Ignore:
Timestamp:
Apr 19, 2024, 11:12:57 AM (4 weeks ago)
Author:
idelkadi
Message:

Introduction of 2 routines for LMDZ-ECRAD :

  • One for LMDZ (calcul_cloud_overlap_decorr_len.F90) to calculate the decorrelation length (Ld) in the case of "Exp-Ran" cloud overlap.
    1. Ld=constant
    2. Ld=linear function of the absolute value of latitude (Shonk and Hogan 2010)
    3. Ld=function of vertical level
  • One for Ecrad (set_overlap_param_var2D in radiation_cloud.F90) : Compute and store the overlap parameter from the provided overlap decorrelation length, which depends on vertical level.

Translated with DeepL.com (free version)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/ecrad/radiation/radiation_cloud.F90

    r4853 r4911  
    8585    procedure :: set_overlap_param_var
    8686    generic   :: set_overlap_param => set_overlap_param_fix, set_overlap_param_var
     87    procedure :: set_overlap_param_var2D
    8788    procedure :: set_overlap_param_approx
    8889    procedure :: create_fractional_std
     
    380381  end subroutine set_overlap_param_var
    381382
     383! AI 04 2024 variation de la longueur Ld en fonction de la verticale 
     384  subroutine set_overlap_param_var2D(this, thermodynamics, decorrelation_length, &
     385       &                           klev, istartcol, iendcol)
     386
     387    use yomhook,                  only : lhook, dr_hook, jphook
     388    use radiation_thermodynamics, only : thermodynamics_type
     389    use radiation_constants,      only : GasConstantDryAir, AccelDueToGravity
     390
     391    integer,                   intent(in)    :: klev
     392    class(cloud_type),         intent(inout) :: this
     393    type(thermodynamics_type), intent(in)    :: thermodynamics
     394    integer,                   intent(in)    :: istartcol, iendcol
     395    real(jprb),                intent(in)    :: decorrelation_length(istartcol:iendcol,klev) ! m
     396
     397    ! Ratio of gas constant for dry air to acceleration due to gravity
     398    real(jprb), parameter :: R_over_g = GasConstantDryAir / AccelDueToGravity
     399
     400    integer :: ncol, nlev
     401
     402    integer :: jcol, jlev
     403
     404    real(jphook) :: hook_handle
     405
     406    if (lhook) call dr_hook('radiation_cloud:set_overlap_param_var',0,hook_handle)
     407
     408    ! Pressure at half-levels, pressure_hl, is defined at nlev+1
     409    ! points
     410    ncol = size(thermodynamics%pressure_hl,dim=1)
     411    nlev = size(thermodynamics%pressure_hl,dim=2)-1
     412
     413    if (.not. allocated(this%overlap_param)) then
     414      ! If pressure is of size (ncol,nlev+1) then overlap_param is of
     415      ! size (ncol,nlev-1), since overlap parameter is only defined here
     416      ! for interfaces between model layers, not for the interface to
     417      ! space or the surface
     418      allocate(this%overlap_param(ncol, nlev-1))
     419    end if
     420
     421    if (thermodynamics%pressure_hl(istartcol,2) > thermodynamics%pressure_hl(istartcol,1)) then
     422      ! Pressure is increasing with index (order of layers is
     423      ! top-of-atmosphere to surface). In case pressure_hl(:,1)=0, we
     424      ! don't take the logarithm of the first pressure in each column.
     425      do jcol = istartcol,iendcol
     426        this%overlap_param(jcol,1) = exp(-(R_over_g/decorrelation_length(jcol,1)) &
     427             &                            * thermodynamics%temperature_hl(jcol,2) &
     428             &                            *log(thermodynamics%pressure_hl(jcol,3) &
     429             &                                /thermodynamics%pressure_hl(jcol,2)))
     430      end do
     431
     432      do jlev = 2,nlev-1
     433        do jcol = istartcol,iendcol
     434          this%overlap_param(jcol,jlev) = exp(-(0.5_jprb*R_over_g/decorrelation_length(jcol,jlev)) &
     435              &                            * thermodynamics%temperature_hl(jcol,jlev+1) &
     436              &                            *log(thermodynamics%pressure_hl(jcol,jlev+2) &
     437              &                                /thermodynamics%pressure_hl(jcol,jlev)))
     438        end do
     439      end do
     440
     441    else
     442       ! Pressure is decreasing with index (order of layers is surface
     443       ! to top-of-atmosphere).  In case pressure_hl(:,nlev+1)=0, we
     444       ! don't take the logarithm of the last pressure in each column.
     445      do jlev = 1,nlev-2
     446        do jcol = istartcol,iendcol
     447          this%overlap_param(jcol,jlev) = exp(-(0.5_jprb*R_over_g/decorrelation_length(jcol,jlev)) &
     448              &                            * thermodynamics%temperature_hl(jcol,jlev+1) &
     449              &                            *log(thermodynamics%pressure_hl(jcol,jlev) &
     450              &                                /thermodynamics%pressure_hl(jcol,jlev+2)))
     451        end do
     452      end do
     453
     454      do jcol = istartcol,iendcol
     455      ! AI ATTENTION a verifier decorrelation_length(jcol,nlev-1) ou nlev
     456        this%overlap_param(jcol,nlev-1) = exp(-(R_over_g/decorrelation_length(jcol,nlev-1)) &
     457            &                            * thermodynamics%temperature_hl(jcol,nlev) &
     458            &                            *log(thermodynamics%pressure_hl(jcol,nlev-1) &
     459            &                                /thermodynamics%pressure_hl(jcol,nlev)))
     460      end do
     461    end if
     462
     463    if (lhook) call dr_hook('radiation_cloud:set_overlap_param_var',1,hook_handle)
     464
     465  end subroutine set_overlap_param_var2D
    382466
    383467  !---------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.