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 2 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
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
101 changes: 46 additions & 55 deletions ush/parsing_model_configure_FV3.sh
Original file line number Diff line number Diff line change
@@ -1,64 +1,55 @@
#! /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

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}

Check warning

Code scanning / shellcheck

SYEAR appears unused. Verify use (or export if used externally). Warning

SYEAR appears unused. Verify use (or export if used externally).
local SMONTH=${tPDY:4:2}

Check warning

Code scanning / shellcheck

SMONTH appears unused. Verify use (or export if used externally). Warning

SMONTH appears unused. Verify use (or export if used externally).
local SDAY=${tPDY:6:2}

Check warning

Code scanning / shellcheck

SDAY appears unused. Verify use (or export if used externally). Warning

SDAY appears unused. Verify use (or export if used externally).
local SHOUR=${tcyc}

Check warning

Code scanning / shellcheck

SHOUR appears unused. Verify use (or export if used externally). Warning

SHOUR appears unused. Verify use (or export if used externally).
#local FHMAX=${FHMAX}
local FHROT=${IAU_FHROT:-0}

Check warning

Code scanning / shellcheck

FHROT appears unused. Verify use (or export if used externally). Warning

FHROT appears unused. Verify use (or export if used externally).
local DT_ATMOS=${DELTIM}

Check warning

Code scanning / shellcheck

DT_ATMOS appears unused. Verify use (or export if used externally). Warning

DT_ATMOS appears unused. Verify use (or export if used externally).
local RESTART_INTERVAL="${restart_interval} -1"

Check warning

Code scanning / shellcheck

RESTART_INTERVAL appears unused. Verify use (or export if used externally). Warning

RESTART_INTERVAL appears unused. Verify use (or export if used externally).
#local QUILTING=${QUILTING}
local QUILTING_RESTART=".true."

Check warning

Code scanning / shellcheck

QUILTING_RESTART appears unused. Verify use (or export if used externally). Warning

QUILTING_RESTART appears unused. Verify use (or export if used externally).
local WRITE_GROUP=${WRITE_GROUP:-1}
local WRTTASK_PER_GROUP=${WRTTASK_PER_GROUP:-24}
local ITASKS=1

Check warning

Code scanning / shellcheck

ITASKS appears unused. Verify use (or export if used externally). Warning

ITASKS appears unused. Verify use (or export if used externally).
local_OUTPUT_HISTORY=${OUTPUT_HISTORY:-".true."}

Check warning

Code scanning / shellcheck

local_OUTPUT_HISTORY appears unused. Verify use (or export if used externally). Warning

local_OUTPUT_HISTORY appears unused. Verify use (or export if used externally).
local WRITE_DOPOST=${WRITE_DOPOST:-".false."}
local WRITE_NSFLIP=${WRITE_NSFLIP:-".false."}
local NUM_FILES=${NUM_FILES:-2}
local FILENAME_BASE="'atm' 'sfc'"

Check warning

Code scanning / shellcheck

FILENAME_BASE appears unused. Verify use (or export if used externally). Warning

FILENAME_BASE appears unused. Verify use (or export if used externally).
#local OUTPUT_GRID=${OUTPUT_GRID}
local OUTPUT_FILE="'${OUTPUT_FILETYPE_ATM}' '${OUTPUT_FILETYPE_SFC}'"

Check warning

Code scanning / shellcheck

OUTPUT_FILE appears unused. Verify use (or export if used externally). Warning

OUTPUT_FILE appears unused. Verify use (or export if used externally).
local ZSTANDARD_LEVEL=1 # TODO: This is new in UFSWM develop. Check what is the default

Check warning

Code scanning / shellcheck

ZSTANDARD_LEVEL appears unused. Verify use (or export if used externally). Warning

ZSTANDARD_LEVEL appears unused. Verify use (or export if used externally).
local IDEFLATE=${ideflate:-1}

Check warning

Code scanning / shellcheck

IDEFLATE appears unused. Verify use (or export if used externally). Warning

IDEFLATE appears unused. Verify use (or export if used externally).
local NBITS=${nbits:-14}

Check warning

Code scanning / shellcheck

NBITS appears unused. Verify use (or export if used externally). Warning

NBITS appears unused. Verify use (or export if used externally).
local ICHUNK2D=$((4*restile))

Check warning

Code scanning / shellcheck

ICHUNK2D appears unused. Verify use (or export if used externally). Warning

ICHUNK2D appears unused. Verify use (or export if used externally).
local JCHUNK2D=$((2*restile))

Check warning

Code scanning / shellcheck

JCHUNK2D appears unused. Verify use (or export if used externally). Warning

JCHUNK2D appears unused. Verify use (or export if used externally).
local ICHUNK3D=$((4*restile))

Check warning

Code scanning / shellcheck

ICHUNK3D appears unused. Verify use (or export if used externally). Warning

ICHUNK3D appears unused. Verify use (or export if used externally).
local JCHUNK3D=$((2*restile))

Check warning

Code scanning / shellcheck

JCHUNK3D appears unused. Verify use (or export if used externally). Warning

JCHUNK3D appears unused. Verify use (or export if used externally).
local KCHUNK3D=1

Check warning

Code scanning / shellcheck

KCHUNK3D appears unused. Verify use (or export if used externally). Warning

KCHUNK3D appears unused. Verify use (or export if used externally).
local IMO=${LONB_IMO}

Check warning

Code scanning / shellcheck

IMO appears unused. Verify use (or export if used externally). Warning

IMO appears unused. Verify use (or export if used externally).
local JMO=${LATB_JMO}

Check warning

Code scanning / shellcheck

JMO appears unused. Verify use (or export if used externally). Warning

JMO appears unused. Verify use (or export if used externally).
local OUTPUT_FH=${FV3_OUTPUT_FH}

Check warning

Code scanning / shellcheck

OUTPUT_FH appears unused. Verify use (or export if used externally). Warning

OUTPUT_FH appears unused. Verify use (or export if used externally).
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