Changeset 3958 for trunk/LMDZ.COMMON/libf/evolution/deftank
- Timestamp:
- Nov 12, 2025, 5:02:00 PM (11 days ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution/deftank
- Files:
-
- 3 edited
-
README (modified) (2 diffs)
-
launchPEM.sh (modified) (2 diffs)
-
lib_launchPEM.sh (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/deftank/README
r3938 r3958 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 dedicated reshaping tool with consistent options. To compile it, in "LMDZ_COMMON", do: ./makelmdz_fcm -arch [local] -p [planet] -d [dimensions] -j 8 reshape_XIOS_output 29 To run the PEM, you also 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 gcm29 To run the PEM, you also 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 30 30 After compilation, the executable file can be found in the "bin" sub-directory. 31 31 … … 75 75 The user has to specify: 76 76 > n_mars_years, n_earth_years -> the number of Mars/Earth years to be simulated in total (> 0); 77 > nPCM_ini -> the number of initial PCM runs (>= 2);78 > nPCM -> the number of PCM runs between each PEM run (>= 2, usually 2);79 > counting -> the counting method for the number of years to be simulated (0 = "only PEM runs count"; any other values = "PCM runs are taken into account"). The former option is the usual one;77 > nPCM_ini -> the number of initial PCM years (>= 2); 78 > nPCM -> the number of PCM years between each PEM run (>= 2, usually 2); 79 > counting -> the counting method for the number of years to be simulated (0 = "only PEM years count"; any other values = "PCM years are taken into account"). The former option is the usual one; 80 80 > mode -> the launching 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. 81 81 The script can take an argument: -
trunk/LMDZ.COMMON/libf/evolution/deftank/launchPEM.sh
r3938 r3958 18 18 #n_earth_years=300. 19 19 20 # Set the number of initial PCM runs (>= 2):20 # Set the number of initial PCM years (>= 2): 21 21 nPCM_ini=3 22 22 23 # Set the number of PCM runs between each PEM run (>= 2):23 # Set the number of PCM years between each PEM run (>= 2): 24 24 nPCM=2 25 25 26 # Set the counting method for the number of years to be simulated (0 = "only PEM runs count"; any other values = "PCM runs are taken into account"). The former option is the usual one:26 # Set the counting method for the number of years to be simulated (0 = "only PEM years count"; any other values = "PCM years are taken into account"). The former option is the usual one: 27 27 counting=0 28 28 … … 117 117 convertyears 118 118 if [ $nPCM_ini -ne $nPCM_ini_old ]; then 119 echo "The number of initial PCM runs has been modified from $nPCM_ini_old to $nPCM_ini."119 echo "The number of initial PCM years has been modified from $nPCM_ini_old to $nPCM_ini." 120 120 fi 121 121 if [ $nPCM -ne $nPCM_old ]; then 122 echo "The number of PCM runs between each PEM run has been modified from $nPCM_old to $nPCM."122 echo "The number of PCM years between each PEM run has been modified from $nPCM_old to $nPCM." 123 123 fi 124 124 if [ "$(echo "$n_myear != $n_myear_old" | bc)" -eq 1 ]; then 125 echo "The number of initial PCM runs has been modified from $n_myear_old to $n_myear."125 echo "The number of initial PCM years has been modified from $n_myear_old to $n_myear." 126 126 fi 127 127 sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt -
trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh
r3909 r3958 135 135 } 136 136 137 # To check if a PCM run is one year 138 check_runyear() { 139 if [ -f "run_PCM.def" ]; then 140 year_sol=$(ncdump -v controle startfi.nc 2>/dev/null | \ 141 sed -n '/controle =/,/;/p' | tr -d '[:space:]' | \ 142 sed 's/.*=//; s/;//' | tr ',' '\n' | sed -n '14p') 143 else 144 year_sol=669 # Length of Martian year (sols) 145 fi 146 sol_in_file=$(awk -F'=' '/^[[:space:]]*(nday|ndt)[[:space:]]*=/ { 147 val=$2 148 gsub(/^[[:space:]]+|[[:space:]]+$/,"",val) 149 print val 150 exit 151 }' run_PCM.def) 152 153 if [ -z "$sol_in_file" ]; then 154 echo "Error: no length of year found in \"run_PCM.def\"!" 155 errlaunch 156 elif [ "$sol_in_file" -eq "$year_sol" ]; then 157 # Good: we do nothing 158 : 159 else 160 echo "Error: length of year mismatch between \"run_PCM.def\" ($sol_in_file) and \"startfi.nc\" ($year_sol)!" 161 errlaunch 162 fi 163 } 164 137 165 # To check if everything necessary for the launching script is ok 138 166 checklaunch() { … … 210 238 get_nslope 211 239 modify_xml 240 # Check if a PCM run is one year 241 check_runyear 212 242 } 213 243 … … 284 314 fi 285 315 ((iPCM++)) 286 if [ $2 -ne 0 ]; then # Counting: PCM runs taken into account316 if [ $2 -ne 0 ]; then # Counting: PCM years taken into account 287 317 i_myear=$(echo "$i_myear + 1." | bc -l) 288 318 fi … … 312 342 fi 313 343 ((iPCM++)) 314 if [ $2 -ne 0 ]; then # Counting: PCM runs taken into account344 if [ $2 -ne 0 ]; then # Counting: PCM years taken into account 315 345 i_myear=$(echo "$i_myear + 1." | bc -l) 316 346 fi … … 425 455 # PCM relaunch during the initialization cycle 426 456 iPEM=1 427 if [ $2 -ne 0 ]; then # Counting: PCM runs taken into account457 if [ $2 -ne 0 ]; then # Counting: PCM years taken into account 428 458 i_myear=$irelaunch 429 else # Counting: only PEM runs count459 else # Counting: only PEM years count 430 460 i_myear=0 431 461 fi … … 456 486 iPEM=$(echo "($iPCM - $nPCM_ini)/$nPCM + 1" | bc) 457 487 il=$(echo "($irelaunch - $nPCM_ini + 1)%$nPCM + 1" | bc) 458 if [ $2 -ne 0 ]; then # Counting: PCM runs taken into account488 if [ $2 -ne 0 ]; then # Counting: PCM years taken into account 459 489 i_myear=$(echo "$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt") + $il" | bc -l) 460 else # Counting: only PEM runs count490 else # Counting: only PEM years count 461 491 i_myear=$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt") 462 492 fi
Note: See TracChangeset
for help on using the changeset viewer.
