Changeset 2803
- Timestamp:
- Oct 19, 2022, 11:24:43 AM (2 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/aerave_new.F
r2625 r2803 56 56 c 57 57 INTEGER iir 58 INTEGER,PARAMETER :: nirmx=1 0058 INTEGER,PARAMETER :: nirmx=1900 59 59 INTEGER idata,ndata 60 60 c -
trunk/LMDZ.GENERIC/libf/phystd/aeropacity.F90
r2297 r2803 4 4 use radinc_h, only : L_TAUMAX,naerkind 5 5 use aerosol_mod 6 USE tracer_h, only: noms,rho_co2,rho_ice 7 use comcstfi_mod, only: g, pi 6 USE tracer_h, only: noms,rho_co2,rho_ice,rho_q,mmol 7 use comcstfi_mod, only: g, pi, mugaz, avocado 8 8 use geometry_mod, only: latitude 9 9 use callkeys_mod, only: aerofixco2,aerofixh2o,kastprof,cloudlvl, & … … 13 13 tau_nh3_cloud, pres_nh3_cloud, & 14 14 nlayaero, aeronlay_tauref, aeronlay_choice, & 15 aeronlay_pbot, aeronlay_ptop, aeronlay_sclhght 16 15 aeronlay_pbot, aeronlay_ptop, aeronlay_sclhght, & 16 aerogeneric 17 use generic_tracer_index_mod, only: generic_tracer_index 17 18 implicit none 18 19 … … 30 31 ! dust removal, simplification by Robin Wordsworth (2009) 31 32 ! Generic n-layer aerosol - J. Vatant d'Ollone (2020) 33 ! Radiative Generic Condensable aerosols - Lucas Teinturier (2022) 32 34 ! 33 35 ! Input … … 90 92 91 93 real CLFtot 92 94 integer igen_ice,igen_vap ! to store the index of generic tracer 95 logical dummy_bool ! dummy boolean just in case we need one 93 96 ! identify tracers 94 97 IF (firstcall) THEN … … 141 144 print*,'iaero_aurora= ',iaero_aurora 142 145 endif 143 146 if (iaero_generic(1) .ne. 0) then 147 print*,"iaero_generic= ",iaero_generic(:) 148 endif 144 149 firstcall=.false. 145 150 ENDIF ! of IF (firstcall) … … 362 367 ENDDO 363 368 ENDDO 364 369 365 370 ! 1/700. is assuming a "sulfurtau" of 1 366 371 ! Sulfur aerosol routine to be improved. … … 645 650 646 651 end if ! if Auroral aerosols 647 652 !=========================================================================== 653 ! Radiative Generic Condensable aerosols scheme 654 ! Only used when we give aerogeneric != 0 in callphys.def 655 ! Computes the generic aerosols' opacity in the same fashion as water of 656 ! dust, using the QREFvis3d of the concerned specie 657 ! Lucas Teinturier (2022) 658 !=========================================================================== 659 if (iaero_generic(1) .ne. 0) then ! we enter the scheme 660 do ia=1,aerogeneric 661 iaer = iaero_generic(ia) 662 ! Initialization 663 aerosol(1:ngrid,1:nlayer,iaer) = 0.D0 664 igen_ice = -1 665 igen_vap = -1 666 ! Get index of the ice tracer (for pq, mol, rho_q) 667 call generic_tracer_index(nq,2*iaer,igen_vap,igen_ice,dummy_bool) 668 if (igen_ice .eq. -1) then 669 !if igen_ice not changed by generic_tracer_index, it means it's an ice tracer => igen_ice=2*iaer 670 igen_ice = 2*iaer 671 endif 672 ! Let's loop on the horizontal and vertical grid 673 do ig=1,ngrid 674 do l=1,nlayer 675 aerosol(ig,l,iaer) = ( 0.75*QREFvis3d(ig,l,iaer) / & 676 (rho_q(igen_ice) * reffrad(ig,l,iaer)) ) * & 677 (pq(ig,l,igen_ice)+1E-9 ) * & 678 (pplev(ig,l) - pplev(ig,l+1)) /g 679 enddo !l=1,nlayer 680 enddo !ig=1,ngrid 681 enddo !ia=1,aerogeneric 682 endif !iaergo_generic(1) .ne. 0 648 683 649 684 ! -------------------------------------------------------------------------- -
trunk/LMDZ.GENERIC/libf/phystd/aerosol_mod.F90
r2297 r2803 22 22 ! Auroral aerosols 23 23 integer :: iaero_aurora = 0 24 !$OMP THREADPRIVATE(iaero_co2,iaero_h2o,iaero_dust,iaero_h2so4,noaero,iaero_back2lay,iaero_nh3,iaero_nlay,iaero_aurora) 24 ! Generic aerosols 25 integer, dimension(:),allocatable,save :: iaero_generic 26 !$OMP THREADPRIVATE(iaero_co2,iaero_h2o,iaero_dust,iaero_h2so4,noaero,iaero_back2lay,iaero_nh3,iaero_nlay,iaero_aurora,iaero_generic) 25 27 26 28 !================================================================== -
trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90
r2736 r2803 297 297 #endif 298 298 299 if(naerkind.gt.4)then300 message='Code not general enough to deal with naerkind > 4 yet.'301 call abort_physic(subname,message,1)302 endif299 ! if(naerkind.gt.4)then 300 ! message='Code not general enough to deal with naerkind > 4 yet.' 301 ! call abort_physic(subname,message,1) 302 ! endif 303 303 call su_aer_radii(ngrid,nlayer,reffrad,nueffrad) 304 304 -
trunk/LMDZ.GENERIC/libf/phystd/callkeys_mod.F90
r2721 r2803 50 50 logical,save :: aerofixco2,aerofixh2o 51 51 !$OMP THREADPRIVATE(aerofixco2,aerofixh2o) 52 integer,save :: aerogeneric 53 !$OMP THREADPRIVATE(aerogeneric) 52 54 logical,save :: hydrology 53 55 logical,save :: sourceevol -
trunk/LMDZ.GENERIC/libf/phystd/iniaerosol.F
r2297 r2803 5 5 use aerosol_mod 6 6 use callkeys_mod, only: aeroco2,aeroh2o,dusttau,aeroh2so4, 7 & aeroback2lay,aeronh3, nlayaero, aeronlay, aeroaurora 7 & aeroback2lay,aeronh3, nlayaero, aeronlay, aeroaurora, 8 & aerogeneric 8 9 9 10 IMPLICIT NONE … … 24 25 IF(.NOT.ALLOCATED(iaero_nlay)) ALLOCATE(iaero_nlay(nlayaero)) 25 26 iaero_nlay(:) = 0 26 27 ! Do the same for iaero_generic 28 IF (.not. allocated(iaero_generic)) 29 & allocate(iaero_generic(aerogeneric)) 30 iaero_generic(:)=0 27 31 ia=0 28 32 if (aeroco2) then … … 76 80 write(*,*) '--- Auroral aerosols = ', iaero_aurora 77 81 82 if (aerogeneric .ne. 0) then 83 do i=1,aerogeneric 84 ia = ia+1 85 iaero_generic(i) = ia 86 enddo 87 endif 88 write(*,*)'--- Generic Condensable Aerosols',iaero_generic 78 89 write(*,*) '=== Number of aerosols= ', ia 79 90 80 91 ! For the zero aerosol case, we currently make a dummy co2 aerosol which is zero everywhere. 81 92 ! (See aeropacity.F90 for how this works). A better solution would be to turn off the -
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r2721 r2803 655 655 if (is_master) write(*,*)trim(rname)//": aeroaurora = ",aeroaurora 656 656 657 if (is_master) write(*,*)trim(rname)//& 658 ": Radiatively active Generic Condensable aerosols?" 659 aerogeneric=0 ! default value 660 call getin_p("aerogeneric",aerogeneric) 661 if (is_master) write(*,*)trim(rname)//":aerogeneric",aerogeneric 662 663 657 664 !================================= 658 665 ! TWOLAY scheme and NH3 cloudare left for retrocompatibility only, -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2802 r2803 495 495 zdtlw(:,:) = 0.0 496 496 497 498 ! Initialize aerosol indexes.499 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~500 call iniaerosol()501 502 503 497 ! Initialize tracer names, indexes and properties. 504 498 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 512 506 endif 513 507 endif 508 ! Initialize aerosol indexes. 509 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 510 call iniaerosol() 514 511 515 512 #ifdef CPP_XIOS … … 2537 2534 endif 2538 2535 2539 do ig=1,ngrid2540 if(tau_col(ig).gt.1.e3)then2541 print*,'WARNING: tau_col=',tau_col(ig)2542 print*,'at ig=',ig,'in PHYSIQ'2543 endif2544 end do2536 ! do ig=1,ngrid 2537 ! if(tau_col(ig).gt.1.e3)then 2538 ! print*,'WARNING: tau_col=',tau_col(ig) 2539 ! print*,'at ig=',ig,'in PHYSIQ' 2540 ! endif 2541 ! end do 2545 2542 2546 2543 call writediagfi(ngrid,"tau_col","Total aerosol optical depth","[]",2,tau_col) -
trunk/LMDZ.GENERIC/libf/phystd/radii_mod.F90
r2340 r2803 28 28 ! ------- 29 29 ! Compute the effective radii of liquid and icy water particles 30 ! Jeremy Leconte (2012) 31 ! Extended to dust, CO2, NH3, 2-lay,Nlay,auroral aerosols by ?? 32 ! Added Radiative Generic Condensable Aerosols effective radii 33 ! calculations (Lucas Teinturier 2022) 30 34 ! 31 35 ! Authors … … 37 41 use radinc_h, only: naerkind 38 42 use aerosol_mod, only: iaero_back2lay, iaero_co2, iaero_dust, & 39 iaero_h2o, iaero_h2so4, iaero_nh3, iaero_nlay, iaero_aurora 40 use callkeys_mod, only: size_nh3_cloud, nlayaero, aeronlay_size, aeronlay_nueff 43 iaero_h2o, iaero_h2so4, iaero_nh3, iaero_nlay, iaero_aurora, & 44 iaero_generic 45 use callkeys_mod, only: size_nh3_cloud, nlayaero, aeronlay_size, aeronlay_nueff,aerogeneric 41 46 42 47 Implicit none … … 51 56 !$OMP THREADPRIVATE(firstcall) 52 57 integer :: iaer, ia 53 54 print*,'enter su_aer_radii' 55 do iaer=1,naerkind 58 real :: temprad !temporary variable for radius when we have Radiative Generic Condensable aerosols 59 do iaer=1,naerkind 56 60 ! these values will change once the microphysics gets to work 57 61 ! UNLESS tracer=.false., in which case we should be working with … … 60 64 ! |-> Done in th n-layer aerosol case (JVO 20) 61 65 62 if(iaer.eq.iaero_co2)then ! CO2 ice 63 reffrad(1:ngrid,1:nlayer,iaer) = 1.e-4 64 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 66 if(iaer.eq.iaero_co2)then ! CO2 ice 67 reffrad(1:ngrid,1:nlayer,iaer) = 1.e-4 68 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 69 endif 70 71 if(iaer.eq.iaero_h2o)then ! H2O ice 72 reffrad(1:ngrid,1:nlayer,iaer) = 1.e-5 73 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 74 endif 75 76 if(iaer.eq.iaero_dust)then ! dust 77 reffrad(1:ngrid,1:nlayer,iaer) = 1.e-5 78 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 79 endif 80 81 if(iaer.eq.iaero_h2so4)then ! H2O ice 82 reffrad(1:ngrid,1:nlayer,iaer) = 1.e-6 83 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 84 endif 85 86 if(iaer.eq.iaero_back2lay)then ! Two-layer aerosols 87 reffrad(1:ngrid,1:nlayer,iaer) = 2.e-6 88 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 89 endif 90 91 92 if(iaer.eq.iaero_nh3)then ! Nh3 cloud 93 reffrad(1:ngrid,1:nlayer,iaer) = size_nh3_cloud 94 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 95 endif 96 97 do ia=1,nlayaero 98 if(iaer.eq.iaero_nlay(ia))then ! N-layer aerosols 99 reffrad(1:ngrid,1:nlayer,iaer) = aeronlay_size(ia) 100 nueffrad(1:ngrid,1:nlayer,iaer) = aeronlay_nueff(ia) 65 101 endif 66 67 if(iaer.eq.iaero_h2o)then ! H2O ice68 reffrad(1:ngrid,1:nlayer,iaer) = 1.e-569 nueffrad(1:ngrid,1:nlayer,iaer) = 0.170 endif71 72 if(iaer.eq.iaero_dust)then ! dust73 reffrad(1:ngrid,1:nlayer,iaer) = 1.e-574 nueffrad(1:ngrid,1:nlayer,iaer) = 0.175 endif76 77 if(iaer.eq.iaero_h2so4)then ! H2O ice78 reffrad(1:ngrid,1:nlayer,iaer) = 1.e-679 nueffrad(1:ngrid,1:nlayer,iaer) = 0.180 endif81 82 if(iaer.eq.iaero_back2lay)then ! Two-layer aerosols83 reffrad(1:ngrid,1:nlayer,iaer) = 2.e-684 nueffrad(1:ngrid,1:nlayer,iaer) = 0.185 endif86 87 88 if(iaer.eq.iaero_nh3)then ! Nh3 cloud89 reffrad(1:ngrid,1:nlayer,iaer) = size_nh3_cloud90 nueffrad(1:ngrid,1:nlayer,iaer) = 0.191 endif92 93 do ia=1,nlayaero94 if(iaer.eq.iaero_nlay(ia))then ! N-layer aerosols95 reffrad(1:ngrid,1:nlayer,iaer) = aeronlay_size(ia)96 nueffrad(1:ngrid,1:nlayer,iaer) = aeronlay_nueff(ia)97 endif98 enddo99 100 if(iaer.eq.iaero_aurora)then ! Auroral aerosols101 reffrad(1:ngrid,1:nlayer,iaer) = 3.e-7102 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1103 endif104 105 106 if(iaer.gt.5)then107 print*,'Error in callcorrk, naerkind is too high (>5).'108 print*,'The code still needs generalisation to arbitrary'109 print*,'aerosol kinds and number.'110 call abort111 endif112 113 102 enddo 114 103 115 116 if (radfixed) then 117 118 write(*,*)"radius of H2O water particles:" 119 rad_h2o=13. ! default value 120 call getin_p("rad_h2o",rad_h2o) 121 write(*,*)" rad_h2o = ",rad_h2o 122 123 write(*,*)"radius of H2O ice particles:" 124 rad_h2o_ice=35. ! default value 125 call getin_p("rad_h2o_ice",rad_h2o_ice) 126 write(*,*)" rad_h2o_ice = ",rad_h2o_ice 127 128 else 129 130 write(*,*)"Number mixing ratio of H2O water particles:" 131 Nmix_h2o=1.e6 ! default value 132 call getin_p("Nmix_h2o",Nmix_h2o) 133 write(*,*)" Nmix_h2o = ",Nmix_h2o 134 135 write(*,*)"Number mixing ratio of H2O ice particles:" 136 Nmix_h2o_ice=Nmix_h2o ! default value 137 call getin_p("Nmix_h2o_ice",Nmix_h2o_ice) 138 write(*,*)" Nmix_h2o_ice = ",Nmix_h2o_ice 139 endif 140 141 print*,'exit su_aer_radii' 104 if(iaer.eq.iaero_aurora)then ! Auroral aerosols 105 reffrad(1:ngrid,1:nlayer,iaer) = 3.e-7 106 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 107 endif 108 109 do ia=1,aerogeneric ! Radiative Generic Condensable aerosols 110 if (iaer .eq. iaero_generic(ia)) then 111 call generic_get_traceur_radius(iaer,temprad) 112 reffrad(1:ngrid,1:nlayer,iaer)=temprad 113 nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 114 endif 115 enddo ! generic radiative condensable aerosols 116 117 if(iaer.gt.5)then ! I think this could be commented out by this needs testing. It works with 5 aerosols (LT 2022) 118 print*,'Error in callcorrk, naerkind is too high (>5).' 119 print*,'The code still needs generalisation to arbitrary' 120 print*,'aerosol kinds and number.' 121 call abort 122 endif 123 enddo ! iaer=1,naerkind 124 125 126 if (radfixed) then 127 128 write(*,*)"radius of H2O water particles:" 129 rad_h2o=13. ! default value 130 call getin_p("rad_h2o",rad_h2o) 131 write(*,*)" rad_h2o = ",rad_h2o 132 133 write(*,*)"radius of H2O ice particles:" 134 rad_h2o_ice=35. ! default value 135 call getin_p("rad_h2o_ice",rad_h2o_ice) 136 write(*,*)" rad_h2o_ice = ",rad_h2o_ice 137 138 else 139 140 write(*,*)"Number mixing ratio of H2O water particles:" 141 Nmix_h2o=1.e6 ! default value 142 call getin_p("Nmix_h2o",Nmix_h2o) 143 write(*,*)" Nmix_h2o = ",Nmix_h2o 144 145 write(*,*)"Number mixing ratio of H2O ice particles:" 146 Nmix_h2o_ice=Nmix_h2o ! default value 147 call getin_p("Nmix_h2o_ice",Nmix_h2o_ice) 148 write(*,*)" Nmix_h2o_ice = ",Nmix_h2o_ice 149 endif 150 142 151 143 152 end subroutine su_aer_radii … … 381 390 !================================================================== 382 391 392 !================================================================== 393 subroutine generic_get_traceur_radius(iaer,radii) 394 !================================================================== 395 ! Purpose 396 ! ------- 397 ! Get the generic traceur radius inputted in modern_traceur.def 398 ! for the specie "specie" 399 ! 400 ! Authors 401 ! ------- 402 ! Lucas Teinturier (2022) 403 ! 404 !================================================================== 405 Use tracer_h, only: radius, noms, nqtot 406 Implicit none 407 408 integer, intent(in) :: iaer !index of aerosol which radius we're looking for 409 real, intent(out) :: radii !radii(ngrid,nlayer,naerkind) ! Particle radii (m) 410 integer :: iq !just a loop index 411 412 if (index(noms(1),'ice') .ne. 0) then !traceur.def is organized with _ice then _vap 413 radii=radius(2*iaer-1) 414 elseif (index(noms(1),'vap') .ne. 0) then !traceur.def is organized with _vap then _ice 415 radii = radius(2*iaer) 416 else 417 print*,"radii_mod: tracer is neither ice or vap :",noms(1) 418 print*,"Aborting" 419 call abort 420 endif 421 422 end subroutine generic_get_traceur_radius 383 423 384 424 end module radii_mod -
trunk/LMDZ.GENERIC/libf/phystd/suaer_corrk.F90
r2297 r2803 13 13 use callkeys_mod, only: tplanet, optprop_back2lay_vis, optprop_back2lay_ir, & 14 14 optprop_aeronlay_vis, optprop_aeronlay_ir, & 15 aeronlay_lamref, nlayaero 16 15 aeronlay_lamref, nlayaero,aerogeneric 16 use tracer_h, only: noms 17 17 implicit none 18 18 … … 119 119 120 120 !-------------------------------------------------------------- 121 122 121 if (noaero) then 123 122 print*, 'naerkind= 0' … … 233 232 ! added by SG 234 233 endif 235 236 234 ! the following was added by LT 235 do ia=1,aerogeneric ! Read Radiative Generic Condensable Aerosols data 236 if (iaer .eq. iaero_generic(ia)) then 237 if (index(noms(2*iaer),'Fe') .ne. 0) then 238 print*,"Reading Fe file" 239 file_id(iaer,1)='Fe.ocst.txt' 240 file_id(iaer,2)='Fe.ocst.txt' 241 lamrefvis(iaer) = 1.0E-6 !random pick 242 lamrefir(iaer) = 1.0E-6 !dummy but random pick 243 else if (index(noms(2*iaer),'Mn') .ne. 0) then 244 print*,"Reading MnS file" 245 file_id(iaer,1)='MnS.ocst.txt' 246 file_id(iaer,2)='MnS.ocst.txt' 247 lamrefvis(iaer) = 1.0E-6 !random pick 248 lamrefir(iaer) = 1.0E-6 !dummy but random pick 249 else if (index(noms(2*iaer),'Mg') .ne. 0) then 250 print*,"Reading Mg2SiO4 file" 251 file_id(iaer,1)='Mg2SiO4.ocst.txt' 252 file_id(iaer,2)='Mg2SiO4.ocst.txt' 253 lamrefvis(iaer) = 1.0E-6 !random pick 254 lamrefir(iaer) = 1.0E-6 !dummy but random pick 255 else if (index(noms(2*iaer),'Cr') .ne. 0) then 256 print*,"Reading Cr file" 257 file_id(iaer,1)='Cr.ocst.txt' 258 file_id(iaer,2)='Cr.ocst.txt' 259 lamrefvis(iaer) = 1.0E-6 !random pick 260 lamrefir(iaer) = 1.0E-6 !dummy but random pick 261 else 262 ! If you want to add another specie, copy,paste & adapt the elseif block up here to your new specie (LT 2022) 263 call abort_physic("suaer_corrk", "Unknown specie in generic condensable aerosols",1) 264 endif 265 endif 266 enddo ! ia=1,aerogeneric 237 267 enddo 238 268 … … 415 445 416 446 417 418 447 !================================================================== 419 448 ! 2. AVERAGED PROPERTIES AND VARIABLE ASSIGNMENTS … … 453 482 454 483 ENDDO 455 456 484 !================================================================== 457 485 CASE(2) domain ! INFRARED DOMAIN (idomain=2) 458 486 !================================================================== 459 460 487 461 488 DO isize=1,nsize(iaer,idomain) ! ---------------------------------- … … 517 544 END DO ! Loop on idomain 518 545 !======================================================================== 519 520 546 RETURN 521 547
Note: See TracChangeset
for help on using the changeset viewer.