Skip to content

Commit d3b40c0

Browse files
[develop] feat: additional MM evaluation packages (#1336)
* Adds additional evaluation packages (ISH/MET, AQS PM, and AQS VOC) to the MELODIES MONET post-processing. * Metatask created for prep as there is heavier data preparation tasks in ISH/MET and AQS PM. Breaking them into separate tasks. --------- Co-authored-by: Michael Lueken <63728921+MichaelLueken@users.noreply.github.com>
1 parent 75337cc commit d3b40c0

21 files changed

Lines changed: 316 additions & 273 deletions

doc/UsersGuide/BuildingRunningTesting/AQM.rst

Lines changed: 7 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ Once data is appropriately staged, the use case workflow configuration file may
386386
* - ``cpl_aqm_parm.USE_FIX_AQM_S3_DATA_STAGE``
387387
- Defaults to false. Set to true if fixed data was downloaded to the stage directory.
388388

389-
MM (MM) Evaluation
389+
MELODIES MONET (MM) Evaluation
390390
================================
391391

392392
SRW-AQM provides an optional task group leveraging `MELODIES MONET <https://melodies-monet.readthedocs.io/en/stable/>`__ for model evaluation.
@@ -400,95 +400,12 @@ SRW-AQM provides an optional task group leveraging `MELODIES MONET <https://melo
400400
How to Run the MM Evaluation
401401
------------------------------
402402

403-
To run the evaluation suite, a user will need to follow these steps. Depending on the MM packages, tasks, and forecast window duration, the jobs can be computationally demanding. Per the usual HPC recommendations, start small and scale as needed.
404-
405-
Install the ``aqm-eval`` Anaconda environment
406-
+++++++++++++++++++++++++++++++++++++++++++++++
407-
408-
#. Clone the ``AQM-Eval`` repository: ``git clone -b main https://github.com/NOAA-EPIC/AQM-Eval.git``.
409-
#. Activate the ``srw_app`` Anaconda environment.
410-
#. Create the ``aqm-eval`` environment: ``cd AQM-Eval && conda create -f environment.yml && conda run -n aqm-eval pip install .``
411-
412-
Stage Observational Datasets
413-
++++++++++++++++++++++++++++++
414-
415-
For SRW-AQM use cases, the `AQM-Eval Data Sync utility <https://github.com/NOAA-EPIC/AQM-Eval?tab=readme-ov-file#installation>`__ utility is recommended to quickly stage all required observations.
416-
417-
.. code-block:: console
418-
419-
$ conda run -n aqm-eval aqm-data-sync observations --dst-dir <path to download location>
420-
421-
MM also offers utility to download and prepare observational datasets. See `Downloading Observations <https://melodies-monet.readthedocs.io/en/stable/getting_started/downloading_obs.html>`__ for more information.
422-
423-
Check Availability of ICs and LBCs
424-
++++++++++++++++++++++++++++++++++++
425-
426-
For the evaulation to work properly, at least a 48-hour forecast is required. It may be necessary to download additional IC and LBC datasets. See :ref:`acquire-use-case-data`.
427-
428-
Enable the MM Workflow Task Group
429-
+++++++++++++++++++++++++++++++++++
430-
431-
Under ``workflow.tasksgroups`` in the experiment configuration, add or uncomment ``- parm/wflow/aqm_post_melodies_monet.yaml``.
432-
433-
Configure Paths to Observational Datasets
434-
+++++++++++++++++++++++++++++++++++++++++++
435-
436-
For AirNow, set ``task_mm_prep.MM_OBS_AIRNOW_FN_TEMPLATE`` to the appropriate path. Wildcards may be used it the experiment's forecast window extends beyond a month.
437-
438-
Configure "Scorecard" Base Model (Optional)
439-
+++++++++++++++++++++++++++++++++++++++++++++
440-
441-
MM provides a set of `scorecard evaluations <https://melodies-monet.readthedocs.io/en/stable/users_guide/supported_plots.html#id8>`__ used to compare a base and evaluation model run. Setting ``task_mm_prep.MM_BASE_MODEL_EXPT_DIR`` to a different SRW experiment root directory will enable scorecard plotting.
442-
443-
Transfer MM Output (Optional)
444-
+++++++++++++++++++++++++++++++
445-
446-
Unless overridden by ``task_mm_prep.MM_OUTPUT_DIR``, the MM evaluation output is written to ``${EXPT_DIR}/mm_output``. Users may wish to transfer the PNG and CSV output to their local machine for simplified review.
447-
448-
Select MM Evaluation Packages (Optional)
449-
+++++++++++++++++++++++++++++++++++++++++
450-
451-
*COMING SOON! Currently, only the "chemistry" evaluation package is supported.*
452-
453-
Select MM Evaluation Tasks (Optional)
454-
+++++++++++++++++++++++++++++++++++++++
455-
456-
Default MM evaluation tasks may be overridden using ``task_mm_run.MM_EVAL_TASKS_SINGLE_MODEL`` or ``task_mm_run.MM_EVAL_TASKS_MULTI_MODEL``. The latter is used in the case a base model is provided for intercomparison.
457-
458-
Users are encouraged to consult MM `Supported Plots <https://melodies-monet.readthedocs.io/en/stable/users_guide/supported_plots.html>`__ and `Supported Statistsics <https://melodies-monet.readthedocs.io/en/stable/users_guide/supported_stats.html>`__ documentation for information on the plots and statistics genenerated by the MM tasks.
459-
460-
Overview of the MM Evaluation Task Group
461-
------------------------------------------
462-
463-
The MM evaluation task group consists of an ``mm_prep`` task followed by a number of MM task-specific jobs (metatasks) ``mm_run_<MM package>_<MM task>``. The ``mm_run_<MM package>_save_paired`` task must run before other metatasks.
403+
.. note::
464404

465-
As the forecast windows increases in time duration, users are encouraged to tune the ``task_mm_run.execution.walltime`` configuration parameter. Please reach out to SRW support with questions on walltime and node tasking. The default configurations are not expected to handle all use cases and customization may be required.
405+
The AQS PM and AQS VOCs evaluations do not run on Derecho. Set the packages' ``active`` flag to ``false`` (i.e., ``melodies_monet_parm.aqm.packages.aqs_pm.active: false``) when using Derecho.
466406

467-
MM Configuration Variables
468-
++++++++++++++++++++++++++++
407+
To run the evaluation suite, a user will need to follow the steps described in the [aqm-mm-eval](https://github.com/NOAA-EPIC/AQM-Eval/wiki/aqm%E2%80%90mm%E2%80%90eval) wiki. An example MM evaluation configuration tuned to the AEROMMA use case is provided at ``ush/aqm-use-cases/config.aqm.AEROMMA.yaml``. High-level steps required to run an evaluation using the AEROMMA use case data:
469408

470-
.. list-table:: MM Configuration Variables
471-
:widths: 20 20 50
472-
:header-rows: 1
473-
474-
* - Configuration Variable
475-
- Default
476-
- Description
477-
* - ``task_mm_prep.MM_OUTPUT_DIR``
478-
- ``null``
479-
- Output directory for MM-generated model evaluation plots and statistics. If ``null``, defaults to ``${EXPTDIR}/mm_output``.
480-
* - ``task_mm_prep.MM_EVAL_PACKAGES``
481-
- ``[chem]``
482-
- Evaluation packages to initialize and run.
483-
* - ``task_mm_prep.MM_BASE_MODEL_EXPT_DIR``
484-
- ``null``
485-
- If set to another SRW experiment path, MM will generate "scorecards" for model inter-comparison.
486-
* - ``task_mm_prep.MM_OBS_AIRNOW_FN_TEMPLATE``
487-
- ``null``
488-
- Path, optionally with wildcards, selecting the AirNow observation files used by MM. For example: ``/staged/obs/Observations/AirNow/AirNow_2023*.nc``
489-
* - ``task_mm_prep.MM_EVAL_TASKS_SINGLE_MODEL``
490-
- ``["timeseries", "taylor", "spatial_bias", "spatial_overlay", "boxplot", "multi_boxplot", "csi", "stats"]``
491-
- MM evaluation tasks to run for a single model.
492-
* - ``task_mm_prep.MM_EVAL_TASKS_MULTI_MODEL``
493-
- ``["timeseries", "taylor", "spatial_bias", "spatial_overlay", "boxplot", "multi_boxplot", "csi", "stats", "scorecard_rmse", "scorecard_ioa", "scorecard_nmb", "scorecard_nme"]``
494-
- MM evaluation tasks to run for two models (i.e., model intercomparison).
409+
1. Download observational data using ``aqm-data-sync``: https://github.com/NOAA-EPIC/AQM-Eval/wiki/aqm%E2%80%90mm%E2%80%90eval#stage-observational-data
410+
2. Configure observational datasets: https://github.com/NOAA-EPIC/AQM-Eval/wiki/aqm%E2%80%90mm%E2%80%90eval#observational-datasets
411+
3. Activate the evaluation task group by setting ``melodies_monet_parm.aqm.active: true`` and uncommenting ``workflow.taskgroups[parm/wflow/aqm_post_melodies_monet.yaml]``.

doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@
132132
r"develop-20250321/.*",
133133
r"installation",
134134
r"grids",
135+
"stage-observational-data",
136+
"observational-datasets"
135137
]
136138

137139
linkcheck_allowed_redirects = {r"https://github\.com/ufs-community/ufs-srweather-app/wiki/.*":
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/usr/bin/env bash
2+
3+
4+
#
5+
#-----------------------------------------------------------------------
6+
#
7+
# Source the variable definitions file and the bash utility functions.
8+
#
9+
#-----------------------------------------------------------------------
10+
#
11+
. $USHdir/source_util_funcs.sh
12+
sections=(
13+
user
14+
nco
15+
workflow
16+
)
17+
for sect in ${sections[*]} ; do
18+
source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect}
19+
done
20+
. $USHdir/job_preamble.sh
21+
22+
#
23+
#-----------------------------------------------------------------------
24+
#
25+
# Save current shell options (in a global array). Then set new options
26+
# for this script/function.
27+
#
28+
#-----------------------------------------------------------------------
29+
#
30+
{ save_shell_opts; . $USHdir/preamble.sh; } > /dev/null 2>&1
31+
#
32+
#-----------------------------------------------------------------------
33+
#
34+
# Get the full path to the file in which this script/function is located
35+
# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in
36+
# which the file is located (scrfunc_dir).
37+
#
38+
#-----------------------------------------------------------------------
39+
#
40+
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
41+
scrfunc_fn=$( basename "${scrfunc_fp}" )
42+
scrfunc_dir=$( dirname "${scrfunc_fp}" )
43+
#
44+
#-----------------------------------------------------------------------
45+
#
46+
# Print message indicating entry into script.
47+
#
48+
#-----------------------------------------------------------------------
49+
#
50+
print_info_msg "
51+
========================================================================
52+
Entering script: \"${scrfunc_fn}\"
53+
In directory: \"${scrfunc_dir}\"
54+
55+
This is the J-job script for MELODIES MONET evaluation/verification
56+
========================================================================"
57+
#
58+
#-----------------------------------------------------------------------
59+
#
60+
# Call the ex-script for this J-job and pass to it the necessary variables.
61+
#
62+
#-----------------------------------------------------------------------
63+
#
64+
aqm-mm-eval concat-stats --root-dir "${MM_OUTPUT_DIR}" --out-path "${MM_OUTPUT_DIR}"/concat-stats.csv
65+
#
66+
#-----------------------------------------------------------------------
67+
#
68+
# Run job postamble.
69+
#
70+
#-----------------------------------------------------------------------
71+
#
72+
job_postamble
73+
#
74+
#-----------------------------------------------------------------------
75+
#
76+
# Restore the shell options saved at the beginning of this script/function.
77+
#
78+
#-----------------------------------------------------------------------
79+
#
80+
{ restore_shell_opts; } > /dev/null 2>&1

jobs/JSRW_AQM_MELODIES_MONET_PREP

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This is the J-job script for AQM MELODIES MONET PREP
6161
#
6262
#-----------------------------------------------------------------------
6363
#
64-
aqm-mm-eval srw-init --expt-dir ${COMOUT}
64+
aqm-mm-eval srw-init --expt-dir ${COMOUT} --package ${MM_EVAL_PACKAGE}
6565
#
6666
#-----------------------------------------------------------------------
6767
#

jobs/JSRW_AQM_MELODIES_MONET_RUN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This is the J-job script for MELODIES MONET evaluation/verification
6161
#
6262
#-----------------------------------------------------------------------
6363
#
64-
aqm-mm-eval srw-run --expt-dir ${COMOUT} --package-selector ${MM_EVAL_PACKAGE} --task-selector ${MM_EVAL_TASK}
64+
aqm-mm-eval srw-run --expt-dir ${COMOUT} --package ${MM_EVAL_PACKAGE} --task ${MM_EVAL_TASK}
6565
#
6666
#-----------------------------------------------------------------------
6767
#
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
unload("python_srw")
2+
load("python_srw_aqm_eval")
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
unload("python_srw")
2+
3+
unload("esmf/8.8.0")
4+
unload("python/3.11.7")
5+
unload("python-venv/1.0")
6+
unload("py-mpi4py/4.0.1")
7+
unload("py-numpy/1.26.4")
8+
unload("py-pip/23.1.2")
9+
unload("py-pyyaml/6.0.2")
10+
211
load("python_srw_aqm")
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
unload("python_srw")
2+
3+
unload("esmf/8.8.0")
4+
unload("python/3.11.7")
5+
unload("python-venv/1.0")
6+
unload("py-mpi4py/4.0.1")
7+
unload("py-numpy/1.26.4")
8+
unload("py-pip/23.1.2")
9+
unload("py-pyyaml/6.0.2")
10+
211
load("python_srw_aqm")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
unload("python_srw")
2+
load("python_srw_aqm_eval")
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
unload("python_srw")
2+
3+
unload("esmf/8.8.0")
4+
unload("python/3.11.7")
5+
unload("python-venv/1.0")
6+
unload("py-mpi4py/4.0.1")
7+
unload("py-numpy/1.26.4")
8+
unload("py-pip/23.1.2")
9+
unload("py-pyyaml/6.0.2")
10+
211
load("python_srw_aqm")
312

413
setenv("FI_CXI_RX_MATCH_MODE", "hybrid")

0 commit comments

Comments
 (0)