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

[develop] feat: predefined grid support for smoke/dust component #1190

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0d728af
initial workf for smoke and dust
chan-hoo Jan 23, 2025
2ac8822
remove fixupp
chan-hoo Jan 23, 2025
fc259d1
update scripts
chan-hoo Jan 23, 2025
3645b71
fix setup.py
chan-hoo Jan 23, 2025
d3c1087
fix issues on run_fcst
chan-hoo Jan 23, 2025
4d82c44
fix run_post failure
chan-hoo Jan 24, 2025
7a0b385
fix we2e smoke dust test script
chan-hoo Jan 24, 2025
f310e7e
fix prepstart failure
chan-hoo Jan 24, 2025
832a260
add prod_util to module file for gaea-c6
Jan 24, 2025
05ac09e
fix esmpy issue on orion/hercules
chan-hoo Jan 25, 2025
98aa23e
fix esmpy issue on orion hercules
chan-hoo Jan 27, 2025
a0b6957
Merge branch 'develop' of https://github.com/chan-hoo/ufs-srweather-a…
chan-hoo Jan 27, 2025
823f8e5
set rrfs_sd to true
chan-hoo Jan 28, 2025
639b2ec
change base dir name suffix from srw to dir
chan-hoo Jan 29, 2025
1279c51
update users guide configworkflow
chan-hoo Jan 29, 2025
38e9c91
add smoke dust rst files to techdocs
chan-hoo Jan 29, 2025
1ea0e47
add missing doc update to users guide
chan-hoo Jan 29, 2025
ab2e73a
[feature/add_sd] Update TechDocs/ush to allow for the TechDocs to pas…
MichaelLueken Jan 29, 2025
80949dd
Merge pull request #8 from MichaelLueken/feature/add_sd
chan-hoo Jan 29, 2025
c1ae41e
separate conda env for smoke dust
chan-hoo Jan 29, 2025
64a70c4
initial reconcile attempt
benkozi Jan 30, 2025
be7706b
Merge remote-tracking branch 'ufs-srweather/develop' into feat/predef…
benkozi Jan 31, 2025
e5bd29c
update executable permissions
benkozi Jan 31, 2025
8b0a118
support upper on log level
benkozi Jan 31, 2025
785e19e
Update sd_environment.yml
benkozi Jan 31, 2025
68bba33
added regridding test
benkozi Jan 31, 2025
961066d
Merge remote-tracking branch 'origin/feat/predefined-grid-support-rec…
benkozi Jan 31, 2025
ce62b3e
refactored regrid to use property caching
benkozi Jan 31, 2025
af12544
refactored regrid to put common files in separate module
benkozi Jan 31, 2025
531a5e9
minor
benkozi Jan 31, 2025
955d013
minor
benkozi Jan 31, 2025
58605de
fix: pylint for test files (#6)
benkozi Feb 3, 2025
6fd4506
feat: pylint fixes, documentation, unit test workflow (#7)
benkozi Feb 6, 2025
02f815f
fix: missed some pylints with wrong .rc file (#8)
benkozi Feb 6, 2025
b507813
fix for supposedly unscriptable
benkozi Feb 6, 2025
895668e
fix test_help
benkozi Feb 6, 2025
9e4ccca
minor fixes for docs; remove extra copy
benkozi Feb 6, 2025
72de851
fix: dummy emissions for EBB_DCYCLE=2 (#9)
benkozi Feb 9, 2025
65fb00c
fix: find restart files in community mode (#10)
benkozi Feb 12, 2025
aa2013f
fix: pylint
benkozi Feb 12, 2025
2b3045a
feat: data staging on T1 platforms (#11)
benkozi Feb 21, 2025
df1b24c
Merge remote-tracking branch 'ufs-srweather/develop' into feat/predef…
benkozi Feb 21, 2025
01eca63
fix: mpirun on gaea-c6 (#12)
benkozi Feb 21, 2025
5e5021b
update build_gaea_intel.lua modulefile
benkozi Feb 21, 2025
7008e67
Merge remote-tracking branch 'ufs-srweather/develop' into feat/predef…
benkozi Feb 21, 2025
b67276b
fix: restart files optimization + non-parallel open (#13)
benkozi Feb 24, 2025
8ecd735
fix: env changes for derecho and gaeac5
benkozi Feb 24, 2025
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
14 changes: 8 additions & 6 deletions .github/workflows/python_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,22 @@ jobs:
- name: Install Micromamba and srw_app environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: srw_app
environment-file: sd_environment.yml
environment-name: srw_sd
init-shell: bash
cache-downloads: true
cache-environment: true

- name: Lint the python code
run: |
micromamba activate srw_app
micromamba activate srw_sd
export PYTHONPATH=$(pwd)/ush
pylint --ignore-imports=yes tests/test_python/
pylint ush/create_*.py
pylint ush/generate_FV3LAM_wflow.py
pylint ush/set_fv3nml*.py
pylint ush/update_input_nml.py
pylint ush/smoke_dust

- name: Checkout externals
run: |
Expand All @@ -47,15 +48,16 @@ jobs:
- name: Run python unittests
run: |
# exclude test_retrieve_data that is tested in functional test
micromamba activate srw_app
micromamba activate srw_sd
export UNIT_TEST=True
export PYTHONPATH=$(pwd)/ush
python -m unittest tests/test_python/*.py
export PYTHONPATH=${PYTHONPATH}:$(pwd)/tests
python -m pytest tests/test_python/test_smoke_dust

- name: Run python functional tests
run: |
micromamba activate srw_app
micromamba activate srw_sd
export CI=true
export PYTHONPATH=${PWD}/ush
python3 -m unittest tests/test_python/test_retrieve_data.py

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ conda_loc

*.swp
__pycache__
.idea
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ clear-cache-post-run=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-allow-list=
extension-pkg-allow-list=mpi4py,netCDF4

# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
Expand Down
6 changes: 1 addition & 5 deletions doc/TechDocs/ush/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,5 @@ ush
set_leadhrs
set_predef_grid_params
setup
smoke_dust_add_smoke
smoke_dust_fire_emiss_tools
smoke_dust_generate_fire_emissions
smoke_dust_hwp_tools
smoke_dust_interp_tools
smoke_dust
update_input_nml
26 changes: 26 additions & 0 deletions doc/TechDocs/ush/smoke_dust.core.regrid.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
smoke\_dust.core.regrid package
===============================

.. automodule:: smoke_dust.core.regrid
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

smoke\_dust.core.regrid.common module
-------------------------------------

.. automodule:: smoke_dust.core.regrid.common
:members:
:undoc-members:
:show-inheritance:

smoke\_dust.core.regrid.processor module
----------------------------------------

.. automodule:: smoke_dust.core.regrid.processor
:members:
:undoc-members:
:show-inheritance:
58 changes: 58 additions & 0 deletions doc/TechDocs/ush/smoke_dust.core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
smoke\_dust.core package
========================

.. automodule:: smoke_dust.core
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
:maxdepth: 4

smoke_dust.core.regrid

Submodules
----------

smoke\_dust.core.common module
------------------------------

.. automodule:: smoke_dust.core.common
:members:
:undoc-members:
:show-inheritance:

smoke\_dust.core.context module
-------------------------------

.. automodule:: smoke_dust.core.context
:members:
:undoc-members:
:show-inheritance:

smoke\_dust.core.cycle module
-----------------------------

.. automodule:: smoke_dust.core.cycle
:members:
:undoc-members:
:show-inheritance:

smoke\_dust.core.preprocessor module
------------------------------------

.. automodule:: smoke_dust.core.preprocessor
:members:
:undoc-members:
:show-inheritance:

smoke\_dust.core.variable module
--------------------------------

.. automodule:: smoke_dust.core.variable
:members:
:undoc-members:
:show-inheritance:
34 changes: 34 additions & 0 deletions doc/TechDocs/ush/smoke_dust.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
smoke\_dust package
===================

.. automodule:: smoke_dust
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
:maxdepth: 4

smoke_dust.core

Submodules
----------

smoke\_dust.add\_smoke module
-----------------------------

.. automodule:: smoke_dust.add_smoke
:members:
:undoc-members:
:show-inheritance:

smoke\_dust.generate\_emissions module
--------------------------------------

.. automodule:: smoke_dust.generate_emissions
:members:
:undoc-members:
:show-inheritance:
7 changes: 0 additions & 7 deletions doc/TechDocs/ush/smoke_dust_add_smoke.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/TechDocs/ush/smoke_dust_fire_emiss_tools.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/TechDocs/ush/smoke_dust_generate_fire_emissions.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/TechDocs/ush/smoke_dust_hwp_tools.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/TechDocs/ush/smoke_dust_interp_tools.rst

This file was deleted.

22 changes: 11 additions & 11 deletions doc/UsersGuide/BuildingRunningTesting/SRW-SD.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _srw-sd:

=====================================
==================================
SRW Smoke & Dust (SRW-SD) Features
=====================================
==================================

.. attention::

Expand All @@ -15,14 +15,14 @@ This chapter provides instructions for running a simple, example six-hour foreca
Although this chapter is the primary documentation resource for running the SRW-SD configuration, users may need to refer to :numref:`Chapter %s <BuildSRW>` and :numref:`Chapter %s <RunSRW>` for additional information on building and running the SRW App, respectively.

Quick Start Guide (SRW-SD)
=============================
==========================

.. attention::

These instructions should work smoothly on Hera and Orion/Hercules, but users on other systems may need to make additional adjustments.

Download the Code
-------------------
-----------------

Clone the |branch| branch of the authoritative SRW App repository:

Expand All @@ -32,7 +32,7 @@ Clone the |branch| branch of the authoritative SRW App repository:
cd ufs-srweather-app/sorc

Checkout Externals
---------------------
------------------

Users must run the ``checkout_externals`` script to collect (or "check out") the individual components of the SRW App (AQM version) from their respective GitHub repositories.

Expand All @@ -41,7 +41,7 @@ Users must run the ``checkout_externals`` script to collect (or "check out") the
./manage_externals/checkout_externals -e Externals_smoke_dust.cfg

Build the SRW App
------------------
-----------------

.. code-block:: console

Expand All @@ -54,7 +54,7 @@ Building the SRW App with SRW-SD on other machines, including other :srw-wiki:`L
If SRW-SD builds correctly, users should see the standard executables listed in :numref:`Table %s <ExecDescription>` in the ``ufs-srweather-app/exec`` directory.

Load the |wflow_env| Environment
--------------------------------------------
--------------------------------

Load the workflow environment:

Expand All @@ -70,7 +70,7 @@ where ``<machine>`` is ``hera``, ``orion``, or ``hercules``. The workflow should
.. _srw-sd-config:

Configure an Experiment
---------------------------
-----------------------

Users will need to configure their experiment by setting parameters in the ``config.yaml`` file. To start, users can copy a default experiment setting into ``config.yaml``:

Expand Down Expand Up @@ -115,7 +115,7 @@ When using the basic ``config.smoke_dust.yaml`` experiment, the usual pre-proces
.. _srw-sd-more-tasks:

Additional SRW-SD Tasks
--------------------------
-----------------------

.. COMMENT: Add workflow diagram in the future.

Expand Down Expand Up @@ -164,7 +164,7 @@ The Python scripts listed in :numref:`Table %s <sd-scripts>` are used to perform
- Regridding utilities using `esmpy <https://earthsystemmodeling.org/esmpy/>`_ that interpolate data from the RAVE observational grid to the RRFS grid.

Generate the Workflow
------------------------
---------------------

Generate the workflow:

Expand Down Expand Up @@ -197,7 +197,7 @@ Users may check experiment status from the experiment directory with either of t
.. _srw-sd-success:

Experiment Output
--------------------
-----------------

The workflow run is complete when all tasks display a "SUCCEEDED" message. If everything goes smoothly, users will eventually see a workflow status table similar to the following:

Expand Down
60 changes: 34 additions & 26 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,22 @@

numfig = True

nitpick_ignore = [('py:class', 'obj'),
('py:class', 'yaml.dumper.Dumper'),
('py:class', 'xml.etree.ElementTree'),
('py:class', 'Basemap'),
('py:class', 'pandas.DataFrame'),
('py:class', 'numpy.ndarray'),
('py:class', 'pandas.Index'),
('py:class', 'xarray.DataArray'),
('py:class', 'netCDF4.Dataset'),
('py:class', 'ESMF.Field'),
('py:class', 'ESMF.Grid'),
]
nitpick_ignore = [
('py:class', 'obj'),
('py:class', 'yaml.dumper.Dumper'),
('py:class', 'xml.etree.ElementTree'),
('py:class', 'Basemap'),
('py:class', 'numpy.ma.MaskedArray'),
('py:class', 'esmpy.Field'),
('py:class', 'pandas.DataFrame'),
('py:class', 'netCDF4.Variable'),
('py:class', 'pandas.DatetimeIndex'),
('py:class', 'netCDF4.Dataset'),
('py:class', 'numpy.ndarray'),
('py:class', 'pydantic.BaseModel'),
('py:class', 'esmpy.Grid'),
('py:class', 'esmpy.StaggerLoc'),
]

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -264,20 +268,24 @@ def setup(app):

# -- Options for autodoc extension ---------------------------------------

autodoc_mock_imports = ["f90nml",
"cartopy",
"mpl_toolkits.basemap",
"fill_jinja_template",
"matplotlib",
"numpy",
"uwtools",
"mpl_toolkits",
"metplus",
"netCDF4",
"pandas",
"xarray",
"ESMF",
]
autodoc_mock_imports = [
"f90nml",
"cartopy",
"mpl_toolkits.basemap",
"fill_jinja_template",
"matplotlib",
"numpy",
"uwtools",
"mpl_toolkits",
"metplus",
"esmpy",
"netCDF4",
"pandas",
"xarray",
"mpi4py",
"pydantic",
"typer",
]

logger = logging.getLogger(__name__)

Expand Down
Loading