Ignore:
Timestamp:
Jan 13, 2025, 2:52:33 PM (3 weeks ago)
Author:
debatzbr
Message:

Remove generic_aerosols and generic_condensation, along with their related variables (useless). RENAME THE VARIABLE AEROHAZE TO OPTICHAZE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90

    r3558 r3572  
    1818      use ioipsl_getin_p_mod, only: getin_p
    1919      use radinc_h, only : L_NSPECTI,L_NSPECTV,naerkind, corrkdir, banddir
    20       use generic_cloud_common_h, only : epsi_generic, Psat_generic
    2120      use gases_h, only: gnom, gfrac
    2221      use radcommon_h, only: sigma, glat, grav, BWNV, WNOI, DWNI, DWNV, WNOV
    2322      use suaer_corrk_mod, only: suaer_corrk
    2423      use radii_mod, only: su_aer_radii,haze_reffrad_fix
    25       use aerosol_mod, only: iaero_haze, i_haze, haze_prof
     24      use aerosol_mod, only: i_haze, haze_prof
    2625      use surfdat_h, only: phisfi, zmea, zstd, zsig, zgam, zthe, &
    2726                           dryness
     
    3635                          igcm_co_gas,igcm_co_ice,igcm_prec_haze,lw_n2,lw_ch4,lw_co,&
    3736                          alpha_lift, alpha_devil, qextrhor, &
    38                           nesp, is_chim, is_condensable,constants_epsi_generic
     37                          nesp, is_chim, is_condensable
    3938      use time_phylmdz_mod, only: ecritphy, iphysiq, nday
    4039      use phyetat0_mod, only: phyetat0,tab_cntrl_mod
     
    5049                              callrad, callsoil, nosurf,                      &
    5150                              callconduct,callmolvis,callmoldiff,             &
    52                               aerohaze, corrk, diagdtau,                      &
     51                              corrk, diagdtau,                                &
    5352                              diurnal, enertest, fat1au,                      &
    5453                              icetstep, intheat, iradia, kastprof,            &
     
    5958                              carbox, methane,condmetsurf,condcosurf,         &
    6059                              oldplutovdifc,oldplutocorrk,oldplutosedim,      &
    61                               aerohaze,haze_proffix,haze_radproffix,          &
     60                              optichaze,haze_proffix,haze_radproffix,         &
    6261                              source_haze, tsurfmax, albmin_ch4,              &
    63                               season, sedimentation,generic_condensation,     &
     62                              season, sedimentation,                          &
    6463                              specOLR,                                        &
    6564                              startphy_file, testradtimes,                    &
     
    6766                              global1d, szangle,                              &
    6867                              callmufi
    69       use generic_tracer_index_mod, only: generic_tracer_index
    7068      use check_fields_mod, only: check_physics_fields
    7169      use conc_mod, only: rnew, cpnew, ini_conc_mod
     
    7876      use turb_mod, only : q2,sensibFlux,turb_resolved
    7977      use mass_redistribution_mod, only: mass_redistribution
    80       use condensation_generic_mod, only: condensation_generic
    8178      use datafile_mod, only: datadir
    8279      USE vertical_layers_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt
     
    295292      real omega(ngrid,nlayer)            ! omega velocity (Pa/s, >0 when downward)
    296293
    297       integer i,l,ig,ierr,iq,nw,isoil,iesp, igcm_generic_gas, igcm_generic_ice
    298       logical call_ice_gas_generic ! to call only one time the ice/vap pair of a tracer
     294      integer i,l,ig,ierr,iq,nw,isoil,iesp
    299295
    300296      real zls                       ! Solar longitude (radians).
     
    316312      ! For Atmospheric Temperatures : (K/s)
    317313      real dtlscale(ngrid,nlayer)                             ! Largescale routine.
    318       real dt_generic_condensation(ngrid,nlayer)              ! condensation_generic routine.
    319314      real zdtc(ngrid,nlayer)                                 ! Condense_n2 routine.
    320315      real zdtdif(ngrid,nlayer)                               ! Turbdiff/vdifc routines.
     
    338333      real zdqsed(ngrid,nlayer,nq)    ! Callsedim routine.
    339334      real zdqmr(ngrid,nlayer,nq)     ! Mass_redistribution routine.
    340       real dqvaplscale_generic(ngrid,nlayer,nq) ! condensation_generic routine.
    341       real dqcldlscale_generic(ngrid,nlayer,nq) ! condensation_generic routine.
    342335      REAL,allocatable,save :: zdqchim(:,:,:) ! Calchim_asis routine
    343336      REAL,allocatable,save :: zdqschim(:,:)  ! Calchim_asis routine
     
    466459      real dItot, dItot_tmp, dVtot, dVtot_tmp
    467460      real dWtot, dWtot_tmp, dWtots, dWtots_tmp
    468       real psat_tmp ! AF24: to remove?
    469 
    470       real qsat_generic(ngrid,nlayer,nq) ! generic condensable tracers (GCS) specific concentration at saturation (kg/kg_of_air).
    471       real RH_generic(ngrid,nlayer,nq)   ! generic condensable tracers (GCS) Relative humidity.
    472       real rneb_generic(ngrid,nlayer,nq) ! GCS cloud fraction (generic condensation).
    473       real psat_tmp_generic
    474       real, save :: metallicity ! metallicity of planet --- is not used here, but necessary to call function Psat_generic
    475 !$OMP THREADPRIVATE(metallicity)
    476 
    477       real reffrad_generic_zeros_for_wrf(ngrid,nlayer) !  !!! this is temporary, it is only a list of zeros, it will be replaced when a generic aerosol will be implemented
    478461
    479462      real nconsMAX, vdifcncons(ngrid), cadjncons(ngrid) ! Vdfic water conservation test. By RW
     
    650633         endif
    651634
    652 !        Set metallicity for GCS
    653 !        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    654          metallicity=0.0 ! default value --- is not used here but necessary to call function Psat_generic
    655          call getin_p("metallicity",metallicity) ! --- is not used here but necessary to call function Psat_generic
    656 
    657635         if (ngrid.ne.1) then ! Note : no need to create a restart file in 1d.
    658636            call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid,nlayer,nq, &
     
    677655            call setspv ! Basic visible properties.
    678656            call sugas_corrk       ! Set up gaseous absorption properties.
    679             if (aerohaze) then
     657            if (optichaze) then
    680658               call suaer_corrk       ! Set up aerosol optical properties.
    681659            endif
     
    754732
    755733!     Get Lyman alpha flux at specific Ls
    756       if (haze) then
     734      if (callmufi.or.haze) then
    757735         call lymalpha(zls,zfluxuv)
    758736         print*, 'Haze lyman-alpha zls,zfluxuv=',zls,zfluxuv
     
    10401018                  call abort
    10411019               endif
    1042                ! if(water) then !AF24: removed
    1043 
    1044                if(generic_condensation) then
    1045                   do iq=1,nq
    1046 
    1047                      call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)
    1048 
    1049                      if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer
    1050 
    1051                         epsi_generic=constants_epsi_generic(iq)
    1052 
    1053                         muvar(1:ngrid,1:nlayer)=mugaz/(1.e0+(1.e0/epsi_generic-1.e0)*pq(1:ngrid,1:nlayer,igcm_generic_gas))
    1054                         muvar(1:ngrid,nlayer+1)=mugaz/(1.e0+(1.e0/epsi_generic-1.e0)*pq(1:ngrid,nlayer,igcm_generic_gas))
    1055 
    1056                      endif
    1057                   end do ! do iq=1,nq loop on tracers
    1058                ! take into account generic condensable specie (GCS) effect on mean molecular weight
    1059 
    1060                else
    1061                   muvar(1:ngrid,1:nlayer+1)=mugaz
    1062                endif
    1063 
    1064                ! if(ok_slab_ocean) then !AF24: removed
    10651020
    10661021               ! standard callcorrk
     
    10711026                               zdtlw,zdtsw,fluxsurf_lw,fluxsurf_sw,fluxtop_lw,   &
    10721027                               fluxabs_sw,fluxtop_dn,reffrad,tau_col,ptime,pday, &
    1073                                cloudfrac,totcloudfrac,.false.,                   &
    10741028                               firstcall,lastcall)
    10751029                  albedo_equivalent(1:ngrid)=albedo(1:ngrid,1)
     
    10771031                               fluxsurf_sw(1:ngrid)*(1.-albedo(1:ngrid,1))
    10781032               else
     1033                muvar(1:ngrid,1:nlayer+1)=mugaz
    10791034                call callcorrk(ngrid,nlayer,pq,nq,qsurf,  &
    10801035                              albedo,albedo_equivalent,emis,mu0,pplev,pplay,pt,   &
     
    10841039                              fluxabs_sw,fluxtop_dn,OLR_nu,OSR_nu,GSR_nu,         &
    10851040                              int_dtaui,int_dtauv,                                &
    1086                               tau_col,cloudfrac,totcloudfrac,                     &
    1087                               .false.,firstcall,lastcall)
     1041                              tau_col,firstcall,lastcall)
    10881042                  ! Radiative flux from the sky absorbed by the surface (W.m-2).
    10891043                  GSR=0.0
     
    12271181                          taux,tauy)
    12281182
    1229          else ! if (oldplutovdifc) .and. (UseTurbDiff)
     1183         else ! if .not. (oldplutovdifc) .and. (UseTurbDiff)
    12301184
    12311185            zdh(1:ngrid,1:nlayer)=pdt(1:ngrid,1:nlayer)/zpopsk(1:ngrid,1:nlayer)
     
    15481502         !   VI.1. Microphysics / Aerosol particles
    15491503         ! ----------------------------------------
    1550          ! Production for microphysics
    1551          IF (callmufi .and. call_haze_prod_pCH4) THEN
    1552             zdqphot_prec(:,:)   = 0.
    1553             zdqphot_ch4(:,:)    = 0.
    1554             pdqmufi_prod(:,:,:) = 0.
    1555 
    1556             call hazecloud(ngrid,nlayer,nq,ptimestep,                             &
    1557                            pplay,pplev,pq,pdq,dist_star,mu0,zfluxuv,pdqmufi_prod, &
    1558                            zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin)
    1559          ENDIF ! end callmufi .and. .and.call_haze_prod_pCH4
    1560 
    15611504         ! Call of microphysics
    15621505         IF (callmufi) THEN
     1506
     1507            ! Production for microphysics
     1508            IF (call_haze_prod_pCH4) THEN
     1509               zdqphot_prec(:,:)   = 0.
     1510               zdqphot_ch4(:,:)    = 0.
     1511               pdqmufi_prod(:,:,:) = 0.
     1512               call hazecloud(ngrid,nlayer,nq,ptimestep,                             &
     1513                              pplay,pplev,pq,pdq,dist_star,mu0,zfluxuv,pdqmufi_prod, &
     1514                              zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin)
     1515            ENDIF ! end call_haze_prod_pCH4
    15631516
    15641517            pdqmufi(:,:,:) = 0.
     
    15671520   
    15681521            pdq(:,:,:) = pdq(:,:,:) + pdqmufi(:,:,:)
     1522         
     1523         ELSE
     1524            IF (haze) THEN
     1525               zdqphot_prec(:,:) = 0.
     1526               zdqphot_ch4(:,:)  = 0.
     1527               zdqhaze(:,:,:)    = 0.
     1528               ! Forcing to a fixed haze profile if haze_proffix
     1529               if (haze_proffix.and.i_haze.gt.0.) then
     1530                  call haze_prof(ngrid,nlayer,zzlay,pplay,pt,  &
     1531                                 reffrad,profmmr)
     1532                  zdqhaze(:,:,i_haze)=(profmmr(:,:)-pq(:,:,igcm_haze))/ptimestep
     1533               else
     1534                  call hazecloud(ngrid,nlayer,nq,ptimestep,            &
     1535                     pplay,pplev,pq,pdq,dist_star,mu0,zfluxuv,zdqhaze, &
     1536                     zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin)
     1537               endif
     1538               pdq(:,:,:) = pdq(:,:,:) + zdqhaze(:,:,:) ! Should be updated
     1539            ENDIF ! end haze
     1540
     1541            IF (fast.and.fasthaze) THEN
     1542               call prodhaze(ngrid,nlayer,nq,ptimestep,pplev,pq,pdq,dist_star, &
     1543                        mu0,declin,zdqprodhaze,zdqsprodhaze,gradflux,fluxbot,   &
     1544                        fluxlym_sol_bot,fluxlym_ipm_bot,flym_sol,flym_ipm)
     1545               DO ig=1,ngrid
     1546                  pdq(ig,1,igcm_ch4_gas)=pdq(ig,1,igcm_ch4_gas)+  &
     1547                                                zdqprodhaze(ig,igcm_ch4_gas)
     1548                  pdq(ig,1,igcm_prec_haze)=pdq(ig,1,igcm_prec_haze)+ &
     1549                                             zdqprodhaze(ig,igcm_prec_haze)
     1550                  pdq(ig,1,igcm_haze)=abs(pdq(ig,1,igcm_haze)+ &
     1551                                             zdqprodhaze(ig,igcm_haze))
     1552                  qsurf(ig,igcm_haze)= qsurf(ig,igcm_haze)+ &
     1553                                                zdqsprodhaze(ig)*ptimestep
     1554               ENDDO
     1555            ENDIF ! end fast.and.fasthaze
     1556
     1557            ! Sedimentation.
     1558            if (sedimentation) then
     1559               zdqsed(1:ngrid,1:nlayer,1:nq) = 0.0
     1560               zdqssed(1:ngrid,1:nq)  = 0.0
     1561               if (oldplutosedim)then
     1562                  call callsedim_pluto(ngrid,nlayer,ptimestep,    &
     1563                           pplev,zzlev,pt,pdt,rice_ch4,rice_co, &
     1564                           pq,pdq,zdqsed,zdqssed,nq,pphi)
     1565               else
     1566                  call callsedim(ngrid,nlayer,ptimestep,       &
     1567                           pplev,zzlev,pt,pdt,pq,pdq,        &
     1568                           zdqsed,zdqssed,nq,pphi)
     1569               endif
     1570               ! Whether it falls as rain or snow depends only on the surface temperature
     1571               pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq) + zdqsed(1:ngrid,1:nlayer,1:nq)
     1572               dqsurf(1:ngrid,1:nq) = dqsurf(1:ngrid,1:nq) + zdqssed(1:ngrid,1:nq)
     1573            end if ! end of 'sedimentation'
     1574
    15691575         ENDIF ! end callmufi
    1570 
    1571          IF (haze) THEN
    1572             zdqphot_prec(:,:) = 0.
    1573             zdqphot_ch4(:,:)  = 0.
    1574             zdqhaze(:,:,:)    = 0.
    1575            
    1576             ! Forcing to a fixed haze profile if haze_proffix
    1577             if (haze_proffix.and.i_haze.gt.0.) then
    1578                call haze_prof(ngrid,nlayer,zzlay,pplay,pt,  &
    1579                               reffrad,profmmr)
    1580                zdqhaze(:,:,i_haze)=(profmmr(:,:)-pq(:,:,igcm_haze))/ptimestep
    1581             else
    1582                call hazecloud(ngrid,nlayer,nq,ptimestep,            &
    1583                   pplay,pplev,pq,pdq,dist_star,mu0,zfluxuv,zdqhaze, &
    1584                   zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin)
    1585             endif
    1586 
    1587             pdq(:,:,:) = pdq(:,:,:) + zdqhaze(:,:,:) ! Should be updated
    1588          ENDIF ! end haze
    1589 
    1590          IF (fast.and.fasthaze) THEN
    1591             call prodhaze(ngrid,nlayer,nq,ptimestep,pplev,pq,pdq,dist_star, &
    1592                      mu0,declin,zdqprodhaze,zdqsprodhaze,gradflux,fluxbot,   &
    1593                      fluxlym_sol_bot,fluxlym_ipm_bot,flym_sol,flym_ipm)
    1594 
    1595             DO ig=1,ngrid
    1596                pdq(ig,1,igcm_ch4_gas)=pdq(ig,1,igcm_ch4_gas)+  &
    1597                                              zdqprodhaze(ig,igcm_ch4_gas)
    1598                pdq(ig,1,igcm_prec_haze)=pdq(ig,1,igcm_prec_haze)+ &
    1599                                           zdqprodhaze(ig,igcm_prec_haze)
    1600                pdq(ig,1,igcm_haze)=abs(pdq(ig,1,igcm_haze)+ &
    1601                                           zdqprodhaze(ig,igcm_haze))
    1602                qsurf(ig,igcm_haze)= qsurf(ig,igcm_haze)+ &
    1603                                              zdqsprodhaze(ig)*ptimestep
    1604             ENDDO
    1605          ENDIF ! end fast.and.fasthaze
    1606 
    1607          ! Generic Condensation
    1608          if (generic_condensation) then
    1609             call condensation_generic(ngrid,nlayer,nq,ptimestep,pplev,pplay,   &
    1610                                           pt,pq,pdt,pdq,dt_generic_condensation, &
    1611                                           dqvaplscale_generic,dqcldlscale_generic,rneb_generic)
    1612             pdt(1:ngrid,1:nlayer) = pdt(1:ngrid,1:nlayer)+dt_generic_condensation(1:ngrid,1:nlayer)
    1613             pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq)+dqvaplscale_generic(1:ngrid,1:nlayer,1:nq)
    1614             pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq)+dqcldlscale_generic(1:ngrid,1:nlayer,1:nq)
    1615 
    1616             if(enertest)then
    1617                do ig=1,ngrid
    1618                   genericconddE(ig) = cpp*SUM(mass(:,:)*dt_generic_condensation(:,:))
    1619                enddo
    1620 
    1621                call planetwide_sumval(cpp*massarea(:,:)*dt_generic_condensation(:,:)/totarea_planet,dEtot)
    1622 
    1623                if (is_master) print*,'In generic condensation atmospheric energy change =',dEtot,' W m-2'
    1624             end if
    1625 
    1626                ! Let's loop on tracers
    1627                cloudfrac(:,:)=0.0
    1628                do iq=1,nq
    1629                   call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)
    1630                   if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer
    1631                      do l = 1, nlayer
    1632                         do ig=1,ngrid
    1633                            cloudfrac(ig,l)=rneb_generic(ig,l,iq)
    1634                         enddo
    1635                      enddo
    1636                   endif
    1637             end do ! do iq=1,nq loop on tracers
    1638             ! endif ! .not. water
    1639 
    1640          endif !generic_condensation
    1641 
    1642          ! Sedimentation.
    1643          if (sedimentation) then
    1644 
    1645             zdqsed(1:ngrid,1:nlayer,1:nq) = 0.0
    1646             zdqssed(1:ngrid,1:nq)  = 0.0
    1647 
    1648             if (oldplutosedim)then
    1649                call callsedim_pluto(ngrid,nlayer,ptimestep,    &
    1650                           pplev,zzlev,pt,pdt,rice_ch4,rice_co, &
    1651                           pq,pdq,zdqsed,zdqssed,nq,pphi)
    1652 
    1653             else
    1654                call callsedim(ngrid,nlayer,ptimestep,       &
    1655                           pplev,zzlev,pt,pdt,pq,pdq,        &
    1656                           zdqsed,zdqssed,nq,pphi)
    1657             endif
    1658 
    1659             ! Whether it falls as rain or snow depends only on the surface temperature
    1660             pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq) + zdqsed(1:ngrid,1:nlayer,1:nq)
    1661             dqsurf(1:ngrid,1:nq) = dqsurf(1:ngrid,1:nq) + zdqssed(1:ngrid,1:nq)
    1662 
    1663          end if ! end of 'sedimentation'
    16641576
    16651577  ! ---------------
     
    19991911      endif ! end of 'tracer'
    20001912
    2001 
    2002 
    2003       ! Calculate RH_generic (Generic Relative Humidity) for diagnostic.
    2004       if(generic_condensation)then
    2005          RH_generic(:,:,:)=0.0
    2006          do iq=1,nq
    2007 
    2008             call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)
    2009 
    2010             if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer
    2011 
    2012                do l = 1, nlayer
    2013                   do ig=1,ngrid
    2014                      call Psat_generic(zt(ig,l),pplay(ig,l),metallicity,psat_tmp_generic,qsat_generic(ig,l,iq))
    2015                      RH_generic(ig,l,iq) = zq(ig,l,igcm_generic_gas) / qsat_generic(ig,l,iq)
    2016                   enddo
    2017                enddo
    2018 
    2019             end if
    2020 
    2021          end do ! iq=1,nq
    2022 
    2023       endif ! end of 'generic_condensation'
    2024 
    2025 
    20261913      if (methane) then
    20271914         IF (fast) then ! zq is the mixing ratio supposingly mixed in all atmosphere
     
    20641951      zrho_haze(:,:)=0.
    20651952      zdqrho_photprec(:,:)=0.
    2066       IF (haze.and.aerohaze) then
     1953      IF (haze.and.optichaze) then
    20671954         DO ig=1,ngrid
    20681955            DO l=1,nlayer
     
    23122199            call write_output("dEzradlw","radiative heating","w.m^-2",dEzradlw)
    23132200         endif
    2314 
    2315          if (generic_condensation) then
    2316             call write_output("genericconddE","heat from generic condensation","W m-2",genericconddE)
    2317             call write_output("dt_generic_condensation","heating from generic condensation","K s-1",dt_generic_condensation)
    2318          endif
    2319 
    23202201      endif ! end of 'enertest'
    23212202
     
    24482329            endif
    24492330
    2450            if (aerohaze) then
     2331           if (optichaze) then
    24512332              call write_output("tau_col",&
    24522333                 "Total aerosol optical depth","opacity",tau_col)
Note: See TracChangeset for help on using the changeset viewer.