Ignore:
Timestamp:
Jan 20, 2025, 10:17:54 AM (12 days ago)
Author:
debatzbr
Message:

Connecting microphysics to radiative transfer + miscellaneous cleans

File:
1 edited

Legend:

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

    r3572 r3585  
    77      subroutine callcorrk(ngrid,nlayer,pq,nq,qsurf,           &
    88          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,    &
    1010          dtlw,dtsw,fluxsurf_lw,                               &
    1111          fluxsurf_sw,fluxsurfabs_sw,fluxtop_lw,               &
     
    3636                              optichaze,haze_radproffix,&
    3737                              methane,carbox,cooling,nlte,strobel,&
    38                               ch4fix,vmrch4_proffix,vmrch4fix
     38                              ch4fix,vmrch4_proffix,vmrch4fix,&
     39                              callmufi
    3940      use optcv_mod, only: optcv
    4041      use optci_mod, only: optci
     
    4445      use planetwide_mod, only: planetwide_maxval, planetwide_minval
    4546      use radcommon_h, only: wavev,wavei
     47      use mp2m_diagnostics
    4648      implicit none
    4749
     
    8183      REAL,INTENT(IN) :: pt(ngrid,nlayer)          ! Air temperature (K).
    8284      REAL,INTENT(IN) :: zzlay(ngrid,nlayer)       ! Mid-layer altitude
     85      REAL,INTENT(IN) :: zzlev(ngrid,nlayer)       ! Altitude at the layer boundaries.
    8386      REAL,INTENT(IN) :: tsurf(ngrid)              ! Surface temperature (K).
    8487      REAL,INTENT(IN) :: fract(ngrid)              ! Fraction of day.
     
    8992
    9093      ! 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 MT2015
     94      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
    105108      REAL,INTENT(OUT) :: int_dtaui(ngrid,nlayer,L_NSPECTI) ! VI optical thickness of layers within narrowbands for diags ().
    106109      REAL,INTENT(OUT) :: int_dtauv(ngrid,nlayer,L_NSPECTV) ! IR optical thickness of layers within narrowbands for diags ().
     
    186189!$OMP THREADPRIVATE(QREFvis3d,QREFir3d)
    187190
    188 
    189191      ! Miscellaneous :
    190       real*8  temp,temp1,temp2,pweight
     192      real*8  temp,temp1,temp2,pweight,sig
    191193      character(len=10) :: tmp1
    192194      character(len=10) :: tmp2
     
    331333         if (is_master) call system('rm -f surf_vals_long.out')
    332334
    333          call su_aer_radii(ngrid,nlayer,reffrad,nueffrad)
    334 
    335 
    336335!--------------------------------------------------
    337336!             Set up correlated k
     
    454453!     Effective radius and variance of the aerosols
    455454!--------------------------------------------------
     455      ! Radiative Hazes
    456456      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   
    461469            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.
    464489            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
    476498
    477499      ! How much light do we get ?
     
    489511
    490512         ! 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,      &
    492514            reffrad,nueffrad,QREFvis3d,QREFir3d,                             &
    493515            tau_col)
     
    665687               pweight=(pplay(ig,L_NLAYRAD-k)-pplev(ig,L_NLAYRAD-k+1))/   &
    666688                       (pplev(ig,L_NLAYRAD-k)-pplev(ig,L_NLAYRAD-k+1))
    667                ! As 'aerosol' is at reference (visible) wavelenght we scale it as
     689               ! As 'dtau_aer' is at reference (visible) wavelenght we scale it as
    668690               ! 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)
    670692               tauaero(2*k+2,iaer)=max(temp*pweight,0.d0)
    671693               tauaero(2*k+3,iaer)=max(temp-tauaero(2*k+2,iaer),0.d0)
     
    9861008            print*,'fluxtop_dn=',fluxtop_dn(ig)
    9871009            print*,'acosz=',acosz
    988             print*,'aerosol=',aerosol(ig,:,:)
     1010            print*,'dtau_aer=',dtau_aer(ig,:,:)
    9891011            print*,'temp=   ',pt(ig,:)
    9901012            print*,'pplay=  ',pplay(ig,:)
Note: See TracChangeset for help on using the changeset viewer.