Skip to content

Commit

Permalink
replace SCRIPTSDIR with HOMEgfs/ush
Browse files Browse the repository at this point in the history
  • Loading branch information
aerorahul committed Jul 13, 2023
1 parent 81792f9 commit 03f8f60
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
15 changes: 6 additions & 9 deletions scripts/exglobal_forecast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,13 @@

source "${HOMEgfs}/ush/preamble.sh"

SCRIPTDIR="${HOMEgfs}/ush"
echo "MAIN: environment loaded for ${machine} platform,Current Script locates in ${SCRIPTDIR}."

# include all subroutines. Executions later.
source "${SCRIPTDIR}/cplvalidate.sh" # validation of cpl*
source "${SCRIPTDIR}/forecast_predet.sh" # include functions for variable definition
source "${SCRIPTDIR}/forecast_det.sh" # include functions for run type determination
source "${SCRIPTDIR}/forecast_postdet.sh" # include functions for variables after run type determination
source "${SCRIPTDIR}/nems_configure.sh" # include functions for nems_configure processing
source "${SCRIPTDIR}/parsing_model_configure_FV3.sh"
source "${HOMEgfs}/ush/cplvalidate.sh" # validation of cpl*
source "${HOMEgfs}/ush/forecast_predet.sh" # include functions for variable definition
source "${HOMEgfs}/ush/forecast_det.sh" # include functions for run type determination
source "${HOMEgfs}/ush/forecast_postdet.sh" # include functions for variables after run type determination
source "${HOMEgfs}/ush/nems_configure.sh" # include functions for nems_configure processing
source "${HOMEgfs}/ush/parsing_model_configure_FV3.sh"

# Compset string. For nems.configure.* template selection. Default ATM only
confignamevarfornems=${confignamevarfornems:-'atm'}
Expand Down
8 changes: 4 additions & 4 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ FV3_nml(){
# namelist output for a certain component
echo "SUB ${FUNCNAME[0]}: Creating name lists and model configure file for FV3"
# Call child scripts in current script directory
source "${SCRIPTDIR}/parsing_namelists_FV3.sh"
source "${HOMEgfs}/ush/parsing_namelists_FV3.sh"
FV3_namelists
echo "SUB ${FUNCNAME[0]}: FV3 name lists and model configure file created"
}
Expand Down Expand Up @@ -648,7 +648,7 @@ WW3_nml() {
exit 4
fi
fi
source "${SCRIPTDIR}/parsing_namelists_WW3.sh"
source "${HOMEgfs}/ush/parsing_namelists_WW3.sh"
WW3_namelists
}

Expand Down Expand Up @@ -835,7 +835,7 @@ MOM6_postdet() {

MOM6_nml() {
echo "SUB ${FUNCNAME[0]}: Creating name list for MOM6"
source "${SCRIPTDIR}/parsing_namelists_MOM6.sh"
source "${HOMEgfs}/ush/parsing_namelists_MOM6.sh"
MOM6_namelists
}

Expand Down Expand Up @@ -975,7 +975,7 @@ CICE_postdet() {

CICE_nml() {
echo "SUB ${FUNCNAME[0]}: Creating name list for CICE"
source "${SCRIPTDIR}/parsing_namelists_CICE.sh"
source "${HOMEgfs}/ush/parsing_namelists_CICE.sh"
CICE_namelists
}

Expand Down
7 changes: 2 additions & 5 deletions ush/nems_configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
#####
writing_nems_configure()
{
echo "SUB ${FUNCNAME[0]}: parsing_nems_configure begins"
if [[ -e "${SCRIPTDIR}/nems.configure" ]]; then
rm -f "${SCRIPTDIR}/nems.configure"
fi
echo "SUB ${FUNCNAME[0]}: nems.configure.sh begins"

# Setup nems.configure
local DumpFields=${NEMSDumpFields:-false}
Expand All @@ -34,7 +31,7 @@ rm -f "${DATA}/nems.configure"
local esmf_logkind=${esmf_logkind:-"ESMF_LOGKIND_MULTI"} #options: ESMF_LOGKIND_MULTI_ON_ERROR, ESMF_LOGKIND_MULTI, ESMF_LOGKIND_NONE

# Copy the selected template into run directory
infile="${SCRIPTDIR}/nems.configure.${confignamevarfornems}.IN"
infile="${HOMEgfs}/parm/ufs/nems.configure.${confignamevarfornems}.IN"
if [[ -s ${infile} ]]; then
cp "${infile}" tmp1
else
Expand Down

0 comments on commit 03f8f60

Please sign in to comment.