From 80322f71676281fc5a58a6a7c920fce95f5eab10 Mon Sep 17 00:00:00 2001 From: Michael Duda Date: Wed, 7 Feb 2018 18:35:29 -0700 Subject: [PATCH 1/5] Update version number to v5.3 --- README.md | 2 +- src/core_atmosphere/Registry.xml | 2 +- src/core_init_atmosphere/Registry.xml | 2 +- src/core_landice/Registry.xml | 2 +- src/core_ocean/Registry.xml | 2 +- src/core_sw/Registry.xml | 2 +- src/core_test/Registry.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3859ca9184..17d0383508 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v5.2 +MPAS-v5.3 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index 752216937f..7d76716c0e 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -1,5 +1,5 @@ - + diff --git a/src/core_init_atmosphere/Registry.xml b/src/core_init_atmosphere/Registry.xml index fbbe4c8569..bb4d157384 100644 --- a/src/core_init_atmosphere/Registry.xml +++ b/src/core_init_atmosphere/Registry.xml @@ -1,5 +1,5 @@ - + diff --git a/src/core_landice/Registry.xml b/src/core_landice/Registry.xml index edab7c4c36..9de2900787 100644 --- a/src/core_landice/Registry.xml +++ b/src/core_landice/Registry.xml @@ -1,5 +1,5 @@ - + diff --git a/src/core_ocean/Registry.xml b/src/core_ocean/Registry.xml index ba2c65f36d..6c9addc4a7 100644 --- a/src/core_ocean/Registry.xml +++ b/src/core_ocean/Registry.xml @@ -1,5 +1,5 @@ - + - + diff --git a/src/core_test/Registry.xml b/src/core_test/Registry.xml index 33640eb50f..c4c4ee00cb 100644 --- a/src/core_test/Registry.xml +++ b/src/core_test/Registry.xml @@ -1,5 +1,5 @@ - + From d1820fa713545971bae67b44d1239029affad32e Mon Sep 17 00:00:00 2001 From: Michael Duda Date: Thu, 8 Mar 2018 13:31:35 -0700 Subject: [PATCH 2/5] Correct the sign of edgeNormalVectors for positive inflow boundary edges For edges that represent positive normal inflow along the boundary of a mesh, i.e., for edges where (cellsOnEdge(1,iEdge) == nCells+1), the mpas_initialize_vectors subroutine incorrectly computed the value of the edgeNormalVectors field due to the transposition of the iEdge and cell2 locations in the difference. --- src/operators/mpas_vector_operations.F | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/operators/mpas_vector_operations.F b/src/operators/mpas_vector_operations.F index db0da10e9f..bbb5257e6c 100644 --- a/src/operators/mpas_vector_operations.F +++ b/src/operators/mpas_vector_operations.F @@ -714,13 +714,13 @@ subroutine mpas_initialize_vectors(meshPool)!{{{ if (cell1 == nCells+1) then ! this is a boundary edge ! the normal points from the cell location to the edge location if (is_periodic) then - edgeNormalVectors(1,iEdge) = mpas_fix_periodicity(xEdge(iEdge), xCell(cell2), x_period) - xCell(cell2) - edgeNormalVectors(2,iEdge) = mpas_fix_periodicity(yEdge(iEdge), yCell(cell2), y_period) - yCell(cell2) - edgeNormalVectors(3,iEdge) = zEdge(iEdge) - zCell(cell2) + edgeNormalVectors(1,iEdge) = xCell(cell2) - mpas_fix_periodicity(xEdge(iEdge), xCell(cell2), x_period) + edgeNormalVectors(2,iEdge) = yCell(cell2) - mpas_fix_periodicity(yEdge(iEdge), yCell(cell2), y_period) + edgeNormalVectors(3,iEdge) = zCell(cell2) - zEdge(iEdge) else - edgeNormalVectors(1,iEdge) = xEdge(iEdge) - xCell(cell2) - edgeNormalVectors(2,iEdge) = yEdge(iEdge) - yCell(cell2) - edgeNormalVectors(3,iEdge) = zEdge(iEdge) - zCell(cell2) + edgeNormalVectors(1,iEdge) = xCell(cell2) - xEdge(iEdge) + edgeNormalVectors(2,iEdge) = yCell(cell2) - yEdge(iEdge) + edgeNormalVectors(3,iEdge) = zCell(cell2) - zEdge(iEdge) end if else if (cell2 == nCells+1) then ! this is a boundary edge From 05ab7756efa1fccf817127b71d4b2d97ec734159 Mon Sep 17 00:00:00 2001 From: Michael Duda Date: Thu, 8 Mar 2018 14:44:24 -0700 Subject: [PATCH 3/5] When deriving QV from RH, always assume RH is w.r.t. liquid water Under the assumption that real-data intermediate files were produced by the WPS's ungrib program, we should always assume that the RH field is with respect to liquid water, since this is what WRF's real.exe program assumes and what the WPS ungrib.exe produces. Thanks to The Weather Company for finding this issue. --- src/core_init_atmosphere/mpas_init_atm_cases.F | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core_init_atmosphere/mpas_init_atm_cases.F b/src/core_init_atmosphere/mpas_init_atm_cases.F index a92b1a9cd9..e0ddb45c1e 100644 --- a/src/core_init_atmosphere/mpas_init_atm_cases.F +++ b/src/core_init_atmosphere/mpas_init_atm_cases.F @@ -4570,8 +4570,12 @@ subroutine init_atm_case_gfs(block, mesh, nCells, nEdges, nVertLevels, fg, state ! es = svp1*10.*exp(svp2*(t(k,iCell)-svpt0)/(t(k,iCell)-svp3)) ! es = min(es,0.99*0.01*pressure(k,iCell)) ! rs = 0.622*es*100. / (pressure(k,iCell)-es*100.) + + ! + ! Note: the RH field provided by ungrib should always be with respect to liquid water, + ! hence, we can always call rslf; see the routine fix_gfs_rh in WPS/ungrib/src/rrpr.F . + ! rs = rslf(pressure(k,iCell),t(k,iCell)) - if(t(k,iCell) .lt. svpt0) rs = rsif(pressure(k,iCell),t(k,iCell)) scalars(index_qv,k,iCell) = 0.01_RKIND*rs*relhum(k,iCell) enddo enddo From 0f616160172c051597dc7197a7de8786bea7d8aa Mon Sep 17 00:00:00 2001 From: Michael Duda Date: Wed, 21 Mar 2018 13:46:14 -0600 Subject: [PATCH 4/5] Update comment describing the direction of normal vectors when cell1 == nCells+1 Following the changes in the previous commit, the comment describing the computation of the edge normal direction when cell1 == nCells+1 needed to be updated to correctly state that the normal vector points from the edge location to the cellsOnEdge(2,iEdge) (i.e., "cell2") location. --- src/operators/mpas_vector_operations.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/operators/mpas_vector_operations.F b/src/operators/mpas_vector_operations.F index bbb5257e6c..98c526f5e0 100644 --- a/src/operators/mpas_vector_operations.F +++ b/src/operators/mpas_vector_operations.F @@ -706,13 +706,13 @@ subroutine mpas_initialize_vectors(meshPool)!{{{ ! Initialize normal unit vectors at each edge ! These vectors point from cell to cell. - ! At boundaries, one cell does not exist, so it points from cell to edge. + ! At boundaries, one cell does not exist, so it points from cell to edge or from edge to cell. do iEdge = 1,nEdges cell1 = cellsOnEdge(1,iEdge) cell2 = cellsOnEdge(2,iEdge) if (cell1 == nCells+1) then ! this is a boundary edge - ! the normal points from the cell location to the edge location + ! the normal points from the edge location to the cell location if (is_periodic) then edgeNormalVectors(1,iEdge) = xCell(cell2) - mpas_fix_periodicity(xEdge(iEdge), xCell(cell2), x_period) edgeNormalVectors(2,iEdge) = yCell(cell2) - mpas_fix_periodicity(yEdge(iEdge), yCell(cell2), y_period) From 595fbd6e08a76e2ee51cbfe35645222053b27f4e Mon Sep 17 00:00:00 2001 From: Michael Duda Date: Thu, 8 Mar 2018 16:09:59 -0700 Subject: [PATCH 5/5] Correct the "units" attribute for scalar tendencies in atmosphere Registry.xml The "units" attribute for scalar tendencies (e.g., tend_qv, tend_qc, etc.) in the Registry.xml file incorrectly identified these fields as being specified in kg kg^{-1} s^{-1}, when in fact the units are kg m^{-3} s^{-1}. Further, these tendencies are divided by d(zeta)/dz, so that the meters in the units refer to meters in the computational grid rather than the physical grid. Note that current physics schemes in MPAS return scalar tendencies in kg kg^{-1} s^{-1}, and these are converted to units of kg m^{-3} s^{-1} in the physics_get_tend routine by multiplication by rho_zz. This commit only addresses the previously incorrect units and description attributes in the Registry.xml file; there is no impact on model results. --- src/core_atmosphere/Registry.xml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index 253970d1b0..ddec5e2982 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -1641,35 +1641,35 @@ - + - - - - - - -