forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make aerosol output frequency variable
The `AERO_HISTORY.rc` file that controls the GOCART output is turned into a template usint `@[ ]` syntax to allow for variable output times. A new "parsing" script is created for GOCART that handles parsing the `AERO_HISTORY.rc` file through `atparse`. Other manip- ulation of these files is also moved to the new parsing script to be consistent with other components. A new variable, `FHOUT_AERO` is introduced to control the output frequency of the GOCART output. This is initially set to 3 to match other components (this is a change from the current value of 6). Since some aerosol fields are also included as part of the atmos output, it may be desirable to meld this back into `FHOUT` later. However, the atmos output has two frequencies (`FHOUT_HF` and `FHOUT`), a feature not supported by other components. The RUN lists for aero fcst, aero analysis, and waves is simplified to avoid confusion, since there is no need for them to only be set if the components are on. Resolves NOAA-EMC#2072
- Loading branch information
1 parent
a42c833
commit 11f9a1d
Showing
6 changed files
with
77 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#! /usr/bin/env bash | ||
|
||
# Disable variable not used warnings | ||
# shellcheck disable=SC2034 | ||
GOCART_namelists() { | ||
# copying GOCART configuration files | ||
if [[ -n "${AERO_CONFIG_DIR}" ]]; then | ||
|
||
local base_in | ||
local fhout_aero_padded | ||
fhout_aero_padded=$(printf "%02d" "${FHOUT_AERO}") | ||
# Only instantaneous AOD is output right now | ||
local inst_aod_freq="${fhout_aero_padded}0000" | ||
|
||
# Other gocart fields not currently used | ||
local inst_du_ss_freq="120000" | ||
local tavg_du_ss_freq="120000" | ||
local inst_ca_freq="120000" | ||
local inst_ni_freq="120000" | ||
local inst_su_freq="120000" | ||
local inst_du_bin_freq="010000" | ||
local tavg_du_bin_freq="030000" | ||
local inst_ss_bin_freq="060000" | ||
local inst_ca_bin_freq="120000" | ||
local inst_ni_bin_freq="120000" | ||
local inst_su_bin_freq="120000" | ||
local inst_2d_freq="030000" | ||
local inst_3d_freq="060000" | ||
local tavg_2d_rad_freq="120000" | ||
local tavg_3d_rad_freq="120000" | ||
|
||
for template_in in "${AERO_CONFIG_DIR}/"*.rc; do | ||
base_in="$(basename "${template_in}")" | ||
atparse < "${template_in}" >> "${DATA}/${base_in}" | ||
status=$? | ||
[[ ${status} -ne 0 ]] && exit "${status}" | ||
done | ||
|
||
# attempt to generate ExtData configuration file if not provided | ||
if [[ ! -f "${DATA}/AERO_ExtData.rc" ]]; then | ||
{ \ | ||
echo "PrimaryExports%%" ; \ | ||
cat "${AERO_CONFIG_DIR}/ExtData.other" ; \ | ||
cat "${AERO_CONFIG_DIR}/ExtData.${AERO_EMIS_FIRE:-none}" ; \ | ||
echo "%%" ; \ | ||
} > "${DATA}/AERO_ExtData.rc" | ||
status=$? | ||
if (( status != 0 )); then exit "${status}"; fi | ||
fi | ||
fi | ||
} |