Skip to content
Snippets Groups Projects
Commit 9906a65c authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 312c506f
Branches
No related tags found
No related merge requests found
import os import os
import h5py
import numpy as np import numpy as np
import xarray as xr import xarray as xr
from netCDF4 import Dataset from netCDF4 import Dataset
...@@ -297,3 +299,31 @@ def run_caliop_clavrx_amv_match(output_path, path_to_caliop_clavrx, path_to_amvs ...@@ -297,3 +299,31 @@ def run_caliop_clavrx_amv_match(output_path, path_to_caliop_clavrx, path_to_amvs
create_file(match_dict, output_path, file, caliop_clavrx_params, amv_params, amv_filenames) create_file(match_dict, output_path, file, caliop_clavrx_params, amv_params, amv_filenames)
print('Done processing: ', file) print('Done processing: ', file)
def analyze(filename):
h5f = h5py.File(filename, 'r')
cc_ctt = h5f['closest_calipso_top_temperature'][:]
cc_ctt = np.where(cc_ctt == -9999.0, np.nan, cc_ctt)
cc_ctt += 273.0
cc_ctp = h5f['closest_calipso_top_pressure'][:]
cc_ctp = np.where(cc_ctp == -9999.0, np.nan, cc_ctp)
lats = h5f['caliop_latitude'][:]
lons = h5f['caliop_longitude'][:]
acha_ctp = h5f['cld_press_acha'][:]
acha_ctp = np.where(acha_ctp == -999.0, np.nan, acha_ctp)
amv_press = h5f['pressure'][:, 0:3]
amv_press = np.where(amv_press == -999.0, np.nan, amv_press)
amv_press_avg = np.nanmean(amv_press, axis=1)
return cc_ctp, acha_ctp, amv_press_avg, lats
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment