Ignore:
Timestamp:
Dec 20, 2024, 5:26:29 PM (11 months ago)
Author:
fhourdin
Message:

Automatic installation of SPLA version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/LMDZ_Setup/script_SIMU

    r5429 r5438  
    187187
    188188cp -f DEF/* .
    189 #---The following changes in .def files will only be visible in the running directory (on SCRATCH if $reseau_local = 0)
    190 # They concern variables that change during runtime : nday, dayref, anneeref, ndayh
    191 # The other "sed" were totally or partially moved in setup.sh, to be done in $MAINDIR/DEF/*.def, before creating $MAINDIR/$SIMU (more transparent)
    192 #sed -e 's/ok_guide=.*.$/ok_guide='$ok_guide'/' DEF/guide.def >| guide.def
    193 #sed -e 's/nday=.*.$/nday='$nday'/' -e 's/dayref=.*.$/dayref='${dayref}'/' -e 's/calend=.*.$/calend='$calend'/' -e 's/anneeref=.*.$/anneeref='$year'/' DEF/run.def >| run.def
    194 
    195 #=====!!!!!!!!====!!!!!!====!!!!+++====!!!!!!====!!!!!!!=====!!!!!!====z!!!====!!!!========!!!!!========!!!
    196 ##POUR que des TESTS soyent tres RAPIDES (pour ex, verifier fichiers input), ON FORCE nday=1 jour  !!!
    197 #nday=1
    198 #=====!!!!!!!!====!!!!!!====!!!!+++====!!!!!!====!!!!!!!=====!!!!!!====z!!!====!!!!========!!!!!========!!!
    199 
    200 sed -e 's/nday=.*.$/nday='$nday'/' -e 's/dayref=.*.$/dayref='${dayref}'/' -e 's/anneeref=.*.$/anneeref='$year'/' DEF/run.def >| run.def
     189
     190# Forcing some parameters in run.def and config.def
     191sed -e 's/nday=.*.$/nday='$nday'/' -e 's/dayref=.*.$/dayref='${dayref}'/' \
     192    -e 's/anneeref=.*.$/anneeref='$year'/' DEF/run.def >| run.def
    201193sed -e 's/phys_out_filetimesteps=[[:space:]]*[0-9][0-9]day/phys_out_filetimesteps=  '$ndayh'day/'  DEF/config.def >| config.def
    202 #--- End of *.def changes in the $WWORKD only
    203194
    204195${GET} $SIMUDIR/start.$ym.nc start.nc
     
    216207echo '# NOTE: Si "aerosols=n" dans setup.sh, script_SIMU met flag_aerosol=0 et on tourne SANS aerosols'
    217208echo '####################################################################'
     209
    218210if [ "`grep 'flag_aerosol=' config.def | head -1 | cut -d= -f2`" != 0 ] ; then
    219211  if [ $aerosols = clim ] ; then
    220212    # if [ $climato = 1 ] ; then suf=clim ; else suf=$year ; fi
    221     suf=clim
    222     # Le script pourrait être sophistique pour prendre des aerosols interannuels
     213    suf=clim # pas d'aerosols interannuels jusque là
    223214    ${GET} $LIMITDIR/aerosols.$suf.nc aerosols$year.nc
    224     if [ ! -f aerosols1980.nc ] ; then ${GET} $LIMITDIR/aerosols.$suf.nc aerosols1980.nc ; fi
     215    if [ ! -f aerosols1980.nc ] ; then
     216       ${GET} $LIMITDIR/aerosols.$suf.nc aerosols1980.nc
     217    fi
    225218    ${GET} $LIMITDIR/aerosols.nat.nc aerosols.nat.nc
    226219  fi
     
    228221  if [[ $aerosols = "spla" ]]; then
    229222    get_input_files ln_from_pub SPLA_WA/emissions
    230     ln -s dust$mo.nc dust.nc
    231     # Le calcul d'emissions de sels marins utilise les vents ERA-10m interpoles sur grille_s (lonv,latu) avec le script era2gcm_uv10m.sh
    232     # NB : GET=ln -s ; ERA10mDIR contient lui-meme le lien ERA10m vers le repertoire des vents interpoles $REA_uv10m (REA=ERA5, ERAI ou OPERA)
    233     echo WORK IN PROGRESS FOR SPLA ; exit 1
    234     ventl="u10m.nc v10m.nc"
    235     for file in $ventl ; do ${GET} $ERA10mDIR/${year}/${month}/$file . ; done
     223    ln -s dust$month.nc dust.nc
     224    for var in u10m v10m u v ; do
     225        ln_from_pub 3DInputData/SPLA_WA/ERA5/$year/$month $var.nc
     226    done
     227    # Le calcul d'emissions de sels marins utilise les vents ERA-10m
     228    # interpoles sur grille_s (lonv,latu) avec le script era2gcm_uv10m.sh
     229    # NB : GET=ln -s ; ERA10mDIR contient lui-meme le lien ERA10m vers le
     230    #le repertoire des vents interpoles $REA_uv10m (REA=ERA5, ERAI ou OPERA)
     231
    236232  fi
    237233fi
    238234
    239 #----------------------------------------
    240 # Noveaux forcages a activer a l'avenir
    241 #   (commentes en attendant) :
    242 #----------------------------------------
    243 #for file in climoz_LMDZ.nc solarforcing.nc  taulwstrat.2D.nc  tauswstrat.2D.nc ; do
    244 #   ${GET} $LIMITDIR/$file $file
    245 #done
    246 #----------------------------------------
     235#--------------------------------------------------------------------------
     236# Noveaux forcages a activer a l'avenir (commentes en attendant) :
     237# climoz_LMDZ.nc solarforcing.nc taulwstrat.2D.nc tauswstrat.2D.nc ; do
     238#--------------------------------------------------------------------------
    247239
    248240${GET} $SIMUDIR/gcm.e gcm.e ; chmod  +x gcm.e
     
    252244
    253245    set +e ; for t in stomate sechiba ; do cp $SIMUDIR/start_$t.$ym.nc ${t}_rest_in.nc ; done ; set -e
    254     #For Orchidee trunk (post-CMIP6), orchidee_pft.def must be copied in addition to orchidee.def
     246    #For Orchidee trunk (post-CMIP6), orchidee_pft.def must be copied
     247    #   in addition to orchidee.def
    255248    \cp -f DEF/orchidee*.def .
    256249
    257     # If no sechiba restart is found, the restart files for sechiba, stomate,
    258     # and routing are created on line in the simulation, requiring Orchidee input files
     250    # If no sechiba restart file, the restart files for sechiba, stomate,
     251    # and routing are created on line, thus requiring Orchidee input files
    259252    if [ ! -f sechiba_rest_in.nc ] ; then
    260253
    261        get_input_files ln_from_pub Orchidee # linking all orchidee input files
     254       get_input_files ln_from_pub Orchidee # linking orchidee input files
    262255
    263256       ln -sf alb_bg_modisopt_2D_ESA_v2.nc alb_bg.nc
     
    391384fi
    392385
    393 
    394386echo '##################################################################'
    395387echo      'lancement de la simulation suivante tmp_'$simul' depuis :'
    396388echo '##################################################################'
    397389pwd
    398 
    399 
    400390cd $SCRIPTDIR
    401391submitcmd tmp_$simul
Note: See TracChangeset for help on using the changeset viewer.