Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ufs.configure, model_configure, MOM_input, data_table, and ice_in templates from UFS-weather-model #2051

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
493a240
use ice_in_template from ufswm instead of creating in from scratch in gw
aerorahul Nov 10, 2023
5479c19
link and parse model_configure from UFSWM
aerorahul Nov 10, 2023
c00e4a2
ignore links from ufs-weather-model templates
aerorahul Nov 10, 2023
35f8ac9
fix errors
aerorahul Nov 10, 2023
b7c7ed4
incorporate inputs from NB on grid-types for atm, ocean and ice in th…
aerorahul Nov 14, 2023
43895f2
set compression levels in parsing_model_configure_FV3.sh directly
aerorahul Nov 14, 2023
3b9d643
Merge branch 'develop' into feature/ufswm_templates
aerorahul Dec 29, 2023
bb9045a
rename ush/parsing_nems_configure.sh to ush/parsing_ufs_configure.sh …
aerorahul Dec 29, 2023
db4d434
use MOM6 templates from ufs-weather-model
aerorahul Dec 29, 2023
a6568ec
local variables are used in parsing namelists. ignore shellcheck war…
aerorahul Dec 29, 2023
9b95b6a
fix typos
aerorahul Dec 29, 2023
a79ffe4
remove files no longer used in global-workflow. They are obtained fro…
aerorahul Jan 2, 2024
117a945
use the DATA_TABLE template from UFSWM
aerorahul Jan 2, 2024
f00f689
move some variables from postdet to configs
aerorahul Jan 2, 2024
21550c1
remove unused variable
aerorahul Jan 2, 2024
53eb65c
prepare for taking in ufs.configure templates from UFSWM
aerorahul Jan 3, 2024
cee85d9
MESH_OCN and MESH_ICE are different variables. They happen to be the…
aerorahul Jan 3, 2024
ea05e88
prepare for ufs.configure from UFSWM
aerorahul Jan 3, 2024
90880a7
ensure the possiblity of waves without ocean
aerorahul Jan 3, 2024
08f378e
Merge branch 'develop' into feature/ufswm_templates
aerorahul Jan 8, 2024
7043d55
Merge branch 'develop' into feature/ufswm_templates
aerorahul Jan 8, 2024
cd30795
Merge branch 'develop' into feature/ufswm_templates
aerorahul Jan 8, 2024
8fb140e
Merge branch 'develop' into feature/ufswm_templates
aerorahul Jan 8, 2024
7ac174e
Merge branch 'develop' into feature/ufswm_templates
aerorahul Jan 10, 2024
3ff7898
update hash to ufs-weather-model. The noahmptable.tbl was reorganized…
aerorahul Jan 12, 2024
1da5e83
Merge branch 'develop' into feature/update_ufs_hash
aerorahul Jan 12, 2024
473ab03
Merge branch 'feature/update_ufs_hash' into feature/ufswm_templates
aerorahul Jan 12, 2024
e591f28
Merge branch 'develop' into feature/ufswm_templates
aerorahul Jan 13, 2024
f46ae2d
use ufs.configure templates from UFSWM
aerorahul Jan 14, 2024
c22eff4
update gefs/config.ufs for looks like missed updates from gfs/config.ufs
aerorahul Jan 14, 2024
30f6095
change calendar type as model now uses gregorian as default
aerorahul Jan 16, 2024
e060e61
Merge branch 'develop' into feature/ufswm_templates
aerorahul Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ parm/post/postxconfig-NT-GFS.txt
parm/post/postxconfig-NT-gefs-aerosol.txt
parm/post/postxconfig-NT-gefs-chem.txt
parm/ufs/noahmptable.tbl
parm/ufs/model_configure.IN
parm/ufs/ice_in_template
parm/wafs

