Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
added humidity or avg rhmin and rhmax for new onhm
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcd-mscb committed Jul 21, 2020
1 parent adf8ff7 commit d4f4891
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gridmetetl/etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,19 @@ def getxy(pt):

elif var == 'srad':
srad = ncfile.createVariable('srad', dtype(float32).char, ('time', 'hruid'))
srad.long_name = 'surface_downwelling_shortwave_flux_in_air '
srad.long_name = 'surface_downwelling_shortwave_flux_in_air'
srad.units = 'W m-2'
srad.standard_name = 'srad '
srad.standard_name = 'srad'
srad.fill_value = default_fillvals['f8']
srad[:, :] = self.np_srad[:, :]

hum = ncfile.createVariable('humidity', dtype(float32).char, ('time', 'hruid'))
hum.long_name = 'Daily mean relative humidity'
hum.units = 'percent'
hum.standard_name = 'rhavg'
hum.fill_value = default_fillvals['f8']
hum[:, :] = (self.np_rhmax[:, :] + self.np_rhmin[:, :])/2.0

ncfile.close()
print("dataset is closed", flush=True)

Expand Down

0 comments on commit d4f4891

Please sign in to comment.