Skip to content

Commit

Permalink
gfs and gefs resources are the same
Browse files Browse the repository at this point in the history
  • Loading branch information
aerorahul committed Jul 13, 2023
1 parent 03f8f60 commit 932be44
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 128 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ ush/make_ntc_bull.pl
ush/make_tif.sh
ush/month_name.sh
ush/imsfv3_scf2ioda.py
ush/atparse.bash

# version files
versions/build.ver
Expand Down
12 changes: 8 additions & 4 deletions parm/config/gefs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -550,38 +550,42 @@ elif [[ "${step}" = "fcst" || "${step}" = "efcs" ]]; then
export MEDPETS MEDTHREADS
echo "MEDIATOR using (threads, PETS) = (${MEDTHREADS}, ${MEDPETS})"

CHMPETS=0; CHMTHREADS=0
if [[ "${DO_AERO}" = "YES" ]]; then
# GOCART shares the same grid and forecast tasks as FV3 (do not add write grid component tasks).
(( CHMTHREADS = ATMTHREADS ))
(( CHMPETS = FV3PETS ))
# Do not add to NTASKS_TOT
export CHMPETS CHMTHREADS
echo "GOCART using (threads, PETS) = (${CHMTHREADS}, ${CHMPETS})"
fi
export CHMPETS CHMTHREADS

WAVPETS=0; WAVTHREADS=0
if [[ "${DO_WAVE}" = "YES" ]]; then
(( WAVPETS = ntasks_ww3 * nthreads_ww3 ))
(( WAVTHREADS = nthreads_ww3 ))
export WAVPETS WAVTHREADS
echo "WW3 using (threads, PETS) = (${WAVTHREADS}, ${WAVPETS})"
(( NTASKS_TOT = NTASKS_TOT + WAVPETS ))
fi
export WAVPETS WAVTHREADS

OCNPETS=0; OCNTHREADS=0
if [[ "${DO_OCN}" = "YES" ]]; then
(( OCNPETS = ntasks_mom6 * nthreads_mom6 ))
(( OCNTHREADS = nthreads_mom6 ))
export OCNPETS OCNTHREADS
echo "MOM6 using (threads, PETS) = (${OCNTHREADS}, ${OCNPETS})"
(( NTASKS_TOT = NTASKS_TOT + OCNPETS ))
fi
export OCNPETS OCNTHREADS

ICEPETS=0; ICETHREADS=0
if [[ "${DO_ICE}" = "YES" ]]; then
(( ICEPETS = ntasks_cice6 * nthreads_cice6 ))
(( ICETHREADS = nthreads_cice6 ))
export ICEPETS ICETHREADS
echo "CICE6 using (threads, PETS) = (${ICETHREADS}, ${ICEPETS})"
(( NTASKS_TOT = NTASKS_TOT + ICEPETS ))
fi
export ICEPETS ICETHREADS

echo "Total PETS for ${_CDUMP} = ${NTASKS_TOT}"

Expand Down
14 changes: 11 additions & 3 deletions parm/config/gefs/config.ufs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ if [[ "${skip_mom6}" == "false" ]]; then
CHLCLIM="seawifs_1998-2006_smoothed_2X.nc"
MOM6_RESTART_SETTING='r'
MOM6_RIVER_RUNOFF='False'
eps_imesh="4.0e-1"
;;
"100")
ntasks_mom6=20
Expand All @@ -267,6 +268,7 @@ if [[ "${skip_mom6}" == "false" ]]; then
CHLCLIM="seawifs_1998-2006_smoothed_2X.nc"
MOM6_RESTART_SETTING='n'
MOM6_RIVER_RUNOFF='False'
eps_imesh="2.5e-1"
;;
"50")
ntasks_mom6=60
Expand All @@ -279,7 +281,8 @@ if [[ "${skip_mom6}" == "false" ]]; then
CHLCLIM="seawifs-clim-1997-2010.${NX_GLB}x${NY_GLB}.v20180328.nc"
MOM6_RESTART_SETTING='n'
MOM6_RIVER_RUNOFF='True'
;;
eps_imesh="1.0e-1"
;;
"025")
ntasks_mom6=220
OCNTIM=1800
Expand All @@ -291,12 +294,14 @@ if [[ "${skip_mom6}" == "false" ]]; then
CHLCLIM="seawifs-clim-1997-2010.${NX_GLB}x${NY_GLB}.v20180328.nc"
MOM6_RIVER_RUNOFF='True'
MOM6_RESTART_SETTING="r"
eps_imesh="1.0e-1"
;;
*)
echo "FATAL ERROR: Unsupported MOM6 resolution = ${mom6_res}, ABORT!"
exit 1
;;
esac

