Skip to content
Snippets Groups Projects
Commit 721fed3c authored by kgao's avatar kgao
Browse files

Added valid_min and max attributes

schema contains valid_min and max values
level_b1's nc.py now implements those values into the netCDF header:
parent f7e43751
No related branches found
No related tags found
No related merge requests found
*.csv *.csv
\ No newline at end of file
*.egg-info
build/*
dist/*
*.swp
*.nc
*__pycache__
aosstower/level_b1/monthly/*
...@@ -100,10 +100,15 @@ def createVariables(ncFile, firstStamp, chunksizes, zlib): ...@@ -100,10 +100,15 @@ def createVariables(ncFile, firstStamp, chunksizes, zlib):
variable = ncFile.createVariable(entry, np.float32, variable = ncFile.createVariable(entry, np.float32,
dimensions=('time'), fill_value=float(-999), zlib=zlib, chunksizes=chunksizes) dimensions=('time'), fill_value=float(-999), zlib=zlib, chunksizes=chunksizes)
variable.standard_name = varTup[1] variable.standard_name = varTup[1]
variable.description = varTup[3] variable.description = varTup[3]
variable.units = varTup[4] variable.units = varTup[4]
if(varTup[5] != ''):
variable.valid_min = float(varTup[5])
variable.valid_max = float(varTup[6])
#create global attributes #create global attributes
ncFile.source = 'surface observation' ncFile.source = 'surface observation'
ncFile.conventions = 'ARM-1.2 CF-1.6' ncFile.conventions = 'ARM-1.2 CF-1.6'
......
...@@ -11,7 +11,10 @@ database = dict( ...@@ -11,7 +11,10 @@ database = dict(
'air_temperature', 'air_temperature',
'box_temp', 'box_temp',
'Auxillary Temperature', 'Auxillary Temperature',
'degC'), 'degC',
'',
''
),
box_pressure=Var( box_pressure=Var(
float32, float32,
'air_pressure', 'air_pressure',
...@@ -60,7 +63,10 @@ database = dict( ...@@ -60,7 +63,10 @@ database = dict(
'', '',
'paro_cal_sig', 'paro_cal_sig',
'', '',
''), '',
'',
''
),
box_rh=Var( box_rh=Var(
float32, float32,
'relative_humidity', 'relative_humidity',
......
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