- Timestamp:
- Jun 12, 2020, 8:51:16 AM (4 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2363 r2374 3100 3100 New tool to convert a startarchive from LMDZ (lonlat) into start.nc and startfi.nc adapted to DYNAMICO 3101 3101 Still under development: be careful when using it 3102 3103 == 12/06/2020 == EM 3104 Minor fix to r2362 (addition of CO2 microphysics): make CO2 conservation 3105 tests only if CO2 microphysics is on. -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r2362 r2374 817 817 enddo 818 818 819 ! calculates the amount of co2 at the beginning of physics 820 co2totA = 0. 821 do ig=1,ngrid 822 do l=1,nlayer 823 co2totA = co2totA + (zplev(ig,l)-zplev(ig,l+1))/g* 824 & (pq(ig,l,igcm_co2)+pq(ig,l,igcm_co2_ice) 825 & +(pdq(ig,l,igcm_co2)+pdq(ig,l,igcm_co2_ice))*ptimestep) 819 ! test for co2 conservation with co2 microphysics 820 if (igcm_co2_ice.ne.0) then 821 ! calculates the amount of co2 at the beginning of physics 822 co2totA = 0. 823 do ig=1,ngrid 824 do l=1,nlayer 825 co2totA = co2totA + (zplev(ig,l)-zplev(ig,l+1))/g* 826 & (pq(ig,l,igcm_co2)+pq(ig,l,igcm_co2_ice) 827 & +(pdq(ig,l,igcm_co2)+pdq(ig,l,igcm_co2_ice))*ptimestep) 828 end do 829 co2totA = co2totA + co2ice(ig) 826 830 end do 827 co2totA = co2totA + co2ice(ig) 828 end do 831 endif ! of if (igcm_co2_ice.ne.0) 829 832 c----------------------------------------------------------------------- 830 833 c 2. Compute radiative tendencies : … … 2143 2146 ENDDO 2144 2147 2145 ! Total mass of co2 2146 mtotco2 = 0. 2147 icetotco2 = 0. 2148 vaptotco2 = 0. 2149 do ig=1,ngrid 2150 do l=1,nlayer 2151 vaptotco2 = vaptotco2 + zq(ig,l,igcm_co2) * 2148 ! test for co2 conservation with co2 microphysics 2149 if (igcm_co2_ice.ne.0) then 2150 ! Total mass of co2 2151 mtotco2 = 0. 2152 icetotco2 = 0. 2153 vaptotco2 = 0. 2154 do ig=1,ngrid 2155 do l=1,nlayer 2156 vaptotco2 = vaptotco2 + zq(ig,l,igcm_co2) * 2152 2157 & (zplev(ig,l) - zplev(ig,l+1)) / g 2153 icetotco2 = icetotco2 + zq(ig,l,igcm_co2_ice) *2158 icetotco2 = icetotco2 + zq(ig,l,igcm_co2_ice) * 2154 2159 & (zplev(ig,l) - zplev(ig,l+1)) / g 2160 end do 2161 mtotco2 = mtotco2 + co2ice(ig) 2155 2162 end do 2156 mtotco2 = mtotco2 + co2ice(ig) 2157 end do 2158 mtotco2 = mtotco2 + vaptotco2 + icetotco2 2163 mtotco2 = mtotco2 + vaptotco2 + icetotco2 2164 endif ! of if (igcm_co2_ice.ne.0) 2159 2165 2160 2166 c Compute surface stress : (NB: z0 is a common in surfdat.h) … … 3766 3772 END IF ! if(ngrid.ne.1) 3767 3773 3768 co2totB = 0. ! added by C.M. 3769 do ig=1,ngrid 3770 do l=1,nlayer 3771 co2totB = co2totB + (zplev(ig,l)-zplev(ig,l+1))/g* 3772 & (pq(ig,l,igcm_co2)+pq(ig,l,igcm_co2_ice) 3773 & +(pdq(ig,l,igcm_co2)+pdq(ig,l,igcm_co2_ice))*ptimestep) 3774 ! test for co2 conservation with co2 microphysics 3775 if (igcm_co2_ice.ne.0) then 3776 co2totB = 0. ! added by C.M. 3777 do ig=1,ngrid 3778 do l=1,nlayer 3779 co2totB = co2totB + (zplev(ig,l)-zplev(ig,l+1))/g* 3780 & (pq(ig,l,igcm_co2)+pq(ig,l,igcm_co2_ice) 3781 & +(pdq(ig,l,igcm_co2)+pdq(ig,l,igcm_co2_ice))*ptimestep) 3782 enddo 3783 co2totB = co2totB + co2ice(ig) 3774 3784 enddo 3775 co2totB = co2totB + co2ice(ig) 3776 enddo 3777 3778 call WRITEDIAGFI(ngrid,'co2conservation', 3779 & 'Total CO2 mass conservation in physic', 3780 & '%',0,(co2totA-co2totB)/co2totA) 3781 call test_vmr(pq(:,:,igcm_co2), pdq(:,:,igcm_co2), ptimestep, 3782 & ngrid, nlayer, 'end physiq_mod') 3783 3785 3786 call WRITEDIAGFI(ngrid,'co2conservation', 3787 & 'Total CO2 mass conservation in physic', 3788 & '%',0,(co2totA-co2totB)/co2totA) 3789 call test_vmr(pq(:,:,igcm_co2), pdq(:,:,igcm_co2), ptimestep, 3790 & ngrid, nlayer, 'end physiq_mod') 3791 endif ! of if (igcm_co2_ice.ne.0) 3784 3792 ! XIOS outputs 3785 3793 #ifdef CPP_XIOS
Note: See TracChangeset
for help on using the changeset viewer.