export nthreads_mom6 ntasks_mom6
export OCNTIM
export NX_GLB NY_GLB
Expand All @@ -305,6 +310,7 @@ if [[ "${skip_mom6}" == "false" ]]; then
export CHLCLIM
export MOM6_RIVER_RUNOFF
export MOM6_RESTART_SETTING
export eps_imesh
fi

# CICE6 specific settings
Expand Down Expand Up @@ -357,10 +363,12 @@ if [[ "${skip_ww3}" == "false" ]]; then
ntasks_ww3=262
;;
"glo_200")
ntasks_ww3=40
ntasks_ww3=30
nthreads_ww3=1
;;
"glo_500")
ntasks_ww3=10
ntasks_ww3=12
nthreads_ww3=1
;;
"mx025")
ntasks_ww3=80
Expand Down
12 changes: 8 additions & 4 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -544,38 +544,42 @@ elif [[ "${step}" = "fcst" || "${step}" = "efcs" ]]; then
export MEDPETS MEDTHREADS
echo "MEDIATOR using (threads, PETS) = (${MEDTHREADS}, ${MEDPETS})"

CHMPETS=0; CHMTHREADS=0
if [[ "${DO_AERO}" = "YES" ]]; then
# GOCART shares the same grid and forecast tasks as FV3 (do not add write grid component tasks).
(( CHMTHREADS = ATMTHREADS ))
(( CHMPETS = FV3PETS ))
# Do not add to NTASKS_TOT
export CHMPETS CHMTHREADS
echo "GOCART using (threads, PETS) = (${CHMTHREADS}, ${CHMPETS})"
fi
export CHMPETS CHMTHREADS

WAVPETS=0; WAVTHREADS=0
if [[ "${DO_WAVE}" = "YES" ]]; then
(( WAVPETS = ntasks_ww3 * nthreads_ww3 ))
(( WAVTHREADS = nthreads_ww3 ))
export WAVPETS WAVTHREADS
echo "WW3 using (threads, PETS) = (${WAVTHREADS}, ${WAVPETS})"
(( NTASKS_TOT = NTASKS_TOT + WAVPETS ))
fi
export WAVPETS WAVTHREADS

OCNPETS=0; OCNTHREADS=0
if [[ "${DO_OCN}" = "YES" ]]; then
(( OCNPETS = ntasks_mom6 * nthreads_mom6 ))
(( OCNTHREADS = nthreads_mom6 ))
export OCNPETS OCNTHREADS
echo "MOM6 using (threads, PETS) = (${OCNTHREADS}, ${OCNPETS})"
(( NTASKS_TOT = NTASKS_TOT + OCNPETS ))
fi
export OCNPETS OCNTHREADS

ICEPETS=0; ICETHREADS=0
if [[ "${DO_ICE}" = "YES" ]]; then
(( ICEPETS = ntasks_cice6 * nthreads_cice6 ))
(( ICETHREADS = nthreads_cice6 ))
export ICEPETS ICETHREADS
echo "CICE6 using (threads, PETS) = (${ICETHREADS}, ${ICEPETS})"
(( NTASKS_TOT = NTASKS_TOT + ICEPETS ))
fi
export ICEPETS ICETHREADS

