Nemo example runscript

From SourceWiki
Revision as of 11:22, 18 January 2008 by GethinWilliams (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
    1. SX6NEC CEA ##
  1. PBS -N EXP.1
  2. PBS -o output_EXP.1
  3. PBS -j oe
  4. PBS -S /usr/bin/ksh
    1. PBS -l mem=3.6gb
    2. PBS -l cput=1:01:00
  5. PBS -q long_ib
    1. PBS -l cpunum_prc=4
    2. PBS -q parallel
    3. Script to run a short experiment when installing the
    4. ORCA2_LIM configuration
    5. Rachid Benshila, OPA System Team
    6. -- print echo of commands before and after shell interpretation

date set -vx cd ${HOME}/modipsl/config/ORCA2_LIM/EXP00

  1. Beginning of user modification

export LD_LIBRARY_PATH="/usr/local/Cluster-Apps/ofed/1.2.5/lib:/usr/local/Cluster-Apps/ofed/1.2.5/lib64:/usr/loca l/Cluster-Apps/torque/2.1.7//lib/:/usr/local/Cluster-Apps/maui/3.2.6p19//lib/:/usr/local/Cluster-Apps/pgi/6.2.5/l inux86-64/6.2/libso:/usr/local/Cluster-Apps/ofed/1.2.5/mpi/pgi/mvapich-0.9.9/lib:/usr/local/Cluster-Apps/ofed/1.2 .5/mpi/pgi/mvapich-0.9.9/lib/shared:/usr/local/netcdf/3.6.2/pgi-251/lib"

    1. -- define some directories :

export DUMP2HOLD="/exports/gpfsbig/work/bristol/${USER}/"

  1. - Input file storing

R_FORCING="${HOME}/NEMO_forcing"

  1. - Launching run repository

R_EXPER=${PWD}

  1. - modipsl repository

R_EXEDIR=${HOME}/modipsl

  1. - execution repository

R_TMP="$DUMP2HOLD/NEMO/$$/"

  1. - output files storing

R_SORTIE_OCE=${R_TMP}/output/

    1. -- define processus number : to change when running in mpp

NB_PROC=1

  1. End of user modification
  1. -- define a fonction to get the input tarfile

Rapatrie () { [ -f $1/$2 ] || ( cp ${R_FORCING}/$2 $1 ; cd $1; tar xvf $2 ;) }

[ -d ${R_TMP} ] || mkdir -p ${R_TMP} cd ${R_TMP}

  1. -- get the executable

cp ${R_EXEDIR}/bin/opa opa.xx chmod 777 opa.xx

    1. -- Copy ancillary files
  1. - Namelist for ocean and ice

cp ${R_EXPER}/namelist_ice namelist_ice cp ${R_EXPER}/namelist namelist

  1. - Namelist for ocean and ice (agrif fine grid)

cp ${R_EXPER}/1_namelist_ice 1_namelist_ice cp ${R_EXPER}/1_namelist 1_namelist cp ${R_EXPER}/AGRIF_FixedGrids.in AGRIF_FixedGrids.in

  1. - Files for the configuration and ocean dynamics

Rapatrie ${R_TMP} ORCA2_LIM_nemo_v2.tar

ls -alF

export F_PROGINF=yes export F_ERRCNT=5

  1. - To be use for a mpp run
  2. mpirun -np ${NB_PROC} ./opa.xx

set

echo $HOSTNAME ldd opa.xx ls /usr/local/netcdf/3.6.2/pgi-251/lib/libnetcdff.so.4

./opa.xx

    1. -- Save output files

ls -alF

    1. - to copy on a storage machine
  1. DPUT=putfer
  2. [ -d ${R_SORTIE_OCE} ] || mkdir -p ${R_SORTIE_OCE}
    1. - Save ocean output files
  3. $DPUT *ocean.output ${R_SORTIE_OCE}/.
  4. $DPUT *solver.stat ${R_SORTIE_OCE}/.
  5. [ -f *mpp.output* ] && $DPUT *mpp.output* ${R_SORTIE_OCE}/.
  6. for file_netcdf in *_grid_*.nc
  7. do
  8. $DPUT ${file_netcdf} ${R_SORTIE_OCE}/${file_netcdf}
  9. done
    1. - Save ice output files
  10. for file_netcdf in *icemod*
  11. do
  12. $DPUT ${file_netcdf} ${R_SORTIE_OCE}/${file_netcdf}
  13. done
  14. $DPUT ice.evolu ${R_SORTIE_OCE}/ice.evolu
    1. - Save restart files
  15. for restart in *restart*
  16. do
  17. $DPUT ${restart} ${R_SORTIE_OCE}/${restart}
  18. done
    1. - Save ftrace file
  19. [ -f ftrace.out* ] && $DPUT ftrace.out* ${R_SORTIE_OCE}/.