Changeset 3585
- Timestamp:
- Jan 20, 2025, 10:17:54 AM (6 hours ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/aeropacity.F90
r3572 r3585 5 5 contains 6 6 7 Subroutine aeropacity(ngrid,nlayer,nq,pplay,pplev, pt,pq, &8 aerosol,reffrad,nueffrad, QREFvis3d,QREFir3d,tau_col)7 Subroutine aeropacity(ngrid,nlayer,nq,pplay,pplev,zzlev,pt,pq, & 8 dtau_aer,reffrad,nueffrad, QREFvis3d,QREFir3d,tau_col) 9 9 10 10 use radinc_h, only : L_TAUMAX,naerkind 11 11 use aerosol_mod, only: iaero_haze, i_haze 12 USE tracer_h, only: noms,rho_n2,rho_ice,rho_q,mmol 12 USE tracer_h, only: noms,rho_n2,rho_ice,rho_q,mmol,micro_indx 13 13 use comcstfi_mod, only: g, pi, mugaz, avocado 14 14 use geometry_mod, only: latitude 15 use callkeys_mod, only: kastprof 15 use callkeys_mod, only: kastprof, callmufi 16 use mp2m_diagnostics 16 17 implicit none 17 18 … … 28 29 ! update J.-B. Madeleine (2008) 29 30 ! dust removal, simplification by Robin Wordsworth (2009) 30 ! Generic n-layer aerosol - J. Vatant d'Ollone (2020)31 ! Radiative Generic Condensable Species - Lucas Teinturier (2022)32 31 ! 33 32 ! Input … … 44 43 ! Output 45 44 ! ------ 46 ! aerosolAerosol optical depth in layer l, grid point ig45 ! dtau_aer Aerosol optical depth in layer l, grid point ig 47 46 ! tau_col Total column optical depth at grid point ig 48 47 ! … … 54 53 REAL,INTENT(IN) :: pplay(ngrid,nlayer) ! mid-layer pressure (Pa) 55 54 REAL,INTENT(IN) :: pplev(ngrid,nlayer+1) ! inter-layer pressure (Pa) 55 REAL,INTENT(IN) :: zzlev(ngrid,nlayer) ! Altitude at the layer boundaries. 56 56 REAL,INTENT(IN) :: pq(ngrid,nlayer,nq) ! tracers (.../kg_of_air) 57 57 REAL,INTENT(IN) :: pt(ngrid,nlayer) ! mid-layer temperature (K) 58 REAL,INTENT(OUT) :: aerosol(ngrid,nlayer,naerkind) ! aerosol optical depth59 REAL,INTENT(IN) :: reffrad(ngrid,nlayer,naerkind) ! aerosol effective radius60 REAL,INTENT(IN) :: nueffrad(ngrid,nlayer,naerkind) ! aerosol effective variance58 REAL,INTENT(OUT) :: dtau_aer(ngrid,nlayer,naerkind) ! aerosol optical depth 59 REAL,INTENT(IN) :: reffrad(ngrid,nlayer,naerkind) ! aerosol effective radius 60 REAL,INTENT(IN) :: nueffrad(ngrid,nlayer,naerkind) ! aerosol effective variance 61 61 REAL,INTENT(IN) :: QREFvis3d(ngrid,nlayer,naerkind) ! extinction coefficient in the visible 62 62 REAL,INTENT(IN) :: QREFir3d(ngrid,nlayer,naerkind) … … 69 69 real dp_tropo(ngrid) 70 70 real dp_layer(ngrid) 71 72 ! Microphysical tracers 73 real sig 74 real m0as(ngrid,nlayer) 75 real m0af(ngrid,nlayer) 71 76 72 77 INTEGER l,ig,iq,iaer,ia … … 110 115 111 116 if (iaero_haze.ne.0) then 112 iaer=iaero_haze 113 ! 1. Initialization 114 aerosol(1:ngrid,1:nlayer,iaer)=0.0 115 ! 2. Opacity calculation 116 DO ig=1, ngrid 117 DO l=1,nlayer-1 ! to stop the rad tran bug 118 ! if fractal, radius doit etre equivalent sphere radius 119 aerosol0 = & 120 ( 0.75 * QREFvis3d(ig,l,iaer) / & 121 ( rho_q(i_haze) * reffrad(ig,l,iaer) ) ) * & 122 ( pq(ig,l,i_haze) + 1.E-10 ) * & 123 ( pplev(ig,l) - pplev(ig,l+1) ) / g 124 aerosol0 = max(aerosol0,1.e-10) 125 aerosol0 = min(aerosol0,L_TAUMAX) 126 aerosol(ig,l,iaer) = aerosol0 117 if (callmufi) then 118 ! Convert intensive microphysical tracers to extensive [m-2] 119 m0as(:,:) = pq(:,:,micro_indx(1)) * (pplev(:,1:nlayer) - pplev(:,2:nlayer+1)) / g 120 m0af(:,:) = pq(:,:,micro_indx(3)) * (pplev(:,1:nlayer) - pplev(:,2:nlayer+1)) / g 121 122 ! Spherical aerosols 123 sig = 0.2 124 dtau_aer(:,:,1) = m0as(:,:) * QREFvis3d(:,:,1) * pi * mp2m_rc_sph(:,:)**2 * exp(2*sig**2) 125 ! Fractal aerosols 126 sig = 0.35 127 dtau_aer(:,:,2) = m0af(:,:) * QREFvis3d(:,:,2) * pi * mp2m_rc_fra(:,:)**2 * exp(2*sig**2) 128 129 ! write(*,*) 'dtau_as :', MINVAL(dtau_aer(:,:,1)), '-', MAXVAL(dtau_aer(:,:,1)) 130 ! write(*,*) 'dtau_af :', MINVAL(dtau_aer(:,:,2)), '-', MAXVAL(dtau_aer(:,:,2)) 131 132 else 133 do iaer = 1, naerkind 134 ! 1. Initialization 135 dtau_aer(1:ngrid,1:nlayer,iaer)=0.0 136 ! 2. Opacity calculation 137 DO ig = 1, ngrid 138 DO l = 1, nlayer-1 ! to stop the rad tran bug 139 ! If fractal, radius doit etre equivalent sphere radius 140 ! Eq. 2.37 - Madeleine's PhD (2011). 141 aerosol0 = & 142 ( 0.75 * QREFvis3d(ig,l,iaer) / & 143 ( rho_q(i_haze) * reffrad(ig,l,iaer) ) ) * & 144 ( pq(ig,l,i_haze) + 1.E-10 ) * & 145 ( pplev(ig,l) - pplev(ig,l+1) ) / g 146 aerosol0 = max(aerosol0,1.e-10) 147 aerosol0 = min(aerosol0,L_TAUMAX) 148 dtau_aer(ig,l,iaer) = aerosol0 149 ENDDO 127 150 ENDDO 128 ENDDO 129 !QREF est le meme dans toute la colonne par def si size uniforme 130 !print*, 'TB17: QREFvis3d=',QREFvis3d(1,:,1) 131 !print*, 'TB17: rho_q=',rho_q(i_haze) 132 !print*, 'TB17: reffrad=',reffrad(1,:,1) 133 !print*, 'TB17: pq=',pq(1,:,i_haze) 134 !print*, 'TB17: deltap=',pplev(1,1) - pplev(1,nlayer) 135 end if ! if haze aerosols 151 !QREF est le meme dans toute la colonne par def si size uniforme 152 !print*, 'TB17: QREFvis3d=',QREFvis3d(1,:,1) 153 !print*, 'TB17: rho_q=',rho_q(i_haze) 154 !print*, 'TB17: reffrad=',reffrad(1,:,1) 155 !print*, 'TB17: pq=',pq(1,:,i_haze) 156 !print*, 'TB17: deltap=',pplev(1,1) - pplev(1,nlayer) 157 enddo ! end iaer = 1, naerkind 158 endif ! end callmufi 159 endif ! if haze aerosols 136 160 137 161 ! -------------------------------------------------------------------------- … … 142 166 do l=1,nlayer 143 167 do ig=1,ngrid 144 tau_col(ig) = tau_col(ig) + aerosol(ig,l,iaer)168 tau_col(ig) = tau_col(ig) + dtau_aer(ig,l,iaer) 145 169 end do 146 170 end do … … 150 174 do l=1,nlayer 151 175 do iaer = 1, naerkind 152 if( aerosol(ig,l,iaer).gt.1.e3)then153 print*,'WARNING: aerosol=',aerosol(ig,l,iaer)176 if(dtau_aer(ig,l,iaer).gt.1.e3)then 177 print*,'WARNING: dtau_aer=',dtau_aer(ig,l,iaer) 154 178 print*,'at ig=',ig,', l=',l,', iaer=',iaer 155 179 print*,'QREFvis3d=',QREFvis3d(ig,l,iaer) … … 164 188 print*,'WARNING: tau_col=',tau_col(ig) 165 189 print*,'at ig=',ig 166 print*,' aerosol=',aerosol(ig,:,:)190 print*,'dtau_aer=',dtau_aer(ig,:,:) 167 191 print*,'QREFvis3d=',QREFvis3d(ig,:,:) 168 192 print*,'reffrad=',reffrad(ig,:,:) -
trunk/LMDZ.PLUTO/libf/phypluto/aeroptproperties.F90
r3353 r3585 279 279 QREFvis3d(ig,lg,iaer)=QREFvis(iaer,1) 280 280 QREFir3d(ig,lg,iaer)=QREFir(iaer,1) 281 !omegaREFvis3d(ig,lg,iaer)=omegaREFvis(iaer,1)282 !omegaREFir3d(ig,lg,iaer)=omegaREFir(iaer,1)281 !omegaREFvis3d(ig,lg,iaer)=omegaREFvis(iaer,1) 282 !omegaREFir3d(ig,lg,iaer)=omegaREFir(iaer,1) 283 283 ENDDO 284 284 ENDDO 285 286 285 287 286 if (firstcall) then … … 297 296 IF (firstcall) THEN 298 297 299 ! 1.1 Pi! 298 ! 1.1 Pi 299 !------- 300 300 pi = 2. * asin(1.e0) 301 301 302 ! 1.2 Effective radius 303 refftab(1) = refftabmin 302 ! 1.2 Effective radius 303 !--------------------- 304 refftab(1) = refftabmin 304 305 refftab(refftabsize) = refftabmax 305 306 … … 311 312 enddo 312 313 313 ! 1.3 Effective variance 314 ! 1.3 Effective variance 315 !----------------------- 314 316 if(nuefftabsize.eq.1)then ! addded by RDW 315 317 print*,'Warning: no variance range in aeroptproperties' … … 344 346 ENDIF ! of IF (firstcall) 345 347 346 ! 1.4 Radius middle point and range for Gauss integration 348 ! 1.4 Radius middle point and range for Gauss integration 349 !-------------------------------------------------------- 347 350 radiusm=0.5*(radiustab(iaer,idomain,nsize(iaer,idomain)) + radiustab(iaer,idomain,1)) 348 351 radiusr=0.5*(radiustab(iaer,idomain,nsize(iaer,idomain)) - radiustab(iaer,idomain,1)) 349 352 350 ! 1.5 Interpolating data at the Gauss quadrature points: 353 ! 1.5 Interpolating data at the Gauss quadrature points: 354 !------------------------------------------------------- 351 355 DO gausind=1,ngau 352 356 drad=radiusr*radgaus(gausind) … … 829 833 !================================================================== 830 834 831 832 833 835 ENDDO ! idomain 834 836 -
trunk/LMDZ.PLUTO/libf/phypluto/callcorrk.F90
r3572 r3585 7 7 subroutine callcorrk(ngrid,nlayer,pq,nq,qsurf, & 8 8 albedo,albedo_equivalent,emis,mu0,pplev,pplay,pt, & 9 zzlay, tsurf,fract,dist_star,aerosol,muvar,&9 zzlay,zzlev,tsurf,fract,dist_star,dtau_aer,muvar, & 10 10 dtlw,dtsw,fluxsurf_lw, & 11 11 fluxsurf_sw,fluxsurfabs_sw,fluxtop_lw, & … … 36 36 optichaze,haze_radproffix,& 37 37 methane,carbox,cooling,nlte,strobel,& 38 ch4fix,vmrch4_proffix,vmrch4fix 38 ch4fix,vmrch4_proffix,vmrch4fix,& 39 callmufi 39 40 use optcv_mod, only: optcv 40 41 use optci_mod, only: optci … … 44 45 use planetwide_mod, only: planetwide_maxval, planetwide_minval 45 46 use radcommon_h, only: wavev,wavei 47 use mp2m_diagnostics 46 48 implicit none 47 49 … … 81 83 REAL,INTENT(IN) :: pt(ngrid,nlayer) ! Air temperature (K). 82 84 REAL,INTENT(IN) :: zzlay(ngrid,nlayer) ! Mid-layer altitude 85 REAL,INTENT(IN) :: zzlev(ngrid,nlayer) ! Altitude at the layer boundaries. 83 86 REAL,INTENT(IN) :: tsurf(ngrid) ! Surface temperature (K). 84 87 REAL,INTENT(IN) :: fract(ngrid) ! Fraction of day. … … 89 92 90 93 ! OUTPUT 91 REAL,INTENT(OUT) :: aerosol(ngrid,nlayer,naerkind) ! Aerosol tau at reference wavelenght.92 REAL,INTENT(OUT) :: dtlw(ngrid,nlayer) ! Heating rate (K/s) due to LW radiation.93 REAL,INTENT(OUT) :: dtsw(ngrid,nlayer) ! Heating rate (K/s) due to SW radiation.94 REAL,INTENT(OUT) :: fluxsurf_lw(ngrid) ! Incident LW flux to surf (W/m2).95 REAL,INTENT(OUT) :: fluxsurf_sw(ngrid) ! Incident SW flux to surf (W/m2)96 REAL,INTENT(OUT) :: fluxsurfabs_sw(ngrid) ! Absorbed SW flux by the surface (W/m2). By MT2015.97 REAL,INTENT(OUT) :: fluxtop_lw(ngrid) ! Outgoing LW flux to space (W/m2).98 REAL,INTENT(OUT) :: fluxabs_sw(ngrid) ! SW flux absorbed by the planet (W/m2).99 REAL,INTENT(OUT) :: fluxtop_dn(ngrid) ! Incident top of atmosphere SW flux (W/m2).100 REAL,INTENT(OUT) :: OLR_nu(ngrid,L_NSPECTI) ! Outgoing LW radiation in each band (Normalized to the band width (W/m2/cm-1).101 REAL,INTENT(OUT) :: OSR_nu(ngrid,L_NSPECTV) ! Outgoing SW radiation in each band (Normalized to the band width (W/m2/cm-1).102 REAL,INTENT(OUT) :: GSR_nu(ngrid,L_NSPECTV) ! Surface SW radiation in each band (Normalized to the band width (W/m2/cm-1).103 REAL,INTENT(OUT) :: tau_col(ngrid) ! Diagnostic from aeropacity.104 REAL,INTENT(OUT) :: albedo_equivalent(ngrid) ! Spectrally Integrated Albedo. For Diagnostic. By MT201594 REAL,INTENT(OUT) :: dtau_aer(ngrid,nlayer,naerkind) ! Aerosol tau at reference wavelenght. 95 REAL,INTENT(OUT) :: dtlw(ngrid,nlayer) ! Heating rate (K/s) due to LW radiation. 96 REAL,INTENT(OUT) :: dtsw(ngrid,nlayer) ! Heating rate (K/s) due to SW radiation. 97 REAL,INTENT(OUT) :: fluxsurf_lw(ngrid) ! Incident LW flux to surf (W/m2). 98 REAL,INTENT(OUT) :: fluxsurf_sw(ngrid) ! Incident SW flux to surf (W/m2) 99 REAL,INTENT(OUT) :: fluxsurfabs_sw(ngrid) ! Absorbed SW flux by the surface (W/m2). By MT2015. 100 REAL,INTENT(OUT) :: fluxtop_lw(ngrid) ! Outgoing LW flux to space (W/m2). 101 REAL,INTENT(OUT) :: fluxabs_sw(ngrid) ! SW flux absorbed by the planet (W/m2). 102 REAL,INTENT(OUT) :: fluxtop_dn(ngrid) ! Incident top of atmosphere SW flux (W/m2). 103 REAL,INTENT(OUT) :: OLR_nu(ngrid,L_NSPECTI) ! Outgoing LW radiation in each band (Normalized to the band width (W/m2/cm-1). 104 REAL,INTENT(OUT) :: OSR_nu(ngrid,L_NSPECTV) ! Outgoing SW radiation in each band (Normalized to the band width (W/m2/cm-1). 105 REAL,INTENT(OUT) :: GSR_nu(ngrid,L_NSPECTV) ! Surface SW radiation in each band (Normalized to the band width (W/m2/cm-1). 106 REAL,INTENT(OUT) :: tau_col(ngrid) ! Diagnostic from aeropacity. 107 REAL,INTENT(OUT) :: albedo_equivalent(ngrid) ! Spectrally Integrated Albedo. For Diagnostic. By MT2015 105 108 REAL,INTENT(OUT) :: int_dtaui(ngrid,nlayer,L_NSPECTI) ! VI optical thickness of layers within narrowbands for diags (). 106 109 REAL,INTENT(OUT) :: int_dtauv(ngrid,nlayer,L_NSPECTV) ! IR optical thickness of layers within narrowbands for diags (). … … 186 189 !$OMP THREADPRIVATE(QREFvis3d,QREFir3d) 187 190 188 189 191 ! Miscellaneous : 190 real*8 temp,temp1,temp2,pweight 192 real*8 temp,temp1,temp2,pweight,sig 191 193 character(len=10) :: tmp1 192 194 character(len=10) :: tmp2 … … 331 333 if (is_master) call system('rm -f surf_vals_long.out') 332 334 333 call su_aer_radii(ngrid,nlayer,reffrad,nueffrad)334 335 336 335 !-------------------------------------------------- 337 336 ! Set up correlated k … … 454 453 ! Effective radius and variance of the aerosols 455 454 !-------------------------------------------------- 455 ! Radiative Hazes 456 456 if (optichaze) then 457 do iaer=1,naerkind 458 if ((iaer.eq.iaero_haze)) then 459 call su_aer_radii(ngrid,nlayer,reffrad(1,1,iaer), & 460 nueffrad(1,1,iaer)) 457 if (callmufi) then 458 ! Spherical aerosols 459 sig = 0.2 460 where (mp2m_rc_sph(:,:) > 1e-10) 461 reffrad(:,:,1) = mp2m_rc_sph(:,:) * exp(5.*sig**2 / 2.) 462 elsewhere 463 reffrad(:,:,1) = 0d0 464 endwhere 465 if (exp(sig**2) - 1 > 0.1) then 466 nueffrad(:,:,1) = exp(sig**2) - 1 467 else 468 nueffrad(:,:,1) = 0.1 461 469 endif 462 end do !iaer=1,naerkind. 463 if (haze_radproffix) then 470 ! Fractal aerosols 471 sig = 0.35 472 where (mp2m_rc_fra(:,:) > 1e-10) 473 reffrad(:,:,2) = mp2m_rc_fra(:,:) * exp(5.*sig**2 / 2.) 474 elsewhere 475 reffrad(:,:,2) = 0d0 476 endwhere 477 if (exp(sig**2) - 1 > 0.1) then 478 nueffrad(:,:,2) = exp(sig**2) - 1 479 else 480 nueffrad(:,:,2) = 0.1 481 endif 482 483 else 484 do iaer=1,naerkind 485 if ((iaer.eq.iaero_haze)) then 486 call su_aer_radii(ngrid,nlayer,reffrad(1,1,iaer),nueffrad(1,1,iaer)) 487 endif 488 end do ! iaer = 1, naerkind. 464 489 if (haze_radproffix) then 465 call haze_reffrad_fix(ngrid,nlayer,zzlay,& 466 reffrad,nueffrad) 467 endif 468 469 print*, 'haze_radproffix=T : fixed profile for haze rad' 470 else 471 print*,'reffrad haze:',reffrad(1,1,iaero_haze) 472 print*,'nueff haze',nueffrad(1,1,iaero_haze) 473 endif 474 endif 475 490 call haze_reffrad_fix(ngrid,nlayer,zzlay,reffrad,nueffrad) 491 if (is_master) print*, 'haze_radproffix=T : fixed profile for haze rad' 492 else 493 if (is_master) print*,'reffrad haze:',reffrad(1,1,iaero_haze) 494 if (is_master) print*,'nueff haze',nueffrad(1,1,iaero_haze) 495 endif ! end haze_radproffix 496 endif ! end callmufi 497 endif ! end radiative haze 476 498 477 499 ! How much light do we get ? … … 489 511 490 512 ! Get aerosol optical depths. 491 call aeropacity(ngrid,nlayer,nq,pplay,pplev, pt,pq,aerosol, &513 call aeropacity(ngrid,nlayer,nq,pplay,pplev,zzlev,pt,pq,dtau_aer, & 492 514 reffrad,nueffrad,QREFvis3d,QREFir3d, & 493 515 tau_col) … … 665 687 pweight=(pplay(ig,L_NLAYRAD-k)-pplev(ig,L_NLAYRAD-k+1))/ & 666 688 (pplev(ig,L_NLAYRAD-k)-pplev(ig,L_NLAYRAD-k+1)) 667 ! As ' aerosol' is at reference (visible) wavelenght we scale it as689 ! As 'dtau_aer' is at reference (visible) wavelenght we scale it as 668 690 ! it will be multplied by qxi/v in optci/v 669 temp= aerosol(ig,L_NLAYRAD-k,iaer)/QREFvis3d(ig,L_NLAYRAD-k,iaer)691 temp=dtau_aer(ig,L_NLAYRAD-k,iaer)/QREFvis3d(ig,L_NLAYRAD-k,iaer) 670 692 tauaero(2*k+2,iaer)=max(temp*pweight,0.d0) 671 693 tauaero(2*k+3,iaer)=max(temp-tauaero(2*k+2,iaer),0.d0) … … 986 1008 print*,'fluxtop_dn=',fluxtop_dn(ig) 987 1009 print*,'acosz=',acosz 988 print*,' aerosol=',aerosol(ig,:,:)1010 print*,'dtau_aer=',dtau_aer(ig,:,:) 989 1011 print*,'temp= ',pt(ig,:) 990 1012 print*,'pplay= ',pplay(ig,:) -
trunk/LMDZ.PLUTO/libf/phypluto/callcorrk_pluto_mod.F90
r3572 r3585 7 7 subroutine callcorrk_pluto(icount,ngrid,nlayer,pq,nq,qsurf, & 8 8 albedo,emis,mu0,pplev,pplay,pt, & 9 zzlay, tsurf,fract,dist_star,aerosol, &9 zzlay,zzlev,tsurf,fract,dist_star,dtau_aer, & 10 10 dtlw,dtsw,fluxsurf_lw, & 11 11 fluxsurf_sw,fluxtop_lw,fluxtop_sw,fluxtop_dn, & … … 26 26 use callkeys_mod, only: optichaze,ch4fix,cooling,methane,nlte,& 27 27 strobel,vmrch4_proffix,specOLR,vmrch4fix,& 28 haze_radproffix 28 haze_radproffix,callmufi 29 29 use optcv_pluto_mod, only: optcv_pluto 30 30 use optci_pluto_mod, only: optci_pluto … … 32 32 use sfluxv_pluto_mod, only: sfluxv_pluto 33 33 use mod_phys_lmdz_para, only : is_master 34 34 use mp2m_diagnostics 35 35 36 36 implicit none … … 61 61 INTEGER icount 62 62 INTEGER ngrid,nlayer 63 REAL aerosol(ngrid,nlayer,naerkind) ! aerosol opacity tau 64 REAL albedo(ngrid) ! SW albedo 65 REAL emis(ngrid) ! LW emissivity 66 REAL pplay(ngrid,nlayer) ! pres. level in GCM mid of layer 67 REAL zzlay(ngrid,nlayer) ! altitude at the middle of the layers 68 REAL pplev(ngrid,nlayer+1) ! pres. level at GCM layer boundaries 69 63 REAL dtau_aer(ngrid,nlayer,naerkind) ! aerosol opacity tau 64 REAL albedo(ngrid) ! SW albedo 65 REAL emis(ngrid) ! LW emissivity 66 REAL pplay(ngrid,nlayer) ! pres. level in GCM mid of layer 67 REAL zzlay(ngrid,nlayer) ! Altitude at the middle of the layers 68 REAL zzlev(ngrid,nlayer) ! Altitude at the layer boundaries. 69 REAL pplev(ngrid,nlayer+1) ! pres. level at GCM layer boundaries 70 70 71 REAL pt(ngrid,nlayer) ! air temperature (K) 71 72 REAL tsurf(ngrid) ! surface temperature (K) … … 135 136 INTEGER ig,l,k,nw,iaer,irad 136 137 138 real*8 sig 139 137 140 real fluxtoplanet 138 141 real*8 taugsurf(L_NSPECTV,L_NGAUSS-1) … … 234 237 call setspv ! basic visible properties 235 238 239 !-------------------------------------------------- 240 ! Effective radius and variance of the aerosols 241 !-------------------------------------------------- 236 242 ! Radiative Hazes 237 243 if (optichaze) then 238 239 ! AF24: TODO check duplicate suaer_corrk called from physiq_mod 240 ! print*,'optichaze: starting suaer_corrk' 241 ! call suaer_corrk ! set up aerosol optical properties 242 ! print*,'ending suaer_corrk' 243 244 !-------------------------------------------------- 245 ! Effective radius and variance of the aerosols 246 !-------------------------------------------------- 247 do iaer=1,naerkind 244 if (callmufi) then 245 ! Spherical aerosols 246 sig = 0.2 247 WHERE(mp2m_rc_sph(:,:) > 1e-10) 248 reffrad(:,:,1) = mp2m_rc_sph(:,:) * exp(5.*sig**2 / 2.) 249 ELSEWHERE 250 reffrad(:,:,1) = 0d0 251 ENDWHERE 252 nueffrad(:,:,1) = exp(sig**2) - 1 253 ! Fractal aerosols 254 sig = 0.35 255 WHERE(mp2m_rc_fra(:,:) > 1e-10) 256 reffrad(:,:,2) = mp2m_rc_fra(:,:) * exp(5.*sig**2 / 2.) 257 ELSEWHERE 258 reffrad(:,:,2) = 0d0 259 ENDWHERE 260 nueffrad(:,:,2) = exp(sig**2) - 1 261 262 else 263 do iaer=1,naerkind 248 264 if ((iaer.eq.iaero_haze)) then 249 call su_aer_radii(ngrid,nlayer,reffrad(1,1,iaer), & 250 nueffrad(1,1,iaer)) 251 ! write(*,*) "Not supported yet" 252 ! STOP 265 call su_aer_radii(ngrid,nlayer,reffrad(1,1,iaer),nueffrad(1,1,iaer)) 253 266 endif 254 end do !iaer=1,naerkind. 255 if (haze_radproffix) then 256 call haze_reffrad_fix(ngrid,nlayer,zzlay, & 257 reffrad,nueffrad) 267 end do ! iaer = 1, naerkind. 268 if (haze_radproffix) then 269 call haze_reffrad_fix(ngrid,nlayer,zzlay,reffrad,nueffrad) 258 270 if (is_master) print*, 'haze_radproffix=T : fixed profile for haze rad' 259 else271 else 260 272 if (is_master) print*,'reffrad haze:',reffrad(1,1,iaero_haze) 261 273 if (is_master) print*,'nueff haze',nueffrad(1,1,iaero_haze) 262 endif 263 endif ! radiative haze 274 endif ! end haze_radproffix 275 endif ! end callmufi 276 endif ! end radiative haze 264 277 265 278 Cmk= 0.01 * 1.0 / (g * mugaz * 1.672621e-27) ! q_main=1.0 assumed … … 305 318 306 319 ! Get aerosol optical depths. 307 call aeropacity(ngrid,nlayer,nq,pplay,pplev, pt,pq,aerosol, &320 call aeropacity(ngrid,nlayer,nq,pplay,pplev,zzlev,pt,pq,dtau_aer, & 308 321 reffrad,nueffrad,QREFvis3d,QREFir3d, & 309 322 tau_col) … … 471 484 (pplev(ig,L_NLAYRAD-k)-pplev(ig,L_NLAYRAD-k+1)) 472 485 if (QREFvis3d(ig,L_NLAYRAD-k,iaer).ne.0) then 473 temp= aerosol(ig,L_NLAYRAD-k,iaer)/ &486 temp=dtau_aer(ig,L_NLAYRAD-k,iaer)/ & 474 487 QREFvis3d(ig,L_NLAYRAD-k,iaer) 475 488 else -
trunk/LMDZ.PLUTO/libf/phypluto/callsedim_pluto.F90
r3353 r3585 3 3 pq, pdqfi, pdqsed,pdqs_sed,nq,pphi) 4 4 5 use radinc_h, only : naerkind6 5 use tracer_h, only: igcm_ch4_ice,igcm_co_ice,radius,rho_q 7 6 use comcstfi_mod, only: g -
trunk/LMDZ.PLUTO/libf/phypluto/ch4cloud.F90
r3252 r3585 1 SUBROUTINE ch4cloud(ngrid,nlay, naersize,ptimestep, &1 SUBROUTINE ch4cloud(ngrid,nlay,ptimestep, & 2 2 pplev,pplay,pdpsrf,pzlev,pzlay,pt,pdt, & 3 3 pq,pdq,pdqcloud,pdqscloud,pdtcloud, & … … 47 47 real pq(ngrid,nlay,nq) ! traceur (kg/kg) 48 48 real pdq(ngrid,nlay,nq) ! tendance avant condensation (kg/kg.s-1) 49 integer naersize ! nombre de traceurs radiativement actifs (=naerkind)50 49 integer nq ! nombre de traceurs 51 50 -
trunk/LMDZ.PLUTO/libf/phypluto/cocloud.F90
r3252 r3585 1 SUBROUTINE cocloud(ngrid,nlay, naersize,ptimestep, &1 SUBROUTINE cocloud(ngrid,nlay,ptimestep, & 2 2 pplev,pplay,pdpsrf,pzlev,pzlay,pt,pdt, & 3 3 pq,pdq,pdqcloud,pdqscloud,pdtcloud, & … … 44 44 real pq(ngrid,nlay,nq) ! traceur (kg/kg) 45 45 real pdq(ngrid,nlay,nq) ! tendance avant condensation (kg/kg.s-1) 46 integer naersize ! nombre de traceurs radiativement actifs (=naerkind)47 46 integer nq ! nombre de traceurs 48 47 -
trunk/LMDZ.PLUTO/libf/phypluto/condense_n2.F90
r3539 r3585 6 6 pdqc,pdicen2) 7 7 8 use radinc_h, only : naerkind9 8 use comgeomfi_h 10 9 use comcstfi_mod, only: g, r, cpp, pi -
trunk/LMDZ.PLUTO/libf/phypluto/datafile_mod.F90
r3561 r3585 19 19 character(LEN=100),save :: config_mufi ='datagcm/microphysics/config.cfg' 20 20 !$OMP THREADPRIVATE(config_mufi) 21 character(len=300),save :: aersprop_file 22 character(len=300),save :: aerfprop_file 21 23 22 24 ! surfdir stores planetary topography, albedo, etc. (surface.nc files) -
trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/kcm1d.F90
r3572 r3585 78 78 79 79 real dTstrat 80 real,allocatable :: aerosol(:,:) ! aerosol tau (kg/kg)80 real,allocatable :: dtau_aer(:,:) ! aerosol tau (kg/kg) 81 81 real OLR_nu(1,L_NSPECTI) 82 82 real OSR_nu(1,L_NSPECTV) … … 320 320 !write(*,*) 1,llm,nq,0,86400.0,1,1.0,latitude,longitude,cell_area,rad,g,r,cpp 321 321 322 ! initialise naerkind (from callphys.def) and allocate aerosol(:,:)322 ! initialise naerkind (from callphys.def) and allocate dtau_aer(:,:) 323 323 naerkind=0 !default 324 324 call getin("naerkind",naerkind) 325 allocate( aerosol(llm,naerkind))326 aerosol(:,:)=0325 allocate(dtau_aer(llm,naerkind)) 326 dtau_aer(:,:)=0 327 327 328 328 do iq=1,nq … … 374 374 albedo_wv,albedo_equivalent, & 375 375 emis,mu0,plev,play,temp, & 376 tsurf,fract,dist_star, aerosol,muvar, &376 tsurf,fract,dist_star,dtau_aer,muvar, & 377 377 dtlw,dtsw,fluxsurf_lw,fluxsurf_sw, & 378 378 fluxsurfabs_sw,fluxtop_lw, & … … 385 385 ! albedo_wv,'D',albedo_equivalent,'E', & 386 386 ! emis,'F',mu0,'G',plev,'H',play,'I',temp,'J', & 387 ! tsurf,'K',fract,'L',dist_star,'M', aerosol,'N',muvar,'O', &387 ! tsurf,'K',fract,'L',dist_star,'M',dtau_aer,'N',muvar,'O', & 388 388 ! dtlw,'P',dtsw,'Q',fluxsurf_lw,'R',fluxsurf_sw,'S', & 389 389 ! fluxsurfabs_sw,'T',fluxtop_lw,'U', & … … 426 426 call callcorrk(1,nlayer,q,nq,qsurf, & 427 427 albedo_wv,albedo_equivalent,emis,mu0,plev,play,temp, & 428 tsurf,fract,dist_star, aerosol,muvar, &428 tsurf,fract,dist_star,dtau_aer,muvar, & 429 429 dtlw,dtsw,fluxsurf_lw,fluxsurf_sw,fluxsurfabs_sw, & 430 430 fluxtop_lw, fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu,GSR_nu, & … … 437 437 ! albedo_wv,'D',albedo_equivalent,'E', & 438 438 ! emis,'F',mu0,'G',plev,'H',play,'I',temp,'J', & 439 ! tsurf,'K',fract,'L',dist_star,'M', aerosol,'N',muvar,'O', &439 ! tsurf,'K',fract,'L',dist_star,'M',dtau_aer,'N',muvar,'O', & 440 440 ! dtlw,'P',dtsw,'Q',fluxsurf_lw,'R',fluxsurf_sw,'S', & 441 441 ! fluxsurfabs_sw,'T',fluxtop_lw,'U', & -
trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/rcm1d.F
r3542 r3585 6 6 use mod_grid_phy_lmdz, only : regular_lonlat 7 7 use infotrac, only: nqtot, tname 8 use tracer_h, only: noms , is_condensable8 use tracer_h, only: noms 9 9 use surfdat_h, only: albedodat, phisfi, dryness, 10 10 & zmea, zstd, zsig, zgam, zthe, -
trunk/LMDZ.PLUTO/libf/phypluto/hazecloud.F90
r3390 r3585 5 5 ! zdqphot_ch4,zdqconv_prec,declin,zdqhaze_col) 6 6 7 use radinc_h, only : naerkind8 7 use comgeomfi_h 9 8 use comcstfi_mod, only: pi, g -
trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90
r3572 r3585 12 12 use radinc_h, only: ini_radinc_h, naerkind 13 13 use radcommon_h, only: ini_radcommon_h 14 use radii_mod, only: radfixed, Nmix_n2 15 use datafile_mod, only: datadir,config_mufi,hazeprop_file,hazerad_file,hazemmr_file,hazedens_file 14 use radii_mod, only: radfixed 15 use datafile_mod, only: datadir,hazeprop_file,hazerad_file,hazemmr_file,hazedens_file, & 16 config_mufi, aersprop_file, aerfprop_file 16 17 use comdiurn_h, only: sinlat, coslat, sinlon, coslon 17 18 use comgeomfi_h, only: totarea, totarea_planet … … 687 688 call getin_p("config_mufi",config_mufi) 688 689 if (is_master) write(*,*)" config_mufi = ",config_mufi 690 691 if (is_master) write(*,*) "Spherical aerosol optical properties datafile" 692 aersprop_file="optprop_rannou_r2-200nm_nu003.dat" ! default file 693 call getin_p("aersprop_file",aersprop_file) 694 if (is_master) write(*,*) trim(rname)//" aersprop_file = ",trim(aersprop_file) 695 696 if (is_master) write(*,*) "Fractal aerosol optical properties datafile" 697 aerfprop_file="optprop_rannou_fractal_r010nm_N1_1e4_d2.dat" ! default file 698 call getin_p("aerfprop_file",aerfprop_file) 699 if (is_master) write(*,*) trim(rname)//" aerfprop_file = ",trim(aerfprop_file) 689 700 690 701 if (is_master) write(*,*) "Use haze production from CH4 photolysis or production rate?" … … 1285 1296 call abort_physic(rname, 'if haze are on, tracers must be on!', 1) 1286 1297 endif 1298 if ((callmufi).and.(haze)) then 1299 call abort_physic(rname, 'if haze are on, microphysics should be desactivated!', 1) 1300 endif 1301 if ((haze).and.(naerkind.gt.1)) then 1302 call abort_physic(rname, 'if haze are on, naerkind must be equal to 1!', 1) 1303 endif 1304 if ((callmufi).and..not.(naerkind.gt.1)) then 1305 call abort_physic(rname, 'if microphysics is on, naerkind must be > 1!', 1) 1306 endif 1307 if (.not.(callmufi.or.haze).and.(optichaze)) then 1308 call abort_physic(rname, 'if microphysics and haze are off, optichaze must be desactivated!', 1) 1309 endif 1310 if ((callmufi.and.call_haze_prod_pCH4).and..not.(methane)) then 1311 call abort_physic(rname, 'if haze production from CH4 photolysis is on, methane must be activated!', 1) 1312 endif 1287 1313 if (haze_proffix.and.sedimentation) then 1288 1314 call abort_physic(rname, 'if haze profile is set, sedimentation must be deactivated', 1) -
trunk/LMDZ.PLUTO/libf/phypluto/initracer.F90
r3572 r3585 123 123 ALLOCATE(is_recomb_qotf(nqtot)) 124 124 ENDIF 125 IF (.NOT. allocated(is_condensable)) allocate(is_condensable(nq)) !LT126 IF (.NOT. allocated(is_rgcs)) allocate(is_rgcs(nq)) !LT127 IF (.NOT. allocated(constants_mass)) allocate(constants_mass(nq))128 IF (.NOT. allocated(constants_delta_gasH)) allocate(constants_delta_gasH(nq))129 IF (.NOT. allocated(constants_Tref)) allocate(constants_Tref(nq))130 IF (.NOT. allocated(constants_Pref)) allocate(constants_Pref(nq))131 IF (.NOT. allocated(constants_RLVTT_generic)) allocate(constants_RLVTT_generic(nq))132 IF (.NOT. allocated(constants_RCPV_generic)) allocate(constants_RCPV_generic(nq))133 125 134 126 !! initialization … … 148 140 radius(:)=0. 149 141 qext(:)=0. 150 151 ! For condensable tracers, by Lucas Teinturier and Noé Clément (2022)152 153 is_condensable(:)= 0154 is_rgcs(:) = 0155 constants_mass(:)=0156 constants_delta_gasH(:)=0157 constants_Tref(:)=0158 constants_Pref(:)=0159 constants_RLVTT_generic(:)=0160 constants_RCPV_generic(:)=0161 142 162 143 rho_q(:) = 0. !need to be init here if we want to read it from modern traceur with get_tracdat … … 403 384 if (is_master) close(407) 404 385 405 ! Get specific data of condensable tracers406 do iq=1,nq407 if((is_condensable(iq)==1)) then408 write(*,*) "There is a specie which is condensable, for generic condensation : ", noms(iq)409 write(*,*) 'looking specie parameters for : ',noms(iq)(1:len(trim(noms(iq)))-4)410 ! call specie_parameters_table(noms(iq)(1:len(trim(noms(iq)))-4))411 ! constants_mass(iq)=m412 ! constants_delta_gasH(iq)=delta_gasH413 ! constants_Tref(iq)=Tref414 ! constants_Pref(iq)=Pref415 ! constants_RLVTT_generic(iq)=RLVTT_generic416 ! constants_RCPV_generic(iq)=RCPV_generic417 else418 write(*,*) "This tracer is not condensable, for generic condensation : : ", noms(iq)419 write(*,*) "We keep condensable constants at zero"420 endif !(is_condensable(iq)==1) .and. (index(noms(iq),"vap") .ne. 0))421 enddo ! iq=1,nq422 423 386 ! Calculate number of species in the chemistry 424 387 nesp = sum(is_chim) 425 388 write(*,*) 'Number of species in the chemistry nesp = ',nesp 426 427 ! Calculate number of generic tracers428 ngt = sum(is_condensable)429 write(*,*) 'Number of generic tracer is ngt = ',ngt430 431 ! Calculate number of radiative generic condensable species432 n_rgcs = sum(is_rgcs)433 write(*,*)'Number of Radiative Generic Condensable Species is n_rgcs = ',n_rgcs434 if (n_rgcs> ngt/2) then435 write(*,*) 'You have more Radiative Generic Condensable Species than Generic Condensable Species'436 write(*,*)'This is not possible: check your Modern traceur.def'437 call abort_physic("initracer, issue with # of RGCS and GCS")438 endif439 389 440 390 ! Calculate number of microphysical tracer … … 461 411 write(*,*) "lw_n2 = ", lw_n2 462 412 463 if (haze) then 413 if (callmufi) then 414 if (optichaze) then 415 iaero_haze = 2 416 write(*,*) 'Microphysical moment model' 417 write(*,*) '--- number of haze aerosol = ', iaero_haze 418 endif ! end optichaze 419 420 elseif (haze) then 464 421 ! the sedimentation radius remains radius(igcm_haze) 465 422 if (fractal) then 466 423 nmono=nb_monomer 467 424 else 468 425 nmono=1 469 426 endif ! end fractal 470 471 ia =0427 428 ia = 0 472 429 if (optichaze) then 473 ia =ia+1474 iaero_haze =ia430 ia = ia + 1 431 iaero_haze = ia 475 432 write(*,*) '--- number of haze aerosol = ', iaero_haze 476 477 block=0 ! Only one type of haze is active : the first one set in traceur.def 433 block = 0 ! Only one type of haze is active : the first one set in traceur.def 478 434 do iq=1,nq 479 435 tracername=noms(iq) … … 484 440 write(*,*) "i_haze=",i_haze 485 441 write(*,*) "Careful: if you set many haze traceurs in & 486 487 442 traceur.def,only ",tracername," will be radiatively active & 443 (first one in traceur.def)" 488 444 endif 489 enddo445 enddo 490 446 endif ! end optichaze 491 447 endif ! end callmufi or haze … … 602 558 is_recomb_qotf(iq) 603 559 end if 604 !option is_condensable (LT)605 if (index(tracline,'is_condensable=') /=0) then606 read(tracline(index(tracline,'is_condensable=') &607 +len('is_condensable='):),*) is_condensable(iq)608 write(*,*) ' Parameter value (traceur.def) :'// &609 ' is_condensable=', is_condensable(iq)610 else611 write(*,*) ' Parameter value (default) :'// &612 ' is_condensable=', is_condensable(iq)613 endif614 560 !option radius 615 561 if (index(tracline,'radius=') .ne. 0) then … … 632 578 ' rho=', rho_q(iq) 633 579 endif 634 !option is_rgcs635 if (index(tracline,'is_rgcs') .ne. 0) then636 read(tracline(index(tracline,'is_rgcs=') &637 +len('is_rgcs='):),*) is_rgcs(iq)638 write(*,*)'Parameter value (traceur.def) :'// &639 'is_rgcs=',is_rgcs(iq)640 else641 write(*,*)'Parameter value (default) : '// &642 'is_rgcs = ',is_rgcs(iq)643 endif644 580 end subroutine get_tracdat 645 581 -
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3572 r3585 21 21 use radcommon_h, only: sigma, glat, grav, BWNV, WNOI, DWNI, DWNV, WNOV 22 22 use suaer_corrk_mod, only: suaer_corrk 23 use radii_mod, only: su_aer_radii,haze_reffrad_fix24 23 use aerosol_mod, only: i_haze, haze_prof 25 24 use surfdat_h, only: phisfi, zmea, zstd, zsig, zgam, zthe, & … … 35 34 igcm_co_gas,igcm_co_ice,igcm_prec_haze,lw_n2,lw_ch4,lw_co,& 36 35 alpha_lift, alpha_devil, qextrhor, & 37 nesp, is_chim , is_condensable36 nesp, is_chim 38 37 use time_phylmdz_mod, only: ecritphy, iphysiq, nday 39 38 use phyetat0_mod, only: phyetat0,tab_cntrl_mod … … 286 285 ! for the "naerkind" optically active aerosols: 287 286 288 real,save,allocatable :: aerosol(:,:,:) ! Aerosols289 !$OMP THREADPRIVATE( aerosol)287 real,save,allocatable :: dtau_aer(:,:,:) ! Aerosols 288 !$OMP THREADPRIVATE(dtau_aer) 290 289 real zh(ngrid,nlayer) ! Potential temperature (K). 291 290 real pw(ngrid,nlayer) ! Vertical velocity (m/s). (NOTE : >0 WHEN DOWNWARDS !!) … … 464 463 real muvar(ngrid,nlayer+1) ! For Runaway Greenhouse 1D study. By RW 465 464 466 real,save,allocatable :: reffcol(:,:)467 !$OMP THREADPRIVATE(reffcol)468 469 465 ! Non-oro GW tendencies 470 466 REAL d_u_hin(ngrid,nlayer), d_v_hin(ngrid,nlayer) … … 535 531 ! allocate related local arrays 536 532 ! (need be allocated instead of automatic because of "naerkind") 537 allocate(aerosol(ngrid,nlayer,naerkind)) 538 allocate(reffcol(ngrid,naerkind)) 533 allocate(dtau_aer(ngrid,nlayer,naerkind)) 539 534 540 535 #ifdef CPP_XIOS … … 1022 1017 if (oldplutocorrk) then 1023 1018 call callcorrk_pluto(icount,ngrid,nlayer,pq,nq,qsurf, & 1024 albedo(:,1),emis,mu0,pplev,pplay,pt, 1025 zzlay, tsurf,fract,dist_star,aerosol,&1019 albedo(:,1),emis,mu0,pplev,pplay,pt, & 1020 zzlay,zzlev,tsurf,fract,dist_star,dtau_aer, & 1026 1021 zdtlw,zdtsw,fluxsurf_lw,fluxsurf_sw,fluxtop_lw, & 1027 1022 fluxabs_sw,fluxtop_dn,reffrad,tau_col,ptime,pday, & … … 1034 1029 call callcorrk(ngrid,nlayer,pq,nq,qsurf, & 1035 1030 albedo,albedo_equivalent,emis,mu0,pplev,pplay,pt, & 1036 zzlay, tsurf,fract,dist_star,aerosol,muvar,&1031 zzlay,zzlev,tsurf,fract,dist_star,dtau_aer,muvar, & 1037 1032 zdtlw,zdtsw,fluxsurf_lw,fluxsurf_sw, & 1038 1033 fluxsurfabs_sw,fluxtop_lw, & … … 1436 1431 zdqch4cloud(:,:,:)=0. 1437 1432 if ((methane).and.(metcloud).and.(.not.fast)) THEN 1438 call ch4cloud(ngrid,nlayer, naerkind,ptimestep, &1433 call ch4cloud(ngrid,nlayer,ptimestep, & 1439 1434 pplev,pplay,pdpsrf,zzlev,zzlay, pt,pdt, & 1440 1435 pq,pdq,zdqch4cloud,zdqsch4cloud,zdtch4cloud, & … … 1469 1464 zdqcocloud(:,:,:)=0. 1470 1465 IF ((carbox).and.(monoxcloud).and.(.not.fast)) THEN 1471 call cocloud(ngrid,nlayer, naerkind,ptimestep, &1466 call cocloud(ngrid,nlayer,ptimestep, & 1472 1467 pplev,pplay,pdpsrf,zzlev,zzlay, pt,pdt, & 1473 1468 pq,pdq,zdqcocloud,zdqscocloud,zdtcocloud, & … … 1845 1840 print*,'fluxtop_dn=',fluxtop_dn(ig) 1846 1841 print*,'tau_col=',tau_col(ig) 1847 print*,' aerosol=',aerosol(ig,:,:)1842 print*,'dtau_aer=',dtau_aer(ig,:,:) 1848 1843 print*,'temp= ',pt(ig,:) 1849 1844 print*,'pplay= ',pplay(ig,:) -
trunk/LMDZ.PLUTO/libf/phypluto/prodhaze.F90
r3247 r3585 3 3 flym_bot,flym_sol_bot,flym_ipm_bot,flym_sol,flym_ipm) 4 4 5 use radinc_h, only : naerkind6 5 use comgeomfi_h 7 6 use comcstfi_mod, only: pi, g -
trunk/LMDZ.PLUTO/libf/phypluto/radii_mod.F90
r3572 r3585 4 4 ! module to centralize the radii calculations for aerosols 5 5 !================================================================== 6 7 ! N2 cloud properties (initialized in inifis)8 real,save :: Nmix_n2 ! Number mixing ratio of N2 ice particles9 !$OMP THREADPRIVATE(Nmix_n2)10 6 11 7 ! flag to specify if we assume a constant fixed radius for particles … … 30 26 use datafile_mod, only: hazerad_file 31 27 use aerosol_mod, only: iaero_haze, i_haze 32 use tracer_h, only: radius, nqtot, is_rgcs,nmono28 use tracer_h, only: radius, nqtot, nmono 33 29 Implicit none 34 30 … … 67 63 USE tracer_h, only:rho_n2,nmono 68 64 use comcstfi_mod, only: pi 69 use aerosol_mod, only: iaero_haze , i_haze65 use aerosol_mod, only: iaero_haze 70 66 use datafile_mod 71 67 Implicit none -
trunk/LMDZ.PLUTO/libf/phypluto/spreadglacier_paleo.F90
r3412 r3585 6 6 use comgeomfi_h 7 7 use geometry_mod, only: latitude, longitude, cell_area 8 use radinc_h, only : naerkind9 8 use tracer_h, only: igcm_n2,igcm_ch4_ice,igcm_co_ice 10 9 -
trunk/LMDZ.PLUTO/libf/phypluto/spreadglacier_simple.F90
r3473 r3585 2 2 3 3 use geometry_mod, only: latitude, longitude, cell_area 4 use radinc_h, only : naerkind5 4 use surfdat_h, only: phisfi 6 5 use tracer_h, only: igcm_n2 -
trunk/LMDZ.PLUTO/libf/phypluto/suaer_corrk.F90
r3572 r3585 10 10 use radinc_h, only: L_NSPECTI,L_NSPECTV,nsizemax,naerkind 11 11 use radcommon_h, only: blamv,blami,lamrefir,lamrefvis 12 use datafile_mod, only: datadir, aerdir, hazeprop_file 12 use datafile_mod, only: datadir, aerdir, & 13 hazeprop_file, aersprop_file, aerfprop_file 13 14 14 15 ! outputs … … 17 18 use radcommon_h, only: qrefvis,qrefir,omegarefir !,omegarefvis 18 19 use aerosol_mod, only: iaero_haze 19 use callkeys_mod, only: tplanet 20 use callkeys_mod, only: tplanet, callmufi 20 21 use tracer_h, only: noms 21 22 … … 129 130 allocate(file_id(naerkind,2)) 130 131 131 do iaer=1,naerkind 132 ! naerkind=1: haze 133 if (iaer.eq.1) then 134 135 ! Only one table of optical properties : 136 if (is_master) write(*,*)'Suaer haze optical properties, using: ', & 137 TRIM(hazeprop_file) 138 139 ! visible 140 file_id(iaer,1)=TRIM(hazeprop_file) 141 ! infrared 142 file_id(iaer,2)=file_id(iaer,1) 143 144 lamrefvis(iaer)=0.607E-6 ! reference wavelength for opacity vis pivot wavelength Cheng et al 2017 145 lamrefir(iaer)=2.E-6 ! reference wavelength for opacity IR (in the LEISA range) 146 132 133 if (callmufi) then 134 if (is_master) then 135 write(*,*)'Suaer spherical aerosols optical properties, using: ', & 136 TRIM(aersprop_file) 137 write(*,*)'Suaer fractal aerosols optical properties, using: ', & 138 TRIM(aerfprop_file) 147 139 endif 148 enddo 149 150 ! IF (naerkind .gt. 1) THEN ! AF24: ? 151 ! print*,'naerkind = ',naerkind 152 ! print*,'but we only have data for 1 type, exiting.' 153 ! call abort 154 ! ENDIF 140 ! Visible 141 file_id(1,1)=TRIM(aersprop_file) 142 file_id(2,1)=TRIM(aerfprop_file) 143 ! Infrared 144 file_id(1,2)=file_id(1,1) 145 file_id(2,2)=file_id(2,1) 146 147 do iaer=1,naerkind 148 lamrefvis(iaer) = 0.607E-6 ! Reference wavelength for opacity vis pivot wavelength Cheng et al 2017 149 lamrefir(iaer) = 2.E-6 ! Reference wavelength for opacity IR (in the LEISA range) 150 enddo ! end iaer=1,naerkind 151 152 else 153 do iaer=1,naerkind 154 if (iaer.eq.1) then 155 ! Only one table of optical properties : 156 if (is_master) write(*,*)'Suaer haze optical properties, using: ', & 157 TRIM(hazeprop_file) 158 ! Visible 159 file_id(iaer,1)=TRIM(hazeprop_file) 160 ! Infrared 161 file_id(iaer,2)=file_id(iaer,1) 162 163 lamrefvis(iaer) = 0.607E-6 ! Reference wavelength for opacity vis pivot wavelength Cheng et al 2017 164 lamrefir(iaer) = 2.E-6 ! Reference wavelength for opacity IR (in the LEISA range) 165 endif ! end iaer.eq.1 166 167 if (naerkind.gt.1) then 168 ! Visible 169 file_id(iaer,1)=file_id(1,1) 170 ! Infrared 171 file_id(iaer,2)=file_id(1,1) 172 173 lamrefvis(iaer) = lamrefvis(1) ! Reference wavelength for opacity vis pivot wavelength Cheng et al 2017 174 lamrefir(iaer) = lamrefir(1) ! Reference wavelength for opacity IR (in the LEISA range) 175 endif ! end naerkind.gt.1 176 enddo ! end iaer=1,naerkind 177 endif ! end callmufi 155 178 156 179 !------------------------------------------------------------------ -
trunk/LMDZ.PLUTO/libf/phypluto/tracer_h.F90
r3572 r3585 13 13 integer, save :: nqtot ! total number of tracers 14 14 integer, save :: nesp ! number of species in the chemistry 15 integer, save :: ngt ! number of generic tracers 16 integer, save :: n_rgcs ! number of Radiative Generic Condensable Species 17 !$OMP THREADPRIVATE(nqtot,nesp,ngt,n_rgcs) 15 !$OMP THREADPRIVATE(nqtot,nesp) 18 16 19 17 logical :: moderntracdef=.false. ! Standard or modern traceur.def … … 54 52 integer, save, allocatable :: is_recomb_qotf(:) ! 1 if tracer recombination is done on-the-fly, else 0 (if 1, must have is_recomb_qset=0) 55 53 !$OMP THREADPRIVATE(is_recomb,is_recomb_qset,is_recomb_qotf) 56 integer, save, allocatable :: is_condensable(:) ! 1 if tracer is generic, else 0 (added LT)57 integer,save,allocatable :: is_rgcs(:) ! 1 if tracer is a radiative generic condensable specie, else 0 (added LT 2022)58 !$OMP THREADPRIVATE(is_condensable,is_rgcs) !also added by LT59 54 ! Lists of constants for condensable tracers 60 real, save, allocatable :: constants_mass(:) ! molecular mass of the specie (g/mol)61 real, save, allocatable :: constants_delta_gasH(:) ! Enthalpy of vaporization (J/mol)62 real, save, allocatable :: constants_Tref(:) ! Ref temperature for Clausis-Clapeyron (K)63 real, save, allocatable :: constants_Pref(:) ! Reference pressure for Clausius Clapeyron (Pa)64 real, save, allocatable :: constants_RLVTT_generic(:) ! Latent heat of vaporization (J/kg)65 real, save, allocatable :: constants_RCPV_generic(:) ! specific heat capacity of the tracer vapor at Tref66 !$OMP THREADPRIVATE(constants_mass,constants_delta_gasH,constants_Tref)67 !$OMP THREADPRIVATE(constants_Pref)68 !$OMP THREADPRIVATE(constants_RLVTT_generic,constants_RCPV_generic)69 55 70 56 ! tracer indexes: these are initialized in initracer and should be 0 if the
Note: See TracChangeset
for help on using the changeset viewer.