Changeset 622 for trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
- Timestamp:
- Apr 16, 2012, 12:22:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.