Changeset 1255
- Timestamp:
- May 12, 2014, 10:59:05 AM (11 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/watercommon_h.F90
r1254 r1255 49 49 ! JL12 variables for tetens formula 50 50 real,parameter :: Pref_solid_liquid=611.14 51 real,parameter :: Trefvap =35.8652 real,parameter :: Trefsub =7.6651 real,parameter :: Trefvaporization=35.86 52 real,parameter :: Trefsublimation=7.66 53 53 real,parameter :: Tmin=8. 54 real,parameter :: r3vap =17.26955 real,parameter :: r3sub =21.87554 real,parameter :: r3vaporization=17.269 55 real,parameter :: r3sublimation=21.875 56 56 57 57 ! checked vs. old watersat data 14/05/2012 by JL. 58 58 59 59 if (T.gt.T_h2O_ice_liq) then 60 psat = Pref_solid_liquid*Exp(r3vap *(T-T_h2O_ice_liq)/(T-Trefvap)) ! liquid / vapour61 else if (T.lt.Tmin) then 62 63 ! psat = Pref_solid_liquid*Exp(r3sub*(Tmin-T_h2O_ice_liq)/(Tmin-Trefsub)) ! min psat64 65 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 66 66 psat=tiny(psat) 67 67 else 68 psat = Pref_solid_liquid*Exp(r3sub *(T-T_h2O_ice_liq)/(T-Trefsub)) ! solid / vapour68 psat = Pref_solid_liquid*Exp(r3sublimation*(T-T_h2O_ice_liq)/(T-Trefsublimation)) ! solid / vapour 69 69 endif 70 70 if(psat.gt.p) then … … 105 105 ! JL12 variables for tetens formula 106 106 real,parameter :: Pref_solid_liquid=611.14 107 real,parameter :: Trefvap =35.86107 real,parameter :: Trefvaporization=35.86 108 108 real,parameter :: Tmin=8. 109 real,parameter :: Trefsub =7.66110 real,parameter :: r3vap =17.269111 real,parameter :: r3sub =21.875109 real,parameter :: Trefsublimation=7.66 110 real,parameter :: r3vaporization=17.269 111 real,parameter :: r3sublimation=21.875 112 112 113 113 real :: dummy 114 114 115 115 if (psat.gt.p) then 116 117 118 116 dqsat=0. 117 return 118 endif 119 119 120 120 if (T.gt.T_h2O_ice_liq) then 121 dummy = r3vap *(T_h2O_ice_liq-Trefvap)/(T-Trefvap)**2 ! liquid / vapour122 else if (T.lt.Tmin) then 123 124 dummy = r3sub *(T_h2O_ice_liq-Trefsub)/(Tmin-Trefsub)**2 ! solid / vapour121 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 125 125 else 126 dummy = r3sub *(T_h2O_ice_liq-Trefsub)/(T-Trefsub)**2 ! solid / vapour126 dummy = r3sublimation*(T_h2O_ice_liq-Trefsublimation)/(T-Trefsublimation)**2 ! solid / vapour 127 127 endif 128 128 129 129 dqsat=RLVTT/RCPD*qsat*(p/(p-(1.-epsi)*psat))*dummy 130 130 dlnpsat=RLVTT/RCPD*dummy 131 131 return 132 132 end subroutine Lcpdqsat_water … … 155 155 ! input 156 156 real p 157 real ra158 157 159 158 ! output … … 162 161 ! JL12 variables for tetens formula 163 162 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 170 167 171 168 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)) 173 170 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)) 175 172 endif 176 173 … … 205 202 ! JL12 variables for tetens formula 206 203 double precision,parameter :: Pref_solid_liquid=611.14d0 207 double precision,parameter :: Trefvap =35.86D0208 double precision,parameter :: Trefsub =7.66d0204 double precision,parameter :: Trefvaporization=35.86D0 205 double precision,parameter :: Trefsublimation=7.66d0 209 206 double precision,parameter :: Tmin=8.d0 210 double precision,parameter :: r3vap =17.269d0211 double precision,parameter :: r3sub =21.875d0207 double precision,parameter :: r3vaporization=17.269d0 208 double precision,parameter :: r3sublimation=21.875d0 212 209 213 210 ! checked vs. old watersat data 14/05/2012 by JL. 214 211 215 212 if (T.gt.T_h2O_ice_liq) then 216 psat = Pref_solid_liquid*Exp(r3vap *(T-T_h2O_ice_liq)/(T-Trefvap)) ! liquid / vapour217 else if (T.lt.Tmin) then 218 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" 219 216 ! psat = Pref_solid_liquid*Exp(r3sublimation*(Tmin-T_h2O_ice_liq)/(Tmin-Trefsublimation)) ! min psat 220 217 ! Ehouarn: gfortran says: Error: Result of EXP underflows its kind, … … 222 219 psat=tiny(psat) 223 220 else 224 psat = Pref_solid_liquid*Exp(r3sub *(T-T_h2O_ice_liq)/(T-Trefsub)) ! solid / vapour221 psat = Pref_solid_liquid*Exp(r3sublimation*(T-T_h2O_ice_liq)/(T-Trefsublimation)) ! solid / vapour 225 222 endif 226 223 if(psat.gt.p) then … … 261 258 ! JL12 variables for tetens formula 262 259 double precision,parameter :: Pref_solid_liquid=611.14d0 263 double precision,parameter :: Trefvap =35.86d0260 double precision,parameter :: Trefvaporization=35.86d0 264 261 double precision,parameter :: Tmin=8.d0 265 double precision,parameter :: Trefsub =7.66d0266 double precision,parameter :: r3vap =17.269d0267 double precision,parameter :: r3sub =21.875d0262 double precision,parameter :: Trefsublimation=7.66d0 263 double precision,parameter :: r3vaporization=17.269d0 264 double precision,parameter :: r3sublimation=21.875d0 268 265 269 266 double precision :: dummy 270 267 271 268 if (psat.gt.p) then 272 273 274 269 dqsat=0.d0 270 return 271 endif 275 272 276 273 if (T.gt.T_h2O_ice_liq) then 277 dummy = r3vap *(T_h2O_ice_liq-Trefvap)/(T-Trefvap)**2 ! liquid / vapour278 else if (T.lt.Tmin) then 279 280 dummy = r3sub *(T_h2O_ice_liq-Trefsub)/(Tmin-Trefsub)**2 ! solid / vapour274 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 281 278 else 282 dummy = r3sub *(T_h2O_ice_liq-Trefsub)/(T-Trefsub)**2 ! solid / vapour279 dummy = r3sublimation*(T_h2O_ice_liq-Trefsublimation)/(T-Trefsublimation)**2 ! solid / vapour 283 280 endif 284 281 285 282 dqsat=RLVTT/RCPD*qsat*(p/(p-(1.d0-epsi)*psat))*dummy 286 283 dlnpsat=RLVTT/RCPD*dummy 287 284 return 288 285 end subroutine Lcpdqsat_waterDP -
trunk/LMDZ.GENERIC/makegcm_gfortran
r1254 r1255 27 27 #setenv LMDGCM "/san/home/rdword/gcm/LMDZ.GENERIC" 28 28 setenv 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: 30 setenv NCDFLIB /donnees/emlmd/netcdf64-4.0.1_gfortran/lib 31 setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_gfortran/include 34 32 ##### 35 33
Note: See TracChangeset
for help on using the changeset viewer.