- Timestamp:
- Nov 7, 2024, 2:48:08 PM (2 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh
r3495 r3498 52 52 53 53 if [ -v n_mars_years ] && [ ! -z "$n_mars_years" ]; then 54 if [ $n_mars_years -lt 1]; then54 if [ $n_mars_years -lt 0. ]; then 55 55 echo "Error: the value of 'n_mars_years' must be >0!" 56 56 errlaunch 57 57 fi 58 58 elif [ -v n_earth_years ] && [ ! -z "$n_earth_years" ]; then 59 if [ $n_earth_years -lt 1]; then59 if [ $n_earth_years -lt 0. ]; then 60 60 echo "Error: the value of 'n_earth_years' must be >0!" 61 61 errlaunch … … 132 132 echo "Number of years to be simulated: $n_myear Martian years." 133 133 elif [ -v n_earth_years ]; then 134 n_myear=$(echo " ($n_earth_years/$convert_years + 0.999999)/1" | bc) # Ceiling of n_earth_years/convert_years134 n_myear=$(echo "$n_earth_years/$convert_years" | bc -l) 135 135 echo "Number of years to be simulated: $n_earth_years Earth years = $n_myear Martian years." 136 136 fi … … 141 141 echo "This is a chained simulation for PEM and PCM runs in $dir on $machine by $user." 142 142 convertyears 143 i_myear=0 143 i_myear=0. 144 144 iPEM=1 145 145 iPCM=1 … … 176 176 errlaunch 177 177 fi 178 else # Mode: launching jobs178 else # Mode: submitting jobs 179 179 cp PCMrun.job PCMrun${iPCM}.job 180 180 sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" PCMrun${iPCM}.job … … 187 187 fi 188 188 ((iPCM++)) 189 ((i_myear++))189 i_myear = $(echo "$i_myear + 1." | bc - l) 190 190 ((ii++)) 191 191 else … … 201 201 errlaunch 202 202 fi 203 else # Mode: launching jobs203 else # Mode: submitting jobs 204 204 cp PCMrun.job PCMrun${iPCM}.job 205 205 sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" PCMrun${iPCM}.job … … 209 209 fi 210 210 ((iPCM++)) 211 ((i_myear++))211 i_myear = $(echo "$i_myear + 1." | bc - l) 212 212 else 213 213 endlaunch … … 226 226 errlaunch 227 227 fi 228 else # Mode: launching jobs228 else # Mode: submitting jobs 229 229 sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPEM}/" PEMrun.job 230 230 jobID=$(eval "$submit_job PEMrun.job") … … 255 255 errlaunch 256 256 fi 257 else # Mode: launching jobs257 else # Mode: submitting jobs 258 258 sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPEM}/" PEMrun.job 259 259 jobID=$(eval "$submit_dependjob=afterok:${jobID} PEMrun.job")
Note: See TracChangeset
for help on using the changeset viewer.