Changeset 596 for trunk/LMDZ.GENERIC/libf/phystd
- Timestamp:
- Mar 26, 2012, 5:44:40 PM (13 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90
r590 r596 341 341 342 342 do ig=1,ngrid 343 if(tracer)then344 !if(tracer.and.igcm_co2_ice.gt.0)then343 !if(tracer)then 344 if(tracer.and.igcm_co2_ice.gt.0)then 345 345 346 346 if(igcm_co2_ice.lt.1)then -
trunk/LMDZ.GENERIC/libf/phystd/callkeys.h
r590 r596 3 3 ! symbols '&' in columns 73 and 6 4 4 ! 5 COMMON/callkeys/callrad,corrk,calldifv, calladj&5 COMMON/callkeys/callrad,corrk,calldifv,UseTurbDiff,calladj & 6 6 & , co2cond,callsoil & 7 7 & , season,diurnal,tlocked,iradia,lwrite & 8 8 & , iaervar,iddist,topdustref,callstats,calleofdump & 9 9 & , enertest & 10 & , callgasvis & 11 & , Continuum & 10 & , callgasvis,Continuum, graybody & 12 11 & , Nmix_co2, Nmix_h2o & 13 12 & , dusttau & … … 17 16 & , kastprof & 18 17 & , noradsurf & 19 & , graybody &20 18 & , Tstrat & 21 19 & , newtonian & … … 51 49 & , pceil 52 50 53 logical callrad,corrk,calldifv,calladj,co2cond,callsoil & 51 logical callrad,corrk,calldifv,UseTurbDiff & 52 & , calladj,co2cond,callsoil & 54 53 & , season,diurnal,tlocked,lwrite & 55 54 & , callstats,calleofdump & 56 & , callgasvis,Continuum 55 & , callgasvis,Continuum,graybody 57 56 58 57 logical enertest … … 79 78 logical CLFvarying 80 79 logical noradsurf 81 logical graybody82 80 83 81 integer iddist -
trunk/LMDZ.GENERIC/libf/phystd/inifis.F
r590 r596 210 210 write(*,*) " calldifv = ",calldifv 211 211 212 write(*,*) "use turbdiff instead of vdifc ?" 213 UseTurbDiff=.true. ! default value 214 call getin("UseTurbDiff",UseTurbDiff) 215 write(*,*) " UseTurbDiff = ",UseTurbDiff 216 212 217 write(*,*) "call convective adjustment ?" 213 218 calladj=.true. ! default value … … 280 285 write(*,*)" kastprof = ",kastprof 281 286 282 write(*,*)"Uniform absorption coefficient in IR?"287 write(*,*)"Uniform absorption in radiative transfer?" 283 288 graybody=.false. 284 289 call getin("graybody",graybody) -
trunk/LMDZ.GENERIC/libf/phystd/optci.F90
r526 r596 137 137 DCONT = 0.0 ! continuum absorption 138 138 139 if(Continuum.and.(.not.graybody))then 139 140 ! include continua if necessary 140 wn_cont = dble(wnoi(nw)) 141 T_cont = dble(TMID(k)) 142 do igas=1,ngasmx 143 144 if(gfrac(igas).eq.-1)then ! variable 145 p_cont = dble(PMID(k)*scalep*QVAR(k)) ! qvar = mol/mol 146 else 147 p_cont = dble(PMID(k)*scalep*gfrac(igas)*(1.-QVAR(k))) 148 endif 149 150 dtemp=0.0 151 if(gnom(igas).eq.'H2_')then 152 call interpolateH2H2(wn_cont,T_cont,p_cont,dtemp,.false.) 153 elseif(gnom(igas).eq.'H2O'.and.T_cont.gt.200.0)then 154 p_air = dble(PMID(k)*scalep) - p_cont ! note assumes air!! 155 call interpolateH2Ocont(wn_cont,T_cont,p_cont,p_air,dtemp,.false.) 156 157 endif 158 159 DCONT = DCONT + dtemp 160 161 enddo 162 163 164 DCONT = DCONT*dz(k) 165 166 if(.not.Continuum)then 167 DCONT=0.0 141 wn_cont = dble(wnoi(nw)) 142 T_cont = dble(TMID(k)) 143 do igas=1,ngasmx 144 145 if(gfrac(igas).eq.-1)then ! variable 146 p_cont = dble(PMID(k)*scalep*QVAR(k)) ! qvar = mol/mol 147 else 148 p_cont = dble(PMID(k)*scalep*gfrac(igas)*(1.-QVAR(k))) 149 endif 150 151 dtemp=0.0 152 if(gnom(igas).eq.'H2_')then 153 call interpolateH2H2(wn_cont,T_cont,p_cont,dtemp,.false.) 154 elseif(gnom(igas).eq.'H2O'.and.T_cont.gt.200.0)then 155 p_air = dble(PMID(k)*scalep) - p_cont ! note assumes air!! 156 call interpolateH2Ocont(wn_cont,T_cont,p_cont,p_air,dtemp,.false.) 157 endif 158 159 DCONT = DCONT + dtemp 160 enddo 161 162 DCONT = DCONT*dz(k) 168 163 endif 169 164 … … 213 208 214 209 TAUGAS = U(k)*ANS 215 216 if(graybody)then217 TAUGAS = 0.0218 DCONT = U(k)*3.3e-26219 endif220 210 221 211 TAUGSURF(NW,NG) = TAUGSURF(NW,NG) + TAUGAS + DCONT -
trunk/LMDZ.GENERIC/libf/phystd/optcv.F90
r526 r596 132 132 DCONT = 0.0 ! continuum absorption 133 133 134 if(callgasvis.and.Continuum.and.(.not.graybody))then 134 135 ! include continua if necessary 135 wn_cont = dble(wnov(nw)) 136 T_cont = dble(TMID(k)) 137 do igas=1,ngasmx 138 139 if(gfrac(igas).eq.-1)then ! variable 140 p_cont = dble(PMID(k)*scalep*QVAR(K)) ! qvar = mol/mol 141 else 142 p_cont = dble(PMID(k)*scalep*gfrac(igas)*(1.-QVAR(k))) 143 endif 144 145 dtemp=0.0 146 if(gnom(igas).eq.'H2_')then 147 call interpolateH2H2(wn_cont,T_cont,p_cont,dtemp,.false.) 148 elseif(gnom(igas).eq.'H2O'.and.T_cont.gt.200.0)then 149 p_air = dble(PMID(k)*scalep) - p_cont ! note assumes air!! 150 call interpolateH2Ocont(wn_cont,T_cont,p_cont,p_air,dtemp,.false.) 151 endif 152 153 DCONT = DCONT + dtemp 154 155 enddo 156 157 DCONT = DCONT*dz(k) 158 159 if(.not.(callgasvis.and.Continuum))then 160 DCONT=0.0 136 wn_cont = dble(wnov(nw)) 137 T_cont = dble(TMID(k)) 138 do igas=1,ngasmx 139 140 if(gfrac(igas).eq.-1)then ! variable 141 p_cont = dble(PMID(k)*scalep*QVAR(K)) ! qvar = mol/mol 142 else 143 p_cont = dble(PMID(k)*scalep*gfrac(igas)*(1.-QVAR(k))) 144 endif 145 146 dtemp=0.0 147 if(gnom(igas).eq.'H2_')then 148 call interpolateH2H2(wn_cont,T_cont,p_cont,dtemp,.false.) 149 elseif(gnom(igas).eq.'H2O'.and.T_cont.gt.200.0)then 150 p_air = dble(PMID(k)*scalep) - p_cont ! note assumes air!! 151 call interpolateH2Ocont(wn_cont,T_cont,p_cont,p_air,dtemp,.false.) 152 endif 153 154 DCONT = DCONT + dtemp 155 156 enddo 157 158 DCONT = DCONT*dz(k) 161 159 endif 162 160 … … 198 196 199 197 TAUGAS = U(k)*ANS 200 201 if(graybody)then202 TAUGAS = 0.0203 DCONT = 0.0204 endif205 206 198 207 199 -
trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
r594 r596 315 315 real dEtot, dEtots, masse, AtmToSurf_TurbFlux 316 316 real dEtotSW, dEtotsSW, dEtotLW, dEtotsLW 317 real dEzRad (ngridmx,nlayermx),dEzdif(ngridmx,nlayermx)317 real dEzRadsw(ngridmx,nlayermx),dEzRadlw(ngridmx,nlayermx),dEzdif(ngridmx,nlayermx) 318 318 real madjdE(ngridmx), lscaledE(ngridmx) 319 319 !JL12 conservation test for mean flow kinetic energy has been disabled temporarily … … 400 400 logical ice_update 401 401 save ice_update 402 403 !JL12 temporary to test difference in diffusion schemes404 logical UseTurbDiff405 402 406 403 !======================================================================= … … 822 819 dEtotsSW = 0.0 823 820 dEtotsLW = 0.0 821 dEzRadsw(:,:)=0. 822 dEzRadlw(:,:)=0. 824 823 do ig = 1, ngrid 825 824 do l = 1, nlayer … … 827 826 dEtotSW = dEtotSW + cpp*masse*zdtsw(ig,l)*area(ig) 828 827 dEtotLW = dEtotLW + cpp*masse*zdtlw(ig,l)*area(ig) 828 dEzRadsw(ig,l)=cpp*masse*zdtsw(ig,l) 829 dEzRadlw(ig,l)=cpp*masse*zdtlw(ig,l) 829 830 enddo 830 831 dEtotsSW = dEtotsSW + fluxsurf_sw(ig)*(1.-albedo(ig))*area(ig) … … 862 863 863 864 !JL12 the following if test is temporarily there to allow us to compare the old vdifc with turbdiff 864 UseTurbDiff=.true.865 865 if (UseTurbDiff) then 866 866 … … 2008 2008 2009 2009 if(enertest) then 2010 call writediagfi(ngridmx,"dEzdif","atm vdifc energy change","w.m^-2",3,dEzdif) 2010 if (calldifv) call writediagfi(ngridmx,"dEzdif","turbulent diffusion heating (-sensible flux)","w.m^-2",3,dEzdif) 2011 if (corrk) then 2012 call writediagfi(ngridmx,"dEzradsw","radiative heating","w.m^-2",3,dEzradsw) 2013 call writediagfi(ngridmx,"dEzradlw","radiative heating","w.m^-2",3,dEzradlw) 2014 endif 2011 2015 if(watercond) then 2012 2016 call writediagfi(ngrid,"lscaledE","heat from largescale","W m-2",2,lscaledE) -
trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90
r484 r596 12 12 ! ------- 13 13 ! Adapted and generalised from the NASA Ames code by Robin Wordsworth (2009) 14 ! Added double gray case by Jeremy Leconte (2012) 14 15 ! 15 16 ! Summary … … 25 26 use datafile_mod, only: datadir 26 27 use gases_h 28 use ioipsl_getincom 27 29 implicit none 28 30 29 31 #include "callkeys.h" 30 32 #include "comcstfi.h" 31 33 !================================================================== 32 34 … … 44 46 45 47 real*8 x, xi(4), yi(4), ans, p 48 real kappa_IR, kappa_VI 46 49 47 50 integer ngas, igas … … 53 56 file_id='/corrk_data/' // TRIM(corrkdir) // '/Q.dat' 54 57 file_path=TRIM(datadir)//TRIM(file_id) 55 56 58 57 59 ! check that the file exists … … 266 268 !----------------------------------------------------------------------- 267 269 268 269 270 270 !======================================================================= 271 271 ! Get gaseous k-coefficients and interpolate onto finer pressure grid 272 272 273 273 ! VISIBLE 274 if (callgasvis.and. .not.TRIM(corrkdir).eq.'null') then274 if (callgasvis.and.(.not.TRIM(corrkdir).eq.'null').and.(.not.graybody)) then 275 275 file_id='/corrk_data/'//trim(adjustl(banddir))//'/corrk_gcm_VI.dat' 276 276 file_path=TRIM(datadir)//TRIM(file_id) … … 288 288 read(111,*) gasv8 289 289 close(111) 290 290 291 else if (callgasvis.and.graybody) then 292 ! constant absorption coefficient in visible 293 write(*,*)"constant absorption coefficient in visible:" 294 kappa_VI=-100000. 295 call getin("kappa_VI",kappa_VI) 296 write(*,*)" kappa_VI = ",kappa_VI 297 kappa_VI=kappa_VI*1.e4* mugaz * 1.672621e-27 ! conversion from m^2/kg to cm^2/molecule 298 gasv8(:,:,:,:,:)=kappa_VI 291 299 else 292 300 print*,'Visible corrk gaseous absorption is set to zero.' … … 295 303 296 304 ! INFRA-RED 297 if ( .not.TRIM(corrkdir).eq.'null') then305 if ((.not.TRIM(corrkdir).eq.'null').and.(.not.graybody)) then 298 306 file_id='/corrk_data/'//trim(adjustl(banddir))//'/corrk_gcm_IR.dat' 299 307 file_path=TRIM(datadir)//TRIM(file_id) … … 311 319 read(111,*) gasi8 312 320 close(111) 313 314 do nw=1,L_NSPECTI 315 fzeroi(nw) = 0. 316 ! do nt=1,L_NTREF 317 ! do np=1,L_NPREF 318 ! do nh=1,L_REFVAR 319 ! do ng = 1,L_NGAUSS 320 ! if(gasi8(nt,np,nh,nw,ng).lt.1.0e-25)then 321 ! fzeroi(nw)=fzeroi(nw)+1. 322 ! endif 323 ! end do 324 ! end do 325 ! end do 326 ! end do 327 ! fzeroi(nw)=fzeroi(nw)/dble(L_NTREF*L_NPREF*L_REFVAR*L_NGAUSS) 328 end do 329 330 do nw=1,L_NSPECTV 331 fzerov(nw) = 0. 332 ! do nt=1,L_NTREF 333 ! do np=1,L_NPREF 334 ! do nh=1,L_REFVAR 335 ! do ng = 1,L_NGAUSS 336 ! if(gasv8(nt,np,nh,nw,ng).lt.1.0e-25)then 337 ! fzerov(nw)=fzerov(nw)+1. 338 ! endif 339 ! end do 340 ! end do 341 ! end do 342 ! end do 343 ! fzerov(nw)=fzerov(nw)/dble(L_NTREF*L_NPREF*L_REFVAR*L_NGAUSS) 344 end do 345 346 347 do nw=1,L_NSPECTV 348 fzerov(nw) = 0. 349 end do 350 321 322 else if (graybody) then 323 ! constant absorption coefficient in IR 324 write(*,*)"constant absorption coefficient in InfraRed:" 325 kappa_IR=-100000. 326 call getin("kappa_IR",kappa_IR) 327 write(*,*)" kappa_IR = ",kappa_IR 328 kappa_IR=kappa_IR*1.e4* mugaz * 1.672621e-27 ! conversion from m^2/kg to cm^2/molecule 329 gasi8(:,:,:,:,:)=kappa_IR 351 330 else 352 331 print*,'Infrared corrk gaseous absorption is set to zero.' 353 332 gasi8(:,:,:,:,:)=0.0 354 333 endif 334 335 do nw=1,L_NSPECTI 336 fzeroi(nw) = 0. 337 end do 338 339 do nw=1,L_NSPECTV 340 fzerov(nw) = 0. 341 end do 342 355 343 356 344 ! Take log10 of the values - this is what we will interpolate.
Note: See TracChangeset
for help on using the changeset viewer.