From 1a3bb7245cc03d8fea213c7699e91c989c81606f Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 27 Aug 2024 18:06:05 -0400 Subject: [PATCH 1/6] fix chap_quick.rst that was not merged correctly from previous PR --- scm/doc/TechGuide/chap_quick.rst | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/scm/doc/TechGuide/chap_quick.rst b/scm/doc/TechGuide/chap_quick.rst index 5c788053..df96e0f4 100644 --- a/scm/doc/TechGuide/chap_quick.rst +++ b/scm/doc/TechGuide/chap_quick.rst @@ -216,13 +216,6 @@ Unified Forecast System and related applications, only a minority of which are r install libraries manually if they wish, but they will need to make sure the appropriate environment variables are set to the correct values so that the build system can find them, as described in the following paragraphs. - -<<<<<<< HEAD -Setting up compilation environment -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -For users on a pre-configured platform, the spack-stack environment can be loaded via one of the provided modules in ``scm/etc/modules/`` as described in :numref:`Section %s `. -======= For users on a pre-configured platform, you can load the spack-stack environment via one of the provided modules in ``scm/etc/modules/``. For example, users on the NSF NCAR machine Derecho who wish to use Intel compilers can do the following: @@ -231,7 +224,6 @@ For example, users on the NSF NCAR machine Derecho who wish to use Intel compile cd [path/to/ccpp-scm/] module use scm/etc/modules/ module load derecho_intel ->>>>>>> feature/modulefile_updates Additionally, for users who have installed spack-stack on their own MacOS or Linux machine can use the provided ``macos_clang`` or ``linux_gnu`` modules. @@ -613,11 +605,7 @@ configuration files located in ``../etc/case_config`` (*without the .nml extensi specifying a suite other than the default, the suite name used must match the value of the suite name in one of the suite definition files located in ``../../ccpp/suites`` (Note: not the filename of the suite definition file). As -<<<<<<< HEAD -part of the CCPP SCM v7.0.0 release, the following suite names are supported: -======= part of the seventh CCPP release, the following suite names are supported: ->>>>>>> feature/modulefile_updates #. SCM_GFS_v16 From 1d2f8c290d0496ad27d449279808409664906f76 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 27 Aug 2024 22:42:02 -0400 Subject: [PATCH 2/6] add info regarding the save_comp option in UFS_case_gen.py --- scm/doc/TechGuide/chap_cases.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scm/doc/TechGuide/chap_cases.rst b/scm/doc/TechGuide/chap_cases.rst index a9c9bbda..48e02aed 100644 --- a/scm/doc/TechGuide/chap_cases.rst +++ b/scm/doc/TechGuide/chap_cases.rst @@ -422,6 +422,16 @@ appreciably different than the calculated geostrophic winds), this often leads t with time. An option exists within the script to assume that the mean three-dimensional winds are, in fact, identical to the geostrophic winds as well. Using this option eliminates any spurious turning. +Writing UFS Comparison Data + +The `--save_comp` (or `-sc`) options allow one to write out the UFS data for the chosen column in NetCDF format. The profiles of the state variables +`u`, `v`, `T`, and `q_v` are written out for the given point for each history file time. In addition, a collection of other +diagnostics like profiles of physics tendencies and scalar surface variables are saved and written. One can include any variable that is +provided in the UFS history files, although the specific variables are hard-coded in the `UFS_case_gen.py` file which will require editing +to change. The file with comparison data is automatically written out to the `scm/data/comparison_data` directory, although this is controlled +by the `COMPARISON_DATA_DIR` global variable in the `UFS_case_gen.py` script. The filename is a concatenation of the case name (specified by the +`--case_name (-n)` argument) and `_comp_data.nc`. + .. _`ufsforcingensemblegenerator`: UFS_forcing_ensemble_generator.py From 6ebd581494db21bcfd91edc28e8091d61f659f8d Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 28 Aug 2024 16:50:14 -0400 Subject: [PATCH 3/6] update chap_cases.rst --- scm/doc/TechGuide/chap_cases.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scm/doc/TechGuide/chap_cases.rst b/scm/doc/TechGuide/chap_cases.rst index 48e02aed..92c86ff3 100644 --- a/scm/doc/TechGuide/chap_cases.rst +++ b/scm/doc/TechGuide/chap_cases.rst @@ -298,6 +298,21 @@ Activate environment: > conda activate env_ufscasegen +.. note:: + +It may be possible for conda to fail to solve for the environment when attempting to use the yml file. It +should still be possible to create the same environment manually: +.. code:: bash + + > conda create --name env_ufscasegen + > conda install -n env_ufscasegen --channel=conda-forge python=3.8.5 + > conda install -n env_ufscasegen --channel=conda-forge netcdf4 + > conda install -n env_ufscasegen --channel=conda-forge f90nml + > conda install -n env_ufscasegen --channel=conda-forge xarray + > conda install -n env_ufscasegen --channel=conda-forge numpy + > conda install -n env_ufscasegen --channel=conda-forge shapely + > conda install -n env_ufscasegen --channel=conda-forge xesmf + .. _`ufscasegen`: UFS_case_gen.py From a3027672adeece43bfc445261fcc9cd65d063126 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 28 Aug 2024 17:42:59 -0400 Subject: [PATCH 4/6] add optional arguments for UFS_case_gen examples --- scm/doc/TechGuide/chap_cases.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scm/doc/TechGuide/chap_cases.rst b/scm/doc/TechGuide/chap_cases.rst index 92c86ff3..032d2227 100644 --- a/scm/doc/TechGuide/chap_cases.rst +++ b/scm/doc/TechGuide/chap_cases.rst @@ -453,7 +453,8 @@ UFS_forcing_ensemble_generator.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There is an additional script in ``scm/etc/scripts/UFS_forcing_ensemble_generator.py`` to create UFS-caseGen case(s) starting -with output from UFS Weather Model (UWM) Regression Tests (RTs). +with output from UFS Weather Model (UWM) Regression Tests (RTs). This script provides a wrapper for ``UFS_case_gen.py`` for +generating multiple cases at once. .. code:: bash @@ -514,11 +515,12 @@ staged UWM RTs located at: Example 1: UFS-caseGen for single point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -UFS regression test, ``control_c192``, for single point. +UFS regression test, ``control_c192``, for a single point using calculated horizontal advective tendencies, +supplying the vertical velocity for the vertical advective terms and nudging the horizontal winds: .. code:: bash - ./UFS_forcing_ensemble_generator.py -d [path_to_regression_tests_output]/control_c192_intel/ -sc --C_RES 192 -dt 360 -n control_c192 -lons 300 -lats 34 + ./UFS_forcing_ensemble_generator.py -d [path_to_regression_tests_output]/control_c192_intel/ -sc --C_RES 192 -dt 360 -n control_c192 -lons 300 -lats 34 -fm 2 -vm 2 -wn Upon successful completion of the script, the command to run the case(s) will print to the screen. For example, @@ -534,11 +536,11 @@ The file ``scm_ufsens_control_c192.py`` is created in ``ccpp-scm/scm/bin/``, whe Example 2: UFS-caseGen for list of points ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -UFS regression test, ``control_c384``, for multiple points. +UFS regression test, ``control_c384``, for multiple points assuming the same forcing method as above: .. code:: bash - ./UFS_forcing_ensemble_generator.py -d /glade/derecho/scratch/epicufsrt/ufs-weather-model/RT/NEMSfv3gfs/develop-20240607/control_c384_intel/ -sc --C_RES 384 -dt 225 -n control_c384 -lons 300 300 300 300 -lats 34 35 35 37 + ./UFS_forcing_ensemble_generator.py -d /glade/derecho/scratch/epicufsrt/ufs-weather-model/RT/NEMSfv3gfs/develop-20240607/control_c384_intel/ -sc --C_RES 384 -dt 225 -n control_c384 -lons 300 300 300 300 -lats 34 35 35 37 -fm 2 -vm 2 -wn Upon successful completion of the script, the command to run the case(s) will print to the screen. For example, From 2ef6259a2daa50d63eea7ee97721d0124b1c199a Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 28 Aug 2024 17:44:59 -0400 Subject: [PATCH 5/6] fix formatting error --- scm/doc/TechGuide/chap_cases.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/scm/doc/TechGuide/chap_cases.rst b/scm/doc/TechGuide/chap_cases.rst index 032d2227..eec004de 100644 --- a/scm/doc/TechGuide/chap_cases.rst +++ b/scm/doc/TechGuide/chap_cases.rst @@ -302,6 +302,7 @@ Activate environment: It may be possible for conda to fail to solve for the environment when attempting to use the yml file. It should still be possible to create the same environment manually: + .. code:: bash > conda create --name env_ufscasegen From 1e402c7c43bae505f2512ffbc4570e350496fdba Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 28 Aug 2024 17:51:29 -0400 Subject: [PATCH 6/6] fix formatting error --- scm/doc/TechGuide/chap_cases.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scm/doc/TechGuide/chap_cases.rst b/scm/doc/TechGuide/chap_cases.rst index eec004de..780eb2f1 100644 --- a/scm/doc/TechGuide/chap_cases.rst +++ b/scm/doc/TechGuide/chap_cases.rst @@ -297,10 +297,8 @@ Activate environment: .. code:: bash > conda activate env_ufscasegen - -.. note:: -It may be possible for conda to fail to solve for the environment when attempting to use the yml file. It +Note that it may be possible for conda to fail to solve for the environment when attempting to use the yml file. It should still be possible to create the same environment manually: .. code:: bash