Changeset 622
- Timestamp:
- Apr 16, 2012, 12:22:40 PM (13 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r600 r622 652 652 corresponding variable, sigma) should be used. Now done in physics, vdifc and turbdiff. 653 653 654 == 16/04/2012 == JL 655 - Added consistency checks for calculations including water and global1d+diurnal. 656 -
trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90
r600 r622 274 274 call getin("global1d",global1d) 275 275 write(*,*) "global1d = ",global1d 276 ! Test of incompatibility: 277 ! if global1d is true, there should not be any diurnal cycle 278 if (global1d.and.diurnal) then 279 print*,'if global1d is true, diurnal must be set to false' 280 stop 281 endif 282 276 283 if (global1d) then 277 284 PRINT *,'Solar Zenith angle (deg.) ?' -
trunk/LMDZ.GENERIC/libf/phystd/inifis.F
r596 r622 438 438 endif 439 439 440 ! Test of incompatibility:441 442 440 write(*,*) "Gravitationnal sedimentation ?" 443 441 sedimentation=.true. ! default value 444 442 call getin("sedimentation",sedimentation) 445 443 write(*,*) " sedimentation = ",sedimentation 446 447 448 ! Test of incompatibility:449 444 450 445 write(*,*) "Compute water cycle ?" … … 453 448 write(*,*) " water = ",water 454 449 450 ! Test of incompatibility: 451 ! if water is true, there should be at least a tracer 452 if (water.and.(.not.tracer)) then 453 print*,'if water is ON, tracer must be ON too!' 454 stop 455 endif 456 455 457 write(*,*) "Include water condensation ?" 456 458 watercond=.false. ! default value … … 458 460 write(*,*) " watercond = ",watercond 459 461 462 ! Test of incompatibility: 463 ! if watercond is used, then water should be used too 464 if (watercond.and.(.not.water)) then 465 print*,'if watercond is used, water should be used too' 466 stop 467 endif 468 460 469 write(*,*) "Include water precipitation ?" 461 470 waterrain=.false. ! default value … … 497 506 call getin("Tsaldiff",Tsaldiff) 498 507 write(*,*) " Tsaldiff = ",Tsaldiff 499 500 ! Test of incompatibility:501 ! if watercond is used, then water should be used too502 503 if (watercond.and.(.not.watercond)) then504 print*,'if watercond is used, water should be used too'505 stop506 endif507 508 508 509 write(*,*) "Does user want to force cpp and mugaz?" -
trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
r600 r622 316 316 real dEtot, dEtots, masse, AtmToSurf_TurbFlux 317 317 real dEtotSW, dEtotsSW, dEtotLW, dEtotsLW 318 real dEzRadsw(ngridmx,nlayermx),dEzRadlw(ngridmx,nlayermx),dEzdif(ngridmx,nlayermx) 318 real dEzRadsw(ngridmx,nlayermx),dEzRadlw(ngridmx,nlayermx),dEzdiff(ngridmx,nlayermx) 319 real dEdiffs(ngridmx),dEdiff(ngridmx) 319 320 real madjdE(ngridmx), lscaledE(ngridmx) 320 321 !JL12 conservation test for mean flow kinetic energy has been disabled temporarily … … 559 560 560 561 do ig=1,ngrid 561 qsurf_hist(ig,igcm_h2o_vap) = qsurf(ig,igcm_h2o_vap) 562 !already done above (JL12) 563 ! qsurf_hist(ig,igcm_h2o_vap) = qsurf(ig,igcm_h2o_vap) 562 564 if(ice_update)then 563 565 ice_initial(ig)=qsurf(ig,igcm_h2o_ice) … … 877 879 do l=1,nlayer 878 880 do ig=1,ngrid 879 zh(ig,l)=pt(ig,l)/zpopsk(ig,l)880 881 zdh(ig,l)=pdt(ig,l)/zpopsk(ig,l) 881 882 enddo … … 931 932 dEtot=0.0 932 933 dEtots=0.0 933 dEzdif (:,:)=0.934 dEzdiff(:,:)=0. 934 935 AtmToSurf_TurbFlux=0. 935 936 dEdiffs(:)=0. 937 dEdiff(:)=0. 938 936 939 do ig = 1, ngrid 937 940 do l = 1, nlayer 938 941 masse = (pplev(ig,l) - pplev(ig,l+1))/g 939 dEtot = dEtot + cpp*masse*zdtdif(ig,l)*area(ig) 940 dEzdif (ig,l)= cpp*masse*(zdtdif(ig,l)) 941 enddo 942 dEzdif(ig,1)= dEzdif(ig,1)+ sensibFlux(ig)! subtract flux to the ground 943 dEtot = dEtot + sensibFlux(ig)*area(ig)! subtract flux to the ground 944 dEtots = dEtots + capcal(ig)*zdtsdif(ig)*area(ig)-zflubid(ig)*area(ig)-sensibFlux(ig)*area(ig) 942 dEzdiff (ig,l)= cpp*masse*(zdtdif(ig,l)) 943 dEdiff(ig)=dEdiff(ig)+dEzdiff (ig,l) 944 enddo 945 dEzdiff(ig,1)= dEzdiff(ig,1)+ sensibFlux(ig)! subtract flux to the ground 946 dEdiff(ig)=dEdiff(ig)+ sensibFlux(ig)! subtract flux to the ground 947 dEtot = dEtot + dEdiff(ig)*area(ig) 948 dEdiffs(ig)=capcal(ig)*zdtsdif(ig)-zflubid(ig)-sensibFlux(ig) 949 dEtots = dEtots + dEdiffs(ig)*area(ig) 945 950 AtmToSurf_TurbFlux=AtmToSurf_TurbFlux+sensibFlux(ig)*area(ig) 946 951 enddo … … 1342 1347 rainout(ig) = zdqsrain(ig)+zdqssnow(ig) ! diagnostic 1343 1348 enddo 1344 1345 !-------------------------1346 ! test energy conservation1347 if(enertest)then1348 dEtot=0.01349 do ig = 1, ngrid1350 do l = 1, nlayer1351 masse = (pplev(ig,l) - pplev(ig,l+1))/g1352 dEtot = dEtot + cpp*masse*zdtrain(ig,l)*area(ig)1353 enddo1354 enddo1355 dEtot=dEtot/totarea1356 print*,'In rain atmospheric energy change =',dEtot,' W m-2'1357 endif1358 !-------------------------1359 1349 1360 1350 … … 1572 1562 ! content of ocean gridpoints back to zero, in order 1573 1563 ! to avoid rounding errors in vdifc, rain 1574 do ig = 1, ngrid 1575 do iq = 1, nq 1576 if(iq.eq.igcm_h2o_vap .and. rnat(ig).eq.0)then ! if liquid water and terrain = ocean 1577 qsurf_hist(ig,iq) = qsurf(ig,iq) 1578 !qsurf(ig,iq) = qcol(ig,iq) 1579 ! the value of qsurf we choose here makes NO DIFFERENCE TO ANYTHING AT ALL 1580 else 1581 qsurf_hist(ig,iq) = qsurf(ig,iq) 1582 endif 1583 enddo 1584 enddo 1564 qsurf_hist(:,:) = qsurf(:,:) 1585 1565 1586 1566 if(ice_update)then … … 2016 1996 2017 1997 if(enertest) then 2018 if (calldifv) call writediagfi(ngridmx,"dEzdif","turbulent diffusion heating (-sensible flux)","w.m^-2",3,dEzdif) 1998 if (calldifv) then 1999 call writediagfi(ngridmx,"q2","turbulent kinetic energy","J.kg^-1",3,q2) 2000 call writediagfi(ngridmx,"dEzdiff","turbulent diffusion heating (-sensible flux)","w.m^-2",3,dEzdiff) 2001 call writediagfi(ngridmx,"dEdiff","integrated turbulent diffusion heating (-sensible flux)","w.m^-2",2,dEdiff) 2002 call writediagfi(ngridmx,"dEdiffs","In TurbDiff (correc rad+latent heat) surf nrj change","w.m^-2",2,dEdiffs) 2003 call writediagfi(ngridmx,"sensibFlux","sensible heat flux","w.m^-2",2,sensibFlux) 2004 endif 2019 2005 if (corrk) then 2020 2006 call writediagfi(ngridmx,"dEzradsw","radiative heating","w.m^-2",3,dEzradsw) … … 2023 2009 if(watercond) then 2024 2010 call writediagfi(ngrid,"lscaledE","heat from largescale","W m-2",2,lscaledE) 2025 call writediagfi(ngrid,"madjdE","heat from moistadj","W m-2",2,madjdE) 2011 call writediagfi(ngrid,"madjdE","heat from moistadj","W m-2",2,madjdE) 2012 call writediagfi(ngridmx,"RH","relative humidity"," ",3,RH) 2013 call writediagfi(ngridmx,"h2o_max_col","maximum H2O column amount","kg.m^-2",2,H2Omaxcol) 2026 2014 endif 2027 2015 endif … … 2054 2042 'kg m^-2',2,qcol(1,iq) ) 2055 2043 2056 if(water)then2057 call writediagfi(ngridmx,"H2Omaxcol","max. poss. H2O column","kg m^-2",2,H2Omaxcol)2058 endif2059 2060 2044 if(watercond.or.CLFvarying)then 2061 !call writediagfi(ngrid,"CLF","H2O cloud fraction"," ",3,cloudfrac) 2045 ! call writediagfi(ngrid,"rneb_man","H2O cloud fraction (conv)"," ",3,rneb_man) 2046 ! call writediagfi(ngrid,"rneb_lsc","H2O cloud fraction (large scale)"," ",3,rneb_lsc) 2047 ! call writediagfi(ngrid,"CLF","H2O cloud fraction"," ",3,cloudfrac) 2062 2048 call writediagfi(ngrid,"CLFt","H2O column cloud fraction"," ",2,totcloudfrac) 2063 2049 endif -
trunk/LMDZ.GENERIC/libf/phystd/rain.F90
r526 r622 51 51 PARAMETER (seuil_neb=0.001) 52 52 53 ! REAL ct ! Inverse of cloud precipitation time 54 ! PARAMETER (ct=1./1800.) 55 ! PARAMETER (ct=1./1849.479) 56 57 REAL cl ! Precipitation threshold 58 PARAMETER (cl=2.0e-4) 53 REAL,PARAMETER :: cl=2.0e-4 ! Precipitation threshold 54 REAL,PARAMETER :: ct=1./1800. ! Precipitation rate 59 55 60 56 INTEGER ninter … … 62 58 63 59 logical simple ! Use very simple Emanuel scheme? 64 parameter(simple=. false.)60 parameter(simple=.true.) 65 61 66 62 logical evap_prec ! Does the rain evaporate? … … 120 116 PRINT*, 'in rain.F, ninter=', ninter 121 117 PRINT*, 'in rain.F, evap_prec=', evap_prec 122 123 !print*,ptimestep124 !print*,1./ct125 !if(.not.simple)then126 ! IF (ABS(ptimestep-1./ct).GT.0.001) THEN127 ! PRINT*, 'Must talk to Laurent Li!!!'128 ! call abort129 ! ENDIF130 !endif131 118 132 119 firstcall = .false. … … 245 232 zneb(i) = MAX(rneb(i,k), seuil_neb) 246 233 IF ((ql(i,k)/zneb(i)).gt.lconvert)THEN ! precipitate! 247 d_ql(i,k) = -MAX((ql(i,k)-lconvert ),0.0)234 d_ql(i,k) = -MAX((ql(i,k)-lconvert*zneb(i)),0.0) 248 235 zrfl(i) = zrfl(i) - d_ql(i,k)*l2c(i,k)/ptimestep 249 236 ENDIF … … 268 255 DO i = 1, ngridmx 269 256 IF (rneb(i,k).GT.0.0) THEN 270 zchau(i) = ( 1./FLOAT(ninter)) * zoliq(i) &257 zchau(i) = (ct*ptimestep/FLOAT(ninter)) * zoliq(i) & 271 258 * (1.0-EXP(-(zoliq(i)/zneb(i)/cl)**2)) * zfrac(i) 272 ! warning: this may give dodgy results for physics calls .ne. 48 per day...273 259 274 260 ! this is the ONLY place where zneb, ct and cl are used
Note: See TracChangeset
for help on using the changeset viewer.