Ignore:
Timestamp:
Feb 27, 2026, 2:04:34 PM (3 days ago)
Author:
jbclement
Message:

PEM:
Update README and change "startpem.nc" into "startevol.nc".
JBC

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

Legend:

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

    r4076 r4090  
    886886== 18/02/2026 == JBC
    887887Fallback for 128-bit integers since this type is not supported by Intel Fortran.
     888
     889== 27/02/2026 == JBC
     890Update README and change "startpem.nc" into "startevol.nc".
  • trunk/LMDZ.COMMON/libf/evolution/clim_state_init.F90

    r4071 r4090  
    308308!
    309309! DESCRIPTION
    310 !     Read the file "startpem.nc" which stores the PEM state.
     310!     Read the file "startevol.nc" which stores the PEM state.
    311311!
    312312! AUTHORS & DATE
     
    367367integer(di)                               :: i, islope, k, nb_str_max, nsoil_startpem
    368368real(dp)                                  :: delta           ! Depth of the interface regolith/breccia, breccia/bedrock [m]
    369 real(dp), dimension(ngrid,nsoil,nslope)   :: TI_startpem     ! Soil thermal inertia saved in the startpem [SI]
    370 real(dp), dimension(ngrid,nsoil,nslope)   :: tsoil_startpem  ! Soil temperature saved in the startpem [K]
     369real(dp), dimension(ngrid,nsoil,nslope)   :: TI_startpem     ! Soil thermal inertia saved in the startevol [SI]
     370real(dp), dimension(ngrid,nsoil,nslope)   :: tsoil_startpem  ! Soil temperature saved in the startevol [K]
    371371real(dp), dimension(:,:,:,:), allocatable :: layerings_array ! Array for layerings
    372372
  • trunk/LMDZ.COMMON/libf/evolution/clim_state_rec.F90

    r4071 r4090  
    2525! VARIABLES
    2626! ---------
    27 logical(k4), private :: is_restartpem = .false. ! Flag to know if "restartpem.nc" exists
     27logical(k4), private :: is_restartpem = .false. ! Flag to know if "restartevol.nc" exists
    2828
    2929contains
     
    397397    call check_nc(nf90_put_att(ncid,varid,'title','Layering ice pore volume fraction'),'putting title attribute for stratif_poreice_volfrac')
    398398end if
     399
    399400! Global attributes
    400401call check_nc(nf90_put_att(ncid,nf90_global,'title','PEM start file'),'putting global attribute')
     
    421422!
    422423! DESCRIPTION
    423 !    Write the file "restartpem.nc".
     424!    Write the file "restartevol.nc".
    424425!
    425426! AUTHORS & DATE
  • trunk/LMDZ.COMMON/libf/evolution/deftank/README

    r4074 r4090  
    2424Options with example:
    2525    1) [local]     : root name of arch files, assuming that they have been set up for your configuration;
    26     2) [planet]    : mars to use the Mars planet physics package;
     26    2) [planet]    : mars to use the PEM dedicated to the Mars planet;
    2727    3) [dimensions]: 64x48x54 to define the grid you want to use  (longitude x latitude x atmospheric layers).
    2828To run the PEM, you need a PCM working with XIOS and consistent options. To compile it, in "LMDZ.COMMON", do: ./makelmdz_fcm -arch [local] -p [planet] -parallel mpi_omp -io xios -d [dimensions] -j 8 gcm
     
    4545    > the def files you want to run the PCM: "run.def", "callphys.def", "traceur.def", etc.
    4646      /!\ Do not forget to rename the PCM "run.def" into "run_pcm.def";
    47     > the starting files you want to run the PCM: "startfi.nc", "start.nc"/"start1D.txt"/profiles;
     47    > the starting files you want to run the PCM: "startfi.nc" and "start.nc"/"start1D.txt";
    4848    > the necessary PEM files: "pem_workflow.sh", "pem_workflow_lib.sh", "pcm_run.job", "pem_run.job", "run_pem.def" and "obl_ecc_lsp.asc";
    49     > the optional PEM files: "diagevol.def" to define the PEM variables to be ouputted and "startpem.nc" to set the initial state of the PEM.
     49    > the optional PEM files: "diagevol.def" to define the PEM variables to be ouputted and "startevol.nc" to set the initial state of the PEM.
    5050
    5151The PEM files can be found in the deftank folder.
    5252
    5353Before a simulation, you have to set up some parameters/options in:
    54     > "pem_workflow.sh";
    55     > "pcm_run.job";
    56     > "pem_run.job";
    57     > def files, especially for "run_pem.def", "run_pcm.def", "callphys.def".
    58 In addition, the user has to provide a "startfi.nc" whose orbital parameters are consistent with the initial date set in "run_pem.def". The script "ini_pem_orbit.sh" can do it automatically with "obl_ecc_lsp.asc".
     54    > "pem_workflow.sh" (see below for details);
     55    > "pcm_run.job" (see below for details);
     56    > "pem_run.job" (see below for details);
     57    > def files, especially for "run_pem.def", "run_pcm.def" and "callphys.def" which must be consistent. In particular, "run_pem.def" needs to include some definitions for the physics in file "run_pcm.def" with "INCLUDEDEF=run_pcm.def".
     58In addition, the user has to provide a "startfi.nc" whose orbital parameters are consistent with the initial date set in "run_pem.def". The script "ini_pem_orbit.sh" can do it automatically reading "obl_ecc_lsp.asc".
    5959
    6060Outputs:
    6161--------
    6262The PEM simulation generates the following files:
    63     > the usual outputs of the PCM: "restartfi.nc", "restart.nc", "diagfi.nc", etc;
     63    > the usual outputs of the PCM: "restartfi.nc", "restart.nc"/"restart1D.txt", "diagfi.nc", etc;
    6464    > the XIOS outputs of the PCM: "Xoutdaily4pem*.nc"/"Xoutyearly4pem*.nc";
    6565    > the outputs of the chained simulation: "pem_workflow.log", "pem_workflow.sts" and possibly "kill_pem_workflow.sh";
    66     > the usual outputs of the PEM: "restartfi.nc", "restart.nc"/"restart1D.txt" and "diagevol.nc".
     66    > the usual outputs of the PEM: "restartevol.nc", "restartfi.nc", "restart.nc"/"restart1D.txt" and "diagevol.nc".
    6767During the simulation, the PCM/PEM run files are renamed conveniently and stored in the sub-directories "logs" (log files), "starts" (starting files) and "diags" (diagnostic files).
    6868If you run a simulation by submitting jobs, the script "kill_pem_workflow.sh" is automatically generated. It can be used to kill the jobs related to your chained simulation in the queue of the job scheduler.
     
    7373  Bash script file to launch the chained simulation of PEM and PCM runs.
    7474  The user has to specify:
    75       > n_mars_years, n_earth_years -> the number of Mars/Earth years to be simulated in total (> 0);
    76       > n_pcm_runs_ini -> the number of initial PCM years (>= 2);
    77       > n_pcm_runs -> the number of PCM years between each PEM run (>= 2, usually 2);
    78       > exec_mode -> the execution mode (0 = "processing scripts"; any other values = "submitting jobs"). The former option is usually used to process the script on a local machine while the latter is used to submit jobs on a supercomputer with SLURM or PBS/TORQUE.
     75      > 'n_planetary_years' or 'n_earth_years' -> the number of Planetary/Earth years to be simulated in total (> 0);
     76      > 'n_pcm_runs_ini' -> the number of initial PCM years (>= 2);
     77      > 'n_pcm_runs' -> the number of PCM years between each PEM run (>= 2, usually 2);
     78      > 'exec_mode' -> the execution mode (0 = "processing scripts"; any other values = "submitting jobs"). The former option is usually used to process the script on a local machine while the latter is used to submit jobs on a supercomputer with SLURM or PBS/TORQUE.
    7979  The script can take an argument:
    8080      1) None: to start a simulation from scratch;
     
    8989      > The headers correspond to the ADASTRA supercomputer and should be changed for other machines and job schedulers. In case of "processing scripts" execution mode, the headers are naturally omitted.
    9090      > The path to source the arch file should be adapted to the machine.
    91       > The name of the PCM executable file should be adapted.
    92       > The execution command should also be adapted according to the set-up.
     91      > 'pcm_exe', the name of the PCM executable file should be adapted.
     92      > 'exec_cmd', the execution command should also be adapted according to the set-up.
    9393
    9494# pem_run.job:
     
    9797      > The headers correspond to the ADASTRA supercomputer and should be changed for other machines and job schedulers. In case of "processing scripts" execution mode, the headers are naturally omitted.
    9898      > The path to source the arch file should be adapted to the machine.
    99       > The name of the PEM executable file should be adapted.
    100       > The PEM executable can have an optional argument which should be specified according to the set-up ("--auto-exit" for SLURM and PBS/TORQUE | "" when the script is not run as a job).
     99      > 'pem_exe', the name of the PEM executable file should be adapted.
     100      > 'pem_arg', the PEM executable can have an optional argument which should be specified according to the set-up ("--auto-exit" for SLURM and PBS/TORQUE | "" when the script is not run as a job).
    101101
    102102# run_pem.def
    103103  All the possible parameters to define a PEM run (read in "config.F90").
    104   It needs to include in "run_pcm.def" with "INCLUDEDEF=run_pem.def".
     104  It needs to include some definitions for the physics in file "run_pcm.def" with "INCLUDEDEF=run_pcm.def".
    105105
    106106# obl_ecc_lsp.asc [default], obl_ecc_lsp_pos.asc [future years]
     
    126126
    127127# visu_layering.py:
    128   Python script file to output the stratification data from the "startpem.nc" files.
     128  Python script file to output the stratification data from the "startevol.nc" files.
    129129
    130130# visu_layering_evol.py:
    131   Python script file to output the stratification data over time from the "startpem.nc" files.
     131  Python script file to output the stratification data over time from the "startevol.nc" files.
  • trunk/LMDZ.COMMON/libf/evolution/deftank/clean.sh

    r4072 r4090  
    3535    cp starts/start1D.txt .
    3636fi
    37 if [ -f "starts/startpem.nc" ]; then
    38     cp starts/startpem.nc .
     37if [ -f "starts/startevol.nc" ]; then
     38    cp starts/startevol.nc .
    3939fi
    4040# Cleaning of files in the sub-folders
  • trunk/LMDZ.COMMON/libf/evolution/deftank/pem_run.job

    r4074 r4090  
    4848    mv diagevol_soil.nc diags/diagevol_soil${i_pem_run}.nc
    4949fi
    50 cp restartpem.nc starts/restartpem${i_pem_run}.nc
    51 mv restartpem.nc startpem.nc
     50cp restartevol.nc starts/restartevol${i_pem_run}.nc
     51mv restartevol.nc startevol.nc
    5252cp restartfi.nc starts/restartfi_postPEM${i_pem_run}.nc
    5353mv restartfi.nc startfi.nc
  • trunk/LMDZ.COMMON/libf/evolution/deftank/pem_workflow_lib.sh

    r4074 r4090  
    285285        cp start1D.txt starts/
    286286    fi
    287     if [ -f "startpem.nc" ]; then
    288         cp startpem.nc starts/
     287    if [ -f "startevol.nc" ]; then
     288        cp startevol.nc starts/
    289289    fi
    290290
     
    468468        cleanup starts/restart_postPEM .nc $(($i_pem_run - 1))
    469469        cleanup starts/restartfi_postPEM .nc $(($i_pem_run - 1))
    470         cleanup starts/restartpem .nc $(($i_pem_run - 1))
    471         rm -f startpem.nc
    472         if [ -f "starts/startpem.nc" ]; then
    473             cp starts/startpem.nc .
     470        cleanup starts/restartevol .nc $(($i_pem_run - 1))
     471        rm -f startevol.nc
     472        if [ -f "starts/startevol.nc" ]; then
     473            cp starts/startevol.nc .
    474474        fi
    475475        if [ $i_resume -eq $(($n_pcm_runs_ini - 1)) ]; then
     
    498498        cleanup starts/restart_postPEM .nc $(($i_pem_run - 1))
    499499        cleanup starts/restartfi_postPEM .nc $(($i_pem_run - 1))
    500         cleanup starts/restartpem .nc $(($i_pem_run - 1))
    501         cp starts/restartpem$(($i_pem_run - 1)).nc startpem.nc
     500        cleanup starts/restartevol .nc $(($i_pem_run - 1))
     501        cp starts/restartevol$(($i_pem_run - 1)).nc startevol.nc
    502502        if [ $il -eq $(($n_pcm_runs - 1)) ]; then # Second to last PCM run
    503503            cp diags/Xoutdaily4pem${i_resume}.nc Xoutdaily4pem_Y1.nc
     
    537537    cleanup starts/restart_postPEM .nc $i_resume
    538538    cleanup starts/restartfi_postPEM .nc $i_resume
    539     cleanup starts/restartpem .nc $i_resume
    540     cp starts/restartpem${i_resume}.nc startpem.nc
     539    cleanup starts/restartevol .nc $i_resume
     540    cp starts/restartevol${i_resume}.nc startevol.nc
    541541    cp starts/restartfi_postPEM${i_resume}.nc startfi.nc
    542542    if [ -f "starts/restart_postPEM${i_resume}.nc" ]; then
  • trunk/LMDZ.COMMON/libf/evolution/deftank/run_pem.def

    r4074 r4090  
    22# Run control parameters for the PEM #
    33#------------------------------------#
    4 
    5 #---------- Planet type ----------#
    6 planet_type=mars
    74
    85#---------- Output parameters ----------#
     
    7774
    7875#---------- Ice management parameters ----------#
    79 # Amount of H2O ice to initialize the huge reservoir if the variable is not present in "startpem.nc". Default = 9200. kg.m-2 (= 10 m)
     76# Amount of H2O ice to initialize the huge reservoir if the variable is not present in "startevol.nc". Default = 9200. kg.m-2 (= 10 m)
    8077# h2oice_huge_ini=9200.
    8178
  • trunk/LMDZ.COMMON/libf/evolution/deftank/visu_layering.py

    r3926 r4090  
    11#!/usr/bin/env python3
    22#######################################################################################
    3 ### Python script to output the stratification data from the "restartpem#.nc" files ###
     3### Python script to output the stratification data from the "restartevol#.nc" files ###
    44#######################################################################################
    55
  • trunk/LMDZ.COMMON/libf/evolution/deftank/visu_layering_evol.py

    r4072 r4090  
    11#!/usr/bin/env python3
    22#######################################################################################################
    3 ### Python script to output stratification data over time from "restartpem#.nc" files               ###
     3### Python script to output stratification data over time from "restartevol#.nc" files               ###
    44### and to plot orbital parameters from "obl_ecc_lsp.asc"                                           ###
    55#######################################################################################################
     
    2121    Prompt the user for:
    2222      - folder_path: directory containing NetCDF files (default: "starts")
    23       - base_name:   base filename (default: "restartpem")
     23      - base_name:   base filename (default: "restartevol")
    2424      - infofile:    name of the PEM info file (default: "pem_workflow.sts")
    2525    Validates existence of folder and infofile before returning.
     
    3737    base_name = input(
    3838        "Enter the base name of the NetCDF files "
    39         "(press Enter for default [restartpem]): "
    40     ).strip() or "restartpem"
     39        "(press Enter for default [restartevol]): "
     40    ).strip() or "restartevol"
    4141
    4242    infofile = input(
  • trunk/LMDZ.COMMON/libf/evolution/io_netcdf.F90

    r4071 r4090  
    3232character(11), parameter :: start1D_name   = 'start1D.txt'
    3333character(10), parameter :: startfi_name   = 'startfi.nc'
    34 character(11), parameter :: startpem_name  = 'startpem.nc'
     34character(12), parameter :: startpem_name  = 'startevol.nc'
    3535character(19), parameter :: xios_day_name1 = 'Xoutdaily4pem_Y1.nc'  ! XIOS daily output file, second to last PCM year
    3636character(19), parameter :: xios_day_name2 = 'Xoutdaily4pem_Y2.nc'  ! XIOS daily output file, last PCM year
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r4076 r4090  
    203203call compute_maxyr_orbit(n_yr_sim,nmax_yr_runorb)
    204204
    205 ! Read the "startpem.nc"
     205! Read the "startevol.nc"
    206206allocate(h2o_ice(ngrid,nslope),co2_ice(ngrid,nslope))
    207207allocate(h2o_ads_reg(ngrid,nsoil,nslope),co2_ads_reg(ngrid,nsoil,nslope),delta_h2o_ads(ngrid),delta_co2_ads(ngrid))
     
    492492call build4PCM_surf_rad_prop(h2o_ice,co2_ice,albedo4PCM,emissivity4PCM)
    493493
    494 ! Write the "startpem.nc"
     494! Write the "startevol.nc"
    495495call write_restartpem(h2o_ice,co2_ice,tsoil_avg,TI,icetable_depth,icetable_thickness,ice_porefilling,h2o_ads_reg,co2_ads_reg,layerings_map)
    496496
  • trunk/LMDZ.COMMON/libf/evolution/soil_temp.F90

    r4074 r4090  
    551551
    552552!=======================================================================
    553 SUBROUTINE evolve_soil_temp(tsoil_avg, tsurf_avg, tsoil_ts, tsoil_ts_old, h2o_soildensity_avg)
     553SUBROUTINE evolve_soil_temp(tsoil_avg,tsurf_avg,tsoil_ts,tsoil_ts_old,h2o_soildensity_avg)
    554554!-----------------------------------------------------------------------
    555555! NAME
  • trunk/LMDZ.COMMON/libf/evolution/xios_data.F90

    r4071 r4090  
    7373character(:),                 allocatable    :: num ! To read slope variables
    7474real(dp), dimension(ngrid,nsoil,nslope,nday) :: h2o_soildensity_ts
     75
    7576! CODE
    7677! ----
     
    143144    end if
    144145end do
     146
    145147! Close the NetCDF file of XIOS outputs
    146148call close_nc(xios_yr_name2)
Note: See TracChangeset for help on using the changeset viewer.