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.
Updates in the aerosol tasks (NOAA-EMC#1420)
-removes the definition of environment variables in the shell script j-jobs -eliminates the use of !ENV in the yaml files for aerosol jobs. -eliminates use of CDATE in the python tasks. Use current_cycle and previous_cycle -uses jinja templates where appropriate. -uses the Executable class to run the variational analysis executable -adds verbose logging to the actions in the aerosol analysis task -uses string templates instead of string replace where looping over tiles is required. -links aerosol ICs when cycling with the ATMA app. ICs courtesy of @CoryMartin-NOAA Co-authored-by: Walter Kolczynski - NOAA <Walter.Kolczynski@noaa.gov>
- Loading branch information
1 parent
3e73038
commit c549acb
Showing
16 changed files
with
208 additions
and
170 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
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,23 @@ | ||
#!/usr/bin/env python3 | ||
# exgdas_global_aero_analysis_run.py | ||
# This script creates an AerosolAnalysis object | ||
# and runs the execute method | ||
# which executes the global aerosol variational analysis | ||
import os | ||
|
||
from pygw.logger import Logger | ||
from pygw.configuration import cast_strdict_as_dtypedict | ||
from pygfs.task.aero_analysis import AerosolAnalysis | ||
|
||
# Initialize root logger | ||
logger = Logger(level='DEBUG', colored_log=True) | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
# Take configuration from environment and cast it as python dictionary | ||
config = cast_strdict_as_dtypedict(os.environ) | ||
|
||
# Instantiate the aerosol analysis task | ||
AeroAnl = AerosolAnalysis(config) | ||
AeroAnl.execute() |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,29 +1,29 @@ | ||
#! /usr/bin/env bash | ||
set -eux | ||
|
||
script_dir=$(dirname "${BASH_SOURCE[0]}") | ||
cd "${script_dir}" || exit 1 | ||
|
||
source gfs_utils.fd/ush/detect_machine.sh | ||
source gfs_utils.fd/ush/module-setup.sh | ||
|
||
# detect_machine now includes the compiler on some machines | ||
# but the GDAS build script does not want it | ||
MACHINE_ID=$(echo "${MACHINE_ID}" | cut -d "." -f 1) | ||
|
||
case "${MACHINE_ID}" in | ||
hera|orion) build_jobs=10 ;; | ||
*) build_jobs=4 ;; | ||
esac | ||
|
||
# Check final exec folder exists | ||
if [[ ! -d "../exec" ]]; then | ||
mkdir ../exec | ||
fi | ||
|
||
cd gdas.cd | ||
|
||
WORKFLOW_BUILD="ON" BUILD_JOBS="${build_jobs}" ./build.sh -t "${MACHINE_ID}" | ||
|
||
exit $? | ||
|
||
OPTIND=1 | ||
while getopts ":dov" option; do | ||
case "${option}" in | ||
d) export BUILD_TYPE="DEBUG";; | ||
v) export BUILD_VERBOSE="YES";; | ||
:) | ||
echo "[${BASH_SOURCE[0]}]: ${option} requires an argument" | ||
usage | ||
;; | ||
*) | ||
echo "[${BASH_SOURCE[0]}]: Unrecognized option: ${option}" | ||
usage | ||
;; | ||
esac | ||
done | ||
shift $((OPTIND-1)) | ||
|
||
# TODO: GDASApp does not presently handle BUILD_TYPE | ||
|
||
BUILD_TYPE=${BUILD_TYPE:-"Release"} \ | ||
BUILD_VERBOSE=${BUILD_VERBOSE:-"NO"} \ | ||
BUILD_JOBS="${BUILD_JOBS:-8}" \ | ||
WORKFLOW_BUILD="ON" \ | ||
./gdas.cd/build.sh | ||
|
||
exit |
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
Oops, something went wrong.