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/tendencies.F90

    r4065 r4071  
    1818! DEPENDENCIES
    1919! ------------
    20 use numerics, only: dp, di, minieps, tol
     20use numerics, only: dp, di, k4, minieps, tol
    2121
    2222! DECLARATION
     
    2828
    2929!=======================================================================
    30 SUBROUTINE compute_tend(min_ice,d_ice)
    31 !-----------------------------------------------------------------------
    32 ! NAME
    33 !     compute_tend
     30SUBROUTINE compute_tendice(min_ice,is_perice,d_ice)
     31!-----------------------------------------------------------------------
     32! NAME
     33!     compute_tendice
    3434!
    3535! DESCRIPTION
     
    5151! ARGUMENTS
    5252! ---------
    53 real(dp), dimension(:,:,:), intent(in)  :: min_ice
    54 real(dp), dimension(:,:),   intent(out) :: d_ice
     53real(dp),    dimension(:,:,:), intent(in)  :: min_ice
     54logical(k4), dimension(:,:),   intent(in)  :: is_perice
     55real(dp),    dimension(:,:),   intent(out) :: d_ice
    5556
    5657! CODE
    5758! ----
    58 ! We compute the difference
    59 d_ice(:,:) = min_ice(:,:,2) - min_ice(:,:,1)
     59! We compute the difference to get the tendency
     60d_ice = min_ice(:,:,2) - min_ice(:,:,1)
    6061
    6162! If the difference is too small, then there is no evolution
    6263where (abs(d_ice) < minieps) d_ice = 0._dp
    6364
    64 ! If the minimum over the last year is 0, then we have no perennial ice
    65 where (abs(min_ice(:,:,2)) < minieps) d_ice = 0._dp
    66 
    67 END SUBROUTINE compute_tend
    68 !=======================================================================
    69 
    70 !=======================================================================
    71 SUBROUTINE evolve_tend_co2(d_co2ice_ini,co2ice,emissivity,q_co2_ts_ini,q_co2_ts,ps_PCM,ps_avg_glob_ini,ps_avg_global,d_co2ice)
    72 !-----------------------------------------------------------------------
    73 ! NAME
    74 !     evolve_tend_co2
     65! If the tendency is negative but there is no ice reservoir for the PEM
     66where (abs(d_ice) < 0._dp .and. .not. is_perice) d_ice = 0._dp
     67
     68END SUBROUTINE compute_tendice
     69!=======================================================================
     70
     71!=======================================================================
     72SUBROUTINE evolve_tend_co2ice(d_co2ice_ini,co2ice,emissivity,q_co2_ts_ini,q_co2_ts,ps_PCM,ps_avg_glob_ini,ps_avg_global,d_co2ice)
     73!-----------------------------------------------------------------------
     74! NAME
     75!     evolve_tend_co2ice
    7576!
    7677! DESCRIPTION
     
    135136call print_msg('New CO2 ice tendencies [kg/m2/yr] (min|max): '//real2str( minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)))
    136137
    137 END SUBROUTINE evolve_tend_co2
    138 !=======================================================================
    139 
    140 !=======================================================================
    141 SUBROUTINE evolve_tend_h2o(h2oice_depth_old,h2oice_depth_new,tsurf,tsoil_ts_old,tsoil_ts_new,d_h2oice)
    142 !-----------------------------------------------------------------------
    143 ! NAME
    144 !     evolve_tend_h2o
     138END SUBROUTINE evolve_tend_co2ice
     139!=======================================================================
     140
     141!=======================================================================
     142SUBROUTINE evolve_tend_h2oice(h2oice_depth_old,h2oice_depth_new,tsurf,tsoil_ts_old,tsoil_ts_new,d_h2oice)
     143!-----------------------------------------------------------------------
     144! NAME
     145!     evolve_tend_h2oice
    145146!
    146147! DESCRIPTION
     
    158159use soil_temp,      only: itp_tsoil
    159160use subsurface_ice, only: psv
     161use display,        only: print_msg
    160162
    161163! DECLARATION
     
    181183! CODE
    182184! ----
     185call print_msg("> Updating the H2O sub-surface ice tendency due to lag layer")
     186
    183187! Higher resistance due to growing lag layer (higher depth)
    184188Rz_old = h2oice_depth_old*zcdv/coef_diff ! Old resistance from PCM
     
    204208d_h2oice = d_h2oice*R_dec*hum_dec
    205209
    206 END SUBROUTINE evolve_tend_h2o
     210END SUBROUTINE evolve_tend_h2oice
    207211!=======================================================================
    208212
Note: See TracChangeset for help on using the changeset viewer.