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]: Adding in the tutorial for the Halloween Storm #1124

Merged
merged 63 commits into from
Oct 10, 2024
Merged
Changes from 7 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
fc15ea5
include info on NA_13km grid
gspetro-NOAA Oct 12, 2023
61d55cf
automate substitutions for name of workflow env
gspetro-NOAA Oct 12, 2023
91a0c0b
updates to intro
gspetro-NOAA Oct 12, 2023
40291c4
Merge branch 'develop' of github.com:gspetro-NOAA/ufs-srweather-app i…
gspetro-NOAA Oct 13, 2023
bc09e91
Merge branch 'develop' of github.com:gspetro-NOAA/ufs-srweather-app i…
gspetro-NOAA Oct 27, 2023
3c4e161
update develop branch
gspetro-NOAA Jan 30, 2024
a0d1e67
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Feb 13, 2024
6851ed6
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Feb 16, 2024
de99fa7
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Feb 23, 2024
85cbead
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA May 22, 2024
6d55f0c
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Jun 5, 2024
5accded
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Jul 12, 2024
3b8f246
Tutorial information for Halloween storm
jdkublnick Jul 31, 2024
88baa05
Changed CCCP_PHYS_SUITE info
jdkublnick Jul 31, 2024
6cf8992
Adding in Halloween storm Tutorial
jdkublnick Jul 31, 2024
e7d7413
Merge branch 'text/us-216' of https://github.com/jdkublnick/ufs-srwea…
jdkublnick Jul 31, 2024
9ffb2e9
Adding in Halloween Tutorial
jdkublnick Jul 31, 2024
86a463a
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Aug 9, 2024
3edd708
Changes to config
jdkublnick Aug 15, 2024
2528bba
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Aug 27, 2024
a95b9a2
Added section about wget
jdkublnick Aug 28, 2024
7dc7fed
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Sep 9, 2024
d538dae
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Sep 12, 2024
ac8f867
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Sep 12, 2024
336ab82
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Sep 12, 2024
754f95d
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Sep 12, 2024
ebb2cb5
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Sep 12, 2024
c2f31bf
Merge branch 'ufs-community:develop' into text/us-216
jdkublnick Sep 12, 2024
1524087
Updating config on halloween tutorial
jdkublnick Sep 12, 2024
d554562
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Sep 17, 2024
ab31032
Adding HRRR forecast input option
jdkublnick Sep 23, 2024
301bfcd
Minor changes and adding plotting explanationss
Sep 24, 2024
36ac4c1
Finishing up plotting explanations
Sep 25, 2024
fe70d0e
Minor formatting corrections
Sep 26, 2024
a5401c7
More minor changes to the text
Sep 26, 2024
6956802
Merge branch 'ufs-community:develop' into text/us-216
jdkublnick Sep 26, 2024
a73af0a
Merge branch 'ufs-community:develop' into develop
gspetro-NOAA Sep 26, 2024
acee59c
add prelim env load snippet to be reused throughout docs
gspetro-NOAA Sep 26, 2024
cb0dcd6
Merge branch 'text/us-216' of https://github.com/jdkublnick/ufs-srwea…
gspetro-NOAA Sep 27, 2024
6abdc76
factor out module use/load cmds; use include dirctive to add
gspetro-NOAA Sep 27, 2024
1d1c47a
add code snippets to tutorial
gspetro-NOAA Sep 27, 2024
38fd16f
update snippet & VX ch
gspetro-NOAA Sep 27, 2024
1b7cffc
fix typo
gspetro-NOAA Sep 27, 2024
f41e41e
replace PNG w/GIF
gspetro-NOAA Sep 27, 2024
48cd3e6
factor out conf intro section for reuse
gspetro-NOAA Sep 27, 2024
6fd0349
factor out file editing hint
gspetro-NOAA Sep 27, 2024
72225c7
update data & plotting info
gspetro-NOAA Sep 28, 2024
9d06f55
refactor scp instructions
gspetro-NOAA Sep 30, 2024
52029c0
misc typos
gspetro-NOAA Sep 30, 2024
9786a91
update links
gspetro-NOAA Sep 30, 2024
698e0d7
minor fix
gspetro-NOAA Sep 30, 2024
82fa33d
minor fixes
gspetro-NOAA Sep 30, 2024
b325985
minor fixes
gspetro-NOAA Sep 30, 2024
b8ca925
add info on generating 2nd expt & saving env var
gspetro-NOAA Sep 30, 2024
52a09ad
Merge pull request #1 from gspetro-NOAA/text/doc-snippets
jdkublnick Oct 1, 2024
8e7dddd
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Oct 10, 2024
ea464c3
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Oct 10, 2024
edbe55e
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Oct 10, 2024
d0e53c3
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Oct 10, 2024
e7c4ff2
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Oct 10, 2024
5aa3582
Merge branch 'develop' into text/us-216
jdkublnick Oct 10, 2024
b270da9
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Oct 10, 2024
57c2a49
Update doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
jdkublnick Oct 10, 2024
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
266 changes: 265 additions & 1 deletion doc/UsersGuide/BuildingRunningTesting/Tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,277 @@ A line of severe storms brought strong winds, flash flooding, and tornadoes to t

