Ignore:
Timestamp:
Feb 5, 2025, 3:06:50 PM (9 hours ago)
Author:
jbclement
Message:

PEM:

  • The sublimation flux can now be modified by the new function 'recomp_tend_h2o' to account for the growth of a dust lag layer (see Eran Vos's note for the formula).
  • Addition of a function 'itp_tsoil' to compute the soil temperature at any point in the soil profile.

JBC

File:
1 edited

Legend:

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

    r3609 r3610  
    6565use pemetat0_mod,               only: pemetat0
    6666use read_data_PCM_mod,          only: read_data_PCM
    67 use recomp_tend_co2_mod,        only: recomp_tend_co2
     67use recomp_tend_mod,            only: recomp_tend_co2, recomp_tend_h2o
    6868use compute_soiltemp_mod,       only: compute_tsoil_pem, shift_tsoil2surf
    6969use writediagpem_mod,           only: writediagpem, writediagsoilpem
     
    211211real, dimension(:,:,:,:), allocatable :: tsoil_timeseries                 ! Grid points x Soil x Slope x Times field: Soil temperature timeseries [K]
    212212real, dimension(:,:,:,:), allocatable :: tsoil_PEM_timeseries             ! Grid points x Soil x Slope x Times field: Soil temperature timeseries for PEM [K]
     213real, dimension(:,:,:,:), allocatable :: tsoil_PEM_timeseries_old         ! Grid points x Soil x Slope x Times field: Soil temperature timeseries for PEM at the previous time step [K]
    213214real, dimension(:,:,:,:), allocatable :: watersoil_density_timeseries     ! Grid points x Soil x Slope x Times Water soil density timeseries [kg /m^3]
    214215real, dimension(:,:),     allocatable :: watersurf_density_avg            ! Grid points x Slope: Averaged  water surface density [kg/m^3]
     
    227228real, dimension(:,:),     allocatable :: zshift_surf                      ! Elevation shift for the surface [m]
    228229real, dimension(:,:),     allocatable :: zlag                             ! Newly built lag thickness [m]
     230real, dimension(:,:),     allocatable :: icetable_depth_old               ! Old depth of the ice table
    229231
    230232! Some variables for the PEM run
     
    857859! II_d.3 Update soil temperature
    858860        write(*,*)"> Updating soil temperature profile"
     861        allocate(tsoil_avg_old(ngrid,nsoilmx_PEM),tsoil_PEM_timeseries_old(ngrid,nsoilmx_PEM,nslope,timelen))
     862        tsoil_PEM_timeseries_old = tsoil_PEM_timeseries
    859863        do islope = 1,nslope
    860864            tsoil_avg_old = tsoil_PEM(:,:,islope)
     
    878882
    879883! II_d.4 Update the ice table
    880         allocate(icetable_thickness_old(ngrid,nslope),ice_porefilling_old(ngrid,nsoilmx_PEM,nslope))
     884        allocate(icetable_thickness_old(ngrid,nslope),ice_porefilling_old(ngrid,nsoilmx_PEM,nslope),icetable_depth_old(ngrid,nslope))
    881885        if (icetable_equilibrium) then
    882886            write(*,*) "> Updating ice table (equilibrium method)"
     
    887891            write(*,*) "> Updating ice table (dynamic method)"
    888892            ice_porefilling_old = ice_porefilling
     893            icetable_depth_old = icetable_depth
    889894            allocate(porefill(nsoilmx_PEM))
    890895            do ig = 1,ngrid
     
    971976!------------------------
    972977    call recomp_tend_co2(ngrid,nslope,timelen,d_co2ice,d_co2ice_ini,co2_ice,emis,vmr_co2_PCM,vmr_co2_PEM_phys,ps_timeseries,ps_avg_global_old,ps_avg_global_new)
    973     deallocate(vmr_co2_PEM_phys)
     978    do ig = 1,ngrid
     979        do islope = 1,nslope
     980            call recomp_tend_h2o(icetable_depth_old(ig,islope),icetable_depth(ig,islope),tsurf_avg(ig,islope),tsoil_PEM_timeseries_old(ig,:,islope,:),tsoil_PEM_timeseries(ig,:,islope,:),d_h2oice(ig,islope))
     981        enddo
     982    enddo
     983    deallocate(vmr_co2_PEM_phys,icetable_depth_old,tsoil_PEM_timeseries_old)
    974984
    975985!------------------------
Note: See TracChangeset for help on using the changeset viewer.