Changeset 4090 for trunk/LMDZ.COMMON/libf
- Timestamp:
- Feb 27, 2026, 2:04:34 PM (3 days ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 14 edited
-
changelog.txt (modified) (1 diff)
-
clim_state_init.F90 (modified) (2 diffs)
-
clim_state_rec.F90 (modified) (3 diffs)
-
deftank/README (modified) (6 diffs)
-
deftank/clean.sh (modified) (1 diff)
-
deftank/pem_run.job (modified) (1 diff)
-
deftank/pem_workflow_lib.sh (modified) (4 diffs)
-
deftank/run_pem.def (modified) (2 diffs)
-
deftank/visu_layering.py (modified) (1 diff)
-
deftank/visu_layering_evol.py (modified) (3 diffs)
-
io_netcdf.F90 (modified) (1 diff)
-
pem.F90 (modified) (2 diffs)
-
soil_temp.F90 (modified) (1 diff)
-
xios_data.F90 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r4076 r4090 886 886 == 18/02/2026 == JBC 887 887 Fallback for 128-bit integers since this type is not supported by Intel Fortran. 888 889 == 27/02/2026 == JBC 890 Update README and change "startpem.nc" into "startevol.nc". -
trunk/LMDZ.COMMON/libf/evolution/clim_state_init.F90
r4071 r4090 308 308 ! 309 309 ! DESCRIPTION 310 ! Read the file "start pem.nc" which stores the PEM state.310 ! Read the file "startevol.nc" which stores the PEM state. 311 311 ! 312 312 ! AUTHORS & DATE … … 367 367 integer(di) :: i, islope, k, nb_str_max, nsoil_startpem 368 368 real(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 start pem[SI]370 real(dp), dimension(ngrid,nsoil,nslope) :: tsoil_startpem ! Soil temperature saved in the start pem[K]369 real(dp), dimension(ngrid,nsoil,nslope) :: TI_startpem ! Soil thermal inertia saved in the startevol [SI] 370 real(dp), dimension(ngrid,nsoil,nslope) :: tsoil_startpem ! Soil temperature saved in the startevol [K] 371 371 real(dp), dimension(:,:,:,:), allocatable :: layerings_array ! Array for layerings 372 372 -
trunk/LMDZ.COMMON/libf/evolution/clim_state_rec.F90
r4071 r4090 25 25 ! VARIABLES 26 26 ! --------- 27 logical(k4), private :: is_restartpem = .false. ! Flag to know if "restart pem.nc" exists27 logical(k4), private :: is_restartpem = .false. ! Flag to know if "restartevol.nc" exists 28 28 29 29 contains … … 397 397 call check_nc(nf90_put_att(ncid,varid,'title','Layering ice pore volume fraction'),'putting title attribute for stratif_poreice_volfrac') 398 398 end if 399 399 400 ! Global attributes 400 401 call check_nc(nf90_put_att(ncid,nf90_global,'title','PEM start file'),'putting global attribute') … … 421 422 ! 422 423 ! DESCRIPTION 423 ! Write the file "restart pem.nc".424 ! Write the file "restartevol.nc". 424 425 ! 425 426 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/deftank/README
r4074 r4090 24 24 Options with example: 25 25 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; 27 27 3) [dimensions]: 64x48x54 to define the grid you want to use (longitude x latitude x atmospheric layers). 28 28 To 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 … … 45 45 > the def files you want to run the PCM: "run.def", "callphys.def", "traceur.def", etc. 46 46 /!\ 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"; 48 48 > 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 "start pem.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. 50 50 51 51 The PEM files can be found in the deftank folder. 52 52 53 53 Before 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". 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 reading "obl_ecc_lsp.asc". 59 59 60 60 Outputs: 61 61 -------- 62 62 The 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; 64 64 > the XIOS outputs of the PCM: "Xoutdaily4pem*.nc"/"Xoutyearly4pem*.nc"; 65 65 > 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: "restart fi.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". 67 67 During 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). 68 68 If 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. … … 73 73 Bash script file to launch the chained simulation of PEM and PCM runs. 74 74 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. 79 79 The script can take an argument: 80 80 1) None: to start a simulation from scratch; … … 89 89 > 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. 90 90 > 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. 93 93 94 94 # pem_run.job: … … 97 97 > 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. 98 98 > 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). 101 101 102 102 # run_pem.def 103 103 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". 105 105 106 106 # obl_ecc_lsp.asc [default], obl_ecc_lsp_pos.asc [future years] … … 126 126 127 127 # visu_layering.py: 128 Python script file to output the stratification data from the "start pem.nc" files.128 Python script file to output the stratification data from the "startevol.nc" files. 129 129 130 130 # visu_layering_evol.py: 131 Python script file to output the stratification data over time from the "start pem.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 35 35 cp starts/start1D.txt . 36 36 fi 37 if [ -f "starts/start pem.nc" ]; then38 cp starts/start pem.nc .37 if [ -f "starts/startevol.nc" ]; then 38 cp starts/startevol.nc . 39 39 fi 40 40 # Cleaning of files in the sub-folders -
trunk/LMDZ.COMMON/libf/evolution/deftank/pem_run.job
r4074 r4090 48 48 mv diagevol_soil.nc diags/diagevol_soil${i_pem_run}.nc 49 49 fi 50 cp restart pem.nc starts/restartpem${i_pem_run}.nc51 mv restart pem.nc startpem.nc50 cp restartevol.nc starts/restartevol${i_pem_run}.nc 51 mv restartevol.nc startevol.nc 52 52 cp restartfi.nc starts/restartfi_postPEM${i_pem_run}.nc 53 53 mv restartfi.nc startfi.nc -
trunk/LMDZ.COMMON/libf/evolution/deftank/pem_workflow_lib.sh
r4074 r4090 285 285 cp start1D.txt starts/ 286 286 fi 287 if [ -f "start pem.nc" ]; then288 cp start pem.nc starts/287 if [ -f "startevol.nc" ]; then 288 cp startevol.nc starts/ 289 289 fi 290 290 … … 468 468 cleanup starts/restart_postPEM .nc $(($i_pem_run - 1)) 469 469 cleanup starts/restartfi_postPEM .nc $(($i_pem_run - 1)) 470 cleanup starts/restart pem.nc $(($i_pem_run - 1))471 rm -f start pem.nc472 if [ -f "starts/start pem.nc" ]; then473 cp starts/start pem.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 . 474 474 fi 475 475 if [ $i_resume -eq $(($n_pcm_runs_ini - 1)) ]; then … … 498 498 cleanup starts/restart_postPEM .nc $(($i_pem_run - 1)) 499 499 cleanup starts/restartfi_postPEM .nc $(($i_pem_run - 1)) 500 cleanup starts/restart pem.nc $(($i_pem_run - 1))501 cp starts/restart pem$(($i_pem_run - 1)).nc startpem.nc500 cleanup starts/restartevol .nc $(($i_pem_run - 1)) 501 cp starts/restartevol$(($i_pem_run - 1)).nc startevol.nc 502 502 if [ $il -eq $(($n_pcm_runs - 1)) ]; then # Second to last PCM run 503 503 cp diags/Xoutdaily4pem${i_resume}.nc Xoutdaily4pem_Y1.nc … … 537 537 cleanup starts/restart_postPEM .nc $i_resume 538 538 cleanup starts/restartfi_postPEM .nc $i_resume 539 cleanup starts/restart pem.nc $i_resume540 cp starts/restart pem${i_resume}.nc startpem.nc539 cleanup starts/restartevol .nc $i_resume 540 cp starts/restartevol${i_resume}.nc startevol.nc 541 541 cp starts/restartfi_postPEM${i_resume}.nc startfi.nc 542 542 if [ -f "starts/restart_postPEM${i_resume}.nc" ]; then -
trunk/LMDZ.COMMON/libf/evolution/deftank/run_pem.def
r4074 r4090 2 2 # Run control parameters for the PEM # 3 3 #------------------------------------# 4 5 #---------- Planet type ----------#6 planet_type=mars7 4 8 5 #---------- Output parameters ----------# … … 77 74 78 75 #---------- Ice management parameters ----------# 79 # Amount of H2O ice to initialize the huge reservoir if the variable is not present in "start pem.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) 80 77 # h2oice_huge_ini=9200. 81 78 -
trunk/LMDZ.COMMON/libf/evolution/deftank/visu_layering.py
r3926 r4090 1 1 #!/usr/bin/env python3 2 2 ####################################################################################### 3 ### Python script to output the stratification data from the "restart pem#.nc" files ###3 ### Python script to output the stratification data from the "restartevol#.nc" files ### 4 4 ####################################################################################### 5 5 -
trunk/LMDZ.COMMON/libf/evolution/deftank/visu_layering_evol.py
r4072 r4090 1 1 #!/usr/bin/env python3 2 2 ####################################################################################################### 3 ### Python script to output stratification data over time from "restart pem#.nc" files ###3 ### Python script to output stratification data over time from "restartevol#.nc" files ### 4 4 ### and to plot orbital parameters from "obl_ecc_lsp.asc" ### 5 5 ####################################################################################################### … … 21 21 Prompt the user for: 22 22 - folder_path: directory containing NetCDF files (default: "starts") 23 - base_name: base filename (default: "restart pem")23 - base_name: base filename (default: "restartevol") 24 24 - infofile: name of the PEM info file (default: "pem_workflow.sts") 25 25 Validates existence of folder and infofile before returning. … … 37 37 base_name = input( 38 38 "Enter the base name of the NetCDF files " 39 "(press Enter for default [restart pem]): "40 ).strip() or "restart pem"39 "(press Enter for default [restartevol]): " 40 ).strip() or "restartevol" 41 41 42 42 infofile = input( -
trunk/LMDZ.COMMON/libf/evolution/io_netcdf.F90
r4071 r4090 32 32 character(11), parameter :: start1D_name = 'start1D.txt' 33 33 character(10), parameter :: startfi_name = 'startfi.nc' 34 character(1 1), parameter :: startpem_name = 'startpem.nc'34 character(12), parameter :: startpem_name = 'startevol.nc' 35 35 character(19), parameter :: xios_day_name1 = 'Xoutdaily4pem_Y1.nc' ! XIOS daily output file, second to last PCM year 36 36 character(19), parameter :: xios_day_name2 = 'Xoutdaily4pem_Y2.nc' ! XIOS daily output file, last PCM year -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r4076 r4090 203 203 call compute_maxyr_orbit(n_yr_sim,nmax_yr_runorb) 204 204 205 ! Read the "start pem.nc"205 ! Read the "startevol.nc" 206 206 allocate(h2o_ice(ngrid,nslope),co2_ice(ngrid,nslope)) 207 207 allocate(h2o_ads_reg(ngrid,nsoil,nslope),co2_ads_reg(ngrid,nsoil,nslope),delta_h2o_ads(ngrid),delta_co2_ads(ngrid)) … … 492 492 call build4PCM_surf_rad_prop(h2o_ice,co2_ice,albedo4PCM,emissivity4PCM) 493 493 494 ! Write the "start pem.nc"494 ! Write the "startevol.nc" 495 495 call write_restartpem(h2o_ice,co2_ice,tsoil_avg,TI,icetable_depth,icetable_thickness,ice_porefilling,h2o_ads_reg,co2_ads_reg,layerings_map) 496 496 -
trunk/LMDZ.COMMON/libf/evolution/soil_temp.F90
r4074 r4090 551 551 552 552 !======================================================================= 553 SUBROUTINE evolve_soil_temp(tsoil_avg, tsurf_avg, tsoil_ts, tsoil_ts_old,h2o_soildensity_avg)553 SUBROUTINE evolve_soil_temp(tsoil_avg,tsurf_avg,tsoil_ts,tsoil_ts_old,h2o_soildensity_avg) 554 554 !----------------------------------------------------------------------- 555 555 ! NAME -
trunk/LMDZ.COMMON/libf/evolution/xios_data.F90
r4071 r4090 73 73 character(:), allocatable :: num ! To read slope variables 74 74 real(dp), dimension(ngrid,nsoil,nslope,nday) :: h2o_soildensity_ts 75 75 76 ! CODE 76 77 ! ---- … … 143 144 end if 144 145 end do 146 145 147 ! Close the NetCDF file of XIOS outputs 146 148 call close_nc(xios_yr_name2)
Note: See TracChangeset
for help on using the changeset viewer.
