Ignore:
Timestamp:
Nov 7, 2024, 2:48:08 PM (2 weeks ago)
Author:
jbclement
Message:

PEM:

  • Correction of the variable name for the ice table depth in "pemetat0.F90". So it is now got as intended from the "startpem.nc" file;
  • Renaming of the tendencies in the PEM with the prefix 'd_' instead of 'tend_';
  • Modification of the PEM time step type from integer to real. As a consequence, all time variables are now of real type. This change adds the possibility to consider fractions of year as time step.

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh

    r3495 r3498  
    5252
    5353    if [ -v n_mars_years ] && [ ! -z "$n_mars_years" ]; then
    54         if [ $n_mars_years -lt 1 ]; then
     54        if [ $n_mars_years -lt 0. ]; then
    5555            echo "Error: the value of 'n_mars_years' must be >0!"
    5656            errlaunch
    5757        fi
    5858    elif [ -v n_earth_years ] && [ ! -z "$n_earth_years" ]; then
    59         if [ $n_earth_years -lt 1 ]; then
     59        if [ $n_earth_years -lt 0. ]; then
    6060            echo "Error: the value of 'n_earth_years' must be >0!"
    6161            errlaunch
     
    132132        echo "Number of years to be simulated: $n_myear Martian years."
    133133    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_years
     134        n_myear=$(echo "$n_earth_years/$convert_years" | bc -l)
    135135        echo "Number of years to be simulated: $n_earth_years Earth years = $n_myear Martian years."
    136136    fi
     
    141141    echo "This is a chained simulation for PEM and PCM runs in $dir on $machine by $user."
    142142    convertyears
    143     i_myear=0
     143    i_myear=0.
    144144    iPEM=1
    145145    iPCM=1
     
    176176                errlaunch
    177177            fi
    178         else # Mode: launching jobs
     178        else # Mode: submitting jobs
    179179            cp PCMrun.job PCMrun${iPCM}.job
    180180            sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" PCMrun${iPCM}.job
     
    187187        fi
    188188        ((iPCM++))
    189         ((i_myear++))
     189        i_myear = $(echo "$i_myear + 1." | bc - l)
    190190        ((ii++))
    191191    else
     
    201201                    errlaunch
    202202                fi
    203             else # Mode: launching jobs
     203            else # Mode: submitting jobs
    204204                cp PCMrun.job PCMrun${iPCM}.job
    205205                sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPCM}/" PCMrun${iPCM}.job
     
    209209            fi
    210210            ((iPCM++))
    211             ((i_myear++))
     211            i_myear = $(echo "$i_myear + 1." | bc - l)
    212212        else
    213213            endlaunch
     
    226226                errlaunch
    227227            fi
    228         else # Mode: launching jobs
     228        else # Mode: submitting jobs
    229229            sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPEM}/" PEMrun.job
    230230            jobID=$(eval "$submit_job PEMrun.job")
     
    255255                errlaunch
    256256            fi
    257         else # Mode: launching jobs
     257        else # Mode: submitting jobs
    258258            sed -i -E "s/($name_job[^0-9]*[0-9]*[^0-9]*)[0-9]+$/\1${iPEM}/" PEMrun.job
    259259            jobID=$(eval "$submit_dependjob=afterok:${jobID} PEMrun.job")
Note: See TracChangeset for help on using the changeset viewer.