Changeset 883 for trunk/LMDZ.MARS/libf
- Timestamp:
- Feb 15, 2013, 2:55:26 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/physiq.F
r835 r883 128 128 #include "tracer.h" 129 129 #include "nlteparams.h" 130 #include "comvert.h" 130 131 131 132 #include "chimiedata.h" … … 306 307 307 308 real co2col(ngridmx) ! CO2 column 308 REAL zplev(ngrid,nlayermx+1),zplay(ngrid,nlayermx) 309 ! pplev and pplay are dynamical inputs and must not be modified in the physics. 310 ! instead, use zplay and zplev : 311 REAL zplev(ngrid,nlayermx+1),zplay(ngrid,nlayermx) 309 312 REAL zstress(ngrid), cd 310 313 real hco2(nqmx),tmean, zlocal(nlayermx) … … 511 514 end if 512 515 516 c Initialize pressure levels 517 c ~~~~~~~~~~~~~~~~~~ 518 zplev(:,:) = pplev(:,:) 519 zplay(:,:) = pplay(:,:) 520 ps(:) = pplev(:,1) 521 522 513 523 c Compute geopotential at interlayers 514 524 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 526 536 DO l=2,nlayer 527 537 DO ig=1,ngrid 528 z1=( pplay(ig,l-1)+pplev(ig,l))/(pplay(ig,l-1)-pplev(ig,l))529 z2=( pplev(ig,l)+pplay(ig,l))/(pplev(ig,l)-pplay(ig,l))538 z1=(zplay(ig,l-1)+zplev(ig,l))/(zplay(ig,l-1)-zplev(ig,l)) 539 z2=(zplev(ig,l)+zplay(ig,l))/(zplev(ig,l)-zplay(ig,l)) 530 540 zzlev(ig,l)=(z1*zzlay(ig,l-1)+z2*zzlay(ig,l))/(z1+z2) 531 541 ENDDO … … 539 549 DO l=1,nlayer 540 550 DO ig=1,ngrid 541 zpopsk(ig,l)=( pplay(ig,l)/pplev(ig,1))**rcp551 zpopsk(ig,l)=(zplay(ig,l)/zplev(ig,1))**rcp 542 552 zh(ig,l)=pt(ig,l)/zpopsk(ig,l) 543 553 ENDDO … … 550 560 551 561 if(photochem.or.callthermos) then 552 call concentrations( pplay,pt,pdt,pq,pdq,ptimestep)562 call concentrations(zplay,pt,pdt,pq,pdq,ptimestep) 553 563 endif 554 564 #endif … … 581 591 IF(callnlte) then 582 592 if(nltemodel.eq.0.or.nltemodel.eq.1) then 583 CALL nltecool(ngrid,nlayer,nq, pplay,pt,pq,zdtnlte)593 CALL nltecool(ngrid,nlayer,nq,zplay,pt,pq,zdtnlte) 584 594 else if(nltemodel.eq.2) then 585 595 co2vmr_gcm(1:ngrid,1:nlayer)= … … 596 606 & mmean(1:ngrid,1:nlayer)/mmol(igcm_o) 597 607 598 CALL nlte_tcool(ngrid,nlayer, pplay*9.869e-6,608 CALL nlte_tcool(ngrid,nlayer,zplay*9.869e-6, 599 609 $ pt,zzlay,co2vmr_gcm, n2vmr_gcm, covmr_gcm, 600 610 $ ovmr_gcm, zdtnlte ) … … 609 619 c Find number of layers for LTE radiation calculations 610 620 IF(MOD(iphysiq*(icount-1),day_step).EQ.0) 611 & CALL nlthermeq(ngrid,nlayer, pplev,pplay)621 & CALL nlthermeq(ngrid,nlayer,zplev,zplay) 612 622 613 623 c Note: Dustopacity.F has been transferred to callradite.F … … 622 632 623 633 CALL callradite(icount,ngrid,nlayer,nq,zday,zls,pq,albedo, 624 $ emis,mu0, pplev,pplay,pt,tsurf,fract,dist_sol,igout,634 $ emis,mu0,zplev,zplay,pt,tsurf,fract,dist_sol,igout, 625 635 $ zdtlw,zdtsw,fluxsurf_lw,fluxsurf_sw,fluxtop_lw,fluxtop_sw, 626 636 $ tauref,tau,aerosol,tauscaling,taucloudtes,rdust,rice, … … 635 645 & " tau(",f4.0," Pa) =",f9.6)') 636 646 & odpref,tauref(igout), 637 & odpref,tau(igout,1)*odpref/ pplev(igout,1)647 & odpref,tau(igout,1)*odpref/zplev(igout,1) 638 648 c --------------------------------------------------------- 639 649 c Call slope parameterization for direct and scattered flux … … 680 690 zdtnirco2(:,:)=0 681 691 if (callnirco2) then 682 call nirco2abs (ngrid,nlayer, pplay,dist_sol,nq,pq,692 call nirco2abs (ngrid,nlayer,zplay,dist_sol,nq,pq, 683 693 . mu0,fract,declin, zdtnirco2) 684 694 endif … … 696 706 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 697 707 IF(callnlte) THEN 698 CALL blendrad(ngrid, nlayer, pplay,708 CALL blendrad(ngrid, nlayer, zplay, 699 709 & zdtsw, zdtlw, zdtnirco2, zdtnlte, dtrad) 700 710 ELSE … … 742 752 743 753 CALL calldrag_noro(ngrid,nlayer,ptimestep, 744 & pplay,pplev,pt,pu,pv,zdtgw,zdugw,zdvgw)754 & zplay,zplev,pt,pu,pv,zdtgw,zdugw,zdvgw) 745 755 746 756 DO l=1,nlayer … … 799 809 IF (tke_heat_flux .ne. 0.) THEN 800 810 zz1(:)=(pt(:,1)+pdt(:,1)*ptimestep)*(r/g)* 801 & (-alog( pplay(:,1)/pplev(:,1)))811 & (-alog(zplay(:,1)/zplev(:,1))) 802 812 pdt(:,1)=pdt(:,1) + (tke_heat_flux/zz1(:))*zpopsk(:,1) 803 813 ENDIF … … 806 816 CALL vdifc(ngrid,nlayer,nq,co2ice,zpopsk, 807 817 $ ptimestep,capcal,lwrite, 808 $ pplay,pplev,zzlay,zzlev,z0,818 $ zplay,zplev,zzlay,zzlev,z0, 809 819 $ pu,pv,zh,pq,tsurf,emis,qsurf, 810 820 $ zdum1,zdum2,zdh,pdq,zflubid, … … 879 889 $ zzlev,zzlay, 880 890 $ ptimestep,pu,pv,pt,pq,pdu,pdv,pdt,pdq,q2, 881 $ pplay,pplev,pphi,zpopsk,891 $ zplay,zplev,pphi,zpopsk, 882 892 $ pdu_th,pdv_th,pdt_th,pdq_th,lmax_th,zmax_th, 883 893 $ dtke_th,zdhdif,hfmax_th,wstar,sensibFlux) … … 931 941 932 942 CALL convadj(ngrid,nlayer,nq,ptimestep, 933 $ pplay,pplev,zpopsk,lmax_th,943 $ zplay,zplev,zpopsk,lmax_th, 934 944 $ pu,pv,zh,pq, 935 945 $ pdu,pdv,zdh,pdq, … … 969 979 co2ice = co2ice * 10000. 970 980 ENDIF 981 982 983 pdpsrf(:) = 0 971 984 972 985 IF (callcond) THEN 973 986 CALL newcondens(ngrid,nlayer,nq,ptimestep, 974 $ capcal, pplay,pplev,tsurf,pt,987 $ capcal,zplay,zplev,tsurf,pt, 975 988 $ pphi,pdt,pdu,pdv,zdtsurf,pu,pv,pq,pdq, 976 989 $ co2ice,albedo,emis, … … 999 1012 ENDIF ! of IF (tracer) 1000 1013 1014 ! update surface pressure 1015 DO ig=1,ngrid 1016 ps(ig) = zplev(ig,1) + pdpsrf(ig)*ptimestep 1017 ENDDO 1018 1019 ! update pressure levels 1020 DO l=1,nlayer 1021 DO ig=1,ngrid 1022 zplay(ig,l) = aps(l) + bps(l)*ps(ig) 1023 zplev(ig,l) = ap(l) + bp(l)*ps(ig) 1024 ENDDO 1025 ENDDO 1026 zplev(:,l) = 0. 1027 1028 ! update layers altitude 1029 DO l=2,nlayer 1030 DO ig=1,ngrid 1031 z1=(zplay(ig,l-1)+zplev(ig,l))/(zplay(ig,l-1)-zplev(ig,l)) 1032 z2=(zplev(ig,l)+zplay(ig,l))/(zplev(ig,l)-zplay(ig,l)) 1033 zzlev(ig,l)=(z1*zzlay(ig,l-1)+z2*zzlay(ig,l))/(z1+z2) 1034 ENDDO 1035 ENDDO 1036 1001 1037 ENDIF ! of IF (callcond) 1038 1039 1002 1040 1003 1041 c----------------------------------------------------------------------- … … 1016 1054 1017 1055 call watercloud(ngrid,nlayer,ptimestep, 1018 & pplev,pplay,pdpsrf,zzlay, pt,pdt,1056 & zplev,zplay,pdpsrf,zzlay, pt,pdt, 1019 1057 & pq,pdq,zdqcloud,zdtcloud, 1020 1058 & nq,tau,tauscaling,rdust,rice,nuice, … … 1037 1075 1038 1076 ! increment dust and ccn masses and numbers 1077 ! We need to check that we have Nccn & Ndust > 0 1078 ! This is due to single precision rounding problems 1039 1079 if (microphys) then 1080 pdq(1:ngrid,1:nlayer,igcm_ccn_mass) = 1081 & pdq(1:ngrid,1:nlayer,igcm_ccn_mass) + 1082 & zdqcloud(1:ngrid,1:nlayer,igcm_ccn_mass) 1083 pdq(1:ngrid,1:nlayer,igcm_ccn_number) = 1084 & pdq(1:ngrid,1:nlayer,igcm_ccn_number) + 1085 & zdqcloud(1:ngrid,1:nlayer,igcm_ccn_number) 1086 where (pq(:,:,igcm_ccn_mass) + 1087 & ptimestep*pdq(:,:,igcm_ccn_mass) < 0.) 1088 pdq(:,:,igcm_ccn_mass) = 1089 & - pq(:,:,igcm_ccn_mass)/ptimestep + 1.e-30 1090 pdq(:,:,igcm_ccn_number) = 1091 & - pq(:,:,igcm_ccn_number)/ptimestep + 1.e-30 1092 end where 1093 where (pq(:,:,igcm_ccn_number) + 1094 & ptimestep*pdq(:,:,igcm_ccn_number) < 0.) 1095 pdq(:,:,igcm_ccn_mass) = 1096 & - pq(:,:,igcm_ccn_mass)/ptimestep + 1.e-30 1097 pdq(:,:,igcm_ccn_number) = 1098 & - pq(:,:,igcm_ccn_number)/ptimestep + 1.e-30 1099 end where 1100 endif 1101 1102 if (scavenging) then 1040 1103 pdq(1:ngrid,1:nlayer,igcm_dust_mass) = 1041 1104 & pdq(1:ngrid,1:nlayer,igcm_dust_mass) + … … 1044 1107 & pdq(1:ngrid,1:nlayer,igcm_dust_number) + 1045 1108 & zdqcloud(1:ngrid,1:nlayer,igcm_dust_number) 1046 pdq(1:ngrid,1:nlayer,igcm_ccn_mass) = 1047 & pdq(1:ngrid,1:nlayer,igcm_ccn_mass) + 1048 & zdqcloud(1:ngrid,1:nlayer,igcm_ccn_mass) 1049 pdq(1:ngrid,1:nlayer,igcm_ccn_number) = 1050 & pdq(1:ngrid,1:nlayer,igcm_ccn_number) + 1051 & zdqcloud(1:ngrid,1:nlayer,igcm_ccn_number) 1052 endif 1053 1054 ! We need to check that we have Nccn & Ndust > 0 1055 ! This is due to single precision rounding problems 1056 if (scavenging) then 1057 1058 where (pq(:,:,igcm_ccn_mass) + 1059 & ptimestep*pdq(:,:,igcm_ccn_mass) < 0.) 1060 pdq(:,:,igcm_ccn_mass) = 1061 & - pq(:,:,igcm_ccn_mass)/ptimestep + 1.e-30 1062 pdq(:,:,igcm_ccn_number) = 1063 & - pq(:,:,igcm_ccn_number)/ptimestep + 1.e-30 1064 end where 1065 where (pq(:,:,igcm_ccn_number) + 1066 & ptimestep*pdq(:,:,igcm_ccn_number) < 0.) 1067 pdq(:,:,igcm_ccn_mass) = 1068 & - pq(:,:,igcm_ccn_mass)/ptimestep + 1.e-30 1069 pdq(:,:,igcm_ccn_number) = 1070 & - pq(:,:,igcm_ccn_number)/ptimestep + 1.e-30 1071 end where 1072 where (pq(:,:,igcm_dust_mass) + 1073 & ptimestep*pdq(:,:,igcm_dust_mass) < 0.) 1074 pdq(:,:,igcm_dust_mass) = 1075 & - pq(:,:,igcm_dust_mass)/ptimestep + 1.e-30 1076 pdq(:,:,igcm_dust_number) = 1077 & - pq(:,:,igcm_dust_number)/ptimestep + 1.e-30 1078 end where 1079 where (pq(:,:,igcm_dust_number) + 1080 & ptimestep*pdq(:,:,igcm_dust_number) < 0.) 1081 pdq(:,:,igcm_dust_mass) = 1082 & - pq(:,:,igcm_dust_mass)/ptimestep + 1.e-30 1083 pdq(:,:,igcm_dust_number) = 1084 & - pq(:,:,igcm_dust_number)/ptimestep + 1.e-30 1085 end where 1086 1087 endif ! of if scavenging 1109 where (pq(:,:,igcm_dust_mass) + 1110 & ptimestep*pdq(:,:,igcm_dust_mass) < 0.) 1111 pdq(:,:,igcm_dust_mass) = 1112 & - pq(:,:,igcm_dust_mass)/ptimestep + 1.e-30 1113 pdq(:,:,igcm_dust_number) = 1114 & - pq(:,:,igcm_dust_number)/ptimestep + 1.e-30 1115 end where 1116 where (pq(:,:,igcm_dust_number) + 1117 & ptimestep*pdq(:,:,igcm_dust_number) < 0.) 1118 pdq(:,:,igcm_dust_mass) = 1119 & - pq(:,:,igcm_dust_mass)/ptimestep + 1.e-30 1120 pdq(:,:,igcm_dust_number) = 1121 & - pq(:,:,igcm_dust_number)/ptimestep + 1.e-30 1122 end where 1123 endif ! of if scavenging 1088 1124 1089 1125 … … 1097 1133 c ---------- 1098 1134 IF(callddevil) then 1099 call dustdevil(ngrid,nlayer,nq, pplev,pu,pv,pt, tsurf,q2,1135 call dustdevil(ngrid,nlayer,nq, zplev,pu,pv,pt, tsurf,q2, 1100 1136 & zdqdev,zdqsdev) 1101 1137 … … 1127 1163 1128 1164 call callsedim(ngrid,nlayer, ptimestep, 1129 & pplev,zzlev, zzlay, pt, rdust, rice,1165 & zplev,zzlev, zzlay, pt, rdust, rice, 1130 1166 & rsedcloud,rhocloud, 1131 1167 & pq, pdq, zdqsed, zdqssed,nq, … … 1162 1198 1163 1199 ! dust and ice surface area 1164 call surfacearea(ngrid, nlayer, ptimestep, pplay, zzlay,1200 call surfacearea(ngrid, nlayer, ptimestep, zplay, zzlay, 1165 1201 $ pt, pq, pdq, nq, 1166 1202 $ rdust, rice, tau, tauscaling, 1167 1203 $ surfdust, surfice) 1168 1204 ! call photochemistry 1169 call calchim(ptimestep, pplay,pplev,pt,pdt,dist_sol,mu0,1205 call calchim(ptimestep,zplay,zplev,pt,pdt,dist_sol,mu0, 1170 1206 $ zzlev,zzlay,zday,pq,pdq,zdqchim,zdqschim, 1171 1207 $ zdqcloud,zdqscloud,tauref,co2ice, … … 1233 1269 1234 1270 if (callthermos) then 1235 call thermosphere( pplev,pplay,dist_sol,1271 call thermosphere(zplev,zplay,dist_sol, 1236 1272 $ mu0,ptimestep,ptime,zday,tsurf,zzlev,zzlay, 1237 1273 & pt,pq,pu,pv,pdt,pdq, … … 1275 1311 if (caps.and.(obliquit.lt.27.)) then 1276 1312 ! NB: Updated surface pressure, at grid point 'ngrid', is 1277 ! ps(ngrid)= pplev(ngrid,1)+pdpsrf(ngrid)*ptimestep1313 ! ps(ngrid)=zplev(ngrid,1)+pdpsrf(ngrid)*ptimestep 1278 1314 tsurf(ngrid)=1./(1./136.27-r/5.9e+5*alog(0.0095* 1279 & ( pplev(ngrid,1)+pdpsrf(ngrid)*ptimestep)))1315 & (zplev(ngrid,1)+pdpsrf(ngrid)*ptimestep))) 1280 1316 endif 1281 1317 #endif … … 1342 1378 zq(ig,l,iq)=pq(ig,l,iq) +pdq(ig,l,iq)*ptimestep 1343 1379 ENDDO 1344 ENDDO1345 ENDDO1346 1347 ! surface pressure1348 DO ig=1,ngrid1349 ps(ig)=pplev(ig,1) + pdpsrf(ig)*ptimestep1350 ENDDO1351 1352 ! pressure1353 DO l=1,nlayer1354 DO ig=1,ngrid1355 zplev(ig,l)=pplev(ig,l)/pplev(ig,1)*ps(ig)1356 zplay(ig,l)=pplay(ig,l)/pplev(ig,1)*ps(ig)1357 1380 ENDDO 1358 1381 ENDDO … … 1413 1436 WRITE(*,'(2f10.5,2f15.5)') 1414 1437 s tsurf(igout),zdtsurf(igout)*ptimestep, 1415 s pplev(igout,1),pdpsrf(igout)*ptimestep1438 s zplev(igout,1),pdpsrf(igout)*ptimestep 1416 1439 WRITE(*,'(a4,a6,5a10)') 'l','u','du','v','dv','T','dT' 1417 1440 WRITE(*,'(i4,6f10.5)') (l, … … 1545 1568 mtot(ig) = mtot(ig) + 1546 1569 & zq(ig,l,igcm_h2o_vap) * 1547 & ( pplev(ig,l) - pplev(ig,l+1)) / g1570 & (zplev(ig,l) - zplev(ig,l+1)) / g 1548 1571 icetot(ig) = icetot(ig) + 1549 1572 & zq(ig,l,igcm_h2o_ice) * 1550 & ( pplev(ig,l) - pplev(ig,l+1)) / g1573 & (zplev(ig,l) - zplev(ig,l+1)) / g 1551 1574 c Computing abs optical depth at 825 cm-1 in each 1552 1575 c layer to simulate NEW TES retrieval … … 1556 1579 opTES(ig,l)= 0.75 * Qabsice * 1557 1580 & zq(ig,l,igcm_h2o_ice) * 1558 & ( pplev(ig,l) - pplev(ig,l+1)) / g1581 & (zplev(ig,l) - zplev(ig,l+1)) / g 1559 1582 & / (rho_ice * rice(ig,l) * (1.+nuice_ref)) 1560 1583 tauTES(ig)=tauTES(ig)+ opTES(ig,l) … … 1563 1586 c if (icetot(ig)*1e3.lt.0.01) rave(ig)=0. 1564 1587 enddo 1565 call watersat(ngridmx*nlayermx,zt, pplay,zqsat)1588 call watersat(ngridmx*nlayermx,zt,zplay,zqsat) 1566 1589 satu(:,:) = zq(:,:,igcm_h2o_vap)/zqsat(:,:) 1567 1590 … … 1574 1597 Nccntot(ig) = Nccntot(ig) + 1575 1598 & zq(ig,l,igcm_ccn_number)*tauscaling(ig) 1576 & *( pplev(ig,l) - pplev(ig,l+1)) / g1599 & *(zplev(ig,l) - zplev(ig,l+1)) / g 1577 1600 Mccntot(ig) = Mccntot(ig) + 1578 1601 & zq(ig,l,igcm_ccn_mass)*tauscaling(ig) 1579 & *( pplev(ig,l) - pplev(ig,l+1)) / g1602 & *(zplev(ig,l) - zplev(ig,l+1)) / g 1580 1603 cccc Column integrated effective ice radius 1581 1604 cccc is weighted by total ice surface area (BETTER than total ice mass) … … 1583 1606 & tauscaling(ig) * 1584 1607 & zq(ig,l,igcm_ccn_number) * 1585 & ( pplev(ig,l) - pplev(ig,l+1)) / g *1608 & (zplev(ig,l) - zplev(ig,l+1)) / g * 1586 1609 & rice(ig,l) * rice(ig,l)* (1.+nuice_ref) 1587 1610 enddo … … 1596 1619 rave(ig) = rave(ig) + 1597 1620 & zq(ig,l,igcm_h2o_ice) * 1598 & ( pplev(ig,l) - pplev(ig,l+1)) / g *1621 & (zplev(ig,l) - zplev(ig,l+1)) / g * 1599 1622 & rice(ig,l) * (1.+nuice_ref) 1600 1623 enddo … … 1641 1664 & "m.s-1",3,pw) 1642 1665 call wstats(ngrid,"rho","Atmospheric density","kg/m3",3,rho) 1643 call wstats(ngrid,"pressure","Pressure","Pa",3, pplay)1666 call wstats(ngrid,"pressure","Pressure","Pa",3,zplay) 1644 1667 call wstats(ngrid,"q2", 1645 1668 & "Boundary layer eddy kinetic energy", … … 1795 1818 do ig=1,ngrid 1796 1819 colden(ig,iq) = colden(ig,iq) + zq(ig,l,iq) 1797 $ *( pplev(ig,l)-pplev(ig,l+1))1820 $ *(zplev(ig,l)-zplev(ig,l+1)) 1798 1821 $ *6.022e22/(mmol(iq)*g) 1799 1822 end do … … 1848 1871 dustot(ig) = dustot(ig) + 1849 1872 & zq(ig,l,igcm_dust_mass) 1850 & * ( pplev(ig,l) - pplev(ig,l+1)) / g1873 & * (zplev(ig,l) - zplev(ig,l+1)) / g 1851 1874 enddo 1852 1875 enddo … … 1945 1968 do ig=1,ngrid 1946 1969 co2col(ig)=co2col(ig)+ 1947 & zq(ig,l,igcm_co2)*( pplev(ig,l)-pplev(ig,l+1))/g1970 & zq(ig,l,igcm_co2)*(zplev(ig,l)-zplev(ig,l+1))/g 1948 1971 enddo 1949 1972 enddo … … 2217 2240 do ig=1,ngrid 2218 2241 co2col(ig)=co2col(ig)+ 2219 & zq(ig,l,1)*( pplev(ig,l)-pplev(ig,l+1))/g2242 & zq(ig,l,1)*(zplev(ig,l)-zplev(ig,l+1))/g 2220 2243 enddo 2221 2244 enddo … … 2285 2308 opTES(1,l)= 0.75 * Qabsice * 2286 2309 & zq(1,l,igcm_h2o_ice) * 2287 & ( pplev(1,l) - pplev(1,l+1)) / g2310 & (zplev(1,l) - zplev(1,l+1)) / g 2288 2311 & / (rho_ice * rice(1,l) * (1.+nuice_ref)) 2289 2312 tauTES=tauTES+ opTES(1,l) … … 2305 2328 do l=1,nlayer 2306 2329 mtot = mtot + zq(1,l,igcm_h2o_vap) 2307 & * ( pplev(1,l) - pplev(1,l+1)) / g2330 & * (zplev(1,l) - zplev(1,l+1)) / g 2308 2331 icetot = icetot + zq(1,l,igcm_h2o_ice) 2309 & * ( pplev(1,l) - pplev(1,l+1)) / g2332 & * (zplev(1,l) - zplev(1,l+1)) / g 2310 2333 end do 2311 2334 h2otot = h2otot+mtot+icetot … … 2329 2352 rave = rave + tauscaling(1) * 2330 2353 & zq(1,l,igcm_ccn_number) * 2331 & ( pplev(1,l) - pplev(1,l+1)) / g *2354 & (zplev(1,l) - zplev(1,l+1)) / g * 2332 2355 & rice(1,l) * rice(1,l)* (1.+nuice_ref) 2333 2356 enddo … … 2335 2358 2336 2359 Nccntot= 0 2337 call watersat(ngridmx*nlayermx,zt, pplay,zqsat)2360 call watersat(ngridmx*nlayermx,zt,zplay,zqsat) 2338 2361 do l=1,nlayermx 2339 2362 Nccntot = Nccntot + 2340 2363 & zq(1,l,igcm_ccn_number)*tauscaling(1) 2341 & *( pplev(1,l) - pplev(1,l+1)) / g2364 & *(zplev(1,l) - zplev(1,l+1)) / g 2342 2365 satu(1,l) = zq(1,l,igcm_h2o_vap)/zqsat(1,l) 2343 2366 satu(1,l) = (max(satu(1,l),float(1))-1) 2344 2367 ! & * zq(1,l,igcm_h2o_vap) * 2345 ! & ( pplev(1,l) - pplev(1,l+1)) / g2368 ! & (zplev(1,l) - zplev(1,l+1)) / g 2346 2369 enddo 2347 2370 call WRITEDIAGFI(ngrid,"satu","vap in satu","kg/kg",1, … … 2364 2387 do l=1,nlayer 2365 2388 rave = rave + zq(1,l,igcm_h2o_ice) 2366 & * ( pplev(1,l) - pplev(1,l+1)) / g2389 & * (zplev(1,l) - zplev(1,l+1)) / g 2367 2390 & * rice(1,l) * (1.+nuice_ref) 2368 2391 enddo … … 2395 2418 2396 2419 2397 zlocal(1)=-log( pplay(1,1)/pplev(1,1))* Rnew(1,1)*zt(1,1)/g2420 zlocal(1)=-log(zplay(1,1)/zplev(1,1))* Rnew(1,1)*zt(1,1)/g 2398 2421 2399 2422 do l=2,nlayer-1 … … 2402 2425 & tmean=(zt(1,l)-zt(1,l-1))/log(zt(1,l)/zt(1,l-1)) 2403 2426 zlocal(l)= zlocal(l-1) 2404 & -log( pplay(1,l)/pplay(1,l-1))*rnew(1,l)*tmean/g2427 & -log(zplay(1,l)/zplay(1,l-1))*rnew(1,l)*tmean/g 2405 2428 enddo 2406 2429 zlocal(nlayer)= zlocal(nlayer-1)- 2407 & log( pplay(1,nlayer)/pplay(1,nlayer-1))*2430 & log(zplay(1,nlayer)/zplay(1,nlayer-1))* 2408 2431 & rnew(1,nlayer)*tmean/g 2409 2432
Note: See TracChangeset
for help on using the changeset viewer.