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

pre-fill with missing

parent d72f4ae4
No related branches found
No related tags found
No related merge requests found
......@@ -2104,33 +2104,42 @@ def create_bestfit_file(filename, match_dct, raob_dct, raob_ts, gfs_at_raob_dct,
prf_dir = rootgrp.createVariable('raob_dir', 'f4', ['time', 'num_raob_profs', 'max_num_raob_levels'])
prf_dir.units = 'degree'
prf_dir[:,] = np.nan
prf_spd = rootgrp.createVariable('raob_spd', 'f4', ['time', 'num_raob_profs', 'max_num_raob_levels'])
prf_spd.units = 'm s-1'
prf_spd[:,] = np.nan
prf_lvl = rootgrp.createVariable('raob_levels', 'f4', ['time', 'num_raob_profs', 'max_num_raob_levels'])
prf_lvl.units = 'hPa'
prf_lvl[:,] = np.nan
# ----- Product variables ----------------
nc4_vars = []
amv_lon = rootgrp.createVariable('amv_lon', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
amv_lon.units = 'degrees_east'
amv_lon[:,] = np.nan
nc4_vars.append(amv_lon)
amv_lat = rootgrp.createVariable('amv_lat', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
amv_lat.units = 'degrees_north'
amv_lat[:,] = np.nan
nc4_vars.append(amv_lat)
amv_elem = rootgrp.createVariable('amv_elem', 'i4', ['time', 'num_raob_profs', 'max_num_amvs'])
amv_elem.long_name = 'FGF x coordinate Full Disk GOES16'
amv_elem[:,] = -9999
nc4_vars.append(amv_elem)
amv_line = rootgrp.createVariable('amv_line', 'i4', ['time', 'num_raob_profs', 'max_num_amvs'])
amv_line.long_name = 'FGF y coordinate Full Disk GOES16'
amv_line[:,] = -9999
nc4_vars.append(amv_line)
dist_to_raob = rootgrp.createVariable('dist_to_raob', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
dist_to_raob.units = 'km'
dist_to_raob[:,] = np.nan
amv_source_index = rootgrp.createVariable('amv_source_index', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
amv_source_index[:,] = -9999
var_s = rg_exmpl.variables
for pidx, param in enumerate(amv_params):
......@@ -2155,16 +2164,19 @@ def create_bestfit_file(filename, match_dct, raob_dct, raob_ts, gfs_at_raob_dct,
var_u.standard_name = 'eastward_wind'
var_u.long_name = 'wind at bestfit level with raob as background profile'
var_u.units = 'm s-1'
var_u[:,] = np.nan
var_v = rootgrp.createVariable('bf_raob_v', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
var_v.standard_name = 'northward_wind'
var_v.long_name = 'wind at bestfit level with raob as background profile'
var_v.units = 'm s-1'
var_v[:,] = np.nan
var_p = rootgrp.createVariable('bf_raob_press', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
var_p.standard_name = 'air_pressure'
var_p.long_name = 'pressure level of bestfit with raob as background profile'
var_p.units = 'hPa'
var_p[:,] = np.nan
var_flg = rootgrp.createVariable('bf_raob_flag', 'i4', ['time', 'num_raob_profs', 'max_num_amvs'])
......@@ -2172,16 +2184,19 @@ def create_bestfit_file(filename, match_dct, raob_dct, raob_ts, gfs_at_raob_dct,
var_u_g.standard_name = 'eastward_wind'
var_u_g.long_name = 'wind at bestfit level with GFS as background profile'
var_u_g.units = 'm s-1'
var_u_g[:,] = np.nan
var_v_g = rootgrp.createVariable('bf_gfs_v', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
var_v_g.standard_name = 'northward_wind'
var_v_g.long_name = 'wind at bestfit level with GFS as background profile'
var_v_g.units = 'm s-1'
var_v_g[:,] = np.nan
var_p_g = rootgrp.createVariable('bf_gfs_press', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
var_p_g.standard_name = 'air_pressure'
var_p_g.long_name = 'pressure level of bestfit with GFS as background profile'
var_p_g.units = 'hPa'
var_p_g[:,] = np.nan
var_flg_g = rootgrp.createVariable('bf_gfs_flag', 'i4', ['time', 'num_raob_profs', 'max_num_amvs'])
......@@ -2189,16 +2204,19 @@ def create_bestfit_file(filename, match_dct, raob_dct, raob_ts, gfs_at_raob_dct,
var_u_cp.standard_name = 'eastward_wind'
var_u_cp.long_name = 'wind at closest raob pressure level to amv within +/- 60mb'
var_u_cp.units = 'm s-1'
var_u_cp[:,] = np.nan
var_v_cp = rootgrp.createVariable('closest_press_v', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
var_v_cp.standard_name = 'northward_wind'
var_v_cp.long_name = 'wind at closest raob pressure level to amv within +/- 60mb'
var_v_cp.units = 'm s-1'
var_v_cp[:,] = np.nan
var_p_cp = rootgrp.createVariable('closest_press', 'f4', ['time', 'num_raob_profs', 'max_num_amvs'])
var_p_cp.standard_name = 'air_pressure'
var_p_cp.long_name = 'closest raob pressure level to amv within +/- 60mb'
var_p_cp.units = 'hPa'
var_p_cp[:,] = np.nan
# Write data to file ---------------------
time[0] = raob_ts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment