Changeset 2660 for trunk/LMDZ.MARS/libf/phymars
- Timestamp:
- Apr 7, 2022, 4:33:05 PM (3 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/co2cloud.F90
r2616 r2660 65 65 ! 3.2. No sub-grid cloud representation (CLFvaryingCO2 = False) 66 66 ! 4. Microphysics of CO2 cloud formation 67 ! 4.1. Stepped entry for tendancies: At each micro timestep we add pdt in order to have a stepped entry68 ! 4.2. Effective tracers quantities in the cloud69 ! 4.3. Gravitational sedimentation70 ! 4.3.a. Compute cloud density71 ! 4.3.b. Save actualized tracer values to compute sedimentation tendancies72 ! 4. 3.c. Sedimentation of co2 ice73 ! 4. 3.d. Sedimentation for other tracers74 ! 4. 3.e. Compute tendencies due to the sedimation process75 ! 4.4. Main call to the cloud scheme76 ! 4.5. Updating tendencies after cloud scheme67 ! 4.1. Effective tracers quantities in the cloud 68 ! 4.2. Stepped entry for tendancies: At each micro timestep we add pdt in order to have a stepped entry 69 ! 4.3. Main call to the cloud scheme 70 ! 4.4. Updating tendencies after cloud scheme 71 ! 4.5. Gravitational sedimentation 72 ! 4.5.a. Compute cloud density 73 ! 4.5.b. Save actualized tracer values to compute sedimentation tendancies 74 ! 4.5.c. Sedimentation of co2 ice 75 ! 4.5.d. Sedimentation for other tracers 76 ! 4.5.e. Compute tendencies due to the sedimation process 77 77 ! 5. Compute final tendencies after time loop 78 78 ! 6. Update clouds physical values in the cloud (for output) … … 80 80 ! 6.2. Update rice and rdust 81 81 ! 7. Correction if a lot of subliming CO2 fills the 1st layer 82 ! 8. Compute water cloud sedimentation radius 83 ! 9. CO2 saturated quantities 84 ! 9.1 Compute CO2 saturation in layers 85 ! 9.2 Compute CO2 saturated quantities in layers 86 ! 10. Everything modified by CO2 microphysics must be wrt co2cloudfrac 87 ! 11. Compute opacity at 1 micron 88 ! 12. Write outputs in diagfi.nc 82 ! 8. CO2 saturated quantities 83 ! 8.1 Compute CO2 saturation in layers 84 ! 8.2 Compute CO2 saturated quantities in layers 85 ! 9. Everything modified by CO2 microphysics must be wrt co2cloudfrac 86 ! 10. Compute opacity at 1 micron 87 ! 11. Write outputs in diagfi.nc 89 88 !======================================================================================================================! 90 89 subroutine co2cloud(ngrid, nlay, ptimestep, pplev, pplay, pdpsrf, pzlay, pt, pdt, pq, pdq, pdqcloudco2, pdtcloudco2, & … … 106 105 107 106 use datafile_mod, only: datadir 107 use density_co2_ice_mod, only: density_co2_ice 108 108 109 109 use improvedCO2clouds_mod, only: improvedCO2clouds … … 173 173 174 174 real, parameter :: & 175 mincloud = 0.1, &! Minimum cloud fraction 176 beta = 0.85, &! correction for the shape of the particles (see Murphy et al. JGR 1990 vol.95): 177 ! beta = 1 for spheres 178 ! beta = 0.85 for irregular particles 179 ! beta = 0.5 for disk shaped particles 180 threshold = 1e-30 ! limit value 175 mincloud = 0.1, &! Minimum cloud fraction 176 beta = 0.85, &! correction for the shape of the particles (see Murphy et al. JGR 1990 vol.95): 177 ! beta = 1 for spheres 178 ! beta = 0.85 for irregular particles 179 ! beta = 0.5 for disk shaped particles 180 threshold = 1e-30, & ! limit value considering as zero 181 threshold_2 = 1e-13 ! limit value considering the value is physical (below this value => computer noise for dble) 181 182 182 183 double precision, parameter :: & … … 550 551 ! TODO: Totalcloud frac of the column missing here 551 552 !----------------------------------------------------------------------------------------------------------------------! 552 ! 3.2. No sub-grid cloud representation (CLFvarying = False)553 ! 3.2. No sub-grid cloud representation (CLFvaryingCO2 = False) 553 554 !----------------------------------------------------------------------------------------------------------------------! 554 555 else … … 565 566 pteff(:,:) = pt(:,:) 566 567 !----------------------------------------------------------------------------------------------------------------------! 567 ! 4. 2. Effective tracers quantities in the cloud568 ! 4.1. Effective tracers quantities in the cloud 568 569 !----------------------------------------------------------------------------------------------------------------------! 569 570 if (CLFvaryingCO2) then … … 577 578 do microstep = 1, imicroco2 578 579 !----------------------------------------------------------------------------------------------------------------------! 579 ! 4. 1. Stepped entry for tendancies: At each micro timestep we add pdt in order to have a stepped entry580 ! 4.2. Stepped entry for tendancies: At each micro timestep we add pdt in order to have a stepped entry 580 581 !----------------------------------------------------------------------------------------------------------------------! 581 582 do l = 1, nlay … … 623 624 end do ! nlay 624 625 !----------------------------------------------------------------------------------------------------------------------! 625 ! 4. 4. Main call to the cloud scheme626 ! 4.3. Main call to the cloud scheme 626 627 !----------------------------------------------------------------------------------------------------------------------! 627 628 call improvedco2clouds(ngrid, nlay, microtimestep, pplay, pplev, pteff, sum_subpdt, pqeff, sum_subpdq, & … … 695 696 end do 696 697 !----------------------------------------------------------------------------------------------------------------------! 697 ! 4. 5. Updating tendencies after cloud scheme698 ! 4.4. Updating tendencies after cloud scheme 698 699 !----------------------------------------------------------------------------------------------------------------------! 699 700 do l = 1, nlay … … 741 742 end do ! nlay 742 743 !----------------------------------------------------------------------------------------------------------------------! 743 ! 4. 3. Gravitational sedimentation744 ! 4.5. Gravitational sedimentation 744 745 !----------------------------------------------------------------------------------------------------------------------! 745 746 if (sedimentation) then 746 747 !----------------------------------------------------------------------------------------------------------------------! 747 ! 4. 3.a. Compute cloud density748 ! 4.5.a. Compute cloud density 748 749 !----------------------------------------------------------------------------------------------------------------------! 749 750 do l = 1, nlay … … 768 769 Nccnco2 = Nccnco2 - Nccnco2_h2o 769 770 Qccnco2 = Qccnco2 - Qccnco2_h2o 771 if (Nccnco2 < 0.) then 772 Nccnco2 = threshold 773 Qccnco2 = threshold 774 end if 770 775 end if 771 776 … … 781 786 end do ! nlay 782 787 !----------------------------------------------------------------------------------------------------------------------! 783 ! 4. 3.b. Save actualized tracer values to compute sedimentation tendancies788 ! 4.5.b. Save actualized tracer values to compute sedimentation tendancies 784 789 !----------------------------------------------------------------------------------------------------------------------! 785 790 zqsed0(:,:,igcm_co2_ice) = zqsed(:,:,igcm_co2_ice) … … 798 803 end if 799 804 !----------------------------------------------------------------------------------------------------------------------! 800 ! 4. 3.c. Sedimentation of co2 ice805 ! 4.5.c. Sedimentation of co2 ice 801 806 !----------------------------------------------------------------------------------------------------------------------! 802 807 do ig = 1, ngrid 803 808 do l = 1, nlay 804 rsedcloudco2(ig,l) = max( riceco2(ig,l)*(1.+ sigma_iceco2)*(1.+sigma_iceco2)*(1.+sigma_iceco2), &809 rsedcloudco2(ig,l) = max( riceco2(ig,l)*(1.+nuiceco2_sed)*(1.+nuiceco2_sed)*(1.+nuiceco2_sed), & 805 810 rdust(ig,l) ) 806 811 end do … … 815 820 end do 816 821 !----------------------------------------------------------------------------------------------------------------------! 817 ! 4. 3.d. Sedimentation for other tracers822 ! 4.5.d. Sedimentation for other tracers 818 823 !----------------------------------------------------------------------------------------------------------------------! 819 824 wq(:,:) = 0. … … 881 886 end if 882 887 !----------------------------------------------------------------------------------------------------------------------! 883 ! 4. 3.e. Compute tendencies due to the sedimation process888 ! 4.5.e. Compute tendencies due to the sedimation process 884 889 !----------------------------------------------------------------------------------------------------------------------! 885 890 do l = 1, nlay … … 961 966 do ig = 1, ngrid 962 967 pdtcloudco2(ig,l) = ( sum_subpdt(ig,l)/real(imicroco2) ) - pdt(ig,l) 968 if (pdtcloudco2(ig,l) /= pdtcloudco2(ig,l)) then 969 write(*,*)ig,l,pdtcloudco2(ig,l), pdt(ig,l), sum_subpdt(ig,l) 970 call abort_physic('co2clouds', 'ptdcloudco2 is NaN', 1) 971 end if 963 972 end do 964 973 end do … … 967 976 do l = 1, nlay 968 977 do ig = 1, ngrid 969 pdqcloudco2(ig,l,igcm_co2) = 0. ! here is the trick, this tendency is computed in co2condens _mod4micro978 pdqcloudco2(ig,l,igcm_co2) = 0. ! here is the trick, this tendency is computed in co2condens 970 979 971 980 pdqcloudco2(ig,l,igcm_co2_ice) = ( sum_subpdq(ig,l,igcm_co2_ice) / real(imicroco2) ) - pdq(ig,l,igcm_co2_ice) … … 1020 1029 do ig = 1, ngrid 1021 1030 Niceco2 = pqeff(ig,l,igcm_co2_ice) + ( pdq(ig,l,igcm_co2_ice) + pdqcloudco2(ig,l,igcm_co2_ice) ) * ptimestep 1022 Niceco2 = max 1031 Niceco2 = max(Niceco2, threshold) 1023 1032 1024 1033 ! meteoritic particles are considered like dust, => rho_dust … … 1047 1056 Nccnco2 = Nccnco2 - Nccnco2_h2o 1048 1057 Qccnco2 = Qccnco2 - Qccnco2_h2o 1058 if (Nccnco2 <= 0) then 1059 Nccnco2 = threshold 1060 Qccnco2 = threshold 1061 end if 1049 1062 end if 1063 1050 1064 ! Compute particle size 1051 1065 call updaterice_microco2(dble(Niceco2), dble(Qccnco2), dble(Nccnco2), dble(Qccnco2_h2o), dble(Nccnco2_h2o), myT, & … … 1053 1067 1054 1068 ! Compute opacities 1055 if ( (Niceco2 <= threshold .or. (Nccnco2)*tauscaling(ig) <= 1.) ) then ! Nccnco2 inclut Nccnco2_h2o 1069 if ( (Niceco2 >= threshold_2 .and. (Nccnco2+Nccnco2_h2o)*tauscaling(ig) >= 1.) ) then 1070 n_derf = derf( (rb_cldco2(1)-log(riceco2(ig,l))) *dev2) 1071 Qext1bins2(ig,l) = 0. 1072 do i = 1, nbinco2_cld 1073 n_aer(i) = -0.5 * (Nccnco2+Nccnco2_h2o)*tauscaling(ig) * n_derf 1074 1075 n_derf = derf((rb_cldco2(i+1)-log(riceco2(ig,l))) *dev2) 1076 n_aer(i) = n_aer(i) + (0.5 * (Nccnco2+Nccnco2_h2o)*tauscaling(ig) * n_derf) 1077 1078 Qext1bins2(ig,l) = Qext1bins2(ig,l) + Qext1bins(i) * n_aer(i) 1079 end do 1080 else 1056 1081 riceco2(ig,l) = 0. 1057 1082 Qext1bins2(ig,l) = 0. 1058 else1059 n_derf = derf( (rb_cldco2(1)-log(riceco2(ig,l))) *dev2)1060 Qext1bins2(ig,l) = 0.1061 1062 do i = 1, nbinco2_cld1063 n_aer(i) = -0.5 * (Nccnco2)*tauscaling(ig) * n_derf1064 1065 n_derf = derf((rb_cldco2(i+1)-log(riceco2(ig,l))) *dev2)1066 n_aer(i) = n_aer(i) + (0.5 * (Nccnco2)*tauscaling(ig) * n_derf)1067 1068 Qext1bins2(ig,l) = Qext1bins2(ig,l) + Qext1bins(i) * n_aer(i)1069 end do1070 1083 end if 1071 1084 !----------------------------------------------------------------------------------------------------------------------! … … 1103 1116 end do 1104 1117 !----------------------------------------------------------------------------------------------------------------------! 1105 ! 9. CO2 saturated quantities1106 !----------------------------------------------------------------------------------------------------------------------! 1107 ! 9.1 Compute CO2 saturation in layers1118 ! 8. CO2 saturated quantities 1119 !----------------------------------------------------------------------------------------------------------------------! 1120 ! 8.1 Compute CO2 saturation in layers 1108 1121 !----------------------------------------------------------------------------------------------------------------------! 1109 1122 call co2sat(ngrid*nlay, pteff+(pdt+pdtcloudco2)*ptimestep, zqsatco2) 1110 1123 !----------------------------------------------------------------------------------------------------------------------! 1111 ! 9.2 Compute CO2 saturated quantities in layers1124 ! 8.2 Compute CO2 saturated quantities in layers 1112 1125 !----------------------------------------------------------------------------------------------------------------------! 1113 1126 do l = 1, nlay … … 1118 1131 end do 1119 1132 !----------------------------------------------------------------------------------------------------------------------! 1120 ! 10. Everything modified by CO2 microphysics must be wrt co2cloudfrac1133 ! 9. Everything modified by CO2 microphysics must be wrt co2cloudfrac 1121 1134 !----------------------------------------------------------------------------------------------------------------------! 1122 1135 if (CLFvaryingCO2) then … … 1161 1174 end if ! if CLFvaryingCO2 is true 1162 1175 !----------------------------------------------------------------------------------------------------------------------! 1163 ! 1 1. Compute opacity at 1 micron: Opacity in mesh ig is the sum over l of Qext1bins2. Is this true ?1176 ! 10. Compute opacity at 1 micron: Opacity in mesh ig is the sum over l of Qext1bins2. Is this true ? 1164 1177 !----------------------------------------------------------------------------------------------------------------------! 1165 1178 tau1mic(:)=0. … … 1170 1183 end do 1171 1184 !----------------------------------------------------------------------------------------------------------------------! 1172 ! 1 2. Write outputs in diagfi.nc1185 ! 11. Write outputs in diagfi.nc 1173 1186 !----------------------------------------------------------------------------------------------------------------------! 1174 1187 call WRITEDIAGFI(ngrid, "satuco2", "vap in satu", " ", 3, satuco2) -
trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F
r2617 r2660 335 335 & rdust,zcondicea,zfallice,zdq_scav,pdqsc) 336 336 endif 337 337 call WRITEdiagfi(ngrid,"zfallice", 338 & "", 339 & " ",2,zfallice(ngrid,1)) 338 340 ELSE ! if co2 clouds 339 341 condens_layer(:,:) = 0. … … 350 352 piceco2(ig) = piceco2(ig) + zdqssed_co2(ig)*ptimestep 351 353 ENDDO 354 call WRITEdiagfi(ngrid,"zfallice", 355 & "", 356 & " ",2,zdqssed_co2) ! otherwise we have not 1 day(1proc) = 1 day (24procs) test 352 357 ENDIF ! end of if co2clouds 353 358 … … 359 364 & "", 360 365 & " ",3,condens_layer) 361 362 call WRITEdiagfi(ngrid,"zfallice",363 & "",364 & " ",2,zfallice(ngrid,1))365 366 366 367 367 c ************************* … … 441 441 c """""""""""""""""""""""""""""""""""""""""""""""""""" 442 442 c (including what has just condensed in the atmosphere) 443 if (co2clouds) then 444 IF((piceco2(ig)/ptimestep).LE. 445 & -zcondices(ig))THEN 446 zcondices(ig) = -piceco2(ig)/ptimestep 447 pdtsrfc(ig)=(latcond/pcapcal(ig)) * 448 & (zcondices(ig)+zfallheat) 449 END IF 450 else 443 451 IF((piceco2(ig)/ptimestep+zfallice(ig,1)).LE. 444 452 & -zcondices(ig))THEN 445 453 zcondices(ig) = -piceco2(ig)/ptimestep - zfallice(ig,1) 446 pdtsrfc(ig)=(latcond/pcapcal(ig)) *454 pdtsrfc(ig)=(latcond/pcapcal(ig)) * 447 455 & (zcondices(ig)+zfallheat) 448 456 END IF 457 end if 449 458 450 459 c Changing CO2 ice amount and pressure : -
trunk/LMDZ.MARS/libf/phymars/improvedco2clouds_mod.F90
r2616 r2660 133 133 134 134 real, parameter :: & 135 threshold = 1e-30 ! limit value 136 137 character(len=23), parameter:: & 135 threshold = 1e-30, & ! limit value considering as zero 136 threshold_2 = 1e-13 ! limit value considering the value is physical (below this value => computer noise for dble) 137 138 character(len=50), parameter:: & 138 139 file_meteoritic_flux = 'Meteo_flux_Plane.dat' 139 140 !----------------------------------------------------------------------------------------------------------------------! … … 194 195 pco2, &! Co2 vapor partial pressure (Pa) 195 196 satu, &! Co2 vapor saturation ratio over ice 196 Mo, &! mass of aerosolparticles197 No, &! number of aerosolparticles197 Mo, &! mass of dust particles 198 No, &! number of dust particles 198 199 Rn, &! logarithm of rdust/rice 199 200 Rm, &! Rn * variance of ice and CCN distribution 200 201 n_derf, &! derf( (rb_cldco2(1)+Rn) *dev3) 201 202 m_derf, &! derf( (rb_cldco2(1)+Rm) *dev2) 202 n_aer(nbinco2_cld), &! Radius used by the microphysical scheme (m) 203 m_aer(nbinco2_cld), &! number concentration V-1 of particle/each size bin 204 n_aer_meteor(nbinco2_cld), &! Radius used by the microphysical scheme (m)205 m_aer_meteor(nbinco2_cld), &! number concentration V-1 of particle/each size bin206 n_aer_h2oice(nbinco2_cld), &! mass mixing ratio of particle/each size bin 207 m_aer_h2oice(nbinco2_cld), &! Same - for CO2 nucleation 203 n_aer(nbinco2_cld), &! Radius used by the microphysical scheme (m) for dust 204 m_aer(nbinco2_cld), &! number concentration V-1 of particle/each size bin for dust 205 n_aer_meteor(nbinco2_cld), &! Radius used by the microphysical scheme (m) for meteor 206 m_aer_meteor(nbinco2_cld), &! number concentration V-1 of particle/each size bin for meteor 207 n_aer_h2oice(nbinco2_cld), &! mass mixing ratio of particle/each size bin for h2o ice 208 m_aer_h2oice(nbinco2_cld), &! Same - for CO2 nucleation for h2o ice 208 209 Ic_rice, &! Mass transfer rate CO2 ice crystal 209 210 ratioh2o_ccn, &! 1./(zq(ig,l,igcm_h2o_ice) + zq(ig,l,igcm_ccn_mass)*tauscaling(ig)) … … 211 212 dN, &! number of particle of dust used as ccn 212 213 dM, &! mass of dN 213 dN_meteor, &! number of particle of dustused as ccn214 dM_meteor, &! mass of dN214 dN_meteor, &! number of particle of meteoritic particles used as ccn 215 dM_meteor, &! mass of dN_meteor 215 216 dNh2o, &! number of particle of h2o ice used as ccn 216 217 dMh2o, &! mass of dNh2o 217 218 dNN, &! min(dN,zq(ig,l,igcm_dust_number)) 218 219 dMM, &! min(dM,zq(ig,l,igcm_dust_mass)) 219 dNN_meteor, &! number of particle of dust used as ccn220 dMM_meteor, &! mass of dN221 220 dNNh2o, &! min(dNNh2o,zq(ig,l,igcm_ccn_number)) 222 221 dMh2o_ice, &! min(dMh2o*zq(ig,l,igcm_h2o_ice)*ratioh2o_ccn, zq(ig,l,igcm_h2o_ice)) 223 222 dMh2o_ccn, &! min(dMh2o_ccn,zq(ig,l,igcm_ccn_mass)) 224 223 rate(nbinco2_cld), &! nucleation rate 225 rate_meteor(nbinco2_cld), &! nucleation rate224 rate_meteor(nbinco2_cld), &! nucleation rate for meteor 226 225 rateh2o(nbinco2_cld), &! nucleation rate for h2o 227 226 rho_ice_co2T, &! density of co2 ice Temperature-dependent … … 230 229 Proba, &! 1.0 - exp(-1.*microtimestep*rate(i)) 231 230 Probah2o, &! 1.0 - exp(-1.*microtimestep*rateh2o(i)) 232 Proba_meteor, &! 1.0 - exp(-1.*microtimestep*rateh2o(i))231 Proba_meteor, &! 1.0 - exp(-1.*microtimestep*rate_meteor(i)) 233 232 diff_pressure(nlev_meteor), &! abs(pression_meteor(:)-pplev(ig,l)) 234 meteor_ccn(ngrid,nlay,nbinco2_cld) ! 233 meteor_ccn(ngrid,nlay,nbinco2_cld) ! input flux of meteoritc particles 235 234 236 235 logical :: & … … 253 252 if (meteo_flux) then 254 253 ! Check if file exists 255 inquire(file=trim(datadir)//'/'// file_meteoritic_flux, exist=file_ok)254 inquire(file=trim(datadir)//'/'//trim(file_meteoritic_flux), exist=file_ok) 256 255 if (.not. file_ok) then 257 call abort_physic("CO2clouds", 'file '// file_meteoritic_flux//' should be in'//trim(datadir), 1)256 call abort_physic("CO2clouds", 'file '//trim(file_meteoritic_flux)//' should be in'//trim(datadir), 1) 258 257 end if 258 write(*,*)'Meteoritic flux file used: ', trim(file_meteoritic_flux) 259 259 260 260 ! open file 261 open(unit=uMeteor,file=trim(datadir)//'/'// file_meteoritic_flux, FORM='formatted')261 open(unit=uMeteor,file=trim(datadir)//'/'//trim(file_meteoritic_flux), FORM='formatted') 262 262 263 263 !skip 1 line … … 509 509 Nccnco2 = Nccnco2 - Nccnco2_h2o 510 510 Qccnco2 = Qccnco2 - Qccnco2_h2o 511 if (Nccnco2 <= 0.) then 512 Nccnco2 = threshold 513 Qccnco2 = threshold 514 end if 511 515 end if 512 516 … … 550 554 !----------------------------------------------------------------------------------------------------------------------! 551 555 ! On sublime tout 552 if ((zq(ig,l,igcm_co2_ice) < = threshold).or.(zq(ig,l,igcm_ccnco2_number) * tauscaling(ig) < 1.)) then556 if ((zq(ig,l,igcm_co2_ice) < threshold_2).or.(zq(ig,l,igcm_ccnco2_number) * tauscaling(ig) < 1.)) then 553 557 zq(ig,l,igcm_dust_mass) = zq(ig,l,igcm_dust_mass) + zq(ig,l,igcm_ccnco2_mass) 554 558 zq(ig,l,igcm_dust_number) = zq(ig,l,igcm_dust_number) + zq(ig,l,igcm_ccnco2_number) -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r2646 r2660 509 509 REAL co2totA 510 510 REAL co2totB 511 REAL co2conservation 511 512 512 513 c entrainment by mountain top dust flows above sub-grid scale topography … … 2031 2032 zdvc(:,:) = 0. 2032 2033 zdqc(:,:,:) = 0. 2034 zdqsc(:,:) = 0. 2033 2035 CALL co2condens(ngrid,nlayer,nq,ptimestep, 2034 2036 $ capcal,zplay,zplev,tsurf,pt, … … 3976 3978 enddo 3977 3979 endif ! of if (igcm_co2_ice.ne.0) 3978 call WRITEDIAGFI(ngrid,'co2conservation', 3980 co2conservation = (co2totA-co2totB)/co2totA 3981 call WRITEDIAGFI(ngrid, 'co2conservation', 3979 3982 & 'Total CO2 mass conservation in physic', 3980 & ' %',0,[(co2totA-co2totB)/co2totA])3983 & ' ', 0, co2conservation) 3981 3984 ! XIOS outputs 3982 3985 #ifdef CPP_XIOS -
trunk/LMDZ.MARS/libf/phymars/updatereffrad_mod.F
r2628 r2660 90 90 c converted to part kg-1 using a typical atmospheric density. 91 91 92 REAL, PARAMETER :: ccn0 = 1.3E8 92 REAL, PARAMETER :: ccn0 = 1.3E8, threshold = 1e-30 ! limit value 93 93 94 94 c For microphysics only: … … 99 99 100 100 LOGICAL,SAVE :: firstcall=.true. 101 REAL Nccnco2, Qccnco2 101 REAL Nccnco2, Qccnco2, Niceco2 102 102 REAL Nccnco2_h2o, Qccnco2_h2o 103 103 REAL CBRT … … 198 198 DO l=1,nlayer 199 199 DO ig=1,ngrid 200 Nccnco2 = pq(ig,l,igcm_ccnco2_number) 201 Qccnco2 = pq(ig,l,igcm_ccnco2_mass) 200 Niceco2 = max(pq(ig,l,igcm_co2_ice), threshold) 201 Nccnco2 = max(pq(ig,l,igcm_ccnco2_number), 202 & threshold) 203 Qccnco2 = max(pq(ig,l,igcm_ccnco2_mass), 204 & threshold) 202 205 Nccnco2_h2o = 0. 203 206 Qccnco2_h2o = 0. 204 207 if (co2useh2o) then 205 Nccnco2_h2o = pq(ig,l,igcm_ccnco2_h2o_number) 206 Qccnco2_h2o = pq(ig,l,igcm_ccnco2_h2o_mass_ice) 207 & + pq(ig,l,igcm_ccnco2_h2o_mass_ccn) 208 Nccnco2_h2o = max(pq(ig,l,igcm_ccnco2_h2o_number), 209 & threshold) 210 Qccnco2_h2o = max(pq(ig,l,igcm_ccnco2_h2o_mass_ice) 211 & + pq(ig,l,igcm_ccnco2_h2o_mass_ccn), 212 & threshold) 213 208 214 Nccnco2 = Nccnco2 - Nccnco2_h2o 209 215 Qccnco2 = Qccnco2 - Qccnco2_h2o 216 if (Nccnco2 <= 0) then 217 Nccnco2 = threshold 218 Qccnco2 = threshold 219 end if 210 220 end if 211 212 call updaterice_microco2(dble(pq(ig,l,igcm_co2_ice)), 221 call updaterice_microco2(dble(Niceco2), 213 222 & dble(Qccnco2), dble(Nccnco2), 214 223 & dble(Qccnco2_h2o),
Note: See TracChangeset
for help on using the changeset viewer.