Changeset 1829 in lmdz_wrf for trunk/tools/nc_var_tools.py


Ignore:
Timestamp:
Mar 20, 2018, 6:32:25 PM (7 years ago)
Author:
lfita
Message:

Adding `WRFhus' in 'pinterp'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r1828 r1829  
    1843918439                newvarattr['long_name'] = varattrs[4].replace('|',' ')
    1844018440                newvarattr['units'] = varattrs[5]
    18441             elif vn == 'WRFrh':
    18442                 # relative humidity
    18443                 ovar1 = 10.*0.6112*np.exp(17.67*(temp-273.16)/(temp-29.65))
    18444                 ovar2 = 0.622*ovar1/(0.01*pres-(1.-0.622)*ovar1)
    18445                 varin = 100.*qv/ovar2
     18441            elif vn == 'WRFhus':
     18442                # specific humidity
     18443                varin = qv/(1.+qv)
    1844618444                isgeop = False
    18447                 varattrs = gen.variables_values('WRFrh')
     18445                varattrs = gen.variables_values('WRFhus')
    1844818446                CFvn = varattrs[0]
    1844918447                newvarattr['standard_name'] = varattrs[1]
Note: See TracChangeset for help on using the changeset viewer.