Changeset 3145 for trunk/LMDZ.MARS/deftank
- Timestamp:
- Dec 1, 2023, 1:48:25 PM (13 months ago)
- Location:
- trunk/LMDZ.MARS/deftank/pem
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/deftank/pem/concat_diagpem.sh
r3143 r3145 19 19 20 20 # Checking if everything is ok 21 if [ ! -d "$directory" ]; then 22 echo "Error: directory \"$diags\" not found!" 23 exit 1 24 fi 21 25 if [ ${#files[@]} -lt 2 ]; then 22 echo "Error: there are not enough files for concatenation!"23 exit 126 echo "Error: there are not enough files for concatenation!" 27 exit 1 24 28 fi 25 29 if [ -f "$output_file" ]; then -
trunk/LMDZ.MARS/deftank/pem/launch_pem.sh
r3136 r3145 38 38 exeReshape=reshape_XIOS_output_64x48x29_phymars_seq.e 39 39 40 #------------------------------ Parameters -----------------------------41 myear=686.9725 # Number of Earth days in Martian year42 eyear=365.256363004 # Number of days in Earth year43 44 40 #------ Check if files/directories necessary for the script exist ------ 45 41 dir=`pwd` 46 42 machine=`hostname` 47 43 address=`whoami` 44 if [ ! -f "$exePEM" ]; then 45 echo "Error: file \"$exePEM\" does not exist in $dir!" 46 exit 1 47 fi 48 if [ ! -f "$exeReshape" ]; then 49 echo "Error: file \"$exeReshape\" does not exist in $dir!" 50 exit 1 51 fi 48 52 if [ ! -f "exePCM.sh" ]; then 49 53 echo "Error: file \"exePCM.sh\" does not exist in $dir!" … … 92 96 address=`whoami` 93 97 echo "This is a chained simulation for PEM and PCM runs in $dir on $machine." 98 myear=686.9725 # Number of Earth days in Martian year 99 eyear=365.256363004 # Number of days in Earth year 94 100 convert_years=$(echo "$myear/$eyear" | bc -l) 95 101 convert_years=$(printf "%.4f" $convert_years) # Rounding to the 4th decimal to respect the precision of Martian year … … 110 116 if [ -f "start.nc" ]; then 111 117 cp start.nc starts/ 118 elif [ -f "star1D.nc" ]; then 119 cp star1D.txt starts/ 112 120 fi 113 121 -
trunk/LMDZ.MARS/deftank/pem/modify_startfi_orbit.sh
r3093 r3145 15 15 16 16 # Calculate modified values 17 if [ ! -f "$name_file" ]; then 18 echo "Error: file \"$name_file\" not found!" 19 exit 1 20 fi 17 21 year_day=669. 18 22 halfaxe=227.94 … … 26 30 zx0=$(echo "-2.*a($tan*sqrt((1. - $new_ecc)/(1. + $new_ecc)))" | bc -l) 27 31 if [ $(echo "$zx0 <= 0." | bc -l) -eq 1 ]; then 28 zx0=$(echo "$zx0 + 2.*$pi" | bc -l)32 zx0=$(echo "$zx0 + 2.*$pi" | bc -l) 29 33 fi 30 34 peri_day=$(echo "$year_day*(1. - ($zx0 - $new_ecc*s($zx0))/(2.*$pi))" | bc -l) … … 36 40 new_inisol=$(echo "$peri_day + $xref*$year_day/(2.*$pi)" | bc -l) 37 41 if [ $(echo "$new_inisol < 0." | bc -l) -eq 1 ]; then 38 new_inisol=$(echo "$new_inisol + $year_day" | bc -l)42 new_inisol=$(echo "$new_inisol + $year_day" | bc -l) 39 43 fi 40 44 if [ $(echo "$new_inisol >= $year_day" | bc -l) -eq 1 ]; then 41 new_inisol=$(echo "$new_inisol - $year_day" | bc -l)45 new_inisol=$(echo "$new_inisol - $year_day" | bc -l) 42 46 fi 43 47
Note: See TracChangeset
for help on using the changeset viewer.