Skip to content

Commit

Permalink
Merge pull request #1288 from aerorahul/patch/aeroda_staticb_crm
Browse files Browse the repository at this point in the history
patch to aeroda_static_crm
  • Loading branch information
CoryMartin-NOAA committed Jan 30, 2023
2 parents db9193b + b48383a commit c43684f
Show file tree
Hide file tree
Showing 6 changed files with 263 additions and 202 deletions.
21 changes: 14 additions & 7 deletions scripts/exglobal_aero_analysis_finalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@
# and runs the configure and finalize methods
# which perform post-processing and clean up activities
# for a global aerosol variational analysis
import pygfs.task.aero_analysis
import logging
import os

# set up logger
logging.basicConfig(format='%(asctime)s:%(levelname)s:%(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S')
from pygw.logger import Logger, logit
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__':

AeroAnl = pygfs.task.aero_analysis.AerosolAnalysis(dict(os.environ))
AeroAnl.configure()
AeroAnl.finalize()
# 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.initialize()
17 changes: 11 additions & 6 deletions scripts/exglobal_aero_analysis_initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@
# which create and stage the runtime directory
# and create the YAML configuration
# for a global aerosol variational analysis
import pygfs.task.aero_analysis
import logging
import os

# set up logger
logging.basicConfig(format='%(asctime)s:%(levelname)s:%(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S')
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__':

AeroAnl = pygfs.task.aero_analysis.AerosolAnalysis(dict(os.environ))
AeroAnl.configure()
# 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.initialize()
Loading

0 comments on commit c43684f

Please sign in to comment.