Ignore:
Timestamp:
Feb 16, 2026, 10:28:56 AM (12 days ago)
Author:
jbclement
Message:

PEM:

  • Making the computation of ice tendencies more reliable by doing it after 'read_startpem' to know exactly where perennial ice is (no matter if there is a "startpem.nc" or not). Moreover, when there is no "startpem.nc", location of perennial ice depends now on 'watercaptag' and on huge amount of frost. This prevents negative ice tendency while there is no ice which can happen with weird PCM inputs (i.e. 'watercaptag' = F & 'watercap' /= 0 & no "stratpem.nc").
  • Few small safeguards throughout the code.

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/glaciers.F90

    r4065 r4071  
    1818! DEPENDENCIES
    1919! ------------
    20 use numerics, only: dp, di, k4
     20use numerics, only: dp, di, k4, minieps
    2121
    2222! DECLARATION
     
    108108! ARGUMENTS
    109109! ---------
    110 real(dp),    dimension(:,:),            intent(in)    :: vmr_co2_PEM     ! Grid points x Time field : VMR of CO2 in the first layer [mol/mol]
    111 real(dp),    dimension(:,:),            intent(in)    :: ps_PCM          ! Grid points x Time field: surface pressure given by the PCM [Pa]
    112 real(dp),                               intent(in)    :: ps_avg_glob_ini ! Global averaged surface pressure at the beginning [Pa]
    113 real(dp),                               intent(in)    :: ps_avg_global   ! Global averaged surface pressure during the PEM iteration [Pa]
    114 real(dp),    dimension(:,:),            intent(inout) :: co2ice          ! Grid points x Slope field: CO2 ice on the subgrid slopes [kg/m^2]
    115 logical(k4), dimension(:,:),            intent(out)   :: is_co2ice_flow  ! Flag to see if there is flow on the subgrid slopes
     110real(dp),    dimension(:,:), intent(in)    :: vmr_co2_PEM     ! Grid points x Time field : VMR of CO2 in the first layer [mol/mol]
     111real(dp),    dimension(:,:), intent(in)    :: ps_PCM          ! Grid points x Time field: surface pressure given by the PCM [Pa]
     112real(dp),                    intent(in)    :: ps_avg_glob_ini ! Global averaged surface pressure at the beginning [Pa]
     113real(dp),                    intent(in)    :: ps_avg_global   ! Global averaged surface pressure during the PEM iteration [Pa]
     114real(dp),    dimension(:,:), intent(inout) :: co2ice          ! Grid points x Slope field: CO2 ice on the subgrid slopes [kg/m^2]
     115logical(k4), dimension(:,:), intent(out)   :: is_co2ice_flow  ! Flag to see if there is flow on the subgrid slopes
    116116
    117117! LOCAL VARIABLES
     
    301301                    iaval = islope + 1
    302302                end if
    303                 do while (iaval /= iflat .and. subslope_dist(ig,iaval) == 0)
     303                do while (iaval /= iflat .and. abs(subslope_dist(ig,iaval)) < minieps)
    304304                    if (iaval > iflat) then
    305305                        iaval = iaval - 1
Note: See TracChangeset for help on using the changeset viewer.