Changeset 3784


Ignore:
Timestamp:
May 30, 2025, 11:45:56 AM (9 days ago)
Author:
jbclement
Message:

PEM:
Correction of 'h2o_ice_depth' update in the main loop.
JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3782 r3784  
    678678- Gathering the processes of "ice condensation" and "dust sedimentation" in the same framework of the layering algorithm
    679679- Reordering the workflow to manage the different situations of the layering algorithm
     680
     681== 30/05/2025 == JBC
     682Correction of 'h2o_ice_depth' update in the main loop.
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3782 r3784  
    200200type(ptrarray), dimension(:,:), allocatable :: current           ! Current active stratum in the layering
    201201logical,        dimension(:,:), allocatable :: new_str, new_lag  ! Flags for the layering algorithm
    202 real                                        :: h2o_ice_depth_old ! Old depth of subsurface ice layer
     202real,           dimension(:,:), allocatable :: h2o_ice_depth_old ! Old depth of subsurface ice layer
    203203logical                                     :: is_subsurface_ice ! Boolean to know if there is subsurface ice
    204204
     
    751751stopPEM = 0
    752752if (layering_algo) then
    753     allocate(new_str(ngrid,nslope),new_lag(ngrid,nslope),current(ngrid,nslope))
     753    allocate(h2o_ice_depth_old(ngrid,nslope),new_str(ngrid,nslope),new_lag(ngrid,nslope),current(ngrid,nslope))
    754754    new_str = .true.
    755755    new_lag = .true.
     
    834834    allocate(zshift_surf(ngrid,nslope),zlag(ngrid,nslope))
    835835    if (layering_algo) then
     836        h2o_ice_depth_old = h2o_ice_depth
    836837        do islope = 1,nslope
    837838            do ig = 1,ngrid
    838839                call make_layering(layerings_map(ig,islope),d_co2ice(ig,islope),d_h2oice(ig,islope),new_str(ig,islope),zshift_surf(ig,islope),new_lag(ig,islope),zlag(ig,islope),current(ig,islope)%p)
    839                 co2_ice = 0.
    840                 h2o_ice = 0.
    841                 h2o_ice_depth = 0.
     840                co2_ice(ig,islope) = 0.
     841                h2o_ice(ig,islope) = 0.
     842                h2o_ice_depth(ig,islope) = 0.
    842843                if (is_co2ice_str(layerings_map(ig,islope)%top)) then
    843844                    co2_ice(ig,islope) = layerings_map(ig,islope)%top%h_co2ice
     
    10641065        do ig = 1,ngrid
    10651066            do islope = 1,nslope
    1066                 if (is_h2oice_sublim_ini(ig,islope)) then
    1067                     h2o_ice_depth_old = h2o_ice_depth(ig,islope)
    1068                     h2o_ice_depth(ig,islope) = thickness_toplag(layerings_map(ig,islope))
    1069                     call recomp_tend_h2o(h2o_ice_depth_old,h2o_ice_depth(ig,islope),tsurf_avg(ig,islope),tsoil_PEM_timeseries_old(ig,:,islope,:),tsoil_PEM_timeseries(ig,:,islope,:),d_h2oice(ig,islope))
    1070                 endif
     1067                if (is_h2oice_sublim_ini(ig,islope)) call recomp_tend_h2o(h2o_ice_depth_old(ig,islope),h2o_ice_depth(ig,islope),tsurf_avg(ig,islope),tsoil_PEM_timeseries_old(ig,:,islope,:),tsoil_PEM_timeseries(ig,:,islope,:),d_h2oice(ig,islope))
    10711068            enddo
    10721069        enddo
     
    11271124deallocate(d_co2ice,d_co2ice_ini,d_h2oice)
    11281125deallocate(is_co2ice_ini,is_co2ice_sublim_ini,is_h2oice_sublim_ini)
    1129 if (layering_algo) deallocate(new_str,new_lag,current)
     1126if (layering_algo) deallocate(h2o_ice_depth_old,new_str,new_lag,current)
    11301127!------------------------------ END RUN --------------------------------
    11311128
  • trunk/LMDZ.COMMON/libf/evolution/recomp_tend_mod.F90

    r3770 r3784  
    9292Rz_old = icetable_depth_old*zcdv/coef_diff ! Old resistance from PCM
    9393Rz_new = icetable_depth_new*zcdv/coef_diff ! New resistance based on new depth
    94 if (abs(Rz_old) < 1.e-10) then
    95     R_dec = 1.
    96 else
    97     R_dec = Rz_new/Rz_old ! Decrease because of resistance
    98 endif
     94R_dec = 1.
     95if (Rz_new >= Rz_old) R_dec = Rz_new/Rz_old ! Decrease because of resistance
    9996
    10097! The maxmimum of the daily averages over one year for the saturation vapor pressure at the ice table location
     
    107104
    108105! Lower humidity due to growing lag layer (higher depth)
    109 print*, psv_max_old,psv_max_new
    110106hum_dec = psv_max_old/psv_max_new ! Decrease because of lower water vapor pressure at the new depth
    111107
    112108! Flux correction (decrease)
    113 print*, 'aaaaah', R_dec,hum_dec
    114109d_h2oice = d_h2oice/R_dec/hum_dec
    115110
Note: See TracChangeset for help on using the changeset viewer.