Ignore:
Timestamp:
Mar 17, 2026, 4:22:44 PM (3 weeks ago)
Author:
jbclement
Message:

PEM:

  • Move ice table variables from "ice_table" to the main program.
  • Merge "job_id_mod" and "job_timelimit_mod" into "job" which is relocated to the PEM folder.
  • Rename local variables in procedures to avoid masking variables in parent scope.
  • Few cleanings to delete remaining PEM-external "include" and "use".

JBC

File:
1 edited

Legend:

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

    r4134 r4138  
    1919! ------------
    2020! Common modules
    21 use job_timelimit_mod, only: timelimit, antetime, timewall
    2221use parse_args_mod,    only: parse_args
    23 ! PEM modules
     22
    2423use allocation,         only: ini_allocation, end_allocation
    2524use atmosphere,         only: ps_PCM, evolve_pressure, CO2cond_ps_PCM
     
    3130use geometry,           only: ngrid, nslope, nday, nsoil_PCM, nsoil, cell_area, total_surface, nlayer
    3231use glaciers,           only: h2oice_flow, co2ice_flow, flow_co2glaciers, flow_h2oglaciers
    33 use ice_table,          only: icetable_equilibrium, icetable_dynamic, icetable_depth, icetable_thickness, ice_porefilling, evolve_ice_table
     32use ice_table,          only: icetable_equilibrium, icetable_dynamic, evolve_ice_table
     33use job,                only: timelimit, antetime, timewall
    3434use layered_deposits,   only: layering, do_layering, del_layering, evolve_layering, ptrarray, layering2surfice, surfice2layering, print_layering
    3535use maths,              only: pi
     
    103103real(dp), dimension(:,:,:),   allocatable :: h2o_ads_reg              ! H2O adsorbed in the regolith [kg/m^2]
    104104real(dp), dimension(:,:,:),   allocatable :: co2_ads_reg              ! CO2 adsorbed in the regolith [kg/m^2]
     105real(dp), dimension(:,:),     allocatable :: icetable_depth           ! Depth of the ice table [m]
     106real(dp), dimension(:,:),     allocatable :: icetable_thickness       ! Thickness of the ice table [m]
     107real(dp), dimension(:,:,:),   allocatable :: ice_porefilling          ! Amount of porefilling [m^3/m^3]
    105108real(dp), dimension(:,:),     allocatable :: icetable_depth_old       ! Old depth of the ice table [m]
    106109real(dp), dimension(:),       allocatable :: delta_icetable ! Total mass of the H2O that has sublimated / condenses from the ice table [kg]
     
    191194! Read the "startevo.nc"
    192195allocate(h2o_ice(ngrid,nslope),co2_ice(ngrid,nslope))
     196allocate(icetable_depth(ngrid,nslope),icetable_thickness(ngrid,nslope),ice_porefilling(ngrid,nsoil,nslope))
    193197allocate(h2o_ads_reg(ngrid,nsoil,nslope),co2_ads_reg(ngrid,nsoil,nslope),delta_h2o_ads(ngrid),delta_co2_ads(ngrid))
    194198allocate(layerings_map(ngrid,nslope))
     199icetable_depth(:,:) = 0._dp
     200icetable_thickness(:,:) = 0._dp
     201ice_porefilling(:,:,:) = 0._dp
    195202delta_h2o_ads(:) = 0._dp
    196203delta_co2_ads(:) = 0._dp
     
    485492deallocate(d_h2oice,d_co2ice,d_co2ice_ini)
    486493deallocate(delta_h2o_ads,delta_co2_ads,delta_icetable,icetable_depth_old)
     494deallocate(icetable_depth,icetable_thickness,ice_porefilling)
    487495call end_allocation()
    488496
Note: See TracChangeset for help on using the changeset viewer.