Changeset 3349 for trunk/LMDZ.COMMON
- Timestamp:
- May 31, 2024, 10:46:55 AM (6 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 4 added
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3347 r3349 327 327 == 27/05/2024 == LL 328 328 Fixing bug in update_soilthermal properties: in case of an ice table, the dry regolith was wrongly initialized. 329 330 == 31/05/2024 == JBC 331 New script called "launchPEM.sh" to launch a chained simulation of PCM/PEM runs: 332 - It is far more efficient since it submits a cycle of PCM/PEM dependent jobs waiting in the SLURM queue. Plus, it does not involve a endless running master script; 333 - It is more robust and user-friendly since it holds lots of warning/error messages handling different situations. It can take arguments to adapt to the needs of the user. It also creates automotically a script called "kill_launchPEM.sh" to cancel all the current dependent jobs. 334 There are 3 other files to make it work: 335 - "lib_launchPEM.sh" which is the library containing the bash functions used by the script; 336 - "jobPCM.slurm" which is the SLURM job script for the PCM used as a template by the script; 337 - "jobPEM.slurm" which is the SLURM job script for the PEM used as a template by the script. 338 More info in the "README" of the deftank. -
trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90
r3339 r3349 30 30 use ice_table_mod, only: icetable_equilibrium, icetable_dynamic 31 31 use layering_mod, only: layering_algo 32 use info_PEM_mod, only: iPCM, iPEM, nPCM, nPCM_ini 32 33 33 34 implicit none … … 48 49 stop 49 50 else 50 read(100,*) i_myear, n_myears, convert_years 51 read(100,*) i_myear, n_myears, convert_years, iPCM, iPEM, nPCM, nPCM_ini 51 52 endif 52 53 close(100) -
trunk/LMDZ.COMMON/libf/evolution/deftank/README
r3152 r3349 1 1 This folder contains all the files needed to run the Planetary Evolution Model (PEM). 2 2 3 # launch _pem.sh:3 # launchPEM.sh: 4 4 Bash script file to launch the chained simulation of PEM and PCM runs. 5 5 The user has to specify: 6 6 (i) n_mars_years, n_earth_years -> the number of Mars/Earth years to be simulated in total; 7 (ii) nPCM -> the number of PCM calls between PEM runs (usually nPCM=2); 8 (iii) exePEM -> the name of executable file for the PEM run; 9 (iv) exeReshape -> the name of executable file for the data reshaping task with XIOS. 7 (ii) nPCM_ini -> the number of initial PCM runs (at least 2); 8 (iii) nPCM -> the number of PCM runs between each PEM run (usually 2). 9 The script can take an argument: 10 - If there is no argument, then the script initiates a PEM simulation from scratch. 11 - If the argument is 're', then the script relaunches an existing PEM simulation. It will ask for parameters to know the starting point that you want to. 12 13 # liblaunchPEM.sh: 14 Library of bash functions used by the PEM launching script "launchPEM.sh". 15 16 # jobPCM.slurm: 17 Bash script file to run the PCM with a SLURM job. The name of the PCM executable file should be adapted. The header corresponds to the ADASTRA supercomputer and should be changed for other machines. 10 18 The path to source the arch file should be adapted to the machine. 11 19 12 # exePCM.sh: 13 Bash script file to run the PCM with a SLURM job. The name of the PCM executable file should be adapted. The header corresponds to the ADASTRA supercomputer and should be changed for other machines. 20 # jobPEM.slurm: 21 Bash script file to run the PEM with a SLURM job. The name of the PEM executable file and Reshaping executable file should be adapted. The header corresponds to the ADASTRA supercomputer and should be changed for other machines. 22 The path to source the arch file should be adapted to the machine. 14 23 15 24 # run_PEM.def … … 23 32 Bash script file to modify orbital parameters in the file "startfi.nc" (obliquity, eccentricity, Ls perihelion and possibly initial Ls). They should be consistent with Laskar's data in "obl_ecc_lsp.asc" to start a chained simulation at a specific date. 24 33 34 # modify_startfi_var.sh: 35 Bash script file to modify the value of a variable in a file "startfi.nc". 36 37 # inipem_orbit.sh: 38 Bash script file to modify the orbital parameters of a file "startfi.nc" according to the date set in the file "run_PEM.def". 39 25 40 # concat_diagpem.sh: 26 41 Bash script file to concatenate along the variable 'Time' all the "diagpem.nc" files of the PEM into one NetCDF file. 'Time' is re-indexed with the numbering of Martian years simulated by the PEM run. 42 43 # output_layering.py: 44 Python script file to output the stratification data from the "startpem.nc" files. 27 45 28 46 Note: -
trunk/LMDZ.COMMON/libf/evolution/info_PEM_mod.F90
r3297 r3349 2 2 3 3 implicit none 4 5 integer :: iPCM, iPEM, nPCM, nPCM_ini ! Data about the chained simulation of PCM/PEM runs 4 6 5 7 !======================================================================= … … 28 30 logical :: ok 29 31 integer :: cstat 30 character(10) :: ich1, ich2, fch32 character(10) :: ich1, ich2, ich3, ich4, ich5, ich6, fch 31 33 32 34 !----- Code … … 36 38 write(ich2,'(i0)') n_myear 37 39 write(fch,'(f0.4)') convert_years ! 4 digits to the right of the decimal point to respect the precision of Martian year in "launch_pem.sh" 38 call execute_command_line('sed -i "1s/.*/'//trim(ich1)//' '//trim(ich2)//' '//trim(fch)//'/" info_PEM.txt',cmdstat = cstat) 40 write(ich3,'(i0)') iPCM 41 write(ich4,'(i0)') iPEM + 1 42 write(ich5,'(i0)') nPCM 43 write(ich6,'(i0)') nPCM_ini 44 call execute_command_line('sed -i "1s/.*/'//trim(ich1)//' '//trim(ich2)//' '//trim(fch)//' '//trim(ich3)//' '//trim(ich4)//' '//trim(ich5)//' '//trim(ich6)//'/" info_PEM.txt',cmdstat = cstat) 39 45 if (cstat > 0) then 40 46 error stop 'info_PEM: command execution failed!'
Note: See TracChangeset
for help on using the changeset viewer.