Changeset 3386 for trunk/LMDZ.COMMON/libf/evolution
- Timestamp:
- Jun 19, 2024, 6:35:12 PM (5 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3384 r3386 375 375 == 18/06/2024 == JBC 376 376 Correction related to r3330 for the initialization of the global average pressure taken from the PCM: it has to be done before the call of "pemetat0". 377 378 == 19/06/2024 == JBC 379 - Correction for the initialization in 1D due to the change of 'ecritphy' into 'outputs_per_sol' in r3369. 380 - Correction in the condition to check the normal end of a PCM/PEM run in "jobP*M.slurm" files. 381 - Correction of files cleaning in the launching script. 382 - Improvement of the launching script to take into account the modification of parameters for a relaunch. -
trunk/LMDZ.COMMON/libf/evolution/deftank/jobPCM.slurm
r3354 r3386 30 30 cp run_PCM.def run.def 31 31 srun --cpu-bind=threads --label -c${OMP_NUM_THREADS:=1} $exePCM > out_runPCM${iPCM} 2>&1 32 if [ ! -f "restartfi.nc" ] || [ ! tail -n 1 out_runPCM${iPCM} | grep -iq "everything is cool!" ]; then # Check if it ended abnormally32 if [ ! -f "restartfi.nc" ] || ! (tail -n 1 out_runPCM${iPCM} | grep -iq "everything is cool!"); then # Check if it ended abnormally 33 33 echo "Error: the run PCM $iPCM crashed!" 34 34 echo "Be careful: there may be dependent jobs remaining in the SLURM queue with status 'DependencyNeverSatisfied'! You can cancel them by executing the script \"kill_launchPEM.sh\"." … … 38 38 # Copy data files and prepare the next run 39 39 mv out_runPCM${iPCM} out_PCM/run${iPCM} 40 mv diagfi.nc diags/diagfi${iPCM}.nc 40 if [ -f "diagfi.nc" ]; then 41 mv diagfi.nc diags/diagfi${iPCM}.nc 42 fi 41 43 if [ -f "diagsoil.nc" ]; then 42 44 mv diagsoil.nc diags/diagsoil${iPCM}.nc -
trunk/LMDZ.COMMON/libf/evolution/deftank/jobPEM.slurm
r3363 r3386 38 38 cp run_PEM.def run.def 39 39 ./$exePEM > out_runPEM${iPEM} 2>&1 40 if [ ! -f "restartfi.nc" ] || [ ! tail -n 1 out_runPEM${iPEM} | grep -iq "so far, so good!" ]; then # Check if it ended abnormally40 if [ ! -f "restartfi.nc" ] || ! (tail -n 1 out_runPEM${iPEM} | grep -iq "so far, so good!"); then # Check if it ended abnormally 41 41 echo "Error: the run PEM $iPEM crashed!" 42 42 exit 1 … … 45 45 # Copy data files and prepare the next run 46 46 mv out_runPEM${iPEM} out_PEM/run${iPEM} 47 mv diagpem.nc diags/diagpem${iPEM}.nc 47 if [ -f "diagpem.nc" ]; then 48 mv diagpem.nc diags/diagpem${iPEM}.nc 49 fi 48 50 if [ -f "diagsoilpem.nc" ]; then 49 51 mv diagsoilpem.nc diags/diagsoilpem${iPEM}.nc -
trunk/LMDZ.COMMON/libf/evolution/deftank/launchPEM.sh
r3383 r3386 74 74 fi 75 75 done 76 read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini< info_PEM.txt76 read i_myear n_myear_old convert_years iPCM iPEM nPCM_old nPCM_ini_old < info_PEM.txt 77 77 while true; do 78 78 if [ $relaunch = "PCM" ]; then … … 101 101 date 102 102 checklaunch 103 convertyears 104 if [ $nPCM_ini -ne $nPCM_ini_old ]; then 105 echo "The number of initial PCM runs has been modified from $nPCM_ini_old to $nPCM_ini." 106 fi 107 if [ $nPCM -ne $nPCM_old ]; then 108 echo "The number of PCM runs between each PEM run has been modified from $nPCM_old to $nPCM." 109 fi 110 if [ $n_myear -ne $n_myear_old ]; then 111 echo "The number of initial PCM runs has been modified from $n_myear_old to $n_myear." 112 fi 113 sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt 103 114 if [ $relaunch = "PCM" ]; then 104 115 relaunchPCM -
trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh
r3383 r3386 108 108 } 109 109 110 # To initialize the launching script 111 initlaunch() { 112 echo "This is a chained simulation for PEM and PCM runs in $dir on $machine by $user." 110 # To convert Earth years into Mars years 111 convertyears() { 113 112 myear=686.9725 # Number of Earth days in Martian year 114 113 eyear=365.256363004 # Number of days in Earth year … … 122 121 echo "Number of years to be simulated: $n_earth_years Earth years = $n_myear Martian years." 123 122 fi 123 } 124 125 # To initialize the launching script 126 initlaunch() { 127 echo "This is a chained simulation for PEM and PCM runs in $dir on $machine by $user." 128 convertyears 124 129 i_myear=0 125 130 iPEM=1 … … 137 142 138 143 # To submit the PCM runs 144 # arg1: number of PCM runs to launch 145 # arg2: local number of the PCM run from which to start (optional) 139 146 submitPCM() { 140 147 find . -type f -name "jobPCM*.slurm" ! -name "jobPCM.slurm" -delete … … 191 198 192 199 # To make one cycle of PCM and PEM runs 200 # arg1: number of PCM runs to launch 201 # arg2: local number of the PCM run from which to start (optional) 193 202 cyclelaunch() { 194 203 # PCM runs … … 207 216 208 217 # To clean files after the starting run of the relaunch 218 # arg1: file name prefix to clean 219 # arg2: file name extension to clean 220 # arg3: file number from which to clean 209 221 cleanfiles() { 210 222 prefix=$1 … … 232 244 iPCM=$(($irelaunch + 1)) 233 245 cleanfiles diags/diagfi .nc $irelaunch 246 cleanfiles diags/data2reshape .nc $irelaunch 234 247 cleanfiles "out_PCM/run" "" $irelaunch 235 248 cleanfiles starts/restart1D .txt $irelaunch … … 256 269 if [ $irelaunch -eq $(($nPCM_ini - 1)) ]; then 257 270 cp diags/data2reshape${irelaunch}.nc data2reshape_Y1.nc 258 cleanfiles diags/data2reshape .nc $irelaunch259 271 cyclelaunch $nPCM_ini $irelaunch 260 272 elif [ $irelaunch -eq $nPCM_ini ]; then 261 273 cp diags/data2reshape$(($irelaunch - 1)).nc data2reshape_Y1.nc 262 274 cp diags/data2reshape${irelaunch}.nc data2reshape_Y2.nc 263 cleanfiles diags/data2reshape .nc $(($irelaunch - 1))264 275 submitPEM # The next job is a PEM run 265 276 else 266 cleanfiles diags/data2reshape .nc 0267 277 cyclelaunch $nPCM_ini $iPCM 268 278 fi … … 282 292 sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt 283 293 cp diags/data2reshape${irelaunch}.nc data2reshape_Y1.nc 284 cleanfiles diags/data2reshape .nc $irelaunch285 294 cyclelaunch $nPCM $il 286 295 elif [ $il -eq 0 ]; then … … 289 298 cp diags/data2reshape$(($irelaunch - 1)).nc data2reshape_Y1.nc 290 299 cp diags/data2reshape${irelaunch}.nc data2reshape_Y2.nc 291 cleanfiles diags/data2reshape .nc $(($irelaunch - 1))292 300 submitPEM # The next job is a PEM run 293 301 else 294 302 i_myear=$(($(awk "NR==$iPEM {print \$1}" "info_PEM.txt") + $il)) 295 303 sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt 296 cleanfiles diags/data2reshape .nc $irelaunch297 304 cyclelaunch $nPCM $il 298 305 fi -
trunk/LMDZ.COMMON/libf/evolution/deftank/visu_layering.py
-
Property
svn:executable
set to
*
-
Property
svn:executable
set to
-
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3384 r3386 99 99 use control_mod, only: iphysiq, day_step, nsplit_phys 100 100 #else 101 use time_phylmdz_mod, only: iphysiq, day_step101 use time_phylmdz_mod, only: iphysiq, steps_per_sol 102 102 use regular_lonlat_mod, only: init_regular_lonlat 103 103 use physics_distribution_mod, only: init_physics_distribution … … 263 263 integer :: nsplit_phys 264 264 integer, parameter :: jjm_value = jjm - 1 265 integer :: day_step 265 266 266 267 ! Dummy variables to use the subroutine 'init_testphys1d' … … 342 343 #ifndef CPP_1D 343 344 dtphys = daysec/48. ! Dummy value (overwritten in phyetat0) 345 day_step = steps_per_sol 344 346 call conf_gcm(99,.true.) 345 347 call infotrac_init
Note: See TracChangeset
for help on using the changeset viewer.