Commit f90adbfe authored by Modellers Operational's avatar Modellers Operational

Add the ncopts to reduce filesize and the fill value for h

parent 8c64f345
......@@ -89,7 +89,7 @@ if rank == 0:
all_attributes = {'lon':{'standard_name':'longitude', 'units':'degrees_east', 'long_name':'longitude'},
'lat':{'standard_name':'latitude', 'units':'degrees_north', 'long_name':'latitude'},
'depth':{'standard_name':'depth', 'units':'m', 'long_name':'depth, measured downwards from free surface', 'axis':'Z', 'positive':'down'},
'h':{'standard_name':'h', 'units':'m', 'long_name':'model bathymetry depth, measured downwards from geoid', 'axis':'Z', 'positive':'down'},
'h':{'standard_name':'h', 'units':'m', 'long_name':'model bathymetry depth, measured downwards from geoid', 'axis':'Z', 'positive':'down', 'missing_value':-32768},
'temp':{'standard_name':'sea_water_potential_temperature','units':'C','missing_value':-32768, 'long_name':'Sea Water Potential Temperature'} ,
'salinity':{'standard_name':'sea_water_salinity','units':'psu', 'missing_value':-32768, 'long_name':'Sea Water Salinity'},
'u':{'standard_name':'eastward_sea_water_velocity','units':'m s-1', 'missing_value':-32768, 'long_name':'Eastward Current Velocity'},
......@@ -107,7 +107,10 @@ if rank == 0:
for this_val in collected_interp_data.values():
np.ma.set_fill_value(this_val, -32768)
ncopts = {}
ncopts = {'zlib':True, 'complevel':7, 'least_significant_digit':4}
h = np.ma.masked_invalid(h)
np.ma.set_fill_value(h, -32768)
#for this_var, this_mode in varlist.items():
# this_output_file_name = 'output_{}.nc'.format(this_var)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment