Changeset 1716 in lmdz_wrf


Ignore:
Timestamp:
Dec 13, 2017, 10:39:05 PM (7 years ago)
Author:
lfita
Message:

Fixing variable issues from 'var_hur'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diag_tools.py

    r1715 r1716  
    3636# var_cllmh: Fcuntion to compute cllmh on a 1D column
    3737# var_clt: Function to compute the total cloud fraction following 'newmicro.F90' from LMDZ using 1D vertical column values
    38 # var_rh: Function to compute relative humidity following 'Tetens' equation (T,P) ...'
     38# var_hur: Function to compute relative humidity following 'August - Roche - Magnus' formula
    3939# var_mslp: Fcuntion to compute mean sea-level pressure
    4040# var_td: Function to compute dew-point air temperature from temperature and pressure values
     
    12671267####### Variables (as they arrive without dimensions staff)
    12681268
    1269 def var_rh(p, t, q):
    1270     """ Function to compute relative humidity following 'Tetens' equation (T,P) ...'
     1269def var_hur(p, t, q):
     1270    """ Function to compute relative humidity following 'August - Roche - Magnus' formula
    12711271      [t]= temperature (assuming [[t],z,y,x] in [K])
    12721272      [p] = pressure field (assuming in [Pa])
     
    12761276    0.250250256174
    12771277    """
    1278     fname = 'var_rh'
     1278    fname = 'var_hur'
    12791279
    12801280    # Enthalpy of vaporization [Jkg-1]
     
    12931293    ws = 0.622*es/(0.01*p-es)
    12941294
    1295     rh = q/(ws*1000.)
    1296 
    1297     return rh
     1295    hur = q/(ws*1000.)
     1296
     1297    return hur
    12981298
    12991299def var_td(t, p, qv):
     
    13911391                p = gen.fill_Narray(p, ta*0., filldim=[0,2,3])
    13921392
    1393             self.values = var_rh(ta, p, hus)
     1393            self.values = var_hur(ta, p, hus)
    13941394            self.dims = [dictdims['time'], dictdims['plev'], dictdims['lat'],        \
    13951395              dictdims['lon']]
Note: See TracChangeset for help on using the changeset viewer.