#!/bin/bash date export PS4='+ $SECONDS + ' set -xue #----------------------------------------------------------------------- export USHaqm=${EXECaqm:-${HOMEaqm}/ush} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export subcyc='00' export SLASH_ENSMEM_SUBDIR='' export ENSMEM_INDX='##' export pid=${pid:-$$} export outid=${outid:-"LL$job"} export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p ${DATA} cd ${DATA} . $USHaqm/aqm_nco_config.sh . $USHaqm/source_util_funcs.sh export cycle=${cycle:-t${cyc}z} setpdy.sh . ./PDY export CDATE=${PDY}${cyc} . $USHaqm/job_preamble.sh export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} export FIXaqmchem_lbcs="${FIXaqmchem_lbcs:-${HOMEaqm}/fix/chem_lbcs}" export COMINgfs="${COMINgfs:-$(compath.py gfs/${gfs_ver})}" export COMINgefs="${COMINgefs:-$(compath.py gefs/${gefs_ver})}" export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located # (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in # which the file is located (scrfunc_dir). #----------------------------------------------------------------------- # scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" ) scrfunc_fn=$( basename "${scrfunc_fp}" ) scrfunc_dir=$( dirname "${scrfunc_fp}" ) #env #----------------------------------------------------------------------- # Print message indicating entry into script. #----------------------------------------------------------------------- # print_info_msg " ======================================================================== Entering script: \"${scrfunc_fn}\" In directory: \"${scrfunc_dir}\" This is the J-job script for the task that copies/fetches to a local directory (either from disk or HPSS) the aqm boundary conditions from which the model needs. ========================================================================" # #----------------------------------------------------------------------- # Set the name of and create the directory in which the output from this # script will be placed (if it doesn't already exist). #----------------------------------------------------------------------- # export INPUT_DATA="${INPUT_DATA:-${COMIN}/${cyc}}" mkdir -p ${INPUT_DATA} # #----------------------------------------------------------------------- # Set the run directory #----------------------------------------------------------------------- # DATA="${DATA:-${COMIN}${SLASH_ENSMEM_SUBDIR}/tmp_AQM_LBCS}" # #----------------------------------------------------------------------- # Call the ex-script for this J-job and pass to it the necessary variables. #----------------------------------------------------------------------- # ${HOMEaqm}/scripts/exaqm_lbcs.sh export err=$?; err_chk # #====================================================================== msg="JOB ${job} HAS COMPLETED NORMALLY." postmsg "${msg}" if [ "${KEEPDATA}" != "YES" ]; then rm -rf ${DATA} fi #======================================================================= # Print exit message print_info_msg " ======================================================================== Exiting script: \"${scrfunc_fn}\" In directory: \"${scrfunc_dir}\" ========================================================================" # #----------------------------------------------------------------------- # Restore the shell options saved at the beginning of this script/function. #----------------------------------------------------------------------- # { restore_shell_opts; } > /dev/null 2>&1 date