**Weather Phenomena:** Flooding and high winds

* `Storm Prediction Center (SPC) Storm Report for 20191031 <https://www.spc.noaa.gov/climo/reports/191031_rpts.html>`__
* `Storm Prediction Center (SPC) Storm Report for 20191031
jdkublnick marked this conversation as resolved.
Show resolved Hide resolved

.. figure:: https://github.com/ufs-community/ufs-srweather-app/wiki/Tutorial/HalloweenStorm.jpg
:alt: Radar animation of the Halloween Storm that swept across the Eastern United States in 2019.

*Halloween Storm 2019*

Data
-------

On :srw-wiki:`Level 1 <Supported-Platforms-and-Compilers>` systems, users can find data for the Halloween Storm in the usual input model data locations (see :numref:`Section %s <DataLocations>` for a list). The data can also be downloaded from the `UFS SRW Halloween Storm Case Study <https://ufs-case-studies.readthedocs.io/en/develop/2019HaloweenStorm.html>`__.
jdkublnick marked this conversation as resolved.
Show resolved Hide resolved

Load the workflow
---------------------

To load the workflow environment, source the lmod-setup file. Then load the workflow conda environment. From the ``ufs-srweather-app`` directory, run:

.. code-block:: console

source etc/lmod-setup.sh <platform> # OR: source etc/lmod-setup.csh <platform> when running in a csh/tcsh shell
jdkublnick marked this conversation as resolved.
Show resolved Hide resolved
module use modulefiles
module load wflow_<platform>

where ``<platform>`` is a valid, lowercased machine name (see ``MACHINE`` in :numref:`Section %s <user>` for valid values).

After loading the workflow, users should follow the instructions printed to the console. Usually, the instructions will tell the user to run |activate|. For example, a user on Hera with permissions on the ``nems`` project may issue the following commands to load the workflow (replacing ``User.Name`` with their actual username):

.. code-block:: console

source /scratch1/NCEPDEV/nems/User.Name/ufs-srweather-app/etc/lmod-setup.sh hera
module use /scratch1/NCEPDEV/nems/User.Name/ufs-srweather-app/modulefiles
module load wflow_hera
conda activate srw_app
gspetro-NOAA marked this conversation as resolved.
Show resolved Hide resolved

Configurations
jdkublnick marked this conversation as resolved.
Show resolved Hide resolved
-------------------------

Navigate to the ``ufs-srweather-app/ush`` directory. The default (or "control") configuration for this experiment is based on the ``config.community.yaml`` file in that directory. Users can copy this file into ``config.yaml`` if they have not already done so:

.. code-block:: console

cd /path/to/ufs-srweather-app/ush


Users can save the location of the ``ush`` directory in an environment variable (``$USH``). This makes it easier to navigate between directories later. For example:

.. code-block:: console

export USH=/path/to/ufs-srweather-app/ush

Users should substitute ``/path/to/ufs-srweather-app/ush`` with the actual path on their system. As long as a user remains logged into their system, they can run ``cd $USH``, and it will take them to the ``ush`` directory. The variable will need to be reset for each login session.
gspetro-NOAA marked this conversation as resolved.
Show resolved Hide resolved

