Skip to content

Commit

Permalink
Feature #2188 move PANDA-C cases to clouds category and fix automated…
Browse files Browse the repository at this point in the history
… tests (#2237)

Co-authored-by: j-opatz <jopatz@ucar.edu>
  • Loading branch information
georgemccabe and j-opatz committed Jul 6, 2023
1 parent 8700272 commit 594f583
Show file tree
Hide file tree
Showing 30 changed files with 349 additions and 146 deletions.
14 changes: 12 additions & 2 deletions .github/jobs/get_use_case_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,24 @@ def main(categories, subset_list, work_dir=None,
for use_case in use_case_by_requirement.use_cases:
# add parm/use_cases path to config args if they are conf files
config_args = []
ci_overrides = None
for config_arg in use_case.config_args:
if config_arg.endswith('.conf'):
config_arg = os.path.join(work_dir, 'parm',
'use_cases',
config_arg)
'use_cases', config_arg)

# look for CI overrides conf file
override_path = os.path.join(config_arg[0:-5],
'ci_overrides.conf')
if os.path.exists(override_path):
ci_overrides = override_path

config_args.append(config_arg)

# add CI overrides config file if running in docker
if ci_overrides and host_name == 'docker':
config_args.append(ci_overrides)

output_base = os.path.join(output_top_dir,
group_name.split('-')[0],
use_case.name)
Expand Down
30 changes: 30 additions & 0 deletions .github/parm/use_case_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,36 @@
"index_list": "0-1",
"run": false
},
{
"category": "clouds",
"index_list": "0",
"run": false
},
{
"category": "clouds",
"index_list": "1",
"run": false
},
{
"category": "clouds",
"index_list": "2",
"run": false
},
{
"category": "clouds",
"index_list": "3",
"run": false
},
{
"category": "clouds",
"index_list": "4",
"run": false
},
{
"category": "clouds",
"index_list": "5",
"run": false
},
{
"category": "data_assimilation",
"index_list": "0-1",
Expand Down
40 changes: 39 additions & 1 deletion docs/Contributors_Guide/add_use_case.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ one of the following:

* air_quality_and_comp
* climate
* clouds
* data_assimilation
* extremes
* land_surface
Expand Down Expand Up @@ -835,6 +836,43 @@ new job for the new use case. See the :ref:`cg-ci-subset_category` section
and the multiple medium_range jobs for an example.


Overriding configuration for automated tests
--------------------------------------------

The automated tests have limited resources available to run the use cases.
Use cases can be adjusted to reduce file size, run time length,
memory usage, etc. but may still exceed the limits provided by GitHub Actions.
We also want to avoid losing scientific significance of a use case to allow
it to run in the automated testing environment.

An additional METplus configuration file can be provided with a use case to
override certain configuration settings for the automated testing of the case.
This allows the use case configuration file to contain a useful example that
can be run on other environments while still allowing a subset of the use case
to be included in the automated use case tests.

If needed, create a file named **ci_overrides.conf** in the use case directory,
e.g. parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac/ci_overrides.conf.
This configuration file will automatically be read **after** the use case
configuration file when run in the automated testing environment.

For example, if a use case processes many thresholds::

[config]
...
FCST_VAR1_THRESH = gt0, lt10.0, ge10.0, ge20.0, ge30.0, ge40.0, ge50.0, ge60.0, ge70.0, ge80.0, ge90.0
...
OBS_VAR1_THRESH = gt0, lt10.0, ge10.0, ge20.0, ge30.0, ge40.0, ge50.0, ge60.0, ge70.0, ge80.0, ge90.0
...

then one can override these variables so that fewer threshold values are
processed in the automated tests. In **ci_overrides.conf**, set::

[config]
FCST_VAR1_THRESH = gt0, lt10.0
OBS_VAR1_THRESH = gt0, lt10.0


.. _exceeded-Github-Actions:

Use Cases That Exceed Memory Allocations of Github Actions
Expand All @@ -853,7 +891,7 @@ steps were unsuccessful in lowering memory usage, please take the following step
Change the number in front of the new use case to an 'X', preceded
by the ‘#’ character::

#X::GridStat_fcstRTOFS_obsGHRSST_climWOA_sst::model_applications/marine_and_cryosphere/GridStat_fcstRTOFS_obsGHRSST_climWOA_sst.conf, model_applications/marine_and_cryosphere/GridStat_fcstRTOFS_obsGHRSST_climWOA_sst/ci_overrides.conf:: icecover_env, py_embed
#X::GridStat_fcstRTOFS_obsGHRSST_climWOA_sst::model_applications/marine_and_cryosphere/GridStat_fcstRTOFS_obsGHRSST_climWOA_sst.conf:: icecover_env, py_embed

- In the *.github/parm/use_case_groups.json* file, remove the entry that
was added during the :ref:`add_new_category_to_test_runs`
Expand Down
2 changes: 2 additions & 0 deletions docs/Users_Guide/quicksearch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Use Cases by Application:

| `Air Quality and Composition <../search.html?q=AirQualityAndCompAppUseCase&check_keywords=yes&area=default>`_
| `Climate <../search.html?q=ClimateAppUseCase&check_keywords=yes&area=default>`_
| `Clouds <../search.html?q=CloudsAppUseCase&check_keywords=yes&area=default>`_
| `Short Range <../search.html?q=ShortRangeAppUseCase&check_keywords=yes&area=default>`_
| `Data Assimilation <../search.html?q=DataAssimilationAppUseCase&check_keywords=yes&area=default>`_
| `Ensemble <../search.html?q=EnsembleAppUseCase&check_keywords=yes&area=default>`_
Expand All @@ -91,6 +92,7 @@ Use Cases by Application:

| **Air Quality and Composition**: *AirQualityAndCompAppUseCase*
| **Climate**: *ClimateAppUseCase*
| **Clouds**: *CloudsAppUseCase*
| **Short Range**: *ShortRangeAppUseCase*
| **Data Assimilation**: *DataAssimilationAppUseCase*
| **Ensemble**: *EnsembleAppUseCase*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
GridStat: Cloud Fractions with Neighborhood and Probabilities
=============================================================
model_applications/air_quality_and_comp/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.conf
model_applications/clouds/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.conf
"""
##############################################################################
Expand Down Expand Up @@ -57,10 +57,10 @@
#
# METplus first loads the default configuration file found in parm/metplus_config,
# then it loads any configuration files passed to METplus via the command line:
# parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.conf
# parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.conf
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.conf
# .. literalinclude:: ../../../../parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.conf

##############################################################################
# MET Configuration
Expand All @@ -84,10 +84,10 @@
# ----------------
#
# This use case utilizes 1 Python script to read and process the observation fields.
# parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac/read_input_data.py
# parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac/read_input_data.py
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac/read_input_data.py
# .. literalinclude:: ../../../../parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac/read_input_data.py

##############################################################################
# Running METplus
Expand All @@ -96,7 +96,7 @@
# Pass the use case configuration file to the run_metplus.py script
# along with any user-specific system configuration files if desired::
#
# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.conf /path/to/user_system.conf
# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.conf /path/to/user_system.conf
#
# See :ref:`running-metplus` for more information.

Expand All @@ -109,7 +109,7 @@
# INFO: METplus has successfully finished running.
#
# Refer to the value set for **OUTPUT_BASE** to find where the output data was generated.
# Output for this use case will be found in model_applications/air_quality_and_comp/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac
# Output for this use case will be found in model_applications/clouds/GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac
# (relative to **OUTPUT_BASE**)
# and will contain the following files:
#
Expand All @@ -129,10 +129,10 @@
#
# * GridStatToolUseCase
# * NetCDFFileUseCase
# * AirQualityAndCompAppUseCase
# * CloudsAppUseCase
# * PythonEmbeddingFileUseCase
#
# Navigate to the :ref:`quick-search` page to discover other similar use cases.
#
# sphinx_gallery_thumbnail_path = '_static/air_quality_and_comp-GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.png'
# sphinx_gallery_thumbnail_path = '_static/clouds-GridStat_fcstGFS_obsERA5_lowAndTotalCloudFrac.png'
#
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
GridStat: Cloud Fractions with Neighborhood and Probabilities
=============================================================
model_applications/air_quality_and_comp/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.conf
model_applications/clouds/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.conf
"""
##############################################################################
Expand Down Expand Up @@ -57,10 +57,10 @@
#
# METplus first loads the default configuration file found in parm/metplus_config,
# then it loads any configuration files passed to METplus via the command line:
# parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.conf
# parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.conf
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.conf
# .. literalinclude:: ../../../../parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.conf

##############################################################################
# MET Configuration
Expand All @@ -85,10 +85,10 @@
#
# This use case utilizes 1 Python script to read and process both forecast and
# observation fields.
# parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac/read_input_data.py
# parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac/read_input_data.py
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac/read_input_data.py
# .. literalinclude:: ../../../../parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac/read_input_data.py

##############################################################################
# Running METplus
Expand All @@ -97,7 +97,7 @@
# Pass the use case configuration file to the run_metplus.py script
# along with any user-specific system configuration files if desired::
#
# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.conf /path/to/user_system.conf
# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.conf /path/to/user_system.conf
#
# See :ref:`running-metplus` for more information.

Expand All @@ -110,7 +110,7 @@
# INFO: METplus has successfully finished running.
#
# Refer to the value set for **OUTPUT_BASE** to find where the output data was generated.
# Output for this use case will be found in model_applications/air_quality_and_comp/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac
# Output for this use case will be found in model_applications/clouds/GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac
# (relative to **OUTPUT_BASE**)
# and will contain the following files:
#
Expand All @@ -129,10 +129,10 @@
#
# * GridStatToolUseCase
# * NetCDFFileUseCase
# * AirQualityAndCompAppUseCase
# * CloudsAppUseCase
# * PythonEmbeddingFileUseCase
#
# Navigate to the :ref:`quick-search` page to discover other similar use cases.
#
# sphinx_gallery_thumbnail_path = '_static/air_quality_and_comp-GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.png'
# sphinx_gallery_thumbnail_path = '_static/clouds-GridStat_fcstGFS_obsMERRA2_lowAndTotalCloudFrac.png'
#
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
GridStat: Cloud Pressure and Temperature Heights
================================================
model_applications/air_quality_and_comp/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.conf
model_applications/clouds/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.conf
"""
##############################################################################
Expand Down Expand Up @@ -57,10 +57,10 @@
#
# METplus first loads the default configuration file found in parm/metplus_config,
# then it loads any configuration files passed to METplus via the command line:
# parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.conf
# parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.conf
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.conf
# .. literalinclude:: ../../../../parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.conf

##############################################################################
# MET Configuration
Expand All @@ -84,10 +84,10 @@
# ----------------
#
# This use case utilizes 1 Python script to read and process the observation fields.
# parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp/read_input_data.py
# parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp/read_input_data.py
#
# .. highlight:: bash
# .. literalinclude:: ../../../../parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp/read_input_data.py
# .. literalinclude:: ../../../../parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp/read_input_data.py

##############################################################################
# Running METplus
Expand All @@ -96,7 +96,7 @@
# Pass the use case configuration file to the run_metplus.py script
# along with any user-specific system configuration files if desired::
#
# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/air_quality_and_comp/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.conf /path/to/user_system.conf
# run_metplus.py /path/to/METplus/parm/use_cases/model_applications/clouds/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.conf /path/to/user_system.conf
#
# See :ref:`running-metplus` for more information.

Expand All @@ -109,7 +109,7 @@
# INFO: METplus has successfully finished running.
#
# Refer to the value set for **OUTPUT_BASE** to find where the output data was generated.
# Output for this use case will be found in model_applications/air_quality_and_comp/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp
# Output for this use case will be found in model_applications/clouds/GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp
# (relative to **OUTPUT_BASE**)
# and will contain the following files:
#
Expand All @@ -128,10 +128,10 @@
#
# * GridStatToolUseCase
# * NetCDFFileUseCase
# * AirQualityAndCompAppUseCase
# * CloudsAppUseCase
# * PythonEmbeddingFileUseCase
#
# Navigate to the :ref:`quick-search` page to discover other similar use cases.
#
# sphinx_gallery_thumbnail_path = '_static/air_quality_and_comp-GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.png'
# sphinx_gallery_thumbnail_path = '_static/clouds-GridStat_fcstGFS_obsSATCORPS_cloudTopPressAndTemp.png'
#
Loading

0 comments on commit 594f583

Please sign in to comment.