echo "Total PETS for ${_CDUMP} = ${NTASKS_TOT}"

Expand Down
8 changes: 7 additions & 1 deletion parm/config/gfs/config.ufs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ if [[ "${skip_mom6}" == "false" ]]; then
CHLCLIM="seawifs_1998-2006_smoothed_2X.nc"
MOM6_RESTART_SETTING='r'
MOM6_RIVER_RUNOFF='False'
eps_imesh="4.0e-1"
;;
"100")
ntasks_mom6=20
Expand All @@ -267,6 +268,7 @@ if [[ "${skip_mom6}" == "false" ]]; then
CHLCLIM="seawifs_1998-2006_smoothed_2X.nc"
MOM6_RESTART_SETTING='n'
MOM6_RIVER_RUNOFF='False'
eps_imesh="2.5e-1"
;;
"50")
ntasks_mom6=60
Expand All @@ -279,7 +281,8 @@ if [[ "${skip_mom6}" == "false" ]]; then
CHLCLIM="seawifs-clim-1997-2010.${NX_GLB}x${NY_GLB}.v20180328.nc"
MOM6_RESTART_SETTING='n'
MOM6_RIVER_RUNOFF='True'
;;
eps_imesh="1.0e-1"
;;
"025")
ntasks_mom6=220
OCNTIM=1800
Expand All @@ -291,12 +294,14 @@ if [[ "${skip_mom6}" == "false" ]]; then
CHLCLIM="seawifs-clim-1997-2010.${NX_GLB}x${NY_GLB}.v20180328.nc"
MOM6_RIVER_RUNOFF='True'
MOM6_RESTART_SETTING="r"
eps_imesh="1.0e-1"
;;
*)
echo "FATAL ERROR: Unsupported MOM6 resolution = ${mom6_res}, ABORT!"
exit 1
;;
esac

export nthreads_mom6 ntasks_mom6
export OCNTIM
export NX_GLB NY_GLB
Expand All @@ -305,6 +310,7 @@ if [[ "${skip_mom6}" == "false" ]]; then
export CHLCLIM
export MOM6_RIVER_RUNOFF
export MOM6_RESTART_SETTING
export eps_imesh
fi

# CICE6 specific settings
Expand Down
24 changes: 24 additions & 0 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,30 @@ for file in finddate.sh make_ntc_bull.pl make_NTC_file.pl make_tif.sh month_name
${LINK_OR_COPY} "${HOMEgfs}/sorc/gfs_utils.fd/ush/${file}" .
done

# TODO: Link these nems.configure templates from ufs-weather-model
#cd "${HOMEgfs}/parm/ufs" || exit 1
#declare -a nems_configure_files=("nems.configure.atm.IN" \
# "nems.configure.atm_aero.IN" \
# "nems.configure.atmw.IN" \
# "nems.configure.blocked_atm_wav_2way.IN" \
# "nems.configure.blocked_atm_wav.IN" \
# "nems.configure.cpld_agrid.IN" \
# "nems.configure.cpld_esmfthreads.IN" \
# "nems.configure.cpld.IN" \
# "nems.configure.cpld_noaero.IN" \
# "nems.configure.cpld_noaero_nowave.IN" \
# "nems.configure.cpld_noaero_outwav.IN" \
# "nems.configure.leapfrog_atm_wav.IN")
#for file in "${nems_configure_files[@]}"; do
# [[ -s "${file}" ]] && rm -f "${file}"
# ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/parm/${file}" .
#done

cd "${HOMEgfs}/ush" || exit 1
[[ -s "atparse.bash" ]] && rm -f "atparse.bash"
${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/atparse.bash" .


#------------------------------
#--add GDASApp fix directory
#------------------------------
Expand Down
Loading

0 comments on commit 932be44

Please sign in to comment.