Experiment 1: Control
^^^^^^^^^^^^^^^^^^^^^^^^

Edit the configuration file (``config.yaml``) to include the variables and values in the sample configuration excerpts below.

.. Hint::

To open the configuration file in the command line, users may run the command:

.. code-block:: console

vi config.yaml

To modify the file, hit the ``i`` key and then make any changes required. To close and save, hit the ``esc`` key and type ``:wq`` to write the changes to the file and exit/quit the file. Users may opt to use their preferred code editor instead.

Start in the ``user:`` section and change the ``MACHINE`` and ``ACCOUNT`` variables. For example, when running on a personal MacOS device, users might set:

.. code-block:: console

user:
RUN_ENVIR: community
MACHINE: macos
ACCOUNT: none

For a detailed description of these variables, see :numref:`Section %s <user>`.

Users do not need to change the ``platform:`` section of the configuration file for this tutorial. The default parameters in the ``platform:`` section pertain to METplus verification, which is not addressed here. For more information on verification, see :numref:`Section %s <VXCases>`.

In the ``workflow:`` section of ``config.yaml``, update ``EXPT_SUBDIR`` and ``PREDEF_GRID_NAME``.

.. code-block:: console

workflow:
USE_CRON_TO_RELAUNCH: false
EXPT_SUBDIR: control
CCPP_PHYS_SUITE: FV3_GFS_v16
PREDEF_GRID_NAME: RRFS_CONUS_13km
DATE_FIRST_CYCL: '2019102812'
DATE_LAST_CYCL: '2019102812'
FCST_LEN_HRS: 12
PREEXISTING_DIR_METHOD: rename
VERBOSE: true
COMPILER: intel

.. _CronNote:

.. note::

Users may also want to set ``USE_CRON_TO_RELAUNCH: true`` and add ``CRON_RELAUNCH_INTVL_MNTS: 3``. This will automate submission of workflow tasks when running the experiment. However, not all systems have :term:`cron`.

``EXPT_SUBDIR:`` This variable can be changed to any name the user wants from "gfsv16_physics_fcst" to "forecast1" to "a;skdfj". However, the best names will indicate useful information about the experiment. This tutorial uses ``control`` to establish a baseline, or "control", forecast. Since this tutorial helps users to compare the output from two different forecasts --- one that uses the FV3_GFS_v16 physics suite and one that uses the FV3_RRFS_v1beta physics suite --- "gfsv16_physics_fcst" could be a good alternative directory name.
jdkublnick marked this conversation as resolved.
Show resolved Hide resolved

``PREDEF_GRID_NAME:`` This experiment uses the RRFS_CONUS_13km, rather than the default RRFS_CONUS_25km grid. Using the RRFS_CONUS_13km grid allows for fewer computational restraints compared to the 25km grid. For more information on this grid, see :numref:`Section %s <RRFS_CONUS_13km>`.
jdkublnick marked this conversation as resolved.
Show resolved Hide resolved

For a detailed description of other ``workflow:`` variables, see :numref:`Section %s <workflow>`.

To turn on the plotting for the experiment, the YAML configuration file
should be included in the ``rocoto:tasks:taskgroups:`` section, like this:

.. code-block:: console

rocoto:
tasks:
task_get_extrn_ics:
walltime: 06:00:00
task_get_extrn_lbcs:
walltime: 06:00:00
metatask_run_ensemble:
task_make_lbcs_mem#mem#:
walltime: 06:00:00
task_run_fcst_mem#mem#:
walltime: 06:00:00
taskgroups: '{{ ["parm/wflow/prep.yaml", "parm/wflow/coldstart.yaml", "parm/wflow/post.yaml", "parm/wflow/plot.yaml"]|include }}'
jdkublnick marked this conversation as resolved.
Show resolved Hide resolved


For more information on how to turn on/off tasks in the workflow, please
see :numref:`Section %s <ConfigTasks>`.

In the ``task_get_extrn_ics:`` section, add ``USE_USER_STAGED_EXTRN_FILES`` and ``EXTRN_MDL_SOURCE_BASEDIR_ICS``. Users will need to adjust the file path to reflect the location of data on their system (see :numref:`Section %s <Data>` for locations on :srw-wiki:`Level 1 <Supported-Platforms-and-Compilers>` systems).

