Changeset 2803 for trunk/LMDZ.GENERIC/libf/phystd/aeropacity.F90
- Timestamp:
- Oct 19, 2022, 11:24:43 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 ! --------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.