# Ignore sorc and logs folders from externals
Expand Down
2 changes: 1 addition & 1 deletion scripts/exglobal_forecast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ 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_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
Expand Down
9 changes: 9 additions & 0 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,16 @@ done
# [[ -s "${file}" ]] && rm -f "${file}"
# ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/parm/${file}" .
#done
# Link these templates from ufs-weather-model
cd "${HOMEgfs}/parm/ufs" || exit 1
declare -a ufs_templates=("model_configure.IN" \
"ice_template_in")
for file in "${ufs_templates[@]}"; do
[[ -s "${file}" ]] && rm -f "${file}"
${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/parm/${file}" .
done

# Link the script from ufs-weather-model that parses the templates
cd "${HOMEgfs}/ush" || exit 1
[[ -s "atparse.bash" ]] && rm -f "atparse.bash"
${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/atparse.bash" .
Expand Down
102 changes: 47 additions & 55 deletions ush/parsing_model_configure_FV3.sh
Original file line number Diff line number Diff line change
@@ -1,64 +1,56 @@
#! /usr/bin/env bash

#####
## "parsing_model_configure_FV3.sh"
## This script writes model configure file
## for FV3 model
##
## This is the child script of ex-global forecast,
## writing model configure file for FV3
## This script is a direct execution.
#####
# parsing model_configure for UFSWM FV3

# shellcheck disable=SC2034
FV3_model_configure(){

local restile=$(echo "${CASE}" |cut -c2-)
local ichunk2d=$((4*restile))
local jchunk2d=$((2*restile))
local ichunk3d=$((4*restile))
local jchunk3d=$((2*restile))
local kchunk3d=1
local restile=${CASE:1}

rm -f model_configure
cat >> model_configure <<EOF
start_year: ${tPDY:0:4}
start_month: ${tPDY:4:2}
start_day: ${tPDY:6:2}
start_hour: ${tcyc}
start_minute: 0
start_second: 0
nhours_fcst: ${FHMAX}
fhrot: ${IAU_FHROT:-0}
# Prepare local variables for use in model_configure.IN from UFSWM
local SYEAR=${tPDY:0:4}
local SMONTH=${tPDY:4:2}
local SDAY=${tPDY:6:2}
local SHOUR=${tcyc}
#local FHMAX=${FHMAX}
local FHROT=${IAU_FHROT:-0}
local DT_ATMOS=${DELTIM}
local RESTART_INTERVAL="${restart_interval} -1"
#local QUILTING=${QUILTING}
local QUILTING_RESTART=".true."
local WRITE_GROUP=${WRITE_GROUP:-1}
local WRTTASK_PER_GROUP=${WRTTASK_PER_GROUP:-24}
local ITASKS=1
local_OUTPUT_HISTORY=${OUTPUT_HISTORY:-".true."}
local WRITE_DOPOST=${WRITE_DOPOST:-".false."}
local WRITE_NSFLIP=${WRITE_NSFLIP:-".false."}
local NUM_FILES=${NUM_FILES:-2}
local FILENAME_BASE="'atm' 'sfc'"
#local OUTPUT_GRID=${OUTPUT_GRID}
local OUTPUT_FILE="'${OUTPUT_FILETYPE_ATM}' '${OUTPUT_FILETYPE_SFC}'"
local ZSTANDARD_LEVEL=1 # TODO: This is new in UFSWM develop. Check what is the default
local IDEFLATE=${ideflate:-1}
local NBITS=${nbits:-14}
local ICHUNK2D=$((4*restile))
local JCHUNK2D=$((2*restile))
local ICHUNK3D=$((4*restile))
local JCHUNK3D=$((2*restile))
local KCHUNK3D=1
local IMO=${LONB_IMO}
local JMO=${LATB_JMO}
local OUTPUT_FH=${FV3_OUTPUT_FH}
local IAU_OFFSET=${IAU_OFFSET:-0}

dt_atmos: ${DELTIM}
calendar: ${calendar:-'julian'}
restart_interval: ${restart_interval} -1
output_1st_tstep_rst: .false.
# Ensure the template exists
template="${HOMEgfs}/parm/ufs/model_configure.IN"
if [[ ! -f ${template} ]]; then
echo "FATAL ERROR: template '${template}' does not exist, ABORT!"
exit 1
fi
source "${HOMEgfs}/ush/atparse.bash"
rm -f "${DATA}/model_configure"
atparse < "${template}" >> "${DATA}/model_configure"
echo "Rendered model_configure"
cat "${DATA}/model_configure"

quilting: ${QUILTING}
quilting_restart: .true.
write_groups: ${WRITE_GROUP:-1}
write_tasks_per_group: ${WRTTASK_PER_GROUP:-24}
itasks: 1
output_history: ${OUTPUT_HISTORY:-".true."}
write_dopost: ${WRITE_DOPOST:-".false."}
write_nsflip: ${WRITE_NSFLIP:-".false."}
num_files: ${NUM_FILES:-2}
filename_base: 'atm' 'sfc'
output_grid: ${OUTPUT_GRID}
output_file: '${OUTPUT_FILETYPE_ATM}' '${OUTPUT_FILETYPE_SFC}'
ichunk2d: ${ichunk2d:-0}
jchunk2d: ${jchunk2d:-0}
ichunk3d: ${ichunk3d:-0}
jchunk3d: ${jchunk3d:-0}
kchunk3d: ${kchunk3d:-0}
ideflate: ${ideflate:-1}
nbits: ${nbits:-14}
imo: ${LONB_IMO}
jmo: ${LATB_JMO}
output_fh: ${FV3_OUTPUT_FH}
iau_offset: ${IAU_OFFSET:-0}
EOF

echo "$(cat model_configure)"
}
Loading