.. code-block:: console

task_get_extrn_ics:
EXTRN_MDL_NAME_ICS: UFS-CASE-STUDY
FV3GFS_FILE_FMT_ICS: nemsio
USE_USER_STAGED_EXTRN_FILES: false

For a detailed description of the ``task_get_extrn_ics:`` variables, see :numref:`Section %s <task_get_extrn_ics>`.

Similarly, in the ``task_get_extrn_lbcs:`` section, add ``USE_USER_STAGED_EXTRN_FILES`` and ``EXTRN_MDL_SOURCE_BASEDIR_LBCS``. Users will need to adjust the file path to reflect the location of data on their system (see :numref:`Section %s <Data>` for locations on Level 1 systems).

.. code-block:: console

task_get_extrn_lbcs:
EXTRN_MDL_NAME_LBCS: UFS-CASE-STUDY
LBC_SPEC_INTVL_HRS: 3
FV3GFS_FILE_FMT_LBCS: nemsio
USE_USER_STAGED_EXTRN_FILES: false
jdkublnick marked this conversation as resolved.
Show resolved Hide resolved

For a detailed description of the ``task_get_extrn_lbcs:`` variables, see :numref:`Section %s <task_get_extrn_lbcs>`.

Users do not need to modify the ``task_run_fcst:`` section for this tutorial.


Lastly, in the ``task_plot_allvars:`` section, add ``PLOT_FCST_INC: 6`` and ``PLOT_DOMAINS: ["regional"]``. Users may also want to add ``PLOT_FCST_START: 0`` and ``PLOT_FCST_END: 12`` explicitly, but these can be omitted since the default values are the same as the forecast start and end time respectively.

.. code-block:: console

task_plot_allvars:
COMOUT_REF: ""
PLOT_FCST_INC: 6
PLOT_DOMAINS: ["regional"]

``PLOT_FCST_INC:`` This variable indicates the forecast hour increment for the plotting task. By setting the value to ``6``, the task will generate a ``.png`` file for every 6th forecast hour starting from 18z on June 15, 2019 (the 0th forecast hour) through the 12th forecast hour (June 16, 2019 at 06z).

``PLOT_DOMAINS:`` The plotting scripts are designed to generate plots over the entire CONUS by default, but by setting this variable to ["regional"], the experiment will generate plots for the smaller SUBCONUS_Ind_3km regional domain instead.

After configuring the forecast, users can generate the forecast by running:

.. code-block:: console

./generate_FV3LAM_wflow.py

To see experiment progress, users should navigate to their experiment directory. Then, use the ``rocotorun`` command to launch new workflow tasks and ``rocotostat`` to check on experiment progress.

.. code-block:: console

cd /path/to/expt_dirs/control
rocotorun -w FV3LAM_wflow.xml -d FV3LAM_wflow.db -v 10
rocotostat -w FV3LAM_wflow.xml -d FV3LAM_wflow.db -v 10

Users will need to rerun the ``rocotorun`` and ``rocotostat`` commands above regularly and repeatedly to continue submitting workflow tasks and receiving progress updates.

.. note::

When using cron to automate the workflow submission (as described :ref:`above <CronNote>`), users can omit the ``rocotorun`` command and simply use ``rocotostat`` to check on progress periodically.

Users can save the location of the ``control`` directory in an environment variable (``$CONTROL``). This makes it easier to navigate between directories later. For example:

.. code-block:: console

export CONTROL=/path/to/expt_dirs/control

Users should substitute ``/path/to/expt_dirs/control`` with the actual path on their system. As long as a user remains logged into their system, they can run ``cd $CONTROL``, and it will take them to the ``control`` experiment directory. The variable will need to be reset for each login session.

Experiment 2: Changing the forecast input
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Users who need to download the ``halloween_rap.tgz`` file using any of the following methods will follow the instructions below:

#. Download directly from the S3 bucket using a browser. The data is available at https://noaa-ufs-srw-pds.s3.amazonaws.com/develop-20240618/halloween_rap.tgz.

#. Download from a terminal using the AWS command line interface (CLI), if installed:

.. code-block:: console

