From 28d72ff47d2ff2d5e286f8f0b659ec90f767835b Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Thu, 3 Aug 2023 10:01:56 -0400 Subject: [PATCH 1/6] fix: mpas_atm/model_mod.f90 constants updated to match the MPAS version5+ constants mpas updated the constants in v5: https://github.com/MPAS-Dev/MPAS-Model/commit/d2b19b6237e98f33d20e62428dcdf044b5106f2a theta_m and pressure use rvord (=1.608362) instead of 1.61 This fix is consistant with the latest version of MPAS: v8.0.1 fixes #251 Co-authored-by: syha --- models/mpas_atm/model_mod.f90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/models/mpas_atm/model_mod.f90 b/models/mpas_atm/model_mod.f90 index c4f77eeeb9..53d17d33af 100644 --- a/models/mpas_atm/model_mod.f90 +++ b/models/mpas_atm/model_mod.f90 @@ -210,10 +210,10 @@ module model_mod ! Real (physical) constants as defined exactly in MPAS. ! redefined here for consistency with the model. -real(r8), parameter :: rgas = 287.0_r8 -real(r8), parameter :: rv = 461.6_r8 -real(r8), parameter :: cp = 1003.0_r8 -real(r8), parameter :: cv = 716.0_r8 +real(r8), parameter :: rgas = 287.0_r8 ! Constant: Gas constant for dry air [J kg-1 K-1] +real(r8), parameter :: rv = 461.6_r8 ! Constant: Gas constant for water vapor [J kg-1 K-1] +real(r8), parameter :: cp = 7.0_r8*rgas/2.0_r8 ! = 1004.5 Constant: Specific heat of dry air at constant pressure [J kg-1 K-1] +real(r8), parameter :: cv = cp - rgas ! = 717.5 Constant: Specific heat of dry air at constant volume [J kg-1 K-1] real(r8), parameter :: p0 = 100000.0_r8 real(r8), parameter :: rcv = rgas/(cp-rgas) real(r8), parameter :: rvord = rv/rgas @@ -7408,7 +7408,7 @@ function theta_to_tk (ens_size, theta, rho, qv, istatus) endif where (istatus == 0) - theta_m = (1.0_r8 + 1.61_r8 * qv_nonzero)*theta + theta_m = (1.0_r8 + rvord * qv_nonzero)*theta where (theta_m > 0.0_r8 .and. rho > 0.0_r8) ! Check if all the input are positive @@ -7457,7 +7457,7 @@ subroutine compute_full_pressure(ens_size, theta, rho, qv, pressure, tk, istatus tk = theta_to_tk(ens_size, theta, rho, qv_nonzero, istatus) where (istatus == 0) ! We only take non-missing tk here - pressure = rho * rgas * tk * (1.0_r8 + 1.61_r8 * qv_nonzero) + pressure = rho * rgas * tk * (1.0_r8 + rvord * qv_nonzero) end where if ( debug > 1 ) then From 5b2e38969b9893e49c8179e540ef94ba4a1b4243 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Thu, 3 Aug 2023 15:27:16 -0400 Subject: [PATCH 2/6] comment: rho is dry air density Co-authored-by: syha --- models/mpas_atm/model_mod.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/mpas_atm/model_mod.f90 b/models/mpas_atm/model_mod.f90 index 53d17d33af..29282f7a8a 100644 --- a/models/mpas_atm/model_mod.f90 +++ b/models/mpas_atm/model_mod.f90 @@ -7380,7 +7380,7 @@ function theta_to_tk (ens_size, theta, rho, qv, istatus) integer, intent(in) :: ens_size real(r8), dimension(ens_size), intent(in) :: theta ! potential temperature [K] -real(r8), dimension(ens_size), intent(in) :: rho ! dry density +real(r8), dimension(ens_size), intent(in) :: rho ! dry air density [kg/m3] real(r8), dimension(ens_size), intent(in) :: qv ! water vapor mixing ratio [kg/kg] integer, dimension(ens_size), intent(inout) :: istatus real(r8), dimension(ens_size) :: theta_to_tk ! sensible temperature [K] @@ -7441,7 +7441,7 @@ subroutine compute_full_pressure(ens_size, theta, rho, qv, pressure, tk, istatus integer, intent(in) :: ens_size real(r8), dimension(ens_size), intent(in) :: theta ! potential temperature [K] -real(r8), dimension(ens_size), intent(in) :: rho ! dry density +real(r8), dimension(ens_size), intent(in) :: rho ! dry air density [kg/m3] real(r8), dimension(ens_size), intent(in) :: qv ! water vapor mixing ratio [kg/kg] real(r8), dimension(ens_size), intent(out) :: pressure ! full pressure [Pa] real(r8), dimension(ens_size), intent(out) :: tk ! return sensible temperature to caller From 7dc70b0ae75e550f0b5f17cb6c5219f99fae210f Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Thu, 3 Aug 2023 10:34:40 -0400 Subject: [PATCH 3/6] doc: mpas constants changed from v4 to v5 --- models/mpas_atm/readme.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/models/mpas_atm/readme.rst b/models/mpas_atm/readme.rst index 68dd28367e..d6c0a2c537 100644 --- a/models/mpas_atm/readme.rst +++ b/models/mpas_atm/readme.rst @@ -7,7 +7,15 @@ Overview This document describes the DART interface module for the atmospheric component of the Model for Prediction Across Scales `MPAS `__ -(or briefly, MPAS-ATM) global model, which uses an unstructured Voronoi grid mesh, +(or briefly, MPAS-ATM) global model. + +The DART interface has constants set to match MPAS v5.0 onwards as defined in +`MPAS-Model/src/framework/mpas_constants.F `__. +If you need to reproduce work with DART and MPAS v4 you will need to change the model_mod.f90 +parameters ``cp``, ``cv`` and ``rvord`` to match MPAS v4. + + +The mpas-atm model uses an unstructured Voronoi grid mesh, formally Spherical Centriodal Voronoi Tesselations (SCVTs). This allows for both quasi-uniform discretization of the sphere and local refinement. The MPAS/DART interface was built on the SCVT-dual mesh and does not regrid to regular lat/lon From a8853185ea301049ae0a762fb29a64e066db7dce Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Thu, 3 Aug 2023 14:50:08 -0400 Subject: [PATCH 4/6] chore: rename README.rst to index.rst for readthdocs build fixes #526 Added an explicit target for the welcome page (index.rst). The links to README.rst were relative using the filename, so had to be udated for the rename to index.rst. Using root_doc instead of master_doc to follow latest sphinx conf.py guidence explicit conf.py following readthedocs v2 configuration --- .readthedocs.yaml | 3 +++ assimilation_code/modules/assimilation/filter_mod.rst | 2 +- assimilation_code/programs/filter/filter.rst | 2 +- conf.py | 2 +- guide/downloading-dart.rst | 2 +- README.rst => index.rst | 2 ++ models/CESM/doc/setup_guidelines.rst | 2 +- models/clm/tutorial/README.rst | 6 +++--- models/wrf/tutorial/README.rst | 8 ++++---- 9 files changed, 17 insertions(+), 12 deletions(-) rename README.rst => index.rst (99%) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c85af1d235..cdd5a58e67 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,3 +8,6 @@ build: os: ubuntu-22.04 tools: python: "3.11" + +sphinx: + configuration: conf.py diff --git a/assimilation_code/modules/assimilation/filter_mod.rst b/assimilation_code/modules/assimilation/filter_mod.rst index b95cc38034..62e730bc08 100644 --- a/assimilation_code/modules/assimilation/filter_mod.rst +++ b/assimilation_code/modules/assimilation/filter_mod.rst @@ -13,7 +13,7 @@ parameter configuration that are driven from its namelist. See the namelist sect of assimilation steps to be done is controlled by the input observation sequence and by the time-stepping capabilities of the model being used in the assimilation. -See :doc:`../../../README` for more documentation, including a discussion of the +See :ref:`Welcome page` for more documentation, including a discussion of the capabilities of the assimilation system, a diagram of the entire execution cycle, the options and features. Namelist diff --git a/assimilation_code/programs/filter/filter.rst b/assimilation_code/programs/filter/filter.rst index 99c8795c07..b777481899 100644 --- a/assimilation_code/programs/filter/filter.rst +++ b/assimilation_code/programs/filter/filter.rst @@ -23,7 +23,7 @@ This overview includes these subsections: - Description of Inflation Options - Detailed Program Flow -See :doc:`../../../README` for more documentation, including a discussion of the +See :ref:`Welcome page` for more documentation, including a discussion of the capabilities of the assimilation system, a diagram of the entire execution cycle, the options and features. Program flow diff --git a/conf.py b/conf.py index a655dcf874..bfc3d088b3 100644 --- a/conf.py +++ b/conf.py @@ -22,7 +22,7 @@ # The full version, including alpha/beta/rc tags release = '10.8.1' -master_doc = 'README' +root_doc = 'index' # -- General configuration --------------------------------------------------- diff --git a/guide/downloading-dart.rst b/guide/downloading-dart.rst index 8c718a9b5b..e84efd735b 100644 --- a/guide/downloading-dart.rst +++ b/guide/downloading-dart.rst @@ -3,7 +3,7 @@ Downloading DART The DART source code is distributed on the GitHub repository `NCAR/DART `_ with the documentation -served through :doc:`readthedocs<../README>`. +served through :ref:`readthedocs `. Go to https://github.com/NCAR/DART and clone the repository or get the ZIP file according to your preference. See the `github help page on diff --git a/README.rst b/index.rst similarity index 99% rename from README.rst rename to index.rst index 8749974589..3edd869bb6 100644 --- a/README.rst +++ b/index.rst @@ -1,3 +1,5 @@ +.. _Welcome page: + Welcome to the Data Assimilation Research Testbed ================================================= diff --git a/models/CESM/doc/setup_guidelines.rst b/models/CESM/doc/setup_guidelines.rst index 6614e71ad1..36c9b31808 100644 --- a/models/CESM/doc/setup_guidelines.rst +++ b/models/CESM/doc/setup_guidelines.rst @@ -5,7 +5,7 @@ CESM+DART setup overview ------------------------ If you found your way to this file without reading more basic DART help files, -please read those first. :doc:`Getting Started <../../../README>` is a good place to find pointers to those files. +please read those first. :ref:`Getting Started ` is a good place to find pointers to those files. Then see :doc:`CESM<../readme>` for an overview of DART's interfaces to CESM. Finally, see the ../../{your_cesm_component(s)}/readme.html documentation about the code-level interfaces and namelist values for various CESM component models. diff --git a/models/clm/tutorial/README.rst b/models/clm/tutorial/README.rst index d8bb6b545f..15da268757 100644 --- a/models/clm/tutorial/README.rst +++ b/models/clm/tutorial/README.rst @@ -31,7 +31,7 @@ for CLM-specific assistance. If you are new to DART, we recommend that you become familiar by first working through the :doc:`../../../theory/readme` and then -understanding the :doc:`DART getting started <../../../README>` documentation. +understanding the :ref:`DART getting started ` documentation. This CLM5-DART tutorial is based on a simple example in which we describe how to: @@ -53,8 +53,8 @@ observations that are assimilated, updated model state variables, assimilation t assimilation frequency, and the model and observation grid resolution. We encourage users to complete the tutorial and then modify CLM-DART to pursue their own -research questions. We have comprehensive and searchable :doc:`documentation -<../../../README>`, with trained and experienced +research questions. We have comprehensive and searchable :ref:`documentation +`, with trained and experienced staff that can help troubleshoot issues (dart@ucar.edu). diff --git a/models/wrf/tutorial/README.rst b/models/wrf/tutorial/README.rst index e11e09aebf..e0dea4ca67 100644 --- a/models/wrf/tutorial/README.rst +++ b/models/wrf/tutorial/README.rst @@ -27,7 +27,7 @@ forum for WRF-specific assistance. If you are new to DART, we recommend that you become familiar with DART by working through the :doc:`../../../theory/readme` and then -understanding the :doc:`DART getting started <../../../README>` documentation. +understanding the :ref:`DART getting started ` documentation. before attempting the WRF/DART tutorial as you will find many helpful resources for learning the base DART configuration. @@ -109,7 +109,7 @@ needed to perform an experiment. Build the DART executables. ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you have not already, see :doc:`Getting Started <../../../README>` to +If you have not already, see :ref:`Getting Started ` to download the DART software package. Set an environment variable *DART_DIR* to point to your base DART directory. How to do this will depend on which shell you are using. @@ -135,7 +135,7 @@ might need for an experiment with that model. 1. It is assumed you have successfully configured the ``$DART_DIR/build_templates/mkmf.template`` file for your system. If - not, you will need to do so now. See the :doc:`Getting Started <../../../README>` + not, you will need to do so now. See the :ref:`Getting Started ` for more detail, if necessary. 2. [OPTIONAL] Modify the DART code to use 32bit reals. Most WRF/DART @@ -576,7 +576,7 @@ want to run with the example observations, you can skip to Step 4. However, observation processing is critical to the success of running -DART and was covered in :doc:`getting started <../../../README>`. In +DART and was covered in :ref:`getting started `. In brief, to add your own observations to WRF/DART you will need to understand the relationship between observation definitions and observation sequences, observation types and observation quantities, and From 341a5335cafdb1e4db0f534c9efdf3dcf90d6d41 Mon Sep 17 00:00:00 2001 From: Helen Kershaw <20047007+hkershaw-brown@users.noreply.github.com> Date: Mon, 7 Aug 2023 14:03:14 -0400 Subject: [PATCH 5/6] grammar removed the unnecessary 'the' getting started is capitalized in the rest of the document. Co-authored-by: Marlena Smith <44214771+mjs2369@users.noreply.github.com> --- models/wrf/tutorial/README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/wrf/tutorial/README.rst b/models/wrf/tutorial/README.rst index e0dea4ca67..b3491df001 100644 --- a/models/wrf/tutorial/README.rst +++ b/models/wrf/tutorial/README.rst @@ -135,7 +135,7 @@ might need for an experiment with that model. 1. It is assumed you have successfully configured the ``$DART_DIR/build_templates/mkmf.template`` file for your system. If - not, you will need to do so now. See the :ref:`Getting Started ` + not, you will need to do so now. See :ref:`Getting Started ` for more detail, if necessary. 2. [OPTIONAL] Modify the DART code to use 32bit reals. Most WRF/DART @@ -576,7 +576,7 @@ want to run with the example observations, you can skip to Step 4. However, observation processing is critical to the success of running -DART and was covered in :ref:`getting started `. In +DART and was covered in :ref:`Getting Started `. In brief, to add your own observations to WRF/DART you will need to understand the relationship between observation definitions and observation sequences, observation types and observation quantities, and From c7ef7c12e57384210d742b5933a369ce1481f232 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Tue, 8 Aug 2023 09:35:40 -0400 Subject: [PATCH 6/6] bump conf.py and changelog for release --- CHANGELOG.rst | 6 ++++++ conf.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c3bf43d703..4ce36d1f39 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,12 @@ individual files. The changes are now listed with the most recent at the top. +**August 8 2023 :: MPAS-ATM constants and readthedocs fix. Tag v10.8.2** + +- MPAS-ATM constants updated to MPAS v5+ +- readthedocs build info updated. + + **July 27 2023 :: Bug-fixes for MOM6 and WRF. Tag v10.8.1** - bug-fixes: diff --git a/conf.py b/conf.py index bfc3d088b3..80ab85600d 100644 --- a/conf.py +++ b/conf.py @@ -21,7 +21,7 @@ author = 'Data Assimilation Research Section' # The full version, including alpha/beta/rc tags -release = '10.8.1' +release = '10.8.2' root_doc = 'index' # -- General configuration ---------------------------------------------------