Changeset 564 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Jul 6, 2015, 12:41:33 PM (10 years ago)
Author:
lfita
Message:

Adding `TStd', dew-point temperature from TS variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/validation_sim.py

    r529 r564  
    829829        'WRFT': CF-time from WRF variables
    830830        'WRFt': temperature from WRF variables
     831        'TStd': dew-point temperature from TS variables
    831832        'WRFtd': dew-point temperature from WRF variables
    832833        'WRFwd': wind direction from WRF variables
     
    961962                dimensions = ncobj.variables['T'].dimensions
    962963                shape = ncobj.variables['P'].shape
     964
     965            elif varn == 'TStd':
     966#        print '    ' + main + ': computing dew-point temperature from TS as t and Tetens...'
     967# tacking from: http://en.wikipedia.org/wiki/Dew_point
     968                p=ncobj.variables['p'][:]
     969
     970                temp = ncobj.variables['t'][:]
     971
     972                qv = ncobj.variables['q'][:]
     973
     974                tk = temp
     975                data1 = 10.*0.6112*np.exp(17.67*(tk-273.16)/(tk-29.65))
     976                data2 = 0.622*data1/(0.01*p-(1.-0.622)*data1)
     977
     978                rh = qv/data2
     979               
     980                pa = rh * data1/100.
     981                varNOcheckv = 257.44*np.log(pa/6.1121)/(18.678-np.log(pa/6.1121))
     982
     983                dimensions = ncobj.variables['t'].dimensions
     984                shape = ncobj.variables['t'].shape
    963985
    964986            elif varn == 'WRFtd':
     
    14311453  "'WRFp': pressure from WRF variables; " +                                          \
    14321454  "'WRFrh': relative humidty fom WRF variables; " +                                  \
     1455  "'TSrhs': surface relative humidity from TS variables; " +                         \
    14331456  "'WRFrhs': surface relative humidity from WRF variables; " +                       \
    14341457  "'WRFT': CF-time from WRF variables; " +                                           \
    14351458  "'WRFt': temperature from WRF variables; " +                                       \
     1459  "'TStd': dew-point temperature from TS variables; " +                              \
    14361460  "'WRFtd': dew-point temperature from WRF variables; " +                            \
    14371461  "'WRFwd': wind direction from WRF variables; " +                                   \
     1462  "'TSwds': surface wind direction from TS variables; " +                            \
    14381463  "'WRFwds': surface wind direction from WRF variables; " +                          \
    14391464  "'WRFws': wind speed from WRF variables; " +                                       \
     1465  "'TSwss': surface wind speed from TS variables; " +                                \
    14401466  "'WRFwss': surface wind speed from WRF variables; " +                              \
    14411467  "'WRFz': height from WRF variables"
Note: See TracChangeset for help on using the changeset viewer.