aws s3 cp https://noaa-ufs-srw-pds.s3.amazonaws.com/develop-20240618/halloween_rap.tgz halloween_rap.tgz

#. Download from a terminal using ``wget``:

.. code-block:: console

wget https://noaa-ufs-srw-pds.s3.amazonaws.com/develop-20240618/halloween_rap.tgz

After downloading ``halloween_rap.tgz`` using one of the three methods above, untar the downloaded compressed archive file:

.. code-block:: console

tar xvfz halloween_rap.tgz

Save the path to this file in and ``HALLOWEENDATA`` environment variable:

.. code-block:: console

cd Indy-Severe-Weather
export HALLOWEENDATA=$PWD

.. note::

Users can untar the fix files and Natural Earth files by substituting those file names in the commands above.

Once the control case is running, users can return to the ``config.yaml`` file (in ``$USH``) and adjust the parameters for a new forecast. Most of the variables will remain the same. However, users will need to adjust ``EXPT_SUBDIR`` in the ``workflow:`` section as follows:

.. code-block:: console

workflow:
EXPT_SUBDIR: test_expt
CCPP_PHYS_SUITE: FV3_GFS_v16

``EXPT_SUBDIR:`` This name must be different than the ``EXPT_SUBDIR`` name used in the previous forecast experiment. Otherwise, the first forecast experiment will be renamed, and the new experiment will take its place (see :numref:`Section %s <preexisting-dirs>` for details). To avoid this issue, this tutorial uses ``test_expt`` as the second experiment's name, but the user may select a different name if desired.

.. hint::

Later, users may want to conduct additional experiments using the FV3_HRRR and FV3_WoFS_v0 physics suites. Like FV3_RRFS_v1beta, these physics suites were designed for use with high-resolution grids for storm-scale predictions.

.. COMMENT: Maybe also FV3_RAP?

Next, users will need to modify the data parameters in ``task_get_extrn_ics:`` and ``task_get_extrn_lbcs:`` to use RAP data. Users will need to change the following lines in each section:

.. code-block:: console

task_get_extrn_ics:
EXTRN_MDL_NAME_ICS: RAP
USE_USER_STAGED_EXTRN_FILES: true
EXTRN_MDL_SOURCE_BASEDIR_ICS: /path/to/UFS_SRW_App/develop/input_model_data/RAP/${yyyymmddhh}
task_get_extrn_lbcs:
EXTRN_MDL_NAME_LBCS: RAP
LBC_SPEC_INTVL_HRS: 3
USE_USER_STAGED_EXTRN_FILES: true
EXTRN_MDL_SOURCE_BASEDIR_LBCS: /path/to/UFS_SRW_App/develop/input_model_data/RAP/${yyyymmddhh}
EXTRN_MDL_LBCS_OFFSET_HRS: '-0'

HRRR and RAP data are better than FV3GFS data for use with the FV3_RRFS_v1beta physics scheme because these datasets use the same physics :term:`parameterizations` that are in the FV3_RRFS_v1beta suite. They focus on small-scale weather phenomena involved in storm development, so forecasts tend to be more accurate when HRRR/RAP data are paired with FV3_RRFS_v1beta and a high-resolution (e.g., 3-km) grid. Using HRRR/RAP data with FV3_RRFS_v1beta also limits the "spin-up adjustment" that takes place when initializing with model data coming from different physics.

``EXTRN_MDL_LBCS_OFFSET_HRS:`` This variable allows users to use lateral boundary conditions (:term:`LBCs`) from a previous forecast run that was started earlier than the start time of the forecast being configured in this experiment. This variable is set to 0 by default except when using RAP data; with RAP data, the default value is 3, so the forecast will look for LBCs from a forecast started 3 hours earlier (i.e., at 2019061515 --- 15z --- instead of 2019061518). To avoid this, users must set ``EXTRN_MDL_LBCS_OFFSET_HRS`` explicitly.

Under ``rocoto:tasks:``, add a section to increase the maximum wall time for the postprocessing tasks. The walltime is the maximum length of time a task is allowed to run. On some systems, the default of 15 minutes may be enough, but on others (e.g., NOAA Cloud), the post-processing time exceeds 15 minutes, so the tasks fail.


Tutorial Content
-------------------

Expand Down
Loading