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

snapshot...

parent ebd2a962
No related branches found
No related tags found
No related merge requests found
......@@ -1500,7 +1500,7 @@ def write_icing_file_nc4_viirs(clvrx_str_time, output_dir, preds_dct, probs_dct,
rootgrp.close()
def write_cld_prods_file_nc4(clvrx_str_time, outfile_name, cloud_fraction, cloud_frac_opd,
def write_cld_prods_file_nc4(clvrx_str_time, outfile_name, cloud_fraction, cloud_frac_opd_1, cloud_frac_opd_2,
x, y, elems, lines, satellite='GOES16', domain='CONUS',
has_time=False):
......@@ -1534,13 +1534,23 @@ def write_cld_prods_file_nc4(clvrx_str_time, outfile_name, cloud_fraction, cloud
cloud_fraction = cloud_fraction.reshape((1, y.shape[0], x.shape[0]))
cld_frac_ds[:, ] = cloud_fraction
cld_frac_opd_ds = rootgrp.createVariable('cldy_fraction_opd', 'f4', var_dim_list)
cld_frac_opd_ds.setncattr('coordinates', geo_coords)
cld_frac_opd_ds.setncattr('grid_mapping', 'Projection')
cld_frac_opd_ds.setncattr('missing', -1.0)
cld_frac_opd_ds_1 = rootgrp.createVariable('cldy_fraction_opd_1', 'f4', var_dim_list)
cld_frac_opd_ds_1.setncattr('long_name', 'FCNN inferred fractional OPD')
cld_frac_opd_ds_1.setncattr('coordinates', geo_coords)
cld_frac_opd_ds_1.setncattr('grid_mapping', 'Projection')
cld_frac_opd_ds_1.setncattr('missing', -1.0)
if has_time:
cloud_frac_opd = cloud_frac_opd.reshape((1, y.shape[0], x.shape[0]))
cld_frac_opd_ds[:, ] = cloud_frac_opd
cloud_frac_opd_1 = cloud_frac_opd_1.reshape((1, y.shape[0], x.shape[0]))
cld_frac_opd_ds_1[:, ] = cloud_frac_opd_1
cld_frac_opd_ds_2 = rootgrp.createVariable('cldy_fraction_opd_2', 'f4', var_dim_list)
cld_frac_opd_ds_2.setncattr('long_name', '2km OPD / cloud_fraction')
cld_frac_opd_ds_2.setncattr('coordinates', geo_coords)
cld_frac_opd_ds_2.setncattr('grid_mapping', 'Projection')
cld_frac_opd_ds_2.setncattr('missing', -1.0)
if has_time:
cloud_frac_opd_2 = cloud_frac_opd_2.reshape((1, y.shape[0], x.shape[0]))
cld_frac_opd_ds_2[:, ] = cloud_frac_opd_2
cf_nav_dct = get_cf_nav_parameters(satellite, domain)
......
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