本文整理匯總了Python中OCO_Matrix.OCO_Matrix.header['Retrieval_Mode']方法的典型用法代碼示例。如果您正苦於以下問題:Python OCO_Matrix.header['Retrieval_Mode']方法的具體用法?Python OCO_Matrix.header['Retrieval_Mode']怎麽用?Python OCO_Matrix.header['Retrieval_Mode']使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OCO_Matrix.OCO_Matrix
的用法示例。
在下文中一共展示了OCO_Matrix.header['Retrieval_Mode']方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: write_aerosol_file
# 需要導入模塊: from OCO_Matrix import OCO_Matrix [as 別名]
# 或者: from OCO_Matrix.OCO_Matrix import header['Retrieval_Mode'] [as 別名]
def write_aerosol_file(sounding_data, out_filename, pressure_in, pressure_out):
aer_names = sounding_data['aerosol_names']
# If there are no aerosols for this sounding then just make an empty list
if aer_names == None:
aer_names = []
num_cols = len(aer_names) + 1
out_aer_data = numpy.zeros((len(pressure_out), num_cols), dtype=float)
out_aer_data[:, 0] = resample_profile(pressure_in, pressure_in, pressure_out, log_data=True, extrapolate=True)
aer_src_data = numpy.zeros((len(pressure_in), len(aer_names)), dtype=float)
for aer_idx in range(len(aer_names)):
curr_aer = sounding_data['aerosol_names'][aer_idx]
for lev_idx in range(len(pressure_in)):
aer_src_data[lev_idx, aer_idx] = abs(sounding_data['aerosol_extinction'][curr_aer][LEV_BEG+lev_idx])
if tuple(pressure_in) == tuple(pressure_out):
aer_dst_data = aer_src_data.transpose()
else:
aer_dst_data = resample_aerosol(pressure_in, aer_src_data, pressure_out, debug=True)
for aer_idx in range(len(aer_names)):
out_aer_data[:, aer_idx+1] = aer_dst_data[aer_idx, :]
out_mat_obj = OCO_Matrix()
out_mat_obj.file_id = 'True aerosol profiles from orbit simulator'
out_mat_obj.data = out_aer_data
out_mat_obj.labels = ['Pressure'] + list(aer_names)
out_mat_obj.header['Retrieval_Mode'] = 'linear'
out_mat_obj.units = ['Pa'] + [ '1/Pa' for x in range(len(aer_names)) ]
out_mat_obj.write(out_filename)