Changeset 4091 for trunk/LMDZ.COMMON/libf
- Timestamp:
- Feb 27, 2026, 3:54:06 PM (28 hours ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 7 edited
-
changelog.txt (modified) (1 diff)
-
config.F90 (modified) (3 diffs)
-
deftank/clean.sh (modified) (1 diff)
-
deftank/pcm_run.job (modified) (1 diff)
-
deftank/pem_run.job (modified) (2 diffs)
-
deftank/pem_workflow_lib.sh (modified) (8 diffs)
-
deftank/visu_layering_evol.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r4090 r4091 889 889 == 27/02/2026 == JBC 890 890 Update README and change "startpem.nc" into "startevol.nc". 891 892 == 27/02/2026 == JBC 893 Small corrections in the scripts -
trunk/LMDZ.COMMON/libf/evolution/config.F90
r4074 r4091 24 24 25 25 character(7), parameter :: rundef_name = 'run.def' 26 character(11), parameter :: run PCMdef_name = 'run_pcm.def'26 character(11), parameter :: run_pcmdef_name = 'run_pcm.def' 27 27 character(12), parameter :: callphys_name = 'callphys.def' 28 28 … … 350 350 ! CODE 351 351 ! ---- 352 inquire(file = run PCMdef_name,exist = here)353 if (.not. here) call stop_clean(__FILE__,__LINE__,'cannot find required file "'//run PCMdef_name//'"!',1)354 call print_msg('> Reading "'//run PCMdef_name//'"')355 open(newunit = funit,file = run PCMdef_name,status = 'old',form = 'formatted',action = 'read',iostat = ierr)356 if (ierr /= 0) call stop_clean(__FILE__,__LINE__,'error opening file "'//run PCMdef_name//'"!',ierr)352 inquire(file = run_pcmdef_name,exist = here) 353 if (.not. here) call stop_clean(__FILE__,__LINE__,'cannot find required file "'//run_pcmdef_name//'"!',1) 354 call print_msg('> Reading "'//run_pcmdef_name//'"') 355 open(newunit = funit,file = run_pcmdef_name,status = 'old',form = 'formatted',action = 'read',iostat = ierr) 356 if (ierr /= 0) call stop_clean(__FILE__,__LINE__,'error opening file "'//run_pcmdef_name//'"!',ierr) 357 357 358 358 found = .false. … … 385 385 close(funit) 386 386 387 if (.not. found) call print_msg('Warning: key ''hybrid'' not found in the file "'//run PCMdef_name//'"!')387 if (.not. found) call print_msg('Warning: key ''hybrid'' not found in the file "'//run_pcmdef_name//'"!') 388 388 if (hybrid .eqv. hybrid_in) call print_msg('USING DEFAULTS : hybrid = '//bool2str(hybrid_in)) 389 389 -
trunk/LMDZ.COMMON/libf/evolution/deftank/clean.sh
r4090 r4091 12 12 rm -f Bands*.dat 13 13 rm -f pem_workflow.sts 14 find . -type f -name " PCMrun*.job" ! -name "pcm_run.job" -delete14 find . -type f -name "pcm_run*.job" ! -name "pcm_run.job" -delete 15 15 rm -f *.out 16 16 rm -f kill_pem_workflow.sh -
trunk/LMDZ.COMMON/libf/evolution/deftank/pcm_run.job
r4074 r4091 47 47 48 48 # Copy data files and prepare the next run 49 mv run.log logs/run PCM${i_pcm_run}.log49 mv run.log logs/run_pcm${i_pcm_run}.log 50 50 if [ -f "diagfi.nc" ]; then 51 51 mv diagfi.nc diags/diagfi${i_pcm_run}.nc -
trunk/LMDZ.COMMON/libf/evolution/deftank/pem_run.job
r4090 r4091 41 41 42 42 # Copy data files and prepare the next run 43 mv run.log logs/run PEM${i_pem_run}.log43 mv run.log logs/run_pem${i_pem_run}.log 44 44 if [ -f "diagevol.nc" ]; then 45 45 mv diagevol.nc diags/diagevol${i_pem_run}.nc … … 50 50 cp restartevol.nc starts/restartevol${i_pem_run}.nc 51 51 mv restartevol.nc startevol.nc 52 cp restartfi.nc starts/restartfi_post PEM${i_pem_run}.nc52 cp restartfi.nc starts/restartfi_postpem${i_pem_run}.nc 53 53 mv restartfi.nc startfi.nc 54 54 if [ -f "restart.nc" ]; then 55 cp restart.nc starts/restart_post PEM${i_pem_run}.nc55 cp restart.nc starts/restart_postpem${i_pem_run}.nc 56 56 mv restart.nc start.nc 57 57 elif [ -f "restart1D.txt" ]; then 58 cp restart1D.txt starts/restart1D_post PEM${i_pem_run}.txt58 cp restart1D.txt starts/restart1D_postpem${i_pem_run}.txt 59 59 mv restart1D.txt start1D.txt 60 60 fi -
trunk/LMDZ.COMMON/libf/evolution/deftank/pem_workflow_lib.sh
r4090 r4091 298 298 # arg3: local number of the PCM run from which to start (optional) 299 299 submit_pcm_phase() { 300 find . -type f -name " PCMrun*.job" ! -name "pcm_run.job" -delete300 find . -type f -name "pcm_run*.job" ! -name "pcm_run.job" -delete 301 301 ii=1 302 302 if [ ! -z $3 ]; then … … 312 312 fi 313 313 else # Mode: submitting jobs 314 cp pcm_run.job PCMrun${i_pcm_run}.job315 sed -i -E "/^$job_name/s/(.*[^0-9])([0-9]+)(_[^0-9]*)?$/\1${i_pcm_run}\3/" PCMrun${i_pcm_run}.job316 sed -i "s/^k=-\?[0-9]\+$/k=$(echo "$ii - $2 + 2" | bc)/" PCMrun${i_pcm_run}.job314 cp pcm_run.job pcm_run${i_pcm_run}.job 315 sed -i -E "/^$job_name/s/(.*[^0-9])([0-9]+)(_[^0-9]*)?$/\1${i_pcm_run}\3/" pcm_run${i_pcm_run}.job 316 sed -i "s/^k=-\?[0-9]\+$/k=$(echo "$ii - $2 + 2" | bc)/" pcm_run${i_pcm_run}.job 317 317 if [[ "$job_scheduler" == "SLURM" ]]; then 318 jobID=$(sbatch --parsable PCMrun${i_pcm_run}.job)318 jobID=$(sbatch --parsable pcm_run${i_pcm_run}.job) 319 319 elif [[ "$job_scheduler" == "PBS" ]]; then 320 jobID=$(qsub PCMrun${i_pcm_run}.job | cut -d. -f1)320 jobID=$(qsub pcm_run${i_pcm_run}.job | cut -d. -f1) 321 321 fi 322 322 # Create a file to cancel the dependent jobs of the cycle … … 340 340 fi 341 341 else # Mode: submitting jobs 342 cp pcm_run.job PCMrun${i_pcm_run}.job343 sed -i -E "/^$job_name/s/(.*[^0-9])([0-9]+)(_[^0-9]*)?$/\1${i_pcm_run}\3/" PCMrun${i_pcm_run}.job344 sed -i "s/^k=-\?[0-9]\+$/k=$(echo "$i - $2 + 2" | bc)/" PCMrun${i_pcm_run}.job342 cp pcm_run.job pcm_run${i_pcm_run}.job 343 sed -i -E "/^$job_name/s/(.*[^0-9])([0-9]+)(_[^0-9]*)?$/\1${i_pcm_run}\3/" pcm_run${i_pcm_run}.job 344 sed -i "s/^k=-\?[0-9]\+$/k=$(echo "$i - $2 + 2" | bc)/" pcm_run${i_pcm_run}.job 345 345 if [[ "$job_scheduler" == "SLURM" ]]; then 346 jobID=$(sbatch --parsable --dependency=afterok:${jobID} PCMrun${i_pcm_run}.job)346 jobID=$(sbatch --parsable --dependency=afterok:${jobID} pcm_run${i_pcm_run}.job) 347 347 elif [[ "$job_scheduler" == "PBS" ]]; then 348 jobID=$(qsub -W depend=afterok:${jobID} PCMrun${i_pcm_run}.job | cut -d. -f1)348 jobID=$(qsub -W depend=afterok:${jobID} pcm_run${i_pcm_run}.job | cut -d. -f1) 349 349 fi 350 350 echo $kill_job $jobID >> kill_pem_workflow.sh … … 447 447 cleanup diags/Xoutdaily4pem .nc $i_resume 448 448 cleanup diags/Xoutyearly4pem .nc $i_resume 449 cleanup logs/run PCM.log $i_resume449 cleanup logs/run_pcm .log $i_resume 450 450 cleanup starts/restart1D .txt $i_resume 451 451 cleanup starts/restart .nc $i_resume … … 464 464 cleanup diags/diagevol .nc $(($i_pem_run - 1)) 465 465 cleanup diags/diagevol_soil .nc $(($i_pem_run - 1)) 466 cleanup logs/run PEM.log $(($i_pem_run - 1))467 cleanup starts/restart1D_post PEM.txt $(($i_pem_run - 1))468 cleanup starts/restart_post PEM.nc $(($i_pem_run - 1))469 cleanup starts/restartfi_post PEM.nc $(($i_pem_run - 1))466 cleanup logs/run_pem .log $(($i_pem_run - 1)) 467 cleanup starts/restart1D_postpem .txt $(($i_pem_run - 1)) 468 cleanup starts/restart_postpem .nc $(($i_pem_run - 1)) 469 cleanup starts/restartfi_postpem .nc $(($i_pem_run - 1)) 470 470 cleanup starts/restartevol .nc $(($i_pem_run - 1)) 471 471 rm -f startevol.nc … … 494 494 cleanup diags/diagevol .nc $(($i_pem_run - 1)) 495 495 cleanup diags/diagevol_soil .nc $(($i_pem_run - 1)) 496 cleanup logs/run PEM.log $(($i_pem_run - 1))497 cleanup starts/restart1D_post PEM.txt $(($i_pem_run - 1))498 cleanup starts/restart_post PEM.nc $(($i_pem_run - 1))499 cleanup starts/restartfi_post PEM.nc $(($i_pem_run - 1))496 cleanup logs/run_pem .log $(($i_pem_run - 1)) 497 cleanup starts/restart1D_postpem .txt $(($i_pem_run - 1)) 498 cleanup starts/restart_postpem .nc $(($i_pem_run - 1)) 499 cleanup starts/restartfi_postpem .nc $(($i_pem_run - 1)) 500 500 cleanup starts/restartevol .nc $(($i_pem_run - 1)) 501 501 cp starts/restartevol$(($i_pem_run - 1)).nc startevol.nc … … 525 525 cleanup diags/diagfi .nc $(($i_pcm_run - 1)) 526 526 cleanup diags/diagsoil .nc $(($i_pcm_run - 1)) 527 cleanup logs/run PCM.log $(($i_pcm_run - 1))527 cleanup logs/run_pcm .log $(($i_pcm_run - 1)) 528 528 cleanup starts/restart1D .txt $(($i_pcm_run - 1)) 529 529 cleanup starts/restart .nc $(($i_pcm_run - 1)) … … 533 533 cleanup diags/diagevol .nc $i_resume 534 534 cleanup diags/diagevol_soil .nc $i_resume 535 cleanup logs/run PEM.log $i_resume536 cleanup starts/restart1D_post PEM.txt $i_resume537 cleanup starts/restart_post PEM.nc $i_resume538 cleanup starts/restartfi_post PEM.nc $i_resume535 cleanup logs/run_pem .log $i_resume 536 cleanup starts/restart1D_postpem .txt $i_resume 537 cleanup starts/restart_postpem .nc $i_resume 538 cleanup starts/restartfi_postpem .nc $i_resume 539 539 cleanup starts/restartevol .nc $i_resume 540 540 cp starts/restartevol${i_resume}.nc startevol.nc 541 cp starts/restartfi_post PEM${i_resume}.nc startfi.nc542 if [ -f "starts/restart_post PEM${i_resume}.nc" ]; then543 cp starts/restart_post PEM${i_resume}.nc start.nc544 elif [ -f "starts/restart1D_post PEM${i_resume}.txt" ]; then545 cp starts/restart1D_post PEM${i_resume}.txt start1D.txt541 cp starts/restartfi_postpem${i_resume}.nc startfi.nc 542 if [ -f "starts/restart_postpem${i_resume}.nc" ]; then 543 cp starts/restart_postpem${i_resume}.nc start.nc 544 elif [ -f "starts/restart1D_postpem${i_resume}.txt" ]; then 545 cp starts/restart1D_postpem${i_resume}.txt start1D.txt 546 546 fi 547 547 submit_cycle $1 $n_pcm_runs -
trunk/LMDZ.COMMON/libf/evolution/deftank/visu_layering_evol.py
r4090 r4091 918 918 def read_orbital_data_nc(starts_folder, infofile=None): 919 919 """ 920 Read orbital parameters from restartfi_post PEM*.nc files in starts_folder.920 Read orbital parameters from restartfi_postpem*.nc files in starts_folder. 921 921 """ 922 922 if not os.path.isdir(starts_folder): … … 929 929 dates_yr = None 930 930 931 pattern = os.path.join(starts_folder, "restartfi_post PEM*.nc")931 pattern = os.path.join(starts_folder, "restartfi_postpem*.nc") 932 932 files = glob(pattern) 933 933 if not files: … … 936 936 def extract_number(path): 937 937 name = os.path.basename(path) 938 prefix = 'restartfi_post PEM'938 prefix = 'restartfi_postpem' 939 939 if name.startswith(prefix) and name.endswith('.nc'): 940 940 num_str = name[len(prefix):-3]
Note: See TracChangeset
for help on using the changeset viewer.
