Changeset 1255


Ignore:
Timestamp:
May 12, 2014, 10:59:05 AM (11 years ago)
Author:
aslmd
Message:

LMDZ.GENERIC: unwanted changes sent in previous commit. corrected.

Location:
trunk/LMDZ.GENERIC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/watercommon_h.F90

    r1254 r1255  
    4949! JL12 variables for tetens formula
    5050         real,parameter :: Pref_solid_liquid=611.14
    51          real,parameter :: Trefvap=35.86
    52          real,parameter :: Trefsub=7.66
     51         real,parameter :: Trefvaporization=35.86
     52         real,parameter :: Trefsublimation=7.66
    5353         real,parameter :: Tmin=8.
    54          real,parameter :: r3vap=17.269
    55          real,parameter :: r3sub=21.875
     54         real,parameter :: r3vaporization=17.269
     55         real,parameter :: r3sublimation=21.875
    5656
    5757! checked vs. old watersat data 14/05/2012 by JL.
    5858
    5959         if (T.gt.T_h2O_ice_liq) then
    60             psat = Pref_solid_liquid*Exp(r3vap*(T-T_h2O_ice_liq)/(T-Trefvap)) ! liquid / vapour
    61          else if (T.lt.Tmin) then
    62             print*, "careful, T<Tmin in psat water"
    63             !  psat = Pref_solid_liquid*Exp(r3sub*(Tmin-T_h2O_ice_liq)/(Tmin-Trefsub)) ! min psat 
    64             ! Ehouarn: gfortran says: Error: Result of EXP underflows its kind,
    65             !          so set psat to the smallest possible value instead
     60            psat = Pref_solid_liquid*Exp(r3vaporization*(T-T_h2O_ice_liq)/(T-Trefvaporization)) ! liquid / vapour
     61         else if (T.lt.Tmin) then
     62            print*, "careful, T<Tmin in psat water"
     63          !  psat = Pref_solid_liquid*Exp(r3sublimation*(Tmin-T_h2O_ice_liq)/(Tmin-Trefsublimation)) ! min psat 
     64         ! Ehouarn: gfortran says: Error: Result of EXP underflows its kind,
     65         !          so set psat to the smallest possible value instead
    6666            psat=tiny(psat)
    6767         else                 
    68             psat = Pref_solid_liquid*Exp(r3sub*(T-T_h2O_ice_liq)/(T-Trefsub)) ! solid / vapour
     68            psat = Pref_solid_liquid*Exp(r3sublimation*(T-T_h2O_ice_liq)/(T-Trefsublimation)) ! solid / vapour
    6969         endif
    7070         if(psat.gt.p) then
     
    105105! JL12 variables for tetens formula
    106106         real,parameter :: Pref_solid_liquid=611.14
    107          real,parameter :: Trefvap=35.86
     107         real,parameter :: Trefvaporization=35.86
    108108         real,parameter :: Tmin=8.
    109          real,parameter :: Trefsub=7.66
    110          real,parameter :: r3vap=17.269
    111          real,parameter :: r3sub=21.875
     109         real,parameter :: Trefsublimation=7.66
     110         real,parameter :: r3vaporization=17.269
     111         real,parameter :: r3sublimation=21.875
    112112
    113113         real :: dummy
    114114
    115115         if (psat.gt.p) then
    116             dqsat=0.
    117             return
    118         endif
     116            dqsat=0.
     117            return
     118        endif
    119119
    120120         if (T.gt.T_h2O_ice_liq) then
    121             dummy = r3vap*(T_h2O_ice_liq-Trefvap)/(T-Trefvap)**2  ! liquid / vapour
    122          else if (T.lt.Tmin) then
    123             print*, "careful, T<Tmin in Lcp psat water"
    124             dummy = r3sub*(T_h2O_ice_liq-Trefsub)/(Tmin-Trefsub)**2  ! solid / vapour
     121            dummy = r3vaporization*(T_h2O_ice_liq-Trefvaporization)/(T-Trefvaporization)**2  ! liquid / vapour
     122         else if (T.lt.Tmin) then
     123            print*, "careful, T<Tmin in Lcp psat water"
     124            dummy = r3sublimation*(T_h2O_ice_liq-Trefsublimation)/(Tmin-Trefsublimation)**2  ! solid / vapour
    125125         else               
    126             dummy = r3sub*(T_h2O_ice_liq-Trefsub)/(T-Trefsub)**2  ! solid / vapour
     126            dummy = r3sublimation*(T_h2O_ice_liq-Trefsublimation)/(T-Trefsublimation)**2  ! solid / vapour
    127127         endif
    128128
    129129         dqsat=RLVTT/RCPD*qsat*(p/(p-(1.-epsi)*psat))*dummy
    130         dlnpsat=RLVTT/RCPD*dummy
     130        dlnpsat=RLVTT/RCPD*dummy
    131131         return
    132132      end subroutine Lcpdqsat_water
     
    155155!        input
    156156         real p
    157          real ra
    158157 
    159158!        output
     
    162161! JL12 variables for tetens formula
    163162         real,parameter :: Pref_solid_liquid=611.14
    164          real,parameter :: Trefvap=35.86
    165          real,parameter :: Trefsub=7.66
    166          real,parameter :: r3vap=17.269
    167          real,parameter :: r3sub=21.875
    168 
    169          ra = p/Pref_solid_liquid
     163         real,parameter :: Trefvaporization=35.86
     164         real,parameter :: Trefsublimation=7.66
     165         real,parameter :: r3vaporization=17.269
     166         real,parameter :: r3sublimation=21.875
    170167
    171168         if (p.lt.Pref_solid_liquid) then ! solid / vapour
    172             Tsat =(T_h2O_ice_liq*r3sub-Trefsub*Log(ra))/(r3sub-Log(ra))
     169            Tsat =(T_h2O_ice_liq*r3sublimation- Trefsublimation*Log(p/Pref_solid_liquid))/(r3sublimation-Log(p/Pref_solid_liquid))
    173170         else                 ! liquid / vapour
    174             Tsat =(T_h2O_ice_liq*r3vap-Trefvap*Log(ra))/(r3vap-Log(ra))
     171            Tsat =(T_h2O_ice_liq*r3vaporization- Trefvaporization*Log(p/Pref_solid_liquid))/(r3vaporization-Log(p/Pref_solid_liquid))
    175172         endif
    176173
     
    205202! JL12 variables for tetens formula
    206203         double precision,parameter :: Pref_solid_liquid=611.14d0
    207          double precision,parameter :: Trefvap=35.86D0
    208          double precision,parameter :: Trefsub=7.66d0
     204         double precision,parameter :: Trefvaporization=35.86D0
     205         double precision,parameter :: Trefsublimation=7.66d0
    209206         double precision,parameter :: Tmin=8.d0
    210          double precision,parameter :: r3vap=17.269d0
    211          double precision,parameter :: r3sub=21.875d0
     207         double precision,parameter :: r3vaporization=17.269d0
     208         double precision,parameter :: r3sublimation=21.875d0
    212209
    213210! checked vs. old watersat data 14/05/2012 by JL.
    214211
    215212         if (T.gt.T_h2O_ice_liq) then
    216             psat = Pref_solid_liquid*Exp(r3vap*(T-T_h2O_ice_liq)/(T-Trefvap)) ! liquid / vapour
    217          else if (T.lt.Tmin) then
    218             print*, "careful, T<Tmin in psat water"
     213            psat = Pref_solid_liquid*Exp(r3vaporization*(T-T_h2O_ice_liq)/(T-Trefvaporization)) ! liquid / vapour
     214         else if (T.lt.Tmin) then
     215            print*, "careful, T<Tmin in psat water"
    219216         !   psat = Pref_solid_liquid*Exp(r3sublimation*(Tmin-T_h2O_ice_liq)/(Tmin-Trefsublimation)) ! min psat 
    220217         ! Ehouarn: gfortran says: Error: Result of EXP underflows its kind,
     
    222219            psat=tiny(psat)
    223220         else                 
    224             psat = Pref_solid_liquid*Exp(r3sub*(T-T_h2O_ice_liq)/(T-Trefsub)) ! solid / vapour
     221            psat = Pref_solid_liquid*Exp(r3sublimation*(T-T_h2O_ice_liq)/(T-Trefsublimation)) ! solid / vapour
    225222         endif
    226223         if(psat.gt.p) then
     
    261258! JL12 variables for tetens formula
    262259         double precision,parameter :: Pref_solid_liquid=611.14d0
    263          double precision,parameter :: Trefvap=35.86d0
     260         double precision,parameter :: Trefvaporization=35.86d0
    264261         double precision,parameter :: Tmin=8.d0
    265          double precision,parameter :: Trefsub=7.66d0
    266          double precision,parameter :: r3vap=17.269d0
    267          double precision,parameter :: r3sub=21.875d0
     262         double precision,parameter :: Trefsublimation=7.66d0
     263         double precision,parameter :: r3vaporization=17.269d0
     264         double precision,parameter :: r3sublimation=21.875d0
    268265
    269266         double precision :: dummy
    270267
    271268         if (psat.gt.p) then
    272             dqsat=0.d0
    273             return
    274         endif
     269            dqsat=0.d0
     270            return
     271        endif
    275272
    276273         if (T.gt.T_h2O_ice_liq) then
    277             dummy = r3vap*(T_h2O_ice_liq-Trefvap)/(T-Trefvap)**2  ! liquid / vapour
    278          else if (T.lt.Tmin) then
    279             print*, "careful, T<Tmin in Lcp psat water"
    280             dummy = r3sub*(T_h2O_ice_liq-Trefsub)/(Tmin-Trefsub)**2  ! solid / vapour
     274            dummy = r3vaporization*(T_h2O_ice_liq-Trefvaporization)/(T-Trefvaporization)**2  ! liquid / vapour
     275         else if (T.lt.Tmin) then
     276            print*, "careful, T<Tmin in Lcp psat water"
     277            dummy = r3sublimation*(T_h2O_ice_liq-Trefsublimation)/(Tmin-Trefsublimation)**2  ! solid / vapour
    281278         else               
    282             dummy = r3sub*(T_h2O_ice_liq-Trefsub)/(T-Trefsub)**2  ! solid / vapour
     279            dummy = r3sublimation*(T_h2O_ice_liq-Trefsublimation)/(T-Trefsublimation)**2  ! solid / vapour
    283280         endif
    284281
    285282         dqsat=RLVTT/RCPD*qsat*(p/(p-(1.d0-epsi)*psat))*dummy
    286         dlnpsat=RLVTT/RCPD*dummy
     283        dlnpsat=RLVTT/RCPD*dummy
    287284         return
    288285      end subroutine Lcpdqsat_waterDP
  • trunk/LMDZ.GENERIC/makegcm_gfortran

    r1254 r1255  
    2727#setenv LMDGCM "/san/home/rdword/gcm/LMDZ.GENERIC"
    2828setenv LIBOGCM $LMDGCM/libo
    29 ## NetCDF, on LMD computers:
    30 #setenv NCDFLIB /donnees/emlmd/netcdf64-4.0.1_gfortran/lib
    31 #setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_gfortran/include
    32 setenv NCDFLIB /home/aymeric/Science/MODELES/LMDZ.COMMON/netcdf/gfortran_netcdf-4.0.1/lib
    33 setenv NCDFINC /home/aymeric/Science/MODELES/LMDZ.COMMON/netcdf/gfortran_netcdf-4.0.1/include
     29# NetCDF, on LMD computers:
     30setenv NCDFLIB /donnees/emlmd/netcdf64-4.0.1_gfortran/lib
     31setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_gfortran/include
    3432#####
    3533
Note: See TracChangeset for help on using the changeset viewer.