Skip to content

Commit

Permalink
clean up comments in jobs and scripts (NOAA-EMC#1313)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Apr 19, 2023
1 parent 0335389 commit c48dd66
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
2 changes: 1 addition & 1 deletion jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fi
##########################################
# Remove the Temporary working directory
##########################################
cd "${DATAROOT}" || exit 1
cd "${DATAROOT}" || ( echo "FATAL ERROR: ${DATAROOT} does not exist, ABORT!"; exit 1 )
[[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}"

exit 0
4 changes: 2 additions & 2 deletions scripts/exglobal_atmens_analysis_finalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# This script creates an AtmEnsAnalysis class
# and runs the finalize method
# which perform post-processing and clean up activities
# for a global atmens variational analysis
# for a global atm local ensemble analysis
import os

from pygw.logger import Logger, logit
from pygw.logger import Logger
from pygw.configuration import cast_strdict_as_dtypedict
from pygfs.task.atmens_analysis import AtmEnsAnalysis

Expand Down
2 changes: 1 addition & 1 deletion scripts/exglobal_atmens_analysis_initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and runs the initialize method
# which create and stage the runtime directory
# and create the YAML configuration
# for a global atmens variational analysis
# for a global atm local ensemble analysis
import os

from pygw.logger import Logger
Expand Down
2 changes: 1 addition & 1 deletion scripts/exglobal_atmens_analysis_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# exgdas_global_atmens_analysis_run.py
# This script creates an AtmEnsAnalysis object
# and runs the execute method
# which executes the global atm ensemble analysis
# which executes the global atm local ensemble analysis
import os

from pygw.logger import Logger
Expand Down
36 changes: 36 additions & 0 deletions ush/python/pygfs/task/atmens_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ def initialize(self: Analysis) -> None:
- generating a YAML file for the JEDI executable
- linking the JEDI executable (TODO make it copyable, requires JEDI fix)
- creating output directories
Parameters
----------
Analysis: parent class for GDAS task
Returns
----------
None
"""
super().initialize()

Expand Down Expand Up @@ -119,7 +127,21 @@ def initialize(self: Analysis) -> None:

@logit(logger)
def execute(self: Analysis) -> None:
"""Execute a global atmens analysis
This method will execute a global atmens analysis using JEDI.
This includes:
- changing to the run directory
- running the global atmens analysis executable
Parameters
----------
Analysis: parent class for GDAS task
Returns
----------
None
"""
chdir(self.task_config.DATA)

exec_cmd = Executable(self.task_config.APRUN_ATMENSANL)
Expand Down Expand Up @@ -147,6 +169,13 @@ def finalize(self: Analysis) -> None:
- copy the generated YAML file from initialize to the ROTDIR
- write UFS model readable atm incrment file
Parameters
----------
Analysis: parent class for GDAS task
Returns
----------
None
"""
# ---- tar up diags
# path of output tar statfile
Expand Down Expand Up @@ -262,6 +291,13 @@ def jedi2fv3inc(self: Analysis) -> None:
Please note that some of these steps are temporary and will be modified
once the modle is able to directly read atm increments.
Parameters
----------
Analysis: parent class for GDAS task
Returns
----------
None
"""
# Select the atm guess file based on the analysis and background resolutions
# Fields from the atm guess are used to compute the delp and delz increments
Expand Down

0 comments on commit c48dd66

Please sign in to comment.