From faa3bbf8fb17ccfe0d48e6c9ca3d72090b79c60a Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Wed, 28 Oct 2026 15:58:28 -0400 Subject: [PATCH 01/10] v8.4.2-1.20: Update mpas init temperature extrapolation options (#301) * update mpas init temperature extrapolation options * fix bugs and enhance code for init extrapolation updates * remove empty line * Update README.md --------- Co-authored-by: Jili Dong Co-authored-by: Dustin Swales --- README.md | 2 +- .../mpas_init_atm_cases.F | 8 +- .../mpas_init_atm_vinterp.F | 81 ++++++++++++++++++- 3 files changed, 84 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f4145ad8b1..a5581dd193 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-1.19 +MPAS-v8.4.2-1.20 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_init_atmosphere/mpas_init_atm_cases.F b/src/core_init_atmosphere/mpas_init_atm_cases.F index 5c26b11ee7..e5c7f78686 100644 --- a/src/core_init_atmosphere/mpas_init_atm_cases.F +++ b/src/core_init_atmosphere/mpas_init_atm_cases.F @@ -4328,6 +4328,8 @@ subroutine init_atm_case_gfs(block, mesh, nCells, nEdges, nVertLevels, fg, state extrap_airtemp = 1 else if (trim(config_extrap_airtemp) == 'lapse-rate') then extrap_airtemp = 2 + else if (trim(config_extrap_airtemp) == 'gfs') then + extrap_airtemp = 3 else call mpas_log_write('*************************************************************', messageType=MPAS_LOG_ERR) call mpas_log_write('* Invalid value for namelist variable config_extrap_airtemp *', messageType=MPAS_LOG_ERR) @@ -7212,8 +7214,8 @@ subroutine init_atm_case_gfs(block, mesh, nCells, nEdges, nVertLevels, fg, state call mpas_log_write('min lon $r max lon $r min lat $r max lat $r',realArgs=(/minval(lonPoints),maxval(lonPoints),minval(latPoints),maxval(latPoints)/)) do iCell=1,nCells - lat = latPoints(i)*DEG_PER_RAD - lon = lonPoints(i)*DEG_PER_RAD + lat = latPoints(iCell)*DEG_PER_RAD + lon = lonPoints(iCell)*DEG_PER_RAD ! T sorted_arr(:,:) = -999.0 do k = 1, nfglevels_actual @@ -7946,6 +7948,8 @@ subroutine init_atm_case_lbc(timestamp, block, mesh, nCells, nEdges, nVertLevels extrap_airtemp = 1 else if (trim(config_extrap_airtemp) == 'lapse-rate') then extrap_airtemp = 2 + else if (trim(config_extrap_airtemp) == 'gfs') then + extrap_airtemp = 3 else call mpas_log_write('*************************************************************', messageType=MPAS_LOG_ERR) call mpas_log_write('* Invalid value for namelist variable config_extrap_airtemp *', messageType=MPAS_LOG_ERR) diff --git a/src/core_init_atmosphere/mpas_init_atm_vinterp.F b/src/core_init_atmosphere/mpas_init_atm_vinterp.F index 164cfac546..20b0dc0cec 100644 --- a/src/core_init_atmosphere/mpas_init_atm_vinterp.F +++ b/src/core_init_atmosphere/mpas_init_atm_vinterp.F @@ -40,7 +40,7 @@ real (kind=RKIND) function vertical_interp(target_z, nz, zf, order, extrap, surf integer :: k, lm, lp real (kind=RKIND) :: wm, wp - real (kind=RKIND) :: slope + real (kind=RKIND) :: slope,z_temp, t_temp, dz_temp integer :: interp_order, extrap_type real (kind=RKIND) :: surface, sealevel @@ -82,6 +82,8 @@ real (kind=RKIND) function vertical_interp(target_z, nz, zf, order, extrap, surf vertical_interp = zf(2,1) + slope * (target_z - zf(1,1)) else if (extrap_type == 2) then vertical_interp = zf(2,1) - (target_z - zf(1,1))*0.0065 + else if (extrap_type == 3) then + vertical_interp = zf(2,1) - (target_z - zf(1,1))*0.0065 end if return end if @@ -92,9 +94,80 @@ real (kind=RKIND) function vertical_interp(target_z, nz, zf, order, extrap, surf slope = (zf(2,nz) - zf(2,nz-1)) / (zf(1,nz) - zf(1,nz-1)) vertical_interp = zf(2,nz) + slope * (target_z - zf(1,nz)) else if (extrap_type == 2) then - call mpas_log_write('extrap_type == 2 not implemented for target_z >= zf(1,nz)', messageType=MPAS_LOG_ERR) - if (present(ierr)) ierr = 1 - return + z_temp = zf(1,nz) + t_temp = zf(2,nz) + + ! Layer 1: Troposphere (up to 11,000 m) + ! Gamma = -6.5 K/km (Cooling) + if (z_temp < 11000.0 .and. target_z > z_temp) then + dz_temp = min(target_z, 11000.0) - z_temp + t_temp = t_temp - 0.0065 * dz_temp + z_temp = z_temp + dz_temp + end if + + ! Layer 2: Lower Stratosphere / Tropopause (11km to 20km) + ! Gamma = 0.0 K/km (Isothermal) + if (z_temp >= 11000.0 .and. z_temp < 20000.0 .and. target_z > z_temp) then + dz_temp = min(target_z, 20000.0) - z_temp + t_temp = t_temp - 0.0 * dz_temp + z_temp = z_temp + dz_temp + end if + + ! Layer 3: Middle Stratosphere (20km to 32km) + ! Gamma = +1.0 K/km (Warming) + if (z_temp >= 20000.0 .and. z_temp < 32000.0 .and. target_z > z_temp) then + dz_temp = min(target_z, 32000.0) - z_temp + t_temp = t_temp - (-0.001) * dz_temp + z_temp = z_temp + dz_temp + end if + + ! Layer 4: Upper Stratosphere (32km to 47km) + ! Gamma = +2.8 K/km (Warming) + if (z_temp >= 32000.0 .and. z_temp < 47000.0 .and. target_z > z_temp) then + dz_temp = min(target_z, 47000.0) - z_temp + t_temp = t_temp - (-0.0028) * dz_temp + z_temp = z_temp + dz_temp + end if + + ! Layer 5: Stratopause (47km to 51km) + ! Gamma = 0.0 K/km (Isothermal) + if (z_temp >= 47000.0 .and. z_temp < 51000.0 .and. target_z > z_temp) then + dz_temp = min(target_z, 51000.0) - z_temp + t_temp = t_temp - 0.0 * dz_temp + z_temp = z_temp + dz_temp + end if + + ! Layer 6: Lower Mesosphere (51km to 71km) + ! Gamma = -2.8 K/km (Cooling) + if (z_temp >= 51000.0 .and. z_temp < 71000.0 .and. target_z > z_temp) then + dz_temp = min(target_z, 71000.0) - z_temp + t_temp = t_temp - 0.0028 * dz_temp + z_temp = z_temp + dz_temp + end if + + ! Layer 7: Upper Mesosphere (71km to 85km) + ! Gamma = -2.0 K/km (Cooling) + if (z_temp >= 71000.0 .and. z_temp < 85000.0 .and. target_z > z_temp) then + dz_temp = min(target_z, 85000.0) - z_temp + t_temp = t_temp - 0.002 * dz_temp + z_temp = z_temp + dz_temp + end if + + ! Extrapolation above 85 km is unsupported in this routine; + + if (z_temp >= 85000.0 .and. target_z > z_temp) then + write(*,'(A,ES12.5,A,ES12.5,A,I10,A)') & + 'vertical_interp: unsupported extrapolation above 85 km: target_z=', target_z, & + ', top_z=', zf(1,nz), ', nz=', nz, & + '. Adjust vertical grid/top-of-model assumptions or extend the extrapolation scheme.' + call mpas_log_write('vertical_interp failed: target_z exceeds the supported extrapolation range above 85 km. See values printed for target_z, zf(1,nz), and nz. Adjust vertical grid/top-of-model assumptions or extend the extrapolation scheme.', messageType=MPAS_LOG_ERR) + if (present(ierr)) ierr = 1 + return + end if + vertical_interp = t_temp + + else if (extrap_type == 3) then + vertical_interp = zf(2,nz) end if return end if From e511c357dcb3a5e1b22d00c02915a4095e912ed7 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Wed, 28 Oct 2026 15:04:04 -0600 Subject: [PATCH 02/10] v8.4.2-1.21: Bug fix for mpas_convective_diagnostics.F when running in full debug mode (#302) * bug fix for running in full debug mode * Update README.md --------- Co-authored-by: Dustin Swales --- README.md | 2 +- src/core_atmosphere/diagnostics/mpas_convective_diagnostics.F | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a5581dd193..b54c19192b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-1.20 +MPAS-v8.4.2-1.21 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_atmosphere/diagnostics/mpas_convective_diagnostics.F b/src/core_atmosphere/diagnostics/mpas_convective_diagnostics.F index 8369c8adee..4823699bb8 100644 --- a/src/core_atmosphere/diagnostics/mpas_convective_diagnostics.F +++ b/src/core_atmosphere/diagnostics/mpas_convective_diagnostics.F @@ -492,6 +492,7 @@ subroutine convective_diagnostics_update(configs, stream_mgr, dt) allocate(wspd(nVertLevels)) do iCell=1, nCellsSolve z_agl(1:nVertLevels) = 0.5*(zgrid(1:nVertLevels,iCell)+zgrid(2:nVertlevelsP1,iCell)) - zgrid(1,iCell) + z_agl(nVertLevelsP1) = zgrid(nVertlevelsP1,iCell) - zgrid(1,iCell) if (column_height_value(refl10cm(:,iCell),z_agl(1:nVertLevels),1000.0_RKIND,nVertLevels) > 20.0_RKIND) then do k=1,nVertLevels wspd(k) = sqrt(uzonal(k,iCell)**2+umeridional(k,iCell)**2) @@ -505,6 +506,7 @@ subroutine convective_diagnostics_update(configs, stream_mgr, dt) if (is_needed_wind02_integral_max) then do iCell=1, nCellsSolve z_agl(1:nVertLevels) = 0.5*(zgrid(1:nVertLevels,iCell)+zgrid(2:nVertlevelsP1,iCell)) - zgrid(1,iCell) + z_agl(nVertLevelsP1) = zgrid(nVertlevelsP1,iCell) - zgrid(1,iCell) if (column_height_value(refl10cm(:,iCell),z_agl(1:nVertLevels),1000.0_RKIND,nVertLevels) > 20.0_RKIND) then wind02_integral_max(iCell) = max(wind02_integral_max(iCell), & sqrt(integral_zstaggered(uzonal(:,iCell),z_agl,0.0_RKIND, 2000.0_RKIND, nVertLevels,nVertLevelsP1)**2 + & From 9c81fedbf500b8de509681f4fb8e396be912ecae Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Wed, 28 Oct 2026 15:38:04 -0600 Subject: [PATCH 03/10] v8.4.2-1.22: Updating MYNN-EDMF in MPAS to unified driver (MPAS/WRF/CCPP) (#303) * updating MYNN-EDMF pointer * minor updates * fixing copilot issues * changed tabs to spaces, as copilot recommends * adding conditionals for pointer allocations * adding granularity to the 2d diagnostic packages * fix spacing in Registry and fix intialization of 2d diags in pbl driver * incrementing the subversion number to 1.19 * final updating of MYNN-EDMF pointer * Update README.md --------- Co-authored-by: Dustin Swales --- README.md | 2 +- src/core_atmosphere/CMakeLists.txt | 1 + src/core_atmosphere/Registry.xml | 76 +++++-- .../physics/mpas_atmphys_driver_pbl.F | 185 ++++++++++++++---- .../physics/mpas_atmphys_packages.F | 36 +++- .../physics/mpas_atmphys_vars.F | 19 +- .../physics/physics_noaa/MYNN-EDMF | 2 +- 7 files changed, 249 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index b54c19192b..2d76fbf575 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-1.21 +MPAS-v8.4.2-1.22 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_atmosphere/CMakeLists.txt b/src/core_atmosphere/CMakeLists.txt index a64d631ee1..1f8f893308 100644 --- a/src/core_atmosphere/CMakeLists.txt +++ b/src/core_atmosphere/CMakeLists.txt @@ -284,6 +284,7 @@ endif() set(ATMOSPHERE_CORE_PHYSICS_MYNN-EDMF_SOURCES src/module_bl_mynnedmf.F90 src/MPAS/module_bl_mynnedmf_common.F90 + src/module_bl_mynnedmf_diags.F90 src/module_bl_mynnedmf_driver.F90 ) list(TRANSFORM ATMOSPHERE_CORE_PHYSICS_MYNN-EDMF_SOURCES PREPEND physics/physics_noaa/MYNN-EDMF/) diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index c2a9fea3c7..d5132cc79c 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -511,7 +511,9 @@ - + + + @@ -1247,6 +1249,15 @@ + + + + + + + + + @@ -3095,7 +3106,12 @@ description="=1:activate TKE transport with the EDMF option of the MYNN PBL scheme (=0 otherwise)" possible_values="0,1"/> - + + @@ -3533,43 +3549,43 @@ + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + packages="bl_mynn_in;bl_mynn_diags3d_in"/> + + + + + + + + + + + + + + + + + + 0)then + if(.not.allocated(lwpbl_p) ) allocate(lwpbl_p(ims:ime,jms:jme) ) + if(.not.allocated(iwpbl_p) ) allocate(iwpbl_p(ims:ime,jms:jme) ) + if(.not.allocated(swpbl_p) ) allocate(swpbl_p(ims:ime,jms:jme) ) + if(.not.allocated(cldceil_p) ) allocate(cldceil_p(ims:ime,jms:jme) ) + endif + if(config_mynn_diags2d>1)then + if(.not.allocated(wspd10_p) ) allocate(wspd10_p(ims:ime,jms:jme) ) + if(.not.allocated(wspd80_p) ) allocate(wspd80_p(ims:ime,jms:jme) ) + if(.not.allocated(wspd160_p) ) allocate(wspd160_p(ims:ime,jms:jme) ) + if(.not.allocated(maxcldfra_p) ) allocate(maxcldfra_p(ims:ime,jms:jme) ) + if(.not.allocated(maxcldfrabl_p) ) allocate(maxcldfrabl_p(ims:ime,jms:jme) ) + endif if(.not.allocated(cov_p) ) allocate(cov_p(ims:ime,kms:kme,jms:jme) ) if(.not.allocated(qke_p) ) allocate(qke_p(ims:ime,kms:kme,jms:jme) ) if(.not.allocated(qsq_p) ) allocate(qsq_p(ims:ime,kms:kme,jms:jme) ) @@ -229,17 +244,18 @@ subroutine allocate_pbl(configs) if(.not.allocated(qcbl_p) ) allocate(qcbl_p(ims:ime,kms:kme,jms:jme) ) if(.not.allocated(qibl_p) ) allocate(qibl_p(ims:ime,kms:kme,jms:jme) ) if(.not.allocated(cldfrabl_p) ) allocate(cldfrabl_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(edmfa_p) ) allocate(edmfa_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(edmfw_p) ) allocate(edmfw_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(edmfqt_p) ) allocate(edmfqt_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(edmfthl_p) ) allocate(edmfthl_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(edmfent_p) ) allocate(edmfent_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(edmfqc_p) ) allocate(edmfqc_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(subthl_p) ) allocate(subthl_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(subqv_p) ) allocate(subqv_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(detthl_p) ) allocate(detthl_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(detqv_p) ) allocate(detqv_p(ims:ime,kms:kme,jms:jme) ) - + if(config_mynn_diags3d>0)then + if(.not.allocated(edmfa_p) ) allocate(edmfa_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(edmfw_p) ) allocate(edmfw_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(edmfqt_p) ) allocate(edmfqt_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(edmfthl_p) ) allocate(edmfthl_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(edmfent_p) ) allocate(edmfent_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(edmfqc_p) ) allocate(edmfqc_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(subthl_p) ) allocate(subthl_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(subqv_p) ) allocate(subqv_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(detthl_p) ) allocate(detthl_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(detqv_p) ) allocate(detqv_p(ims:ime,kms:kme,jms:jme) ) + endif !additional tendencies: if(.not.allocated(rqsblten_p) ) allocate(rqsblten_p(ims:ime,kms:kme,jms:jme) ) if(.not.allocated(rncblten_p) ) allocate(rncblten_p(ims:ime,kms:kme,jms:jme) ) @@ -284,7 +300,8 @@ subroutine deallocate_pbl(configs) !local pointers: character(len=StrKIND),pointer:: pbl_scheme - + integer,pointer:: config_mynn_diags2d,config_mynn_diags3d + !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_pbl_scheme',pbl_scheme) @@ -389,6 +406,8 @@ subroutine deallocate_pbl(configs) if(allocated(pattern_spp_pbl)) deallocate(pattern_spp_pbl) case("bl_mynnedmf") + call mpas_pool_get_config(configs,'config_mynn_diags2d',config_mynn_diags2d) + call mpas_pool_get_config(configs,'config_mynn_diags3d',config_mynn_diags3d) if(allocated(dx_p) ) deallocate(dx_p ) if(allocated(ch_p) ) deallocate(ch_p ) if(allocated(qsfc_p) ) deallocate(qsfc_p ) @@ -396,14 +415,26 @@ subroutine deallocate_pbl(configs) if(allocated(maxwidthbl_p) ) deallocate(maxwidthbl_p ) if(allocated(maxmfbl_p) ) deallocate(maxmfbl_p ) if(allocated(zbl_plume_p) ) deallocate(zbl_plume_p ) - if(allocated(excessh_p) ) deallocate(excessh_p ) + if(allocated(excessh_p) ) deallocate(excessh_p ) if(allocated(excessq_p) ) deallocate(excessq_p ) if(allocated(maxwidth_dd_p) ) deallocate(maxwidth_dd_p ) if(allocated(maxmf_dd_p) ) deallocate(maxmf_dd_p ) if(allocated(maxtkeprod_dd_p) ) deallocate(maxtkeprod_dd_p ) if(allocated(cldtop_cooling_p)) deallocate(cldtop_cooling_p) if(allocated(ent_eff_p) ) deallocate(ent_eff_p ) - + if(config_mynn_diags2d>0)then + if(allocated(lwpbl_p) ) deallocate(lwpbl_p ) + if(allocated(iwpbl_p) ) deallocate(iwpbl_p ) + if(allocated(swpbl_p) ) deallocate(swpbl_p ) + if(allocated(cldceil_p) ) deallocate(cldceil_p ) + endif + if(config_mynn_diags2d>1)then + if(allocated(wspd10_p) ) deallocate(wspd10_p ) + if(allocated(wspd80_p) ) deallocate(wspd80_p ) + if(allocated(wspd160_p) ) deallocate(wspd160_p ) + if(allocated(maxcldfra_p) ) deallocate(maxcldfra_p ) + if(allocated(maxcldfrabl_p) ) deallocate(maxcldfrabl_p ) + endif if(allocated(cov_p) ) deallocate(cov_p ) if(allocated(qke_p) ) deallocate(qke_p ) if(allocated(qsq_p) ) deallocate(qsq_p ) @@ -420,17 +451,18 @@ subroutine deallocate_pbl(configs) if(allocated(qcbl_p) ) deallocate(qcbl_p ) if(allocated(qibl_p) ) deallocate(qibl_p ) if(allocated(cldfrabl_p) ) deallocate(cldfrabl_p ) - if(allocated(edmfa_p) ) deallocate(edmfa_p ) - if(allocated(edmfw_p) ) deallocate(edmfw_p ) - if(allocated(edmfqt_p) ) deallocate(edmfqt_p ) - if(allocated(edmfthl_p) ) deallocate(edmfthl_p ) - if(allocated(edmfent_p) ) deallocate(edmfent_p ) - if(allocated(edmfqc_p) ) deallocate(edmfqc_p ) - if(allocated(subthl_p) ) deallocate(subthl_p ) - if(allocated(subqv_p) ) deallocate(subqv_p ) - if(allocated(detthl_p) ) deallocate(detthl_p ) - if(allocated(detqv_p) ) deallocate(detqv_p ) - + if(config_mynn_diags3d>0)then + if(allocated(edmfa_p) ) deallocate(edmfa_p ) + if(allocated(edmfw_p) ) deallocate(edmfw_p ) + if(allocated(edmfqt_p) ) deallocate(edmfqt_p ) + if(allocated(edmfthl_p) ) deallocate(edmfthl_p ) + if(allocated(edmfent_p) ) deallocate(edmfent_p ) + if(allocated(edmfqc_p) ) deallocate(edmfqc_p ) + if(allocated(subthl_p) ) deallocate(subthl_p ) + if(allocated(subqv_p) ) deallocate(subqv_p ) + if(allocated(detthl_p) ) deallocate(detthl_p ) + if(allocated(detqv_p) ) deallocate(detqv_p ) + endif !additional tendencies: if(allocated(rqsblten_p) ) deallocate(rqsblten_p ) if(allocated(rncblten_p) ) deallocate(rncblten_p ) @@ -497,7 +529,7 @@ subroutine pbl_from_MPAS(configs,state,mesh,sfc_input,diag_physics,tend_physics, !local pointers for MYNN scheme: real(kind=RKIND),pointer:: len_disp - integer,pointer:: config_mynn_tkebudget,config_mynn_edmf_output + integer,pointer:: config_mynn_tkebudget,config_mynn_diags2d,config_mynn_diags3d real(kind=RKIND),dimension(:),pointer :: meshDensity real(kind=RKIND),dimension(:),pointer :: ch,qsfc,rmol,skintemp real(kind=RKIND),dimension(:,:),pointer:: cov,qke,qsq,tsq,sh3d,sm3d,tke_pbl,qke_adv,el_pbl @@ -768,7 +800,8 @@ subroutine pbl_from_MPAS(configs,state,mesh,sfc_input,diag_physics,tend_physics, case("bl_mynnedmf") call mpas_pool_get_config(configs,'config_len_disp',len_disp) - call mpas_pool_get_config(configs,'config_mynn_edmf_output',config_mynn_edmf_output) + call mpas_pool_get_config(configs,'config_mynn_diags2d',config_mynn_diags2d) + call mpas_pool_get_config(configs,'config_mynn_diags3d',config_mynn_diags3d) call mpas_pool_get_config(configs,'config_mynn_tkebudget',config_mynn_tkebudget) call mpas_pool_get_array(mesh,'meshDensity',meshDensity) @@ -786,7 +819,7 @@ subroutine pbl_from_MPAS(configs,state,mesh,sfc_input,diag_physics,tend_physics, call mpas_pool_get_array(diag_physics,'cldfrac_bl',cldfrac_bl) call mpas_pool_get_array(diag_physics,'qc_bl' ,qc_bl ) call mpas_pool_get_array(diag_physics,'qi_bl' ,qi_bl ) - if(config_mynn_edmf_output > 0) then + if(config_mynn_diags3d > 0) then call mpas_pool_get_array(diag_physics,'edmf_a' ,edmf_a ) call mpas_pool_get_array(diag_physics,'edmf_ent' ,edmf_ent ) call mpas_pool_get_array(diag_physics,'edmf_qc' ,edmf_qc ) @@ -835,7 +868,7 @@ subroutine pbl_from_MPAS(configs,state,mesh,sfc_input,diag_physics,tend_physics, enddo enddo - if(config_mynn_edmf_output > 0)then + if(config_mynn_diags3d > 0)then do j = jts,jte do k = kts,kte do i = its,ite @@ -883,6 +916,28 @@ subroutine pbl_from_MPAS(configs,state,mesh,sfc_input,diag_physics,tend_physics, enddo enddo + if(config_mynn_diags2d >= 1)then + do j = jts,jte + do i = its,ite + lwpbl_p(i,j) = 0._RKIND + iwpbl_p(i,j) = 0._RKIND + swpbl_p(i,j) = 0._RKIND + cldceil_p(i,j) = 0._RKIND + enddo + enddo + endif + if(config_mynn_diags2d >= 2)then + do j = jts,jte + do i = its,ite + wspd10_p(i,j) = 0._RKIND + wspd80_p(i,j) = 0._RKIND + wspd160_p(i,j) = 0._RKIND + maxcldfra_p(i,j) = 0._RKIND + maxcldfrabl_p(i,j) = 0._RKIND + enddo + enddo + endif + case("bl_myj") !input variables: call mpas_pool_get_array(mesh ,'zgrid' ,zgrid) @@ -984,9 +1039,11 @@ subroutine pbl_to_MPAS(configs,state,diag_physics,tend_physics,its,ite) real(kind=RKIND),dimension(:),pointer :: delta,wstar !local pointers for MYNN scheme: - integer,pointer:: config_mynn_tkebudget,config_mynn_edmf_output + integer,pointer:: config_mynn_tkebudget,config_mynn_diags2d,config_mynn_diags3d real(kind=RKIND),dimension(:),pointer :: maxmf,maxwidth,ztop_plume,excess_h,excess_q real(kind=RKIND),dimension(:),pointer :: maxmf_dd,maxwidth_dd,maxtkeprod_dd,cldtop_cooling,ent_eff + real(kind=RKIND),dimension(:),pointer :: lwp_bl,iwp_bl,swp_bl,cldceil + real(kind=RKIND),dimension(:),pointer :: wspd10,wspd80,wspd160,maxcldfra,maxcldfra_pbl real(kind=RKIND),dimension(:,:),pointer:: cov,qke,qsq,tsq,sh3d,sm3d,tke_pbl,qke_adv,el_pbl,dqke,qbuoy, & qdiss,qshear,qwt real(kind=RKIND),dimension(:,:),pointer:: cldfrac_bl,qc_bl,qi_bl @@ -1172,8 +1229,9 @@ subroutine pbl_to_MPAS(configs,state,diag_physics,tend_physics,its,ite) endif case("bl_mynnedmf") - call mpas_pool_get_config(configs,'config_mynn_edmf_output',config_mynn_edmf_output) call mpas_pool_get_config(configs,'config_mynn_tkebudget',config_mynn_tkebudget) + call mpas_pool_get_config(configs,'config_mynn_diags2d',config_mynn_diags2d) + call mpas_pool_get_config(configs,'config_mynn_diags3d',config_mynn_diags3d) call mpas_pool_get_array(diag_physics,'maxmf' ,maxmf ) call mpas_pool_get_array(diag_physics,'maxwidth' ,maxwidth ) call mpas_pool_get_array(diag_physics,'ztop_plume' ,ztop_plume ) @@ -1202,7 +1260,20 @@ subroutine pbl_to_MPAS(configs,state,diag_physics,tend_physics,its,ite) call mpas_pool_get_array(diag_physics,'cldfrac_bl' ,cldfrac_bl ) call mpas_pool_get_array(diag_physics,'qc_bl' ,qc_bl ) call mpas_pool_get_array(diag_physics,'qi_bl' ,qi_bl ) - if(config_mynn_edmf_output > 0) then + if(config_mynn_diags2d > 0) then + call mpas_pool_get_array(diag_physics,'lwp_bl' ,lwp_bl ) + call mpas_pool_get_array(diag_physics,'iwp_bl' ,iwp_bl ) + call mpas_pool_get_array(diag_physics,'swp_bl' ,swp_bl ) + call mpas_pool_get_array(diag_physics,'cldceil' ,cldceil ) + endif + if(config_mynn_diags2d > 1) then + call mpas_pool_get_array(diag_physics,'wspd10' ,wspd10 ) + call mpas_pool_get_array(diag_physics,'wspd80' ,wspd80 ) + call mpas_pool_get_array(diag_physics,'wspd160' ,wspd160 ) + call mpas_pool_get_array(diag_physics,'maxcldfra' ,maxcldfra ) + call mpas_pool_get_array(diag_physics,'maxcldfra_pbl',maxcldfra_pbl) + endif + if(config_mynn_diags3d > 0) then call mpas_pool_get_array(diag_physics,'edmf_a' ,edmf_a ) call mpas_pool_get_array(diag_physics,'edmf_ent' ,edmf_ent ) call mpas_pool_get_array(diag_physics,'edmf_qc' ,edmf_qc ) @@ -1250,7 +1321,28 @@ subroutine pbl_to_MPAS(configs,state,diag_physics,tend_physics,its,ite) enddo enddo - if(config_mynn_edmf_output > 0)then + if(config_mynn_diags2d > 0)then + do j = jts,jte + do i = its,ite + lwp_bl(i) = lwpbl_p(i,j) + iwp_bl(i) = iwpbl_p(i,j) + swp_bl(i) = swpbl_p(i,j) + cldceil(i) = cldceil_p(i,j) + enddo + enddo + endif + if(config_mynn_diags2d > 1)then + do j = jts,jte + do i = its,ite + wspd10(i) = wspd10_p(i,j) + wspd80(i) = wspd80_p(i,j) + wspd160(i) = wspd160_p(i,j) + maxcldfra(i) = maxcldfra_p(i,j) + maxcldfra_pbl(i)=maxcldfrabl_p(i,j) + enddo + enddo + endif + if(config_mynn_diags3d > 0)then do j = jts,jte do k = kts,kte do i = its,ite @@ -1419,7 +1511,6 @@ subroutine driver_pbl(itimestep,configs,state,mesh,sfc_input,diag_physics,tend_p bl_mynn_edmf_dd, & bl_mynn_edmf_mom, & bl_mynn_edmf_tke, & - bl_mynn_edmf_output, & bl_mynn_mixscalars, & bl_mynn_mixaerosols, & bl_mynn_mixnumcon, & @@ -1427,6 +1518,8 @@ subroutine driver_pbl(itimestep,configs,state,mesh,sfc_input,diag_physics,tend_p bl_mynn_mixqt, & bl_mynn_ess, & bl_mynn_tkebudget, & + bl_mynn_diags2d, & + bl_mynn_diags3d, & spp_pbl real(kind=RKIND),pointer:: bl_mynn_closure @@ -1502,7 +1595,7 @@ subroutine driver_pbl(itimestep,configs,state,mesh,sfc_input,diag_physics,tend_p call mpas_pool_get_config(configs,'config_mynn_edmf_dd' ,bl_mynn_edmf_dd ) call mpas_pool_get_config(configs,'config_mynn_edmf_mom' ,bl_mynn_edmf_mom ) call mpas_pool_get_config(configs,'config_mynn_edmf_tke' ,bl_mynn_edmf_tke ) - call mpas_pool_get_config(configs,'config_mynn_edmf_output',bl_mynn_edmf_output) + call mpas_pool_get_config(configs,'config_mynn_diags3d' ,bl_mynn_diags3d ) call mpas_pool_get_config(configs,'config_mynn_closure' ,bl_mynn_closure ) call mpas_pool_get_config(configs,'config_mynn_mixscalars' ,bl_mynn_mixscalars ) call mpas_pool_get_config(configs,'config_mynn_mixclouds' ,bl_mynn_cloudmix ) @@ -1522,7 +1615,7 @@ subroutine driver_pbl(itimestep,configs,state,mesh,sfc_input,diag_physics,tend_p ! call mpas_log_write('--- config_mynn_edmf_dd = $i',intArgs=(/bl_mynn_edmf_dd/)) ! call mpas_log_write('--- config_mynn_edmf_mom = $i',intArgs=(/bl_mynn_edmf_mom/)) ! call mpas_log_write('--- config_mynn_edmf_tke = $i',intArgs=(/bl_mynn_edmf_tke/)) -! call mpas_log_write('--- config_mynn_edmf_output = $i',intArgs=(/bl_mynn_edmf_output/)) +! call mpas_log_write('--- config_mynn_diags3d = $i',intArgs=(/bl_mynn_diags3d/)) ! call mpas_log_write('--- config_mynn_mixscalars = $i',intArgs=(/bl_mynn_mixscalars/)) ! call mpas_log_write('--- config_mynn_mixclouds = $i',intArgs=(/bl_mynn_cloudmix/)) ! call mpas_log_write('--- config_mynn_mixqt = $i',intArgs=(/bl_mynn_mixqt/)) @@ -1588,7 +1681,7 @@ subroutine driver_pbl(itimestep,configs,state,mesh,sfc_input,diag_physics,tend_p bl_mynn_edmf_dd = bl_mynn_edmf_dd , & bl_mynn_edmf_mom = bl_mynn_edmf_mom , & bl_mynn_edmf_tke = bl_mynn_edmf_tke , & - bl_mynn_output = bl_mynn_edmf_output , & + bl_mynn_output = bl_mynn_diags3d , & bl_mynn_mixscalars = bl_mynn_mixscalars , & bl_mynn_cloudmix = bl_mynn_cloudmix , & bl_mynn_mixqt = bl_mynn_mixqt , & @@ -1608,7 +1701,8 @@ subroutine driver_pbl(itimestep,configs,state,mesh,sfc_input,diag_physics,tend_p call mpas_pool_get_config(configs,'config_mynn_edmf_dd' ,bl_mynn_edmf_dd ) call mpas_pool_get_config(configs,'config_mynn_edmf_mom' ,bl_mynn_edmf_mom ) call mpas_pool_get_config(configs,'config_mynn_edmf_tke' ,bl_mynn_edmf_tke ) - call mpas_pool_get_config(configs,'config_mynn_edmf_output',bl_mynn_edmf_output) + call mpas_pool_get_config(configs,'config_mynn_diags2d' ,bl_mynn_diags2d ) + call mpas_pool_get_config(configs,'config_mynn_diags3d' ,bl_mynn_diags3d ) call mpas_pool_get_config(configs,'config_mynn_closure' ,bl_mynn_closure ) call mpas_pool_get_config(configs,'config_mynn_mixscalars' ,bl_mynn_mixscalars ) call mpas_pool_get_config(configs,'config_mynn_mixaerosols',bl_mynn_mixaerosols) @@ -1629,7 +1723,8 @@ subroutine driver_pbl(itimestep,configs,state,mesh,sfc_input,diag_physics,tend_p ! call mpas_log_write('--- config_mynn_edmf_dd = $i',intArgs=(/bl_mynn_edmf_dd/)) ! call mpas_log_write('--- config_mynn_edmf_mom = $i',intArgs=(/bl_mynn_edmf_mom/)) ! call mpas_log_write('--- config_mynn_edmf_tke = $i',intArgs=(/bl_mynn_edmf_tke/)) -! call mpas_log_write('--- config_mynn_edmf_output = $i',intArgs=(/bl_mynn_edmf_output/)) +! call mpas_log_write('--- config_mynn_diags2d = $i',intArgs=(/bl_mynn_diags2d/)) +! call mpas_log_write('--- config_mynn_diags3d = $i',intArgs=(/bl_mynn_diags3d/)) ! call mpas_log_write('--- config_mynn_mixscalars = $i',intArgs=(/bl_mynn_mixscalars/)) ! call mpas_log_write('--- config_mynn_mixclouds = $i',intArgs=(/bl_mynn_cloudmix/)) ! call mpas_log_write('--- config_mynn_mixqt = $i',intArgs=(/bl_mynn_mixqt/)) @@ -1671,7 +1766,10 @@ subroutine driver_pbl(itimestep,configs,state,mesh,sfc_input,diag_physics,tend_p maxwidth = maxwidthbl_p , maxmf = maxmfbl_p , ztop_plume = zbl_plume_p , & excess_h = excessh_p , excess_q = excessq_p , maxwidth_dd = maxwidth_dd_p , & maxmf_dd = maxmf_dd_p , maxtkeprod = maxtkeprod_dd_p, cldtop_cooling= cldtop_cooling_p , & - ent_eff = ent_eff_p , & + ent_eff = ent_eff_p , lwp = lwpbl_p , iwp = iwpbl_p , & + swp = swpbl_p , cldceil = cldceil_p , wspd10 = wspd10_p , & + wspd80 = wspd80_p , wspd160 = wspd160_p , maxcldfra = maxcldfra_p , & + maxcldfra_pbl = maxcldfrabl_p , & qke = qke_p , qke_adv = qkeadv_p , & tsq = tsq_p , qsq = qsq_p , cov = cov_p , & el_pbl = elpbl_p , rublten = rublten_p , rvblten = rvblten_p , & @@ -1697,7 +1795,8 @@ subroutine driver_pbl(itimestep,configs,state,mesh,sfc_input,diag_physics,tend_p bl_mynn_edmf_dd = bl_mynn_edmf_dd , & bl_mynn_edmf_mom = bl_mynn_edmf_mom , & bl_mynn_edmf_tke = bl_mynn_edmf_tke , & - bl_mynn_output = bl_mynn_edmf_output , & + bl_mynn_diags2d = bl_mynn_diags2d , & + bl_mynn_diags3d = bl_mynn_diags3d , & bl_mynn_mixscalars = bl_mynn_mixscalars , & bl_mynn_mixaerosols= bl_mynn_mixaerosols , & bl_mynn_mixnumcon = bl_mynn_mixnumcon , & diff --git a/src/core_atmosphere/physics/mpas_atmphys_packages.F b/src/core_atmosphere/physics/mpas_atmphys_packages.F index 2239490f94..e11ab25e77 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_packages.F +++ b/src/core_atmosphere/physics/mpas_atmphys_packages.F @@ -39,12 +39,13 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie character(len=StrKIND),pointer:: config_convection_scheme character(len=StrKIND),pointer:: config_pbl_scheme character(len=StrKIND),pointer:: config_lsm_scheme - integer,pointer:: config_mynn_tkebudget,config_mynn_edmf_output + integer,pointer:: config_mynn_tkebudget,config_mynn_diags3d,config_mynn_diags2d logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware logical,pointer:: mp_kessler_in,mp_thompson_in,mp_thompson_aers_in,mp_wsm6_in,mp_nssl2m_in,nssl3m_in logical,pointer:: mp_tempo_in,tempo_hailaware_in,tempo_aerosolaware_in logical,pointer:: cu_grell_freitas_in,cu_grell_freitas_li_in,cu_kain_fritsch_in,cu_ntiedtke_in - logical,pointer:: bl_mynnedmf_tkebudget_in,bl_mynnedmf_output_in + logical,pointer:: bl_mynnedmf_tkebudget_in,bl_mynn_diags3d_in + logical,pointer:: bl_mynn_diags2d_in,bl_mynn_diags2dextra_in logical,pointer:: bl_mynn_in,bl_mynnedmf_in,bl_ysu_in,bl_myj_in logical,pointer:: lsm_noah_in,lsm_ruc_in logical,pointer:: sf_noahmp_in @@ -199,7 +200,8 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie call mpas_pool_get_config(configs,'config_pbl_scheme',config_pbl_scheme) call mpas_pool_get_config(configs,'config_mynn_tkebudget',config_mynn_tkebudget) - call mpas_pool_get_config(configs,'config_mynn_edmf_output',config_mynn_edmf_output) + call mpas_pool_get_config(configs,'config_mynn_diags2d',config_mynn_diags2d) + call mpas_pool_get_config(configs,'config_mynn_diags3d',config_mynn_diags3d) nullify(bl_mynn_in) call mpas_pool_get_package(packages,'bl_mynn_inActive',bl_mynn_in) @@ -210,9 +212,15 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie nullify(bl_mynnedmf_tkebudget_in) call mpas_pool_get_package(packages,'bl_mynnedmf_tkebudget_inActive',bl_mynnedmf_tkebudget_in) - nullify(bl_mynnedmf_output_in) - call mpas_pool_get_package(packages,'bl_mynnedmf_output_inActive',bl_mynnedmf_output_in) + nullify(bl_mynn_diags2d_in) + call mpas_pool_get_package(packages,'bl_mynn_diags2d_inActive',bl_mynn_diags2d_in) + nullify(bl_mynn_diags2dextra_in) + call mpas_pool_get_package(packages,'bl_mynn_diags2dextra_inActive',bl_mynn_diags2dextra_in) + + nullify(bl_mynn_diags3d_in) + call mpas_pool_get_package(packages,'bl_mynn_diags3d_inActive',bl_mynn_diags3d_in) + nullify(bl_ysu_in) call mpas_pool_get_package(packages,'bl_ysu_inActive',bl_ysu_in) @@ -221,7 +229,9 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie if(.not.associated(bl_mynn_in) .or. & .not.associated(bl_mynnedmf_in) .or. & - .not.associated(bl_mynnedmf_output_in) .or. & + .not.associated(bl_mynn_diags2d_in) .or. & + .not.associated(bl_mynn_diags2dextra_in) .or. & + .not.associated(bl_mynn_diags3d_in) .or. & .not.associated(bl_mynnedmf_tkebudget_in) .or. & .not.associated(bl_ysu_in) .or. & .not.associated(bl_myj_in)) then @@ -234,7 +244,9 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie bl_mynn_in = .false. bl_mynnedmf_in = .false. - bl_mynnedmf_output_in = .false. + bl_mynn_diags2d_in = .false. + bl_mynn_diags2dextra_in = .false. + bl_mynn_diags3d_in = .false. bl_mynnedmf_tkebudget_in = .false. bl_ysu_in = .false. bl_myj_in = .false. @@ -242,8 +254,10 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie bl_mynn_in = .true. elseif(config_pbl_scheme == 'bl_mynnedmf') then bl_mynnedmf_in = .true. - if(config_mynn_edmf_output >0) bl_mynnedmf_output_in = .true. - if(config_mynn_tkebudget >0) bl_mynnedmf_tkebudget_in = .true. + if(config_mynn_diags2d >=1) bl_mynn_diags2d_in = .true. + if(config_mynn_diags2d >=2) bl_mynn_diags2dextra_in = .true. + if(config_mynn_diags3d >=1) bl_mynn_diags3d_in = .true. + if(config_mynn_tkebudget ==1) bl_mynnedmf_tkebudget_in = .true. elseif(config_pbl_scheme == 'bl_ysu') then bl_ysu_in = .true. elseif(config_pbl_scheme == 'bl_myj') then @@ -252,7 +266,9 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie call mpas_log_write(' bl_mynn_in = $l', logicArgs=(/bl_mynn_in/)) call mpas_log_write(' bl_mynnedmf_in = $l', logicArgs=(/bl_mynnedmf_in/)) - call mpas_log_write(' bl_mynnedmf_output_in = $l', logicArgs=(/bl_mynnedmf_output_in/)) + call mpas_log_write(' bl_mynn_diags2d_in = $l', logicArgs=(/bl_mynn_diags2d_in/)) + call mpas_log_write(' bl_mynn_diags2dextra_in = $l', logicArgs=(/bl_mynn_diags2dextra_in/)) + call mpas_log_write(' bl_mynn_diags3d_in = $l', logicArgs=(/bl_mynn_diags3d_in/)) call mpas_log_write(' bl_mynnedmf_tkebudget_in= $l', logicArgs=(/bl_mynnedmf_tkebudget_in/)) call mpas_log_write(' bl_ysu_in = $l', logicArgs=(/bl_ysu_in/)) call mpas_log_write(' bl_myj_in = $l', logicArgs=(/bl_myj_in/)) diff --git a/src/core_atmosphere/physics/mpas_atmphys_vars.F b/src/core_atmosphere/physics/mpas_atmphys_vars.F index ada7f8f0fd..3d1ba68e3a 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_vars.F +++ b/src/core_atmosphere/physics/mpas_atmphys_vars.F @@ -341,7 +341,7 @@ module mpas_atmphys_vars f_qc, &!parameter set to true to include the cloud water mixing ratio. f_qr, &!parameter set to true to include the rain mixing ratio. f_qi, &!parameter set to true to include the cloud ice mixing ratio. - f_qs, &!parameter set to true to include the snow minxg ratio. + f_qs, &!parameter set to true to include the snow mixing ratio. f_qg, &!parameter set to true to include the graupel mixing ratio. f_qoz, &!parameter set to true to include the ozone mixing ratio. f_qh @@ -560,7 +560,16 @@ module mpas_atmphys_vars maxmf_dd_p, &!maximum mass flux for downdrafts [m/s] maxtkeprod_dd_p, &!maximum tke prduction in column from downdrafts [m2/s2/hr] cldtop_cooling_p, &!maximum net cooling at boundary layer cloud top [K/hr] - ent_eff_p !entrainment efficiency [-] + ent_eff_p, &!entrainment efficiency + lwpbl_p, &!liquid water path (resolved + bl clouds) [g/m2] + iwpbl_p, &!ice water path (resolved + bl clouds) [g/m2] + swpbl_p, &!snow water path (resolved + bl clouds) [g/m2] + cldceil_p, &!cloud ceiling (using resolved + bl clouds) from MYNN [m] + wspd10_p, &!wind speed interpolated to 10m [m/s] + wspd80_p, &!wind speed interpolated to 80m [m/s] + wspd160_p, &!wind speed interpolated to 160m [m/s] + maxcldfra_p, &!maximum cloud fraction in the column (from MYNN) [-] + maxcldfrabl_p !maximum cloud fraction between surface and pblh + 1km (from MYNN) [-] real(kind=RKIND),dimension(:,:,:),allocatable:: & dqke_p, &! @@ -1131,9 +1140,9 @@ module mpas_atmphys_vars ! is set to true. the arrays below have the same definition as the corresponding "_p" arrays: !================================================================================================================= - real(kind=RKIND),dimension(:,:),allocatable:: br_sea,ch_sea,chs_sea,chs2_sea,cpm_sea,cqs_sea,cqs2_sea, & - flhc_sea,flqc_sea,gz1oz0_sea,hfx_sea,lh_sea,mavail_sea,mol_sea, & - psih_sea,psim_sea,fh_sea,fm_sea,qfx_sea,qgh_sea,qsfc_sea,regime_sea, & + real(kind=RKIND),dimension(:,:),allocatable:: br_sea,ch_sea,chs_sea,chs2_sea,cpm_sea,cqs_sea,cqs2_sea,& + flhc_sea,flqc_sea,gz1oz0_sea,hfx_sea,lh_sea,mavail_sea,mol_sea, & + psih_sea,psim_sea,fh_sea,fm_sea,qfx_sea,qgh_sea,qsfc_sea,regime_sea, & rmol_sea,ust_sea,wspd_sea,znt_sea,zol_sea,tsk_sea,xland_sea real(kind=RKIND),dimension(:,:),allocatable:: t2m_sea,th2m_sea,q2_sea,u10_sea,v10_sea real(kind=RKIND),dimension(:,:),allocatable:: cd_sea,cda_sea,ck_sea,cka_sea,ustm_sea diff --git a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF index 0cd8b70d9d..11f6bc115a 160000 --- a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF +++ b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF @@ -1 +1 @@ -Subproject commit 0cd8b70d9d78b912cd0feec2160e2df9b0c52b6a +Subproject commit 11f6bc115a68f2ec9a6aa24071c729a853ebdd1d From 5d74e280cfc2c8900baf769539d88db5d77d0bff Mon Sep 17 00:00:00 2001 From: Guoqing Ge Date: Wed, 28 Oct 2026 16:21:41 -0600 Subject: [PATCH 04/10] v8.4.2-1.23: Add a namelist option "config_coordinate_smoothing_height" (#305) * add a namelist option "config_coordinate_smoothing_height" * apply changes from review * Update README.md --------- Co-authored-by: Dustin Swales --- README.md | 2 +- src/core_init_atmosphere/Registry.xml | 5 +++++ src/core_init_atmosphere/mpas_init_atm_cases.F | 14 +++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d76fbf575..a548a7f1b3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-1.22 +MPAS-v8.4.2-1.23 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_init_atmosphere/Registry.xml b/src/core_init_atmosphere/Registry.xml index 5323f44fc8..ca4a18c139 100644 --- a/src/core_init_atmosphere/Registry.xml +++ b/src/core_init_atmosphere/Registry.xml @@ -268,6 +268,11 @@ description="Whether to smooth zeta surfaces" possible_values="true or false"/> + + 0.0_RKIND) then + coordinate_smoothing_height = config_coordinate_smoothing_height + else + call mpas_log_write('config_coordinate_smoothing_height must be zero or positive.', messageType=MPAS_LOG_CRIT) + end if + call mpas_log_write(' ') call mpas_log_write(' surfaces will be smoothed, dzmin = $r ',realArgs=(/config_dzmin/)) call mpas_log_write(' base number of smoothing passes = $i ',intArgs=(/config_nsm/)) + call mpas_log_write(' coordinate smoothing height (m) = $r ',realArgs=(/coordinate_smoothing_height/)) call mpas_log_write(' ') call mpas_log_write(' level, smoothing steps, smoothing factor, smallest fractional dz ') @@ -4781,7 +4793,7 @@ subroutine init_atm_case_gfs(block, mesh, nCells, nEdges, nVertLevels, fg, state do i=1,config_nsm + k do iCell=1,nCells - sm = sm0(iCell) * min((3.0*zw(k)/zh)**2.0, 1.0_RKIND) + sm = sm0(iCell) * min((3.0*zw(k)/coordinate_smoothing_height)**2.0, 1.0_RKIND) hs1(iCell) = 0. do j = 1,nEdgesOnCell(iCell) From de016e0ff43ff67ba84c9a675b84023c31c79d79 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA <132939212+AndersJensen-NOAA@users.noreply.github.com> Date: Wed, 4 Nov 2026 10:31:15 -0700 Subject: [PATCH 05/10] v8.4.2-2.1: Tempo v3.2.4 (#291) * - Update Makefile to include TEMPO module configurations - Update driver to for threadsafe emissions subroutine * tempo version 3.2.0 * tempo version 3.2.1 * tempo version 3.2.2 * tempo version 3.2.3 * tempo version 3.2.4 * Update README.md --------- Co-authored-by: Dustin Swales Co-authored-by: Clark Evans --- README.md | 2 +- src/core_atmosphere/physics/Makefile | 3 ++- src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F | 2 +- src/core_atmosphere/physics/physics_noaa/TEMPO | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a548a7f1b3..f8c6cd6646 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-1.23 +MPAS-v8.4.2-2.1 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile index 87d0eba293..169dd4fb2f 100644 --- a/src/core_atmosphere/physics/Makefile +++ b/src/core_atmosphere/physics/Makefile @@ -165,7 +165,8 @@ mpas_atmphys_driver_microphysics.o: \ mpas_atmphys_init_microphysics.o \ mpas_atmphys_init_tempo.o \ mpas_atmphys_interface.o \ - mpas_atmphys_vars.o + mpas_atmphys_vars.o \ + physics_noaa/TEMPO/module_mp_tempo_cfgs.o mpas_atmphys_driver_oml.o: \ mpas_atmphys_constants.o \ diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F index 44e0f1f4af..1733547d5e 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F @@ -592,7 +592,7 @@ subroutine driver_microphysics(configs,mesh,state,time_lev,diag,diag_physics,ten case ("mp_tempo") if (allocated(nwfa_p) .and. allocated(nwfa2d_p)) then call tempo_aerosol_surface_emissions(dt=dt_microp, nwfa=nwfa_p, nwfa2d=nwfa2d_p, & - ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, kts=kts) + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, its=its, ite=ite, jts=jts, jte=jte, kts=kts) endif call mpas_timer_start('mp_tempo') diff --git a/src/core_atmosphere/physics/physics_noaa/TEMPO b/src/core_atmosphere/physics/physics_noaa/TEMPO index 9adf9ef282..efea80b638 160000 --- a/src/core_atmosphere/physics/physics_noaa/TEMPO +++ b/src/core_atmosphere/physics/physics_noaa/TEMPO @@ -1 +1 @@ -Subproject commit 9adf9ef2827104640125f0c322e1218fce74e94c +Subproject commit efea80b63899c85ac5dc41a885e411890ee63cfc From e135b964d07e56aa82d9c95562cea5b2e5987253 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 9 Nov 2026 19:50:17 -0700 Subject: [PATCH 06/10] v8.4.2-2.2: CLM Lake model for UFS-MPAS (#307) * init_atmosphere: add 21-class MODIS land use with lakes New config_landuse_data option 'MODIFIED_IGBP_MODIS_NOAH_LAKES' reads the WPS dataset modis_landuse_20class_30s_with_lakes/ (category 21 = lakes): - Registry: nlcat = 21 for the new option; new mesh field islake_lu (default -1) in the input and output streams. - MMINLU stays 'MODIFIED_IGBP_MODIS_NOAH', so the RUC LSM selects the 21-row MODI-RUC table in VEGPARM.TBL. - interp_landuse returns islake from the dataset index file, and stops if the dataset's category count does not match nlcat. - Lake points keep lu_index = islake_lu (they are no longer converted to iswater_lu by the soil/land use consistency check) and get water soil. - derive_landmask treats lake points as water (landmask = 0). - The static step stops if the new option is used with a dataset that has no lake category. Static files without islake_lu still work: MPAS warns that the variable is not in the input file and keeps the default (-1). * init_atmosphere: nullify aerosol first-guess pointers before conditional fetch smoke_fine_fg, dust_fine_fg and dust_coarse_fg in init_atm_case_gfs and init_atm_case_lbc are only set when config_smoke_scheme / config_dust_scheme are on, but are later tested with associated(). With the schemes off the pointers are undefined, so associated() can return true and the code reads through a garbage descriptor: segfault with optimized gfortran builds, 'index below lower bound' with -fcheck=bounds (mpas_init_atm_cases.F:7357). * CI: add make_ics workflow to test init_atmosphere New workflow .github/workflows/make_ics.yml builds init_atmosphere_model from the branch under test and creates static, init, lbc and sfc_update files for four 120 km CONUS cases: conus_gfs, conus_raps, conus_rapw (20-class MODIS land use) and conus_rapw_lake (21-class MODIS with lakes). Static files are made once per land-use variant and cached on the init_atmosphere source; each case is checked with check_ics.py (nlcat, islake_lu, lake points are water, no NaN/Inf, LBC times) and uploaded as an artifact. Scripts and namelists are in testing_and_setup/ufs-community/ics/, taken from dustinswales/mpas-ic-factory; inputs come from release init-inputs-v1.0.0 of this repository (copy_inputs_release.sh copies them from the factory). The existing run_mpas* workflows are unchanged. * make_ics: run the summer RAP case with and without lakes Use only the summer RAP case (2024081518), whose ungrib inputs are 1.3 GB against 8 GB for GFS and 16 GB for winter RAP: conus_raps (20-class MODIS) and the new conus_raps_lake (21-class MODIS with lakes). The conus_gfs, conus_rapw and conus_rapw_lake case files stay for running by hand. copy_inputs_release.sh now copies only the bundles the workflow uses by default (about 6 GB); -a copies everything, -b chooses. * make_ics: add the GFS case Run conus_gfs alongside conus_raps and conus_raps_lake, so the GFS init path and the sfc_update step are tested too. conus_gfs shares the 20-class static file with conus_raps, so there are still two static jobs. copy_inputs_release.sh: default destination tag v8.4.2-1.19 (INPUTS_TAG), and the default bundles now include ungrib-gfs.2023031015 and ungrib-sst.2023031015 (about 14 GB in all). Assets already in the release are skipped, so re-running it adds only the GFS bundles. * make_ics: add a GFS lake case Add conus_gfs_lake: the GFS case (2023031015) with the 21-class MODIS land use with lakes. It shares the lakes static file with conus_raps_lake, so there are still two static jobs, and it exercises the sfc_update step over lake points. No new inputs are needed. * Add islake to core_atmosphere registry. Only used by UFS-MPAS. * Update CI script to point to new release asset * make_ics: add a Noah-MP GFS case conus_gfs_noahmp makes GFS ICs for Noah-MP: 4 soil levels, with the NCAR init/lbc/sfc_update namelists from barlage/mpas_testcase (55 levels, 30 km top), as used by the mesoscale_reference_noahmp run tests. It shares the 20-class static file with conus_gfs, which already has the Noah-MP static fields (config_noahmp_static defaults to true). - create_case.sh: optional nml_variant per case selects case_files//.. - check_ics.py: check nSoilLevels (4 with --noahmp, 9 otherwise) and, with --noahmp, soilcomp and soilcl1-4 over land - make_ics.yml: add the case; the matrix "lakes" key is now "checks" * make_ics: add a 10-layer Noah-MP GFS case init_atmosphere: config_nsoillevels = 10 now gives a 10-layer soil set for Noah-MP (dzs = 0.05 0.10 0.10 0.10 0.30 0.35 0.50 1.00 1.00 1.50 m, 5 m deep), with soil temperature and moisture interpolated as for the 4-layer set. Layers centered below the deepest input level (3 m, the deep soil temperature) take the deepest input values instead of being left unset. The 4- and 9-level sets are unchanged. conus_gfs_noahmp10 is conus_gfs_noahmp with 10 soil layers. check_ics.py gets --soil-levels N and, for Noah-MP cases, checks that every soil level of tslb and smois is plausible over land. * physics_init_seaice: keep frozen lakes as lakes Ice-covered cells are converted to land-ice cells (lu_index = isice_lu, soil category 16, xland = 1, tmn = 271.4, soil state recomputed). That also caught lake cells (lu_index = islake_lu), so frozen lakes lost their lake category in init.nc and were never handed to the lake model. Frozen lake cells now keep their lake land use and water soil categories, landmask, xland and tmn, and only record the ice state: seaice = 1, xice set to 1 when the cell was flagged by the skin-temperature test alone, and the same snow-albedo, vegfra and snow-depth limits as sea ice. Nothing changes when the land use dataset has no lake category (islake_lu = -1). Addresses a Copilot review comment. * Update version number --------- Co-authored-by: Claude Opus 5.5 Co-authored-by: Clark Evans --- .github/workflows/make_ics.yml | 224 ++++++++++++ .gitignore | 4 + README.md | 2 +- src/core_atmosphere/Registry.xml | 6 + .../physics/mpas_atmphys_initialize_real.F | 69 +++- src/core_init_atmosphere/Registry.xml | 9 +- .../mpas_init_atm_cases.F | 6 + .../mpas_init_atm_static.F | 60 ++- testing_and_setup/ufs-community/ics/README.md | 66 ++++ .../step1_static/namelist.init_atmosphere | 57 +++ .../step1_static/streams.init_atmosphere | 20 + .../namelist.init_atmosphere | 57 +++ .../streams.init_atmosphere | 20 + .../namelist.init_atmosphere | 53 +++ .../streams.init_atmosphere | 14 + .../namelist.init_atmosphere | 53 +++ .../streams.init_atmosphere | 14 + .../gfs.2023031015/namelist.init_atmosphere | 57 +++ .../gfs.2023031015/streams.init_atmosphere | 14 + .../rap.2024020218/namelist.init_atmosphere | 57 +++ .../rap.2024020218/streams.init_atmosphere | 14 + .../rap.2024081518/namelist.init_atmosphere | 57 +++ .../rap.2024081518/streams.init_atmosphere | 14 + .../namelist.init_atmosphere | 53 +++ .../streams.init_atmosphere | 15 + .../namelist.init_atmosphere | 53 +++ .../streams.init_atmosphere | 15 + .../gfs.2023031015/namelist.init_atmosphere | 57 +++ .../gfs.2023031015/streams.init_atmosphere | 15 + .../rap.2024020218/namelist.init_atmosphere | 57 +++ .../rap.2024020218/streams.init_atmosphere | 15 + .../rap.2024081518/namelist.init_atmosphere | 57 +++ .../rap.2024081518/streams.init_atmosphere | 15 + .../namelist.init_atmosphere | 53 +++ .../streams.init_atmosphere | 15 + .../namelist.init_atmosphere | 53 +++ .../streams.init_atmosphere | 15 + .../gfs.2023031015/namelist.init_atmosphere | 57 +++ .../gfs.2023031015/streams.init_atmosphere | 15 + .../ufs-community/ics/cases/conus_gfs.sh | 11 + .../ufs-community/ics/cases/conus_gfs_lake.sh | 11 + .../ics/cases/conus_gfs_noahmp.sh | 17 + .../ics/cases/conus_gfs_noahmp10.sh | 17 + .../ufs-community/ics/cases/conus_raps.sh | 11 + .../ics/cases/conus_raps_lake.sh | 11 + .../ufs-community/ics/cases/conus_rapw.sh | 11 + .../ics/cases/conus_rapw_lake.sh | 11 + .../ufs-community/ics/check_ics.py | 162 +++++++++ .../ufs-community/ics/scripts/create_case.sh | 341 ++++++++++++++++++ .../ufs-community/ics/scripts/fetch_inputs.sh | 98 +++++ 50 files changed, 2186 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/make_ics.yml create mode 100644 testing_and_setup/ufs-community/ics/README.md create mode 100644 testing_and_setup/ufs-community/ics/case_files/step1_static/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step1_static/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step1_static_lakes/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step1_static_lakes/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp10/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp10/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024020218/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024020218/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024081518/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024081518/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp10/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp10/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024020218/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024020218/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024081518/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024081518/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp10/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp10/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015/namelist.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015/streams.init_atmosphere create mode 100644 testing_and_setup/ufs-community/ics/cases/conus_gfs.sh create mode 100644 testing_and_setup/ufs-community/ics/cases/conus_gfs_lake.sh create mode 100644 testing_and_setup/ufs-community/ics/cases/conus_gfs_noahmp.sh create mode 100644 testing_and_setup/ufs-community/ics/cases/conus_gfs_noahmp10.sh create mode 100644 testing_and_setup/ufs-community/ics/cases/conus_raps.sh create mode 100644 testing_and_setup/ufs-community/ics/cases/conus_raps_lake.sh create mode 100644 testing_and_setup/ufs-community/ics/cases/conus_rapw.sh create mode 100644 testing_and_setup/ufs-community/ics/cases/conus_rapw_lake.sh create mode 100755 testing_and_setup/ufs-community/ics/check_ics.py create mode 100755 testing_and_setup/ufs-community/ics/scripts/create_case.sh create mode 100755 testing_and_setup/ufs-community/ics/scripts/fetch_inputs.sh diff --git a/.github/workflows/make_ics.yml b/.github/workflows/make_ics.yml new file mode 100644 index 0000000000..736dc69bc7 --- /dev/null +++ b/.github/workflows/make_ics.yml @@ -0,0 +1,224 @@ +name: Make MPAS ICs (init_atmosphere) + +on: [push, pull_request, workflow_dispatch] + +############################################################################################# +# Build init_atmosphere_model from this branch and create the static, initial-condition, +# lateral-boundary files for 120 km CONUS test cases (GFS and RAP, with and without lakes, +# and GFS for Noah-MP with 4 and 10 soil layers). +# +# Jobs +# build - make gfortran CORE=init_atmosphere (in the CI container) +# static - one static file per variant (20-class MODIS land use, and 21-class with +# lakes); cached on the init_atmosphere source, the static namelist and the +# inputs release, so it only reruns when one of those changes +# case - init / lbc / sfc_update for each case, sanity checks, artifacts +# +# Cases source date static land use +# conus_gfs gfs 2023031015 20-class MODIS (also makes sfc_update) +# conus_gfs_lake gfs 2023031015 21-class MODIS with lakes (also makes sfc_update) +# conus_gfs_noahmp gfs 2023031015 20-class MODIS; NCAR namelists with 4 soil levels +# for Noah-MP (also makes sfc_update) +# conus_gfs_noahmp10 gfs 2023031015 as conus_gfs_noahmp, with 10 soil layers +# conus_raps rap 2024081518 20-class MODIS +# conus_raps_lake rap 2024081518 21-class MODIS with lakes +# (cases/ also has conus_rapw and conus_rapw_lake for running by hand) +# +# Inputs (mesh, geographic data, ungrib intermediate files, aerosol climatology) come +# from release INPUTS_TAG of this repository (copy them with +# testing_and_setup/ufs-community/ics/copy_inputs_release.sh). Scripts and namelists +# are in testing_and_setup/ufs-community/ics/ (from dustinswales/mpas-ic-factory). +############################################################################################# + +env: + INPUTS_REPO: ${{ github.repository }} + INPUTS_TAG: MPAS-v8.4.2-1.20 + ICS_DIR: testing_and_setup/ufs-community/ics + IMAGE: dustinswales/ufs-community-mpas-ci:gnu + +jobs: + build: + runs-on: ubuntu-22.04 + container: + image: dustinswales/ufs-community-mpas-ci:gnu + defaults: + run: + shell: bash -el {0} + env: + PNETCDF: /opt/pnetcdf + steps: + - uses: actions/checkout@v6 + with: + submodules: recursive + - name: Build init_atmosphere_model + run: | + git config --global --add safe.directory "$GITHUB_WORKSPACE" + make gfortran CORE=init_atmosphere > build.log 2>&1 || { tail -80 build.log; exit 1; } + test -x init_atmosphere_model + mkdir -p bin && cp init_atmosphere_model bin/ + { + echo "code commit: ${{ github.repository }}@${{ github.sha }}" + echo "compiler: $(mpif90 --version | head -1)" + echo "image: $IMAGE" + echo "workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + } > bin/build-info.txt + cat bin/build-info.txt + - uses: actions/upload-artifact@v4 + with: + name: init-exe + path: bin/ + retention-days: 7 + + static: + needs: build + runs-on: ubuntu-22.04 + container: + image: dustinswales/ufs-community-mpas-ci:gnu + defaults: + run: + shell: bash -el {0} + strategy: + fail-fast: false + matrix: + include: + - static_key: conus-120km + case: conus_raps + nml_dir: step1_static + - static_key: conus-120km-lakes + case: conus_raps_lake + nml_dir: step1_static_lakes + name: static (${{ matrix.static_key }}) + steps: + - uses: actions/checkout@v6 + - name: Restore static files + id: cache + uses: actions/cache@v4 + with: + path: static/${{ matrix.static_key }} + key: static-v1-${{ matrix.static_key }}-${{ env.INPUTS_TAG }}-${{ hashFiles('src/core_init_atmosphere/**', 'src/framework/**', 'src/operators/**', 'src/external/**', 'src/tools/**', 'Makefile', format('testing_and_setup/ufs-community/ics/case_files/{0}/*', matrix.nml_dir), 'testing_and_setup/ufs-community/ics/scripts/create_case.sh') }} + - uses: actions/download-artifact@v4 + if: steps.cache.outputs.cache-hit != 'true' + with: + name: init-exe + path: bin/ + - name: Fetch mesh and geographic data + if: steps.cache.outputs.cache-hit != 'true' + run: | + df -h . + bash "$ICS_DIR/scripts/fetch_inputs.sh" -r "$INPUTS_REPO" -t "$INPUTS_TAG" -d inputs grids geog + df -h . + - name: Create static file + if: steps.cache.outputs.cache-hit != 'true' + env: + MPIRUN: mpiexec --allow-run-as-root --oversubscribe -np + run: | + chmod +x bin/init_atmosphere_model + DESCRIBE_EXTRA=$PWD/bin/build-info.txt \ + bash "$ICS_DIR/scripts/create_case.sh" -c ${{ matrix.case }} -e bin/init_atmosphere_model \ + -i inputs -o out -n 4 -s static + mkdir -p static/${{ matrix.static_key }} + cp out/*/case_files/mpas.*.nc out/*/case_files/log.static static/${{ matrix.static_key }}/ + ls -l static/${{ matrix.static_key }} + - uses: actions/upload-artifact@v4 + with: + name: static-${{ matrix.static_key }} + path: static/${{ matrix.static_key }}/ + retention-days: 7 + + case: + needs: [build, static] + runs-on: ubuntu-22.04 + container: + image: dustinswales/ufs-community-mpas-ci:gnu + defaults: + run: + shell: bash -el {0} + strategy: + fail-fast: false + matrix: + include: + - case: conus_gfs + source: gfs + static_key: conus-120km + bundles: ungrib-gfs.2023031015 ungrib-sst.2023031015 + lbc_times: 17 + checks: '' + - case: conus_gfs_lake + source: gfs + static_key: conus-120km-lakes + bundles: ungrib-gfs.2023031015 ungrib-sst.2023031015 + lbc_times: 17 + checks: --lakes + - case: conus_gfs_noahmp + source: gfs + static_key: conus-120km + bundles: ungrib-gfs.2023031015 ungrib-sst.2023031015 + lbc_times: 17 + checks: --noahmp + - case: conus_gfs_noahmp10 + source: gfs + static_key: conus-120km + bundles: ungrib-gfs.2023031015 ungrib-sst.2023031015 + lbc_times: 17 + checks: --noahmp --soil-levels 10 + - case: conus_raps + source: rap + static_key: conus-120km + bundles: ungrib-rap.2024081518 + lbc_times: 2 + checks: '' + - case: conus_raps_lake + source: rap + static_key: conus-120km-lakes + bundles: ungrib-rap.2024081518 + lbc_times: 2 + checks: --lakes + name: ${{ matrix.case }} + steps: + - uses: actions/checkout@v6 + - uses: actions/download-artifact@v4 + with: + name: init-exe + path: bin/ + - uses: actions/download-artifact@v4 + with: + name: static-${{ matrix.static_key }} + path: static/ + - name: Fetch inputs + run: | + df -h . + # shellcheck disable=SC2086 + bash "$ICS_DIR/scripts/fetch_inputs.sh" -r "$INPUTS_REPO" -t "$INPUTS_TAG" -d inputs \ + grids aerosols ${{ matrix.bundles }} + df -h . + - name: Create init / lbc / sfc_update files + env: + MPIRUN: mpiexec --allow-run-as-root --oversubscribe -np + run: | + chmod +x bin/init_atmosphere_model + DESCRIBE_EXTRA=$PWD/bin/build-info.txt \ + bash "$ICS_DIR/scripts/create_case.sh" -c ${{ matrix.case }} -e bin/init_atmosphere_model \ + -i inputs -o out -n 4 -S static + case_dir=$(basename out/*) + echo "CASE_DIR=$case_dir" >> "$GITHUB_ENV" + ls -l "out/$case_dir/case_files" + - name: Set up Python (netCDF4) for checks + uses: conda-incubator/setup-miniconda@v4 + with: + python-version: '3.11' + auto-update-conda: true + auto-activate-base: false + environment-file: testing_and_setup/ufs-community/environment.yml + activate-environment: mpas-ci-env + - name: Check files + run: | + python "$ICS_DIR/check_ics.py" "out/$CASE_DIR/case_files" \ + --source ${{ matrix.source }} --lbc-times ${{ matrix.lbc_times }} ${{ matrix.checks }} + - name: Upload files + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ics-${{ matrix.case }} + path: out/ + retention-days: 14 + if-no-files-found: ignore diff --git a/.gitignore b/.gitignore index eba5cabcff..913f305252 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,7 @@ streams.init_atmosphere # ignore ics and tables generated by get_data.sh testing_and_setup/ufs-community/data/ics/ testing_and_setup/ufs-community/data/tables/ + +# make_ics test namelists (testing_and_setup/ufs-community/ics) are source files +!testing_and_setup/ufs-community/ics/case_files/**/namelist.init_atmosphere +!testing_and_setup/ufs-community/ics/case_files/**/streams.init_atmosphere diff --git a/README.md b/README.md index f8c6cd6646..8b6790606e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-2.1 +MPAS-v8.4.2-2.2 ==== 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 d5132cc79c..2221b94fa2 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -615,6 +615,9 @@ #endif +#ifdef MPAS_UFS_DYCORE + +#endif #ifdef DO_PHYSICS @@ -4974,6 +4977,9 @@ + + diff --git a/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F b/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F index 31d3a7fa2d..5fdb402342 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F +++ b/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F @@ -324,7 +324,7 @@ subroutine init_soil_layers_depth(mesh, fg, dims, configs) !end select selectcase (config_nsoillevels) - case( 4 ) + case( 4, 10 ) do iCell = 1, nCellsSolve iSoil = 1 zs_fg(iSoil,iCell) = 0.5_RKIND * dzs_fg(iSoil,iCell) @@ -336,10 +336,24 @@ subroutine init_soil_layers_depth(mesh, fg, dims, configs) enddo do iCell = 1, nCellsSolve - dzs(1,iCell) = 0.10_RKIND - dzs(2,iCell) = 0.30_RKIND - dzs(3,iCell) = 0.60_RKIND - dzs(4,iCell) = 1.00_RKIND + if (config_nsoillevels == 10) then + !10-layer set for Noah-MP (5 m total depth): + dzs( 1,iCell) = 0.05_RKIND + dzs( 2,iCell) = 0.10_RKIND + dzs( 3,iCell) = 0.10_RKIND + dzs( 4,iCell) = 0.10_RKIND + dzs( 5,iCell) = 0.30_RKIND + dzs( 6,iCell) = 0.35_RKIND + dzs( 7,iCell) = 0.50_RKIND + dzs( 8,iCell) = 1.00_RKIND + dzs( 9,iCell) = 1.00_RKIND + dzs(10,iCell) = 1.50_RKIND + else + dzs(1,iCell) = 0.10_RKIND + dzs(2,iCell) = 0.30_RKIND + dzs(3,iCell) = 0.60_RKIND + dzs(4,iCell) = 1.00_RKIND + endif iSoil = 1 zs(iSoil,iCell) = 0.5_RKIND * dzs(iSoil,iCell) @@ -458,7 +472,7 @@ subroutine init_soil_layers_properties(mesh, fg, dminfo, dims, configs) endif select case(config_nsoillevels) - case ( 4 ) + case ( 4, 10 ) ! if(config_nsoillevels .ne. 4) & ! call physics_error_fatal('NOAH lsm uses 4 soil layers. Correct config_nsoillevels.') call init_soil_properties_noah(mesh, fg, dminfo, dims, configs) @@ -491,6 +505,7 @@ subroutine init_soil_properties_noah(mesh, fg, dminfo, dims, configs) integer, pointer:: nCellsSolve,nFGSoilLevels,nSoilLevels integer:: num_sm,num_st integer,dimension(:),pointer:: landmask + logical:: found real(kind=RKIND),dimension(:,:),allocatable:: zhave,sm_input,st_input @@ -556,6 +571,7 @@ subroutine init_soil_properties_noah(mesh, fg, dminfo, dims, configs) if(landmask(iCell) .eq. 1) then noah: do iSoil = 1 , nSoilLevels + found = .false. input: do ifgSoil = 1 , nFGSoilLevels+2-1 if(iCell .eq. 1) call mpas_log_write('$i $i $r $r $r', & intArgs=(/iSoil,ifgSoil/), & @@ -580,9 +596,19 @@ subroutine init_soil_properties_noah(mesh, fg, dminfo, dims, configs) sh2o(iSoil,iCell) = 0._RKIND smcrel(iSoil,iCell) = 0._RKIND + found = .true. exit input endif enddo input + !layers centered below the deepest input level (3 m, where the deep soil + !temperature is used; only the 10-layer set goes that deep): use the + !deepest input values. + if(.not. found) then + tslb(iSoil,iCell) = st_input(nFGSoilLevels+2,iCell) + smois(iSoil,iCell) = sm_input(nFGSoilLevels+2,iCell) + sh2o(iSoil,iCell) = 0._RKIND + smcrel(iSoil,iCell) = 0._RKIND + endif if(iCell.eq. 1) call mpas_log_write('') enddo noah @@ -934,7 +960,7 @@ subroutine physics_init_seaice(mesh, input, dims, configs) character(len=StrKIND):: mess integer, pointer:: nCellsSolve,nSoilLevels integer:: iCell,iSoil - integer:: num_seaice_changes + integer:: num_seaice_changes, num_lake_ice integer,dimension(:),pointer:: landmask,isltyp,ivgtyp real(kind=RKIND):: xice_threshold @@ -948,7 +974,8 @@ subroutine physics_init_seaice(mesh, input, dims, configs) logical, pointer :: config_frac_seaice character(len=StrKIND),pointer:: config_landuse_data - integer,pointer:: isice_lu + integer,pointer:: isice_lu, islake_lu + logical:: lake_point !note that this threshold is also defined in module_physics_vars.F.It is defined here to avoid !adding "use module_physics_vars" since this subroutine is only used for the initialization of @@ -967,6 +994,7 @@ subroutine physics_init_seaice(mesh, input, dims, configs) call mpas_pool_get_dimension(dims, 'nSoilLevels', nSoilLevels) call mpas_pool_get_array(mesh, 'isice_lu', isice_lu) + call mpas_pool_get_array(mesh, 'islake_lu', islake_lu) call mpas_pool_get_array(mesh, 'landmask', landmask) call mpas_pool_get_array(mesh, 'lu_index', ivgtyp) call mpas_pool_get_array(mesh, 'soilcat_top', isltyp) @@ -992,6 +1020,7 @@ subroutine physics_init_seaice(mesh, input, dims, configs) call mpas_pool_get_array(input, 'smcrel', smcrel) call mpas_log_write('--- isice_lu = $i', intArgs=(/isice_lu/)) + call mpas_log_write('--- islake_lu = $i', intArgs=(/islake_lu/)) !assign the threshold value for xice as a function of config_frac_seaice: if(.not. config_frac_seaice) then @@ -1011,13 +1040,32 @@ subroutine physics_init_seaice(mesh, input, dims, configs) call mpas_log_write('--- tsk_seaice_threshold : $r', realArgs=(/tsk_seaice_threshold/)) !convert seaice points to land points when the sea-ice fraction is greater than the -!prescribed threshold: +!prescribed threshold. Frozen lakes (lu_index = islake_lu) are the exception: they stay lakes. num_seaice_changes = 0 + num_lake_ice = 0 do iCell = 1, nCellsSolve seaice(iCell) = 0._RKIND + lake_point = (islake_lu > 0 .and. ivgtyp(iCell) == islake_lu) + if(xice(iCell) .ge. xice_threshold .or. & (landmask(iCell).eq.0 .and. skintemp(iCell).lt.tsk_seaice_threshold)) then + if(lake_point) then + !... frozen lakes stay lakes: keep the lake land use category, the water soil category, + ! landmask and xland, and the deep soil temperature; only record the ice state. + ! The lake model handles lake ice itself. + num_lake_ice = num_lake_ice + 1 + seaice(iCell) = 1._RKIND + !cold skin temperature without an ice analysis: treat the lake as fully ice covered. + if(xice(iCell) .lt. xice_threshold) xice(iCell) = 1._RKIND + snoalb(iCell) = 0.75 + vegfra(iCell) = 0._RKIND + !top limit on snow depth on lake ice: 1.2 m or 360 mm swe + snowh(iCell) = min(snowh(iCell),1.2_RKIND) + snow(iCell) = min(snow(iCell),360._RKIND) + cycle + endif + num_seaice_changes = num_seaice_changes + 1 !... sea-ice points are converted to land points: if(landmask(iCell) .eq. 0) tmn(iCell) = 271.4_RKIND @@ -1060,6 +1108,9 @@ subroutine physics_init_seaice(mesh, input, dims, configs) write(mess,fmt='(A,i12)') 'number of seaice cells converted to land cells 2 =', & num_seaice_changes call physics_message(mess) + write(mess,fmt='(A,i12)') 'number of frozen lake cells kept as lakes =', & + num_lake_ice + call physics_message(mess) !call mpas_log_write('--- end physics_init_seaice:') diff --git a/src/core_init_atmosphere/Registry.xml b/src/core_init_atmosphere/Registry.xml index ca4a18c139..2705d861d5 100644 --- a/src/core_init_atmosphere/Registry.xml +++ b/src/core_init_atmosphere/Registry.xml @@ -44,7 +44,7 @@ description="The number of prescribed pressure levels in the climatological GOCART data set"/> - @@ -183,7 +183,7 @@ + possible_values="`USGS', `MODIFIED_IGBP_MODIS_NOAH', `MODIFIED_IGBP_MODIS_NOAH_15s', or `MODIFIED_IGBP_MODIS_NOAH_LAKES' (21-class MODIS with lakes as category 21)"/> + @@ -612,6 +613,7 @@ + @@ -952,6 +954,9 @@ + + 0 .and. lu_index(iCell) == islake_lu) then + soilcat_top(iCell) = iswater_soil + cycle + end if if (lu_index(iCell) == iswater_lu .or. & soilcat_top(iCell) == iswater_soil) then if (lu_index(iCell) /= iswater_lu) then @@ -483,7 +503,7 @@ subroutine init_atm_static(mesh, dims, configs) ! Derive LANDMASK ! call mpas_log_write('--- start interpolate LANDMASK') - call derive_landmask(mesh, dims, iswater_lu) + call derive_landmask(mesh, dims, iswater_lu, islake_lu) call mpas_log_write('--- end interpolate LANDMASK') @@ -1955,7 +1975,7 @@ end subroutine categorical_interp_accumulation !> that isice and iswater are in the dataset's index file. ! !----------------------------------------------------------------------- - subroutine interp_landuse(mesh, kdtree, geog_data_path, isice_lu, iswater_lu, supersample_fac) + subroutine interp_landuse(mesh, kdtree, geog_data_path, isice_lu, iswater_lu, supersample_fac, islake_lu) implicit none @@ -1966,12 +1986,14 @@ subroutine interp_landuse(mesh, kdtree, geog_data_path, isice_lu, iswater_lu, su integer, intent(out) :: isice_lu integer, intent(out) :: iswater_lu integer, intent(in), optional :: supersample_fac + integer, intent(out), optional :: islake_lu ! Local variables type (mpas_geotile_mgr_type) :: mgr integer, pointer :: nCells integer, pointer :: isice_lu_ptr integer, pointer :: iswater_lu_ptr + integer, pointer :: islake_lu_ptr real (kind=RKIND), pointer :: scalefactor real (kind=RKIND), pointer :: landusef(:,:) @@ -1997,6 +2019,18 @@ subroutine interp_landuse(mesh, kdtree, geog_data_path, isice_lu, iswater_lu, su isice_lu = isice_lu_ptr iswater_lu = iswater_lu_ptr + if (present(islake_lu)) then + ! The geotile manager sets islake = -1 when the index file has no islake entry. + call mpas_pool_get_config(mgr % pool, 'islake', islake_lu_ptr) + islake_lu = islake_lu_ptr + end if + + ! landusef is dimensioned by nlcat (from config_landuse_data); it must match the dataset. + if (size(landusef, dim=1) /= category_max - category_min + 1) then + call mpas_log_write('Land use dataset '//trim(geog_data_path)//' has $i categories but nlcat = $i.', & + intArgs=(/category_max - category_min + 1, size(landusef, dim=1)/), messageType=MPAS_LOG_ERR) + call mpas_log_write('Check that config_landuse_data matches the dataset.', messageType=MPAS_LOG_CRIT) + end if allocate(ncat(category_min:category_max, nCells)) ncat(:,:) = 0 @@ -2126,11 +2160,12 @@ end subroutine interp_soilcat !> \details !> Derive the landmask field from lu_index. mesh should be an mpas_pool !> that contains landmask, and lu_index. iswater_lu should be the value that - !> the landuse dataset uses to signify water. Before calling this function, + !> the landuse dataset uses to signify water; lake points (islake_lu, if present + !> and positive) are also water. Before calling this function, !> the landuse dataset will need to be successfully interpolated to lu_index. ! !----------------------------------------------------------------------- - subroutine derive_landmask(mesh, dims, iswater_lu) + subroutine derive_landmask(mesh, dims, iswater_lu, islake_lu) implicit none @@ -2138,9 +2173,11 @@ subroutine derive_landmask(mesh, dims, iswater_lu) type (mpas_pool_type), intent(inout) :: mesh type (mpas_pool_type), intent(in) :: dims integer, intent(in) :: iswater_lu + integer, intent(in), optional :: islake_lu ! Local variables integer :: iCell + integer :: lake integer, pointer :: nCells integer, dimension(:), pointer :: lu_index @@ -2151,9 +2188,12 @@ subroutine derive_landmask(mesh, dims, iswater_lu) ! ! Derive LANDMASK ! + lake = -1 + if (present(islake_lu)) lake = islake_lu + landmask(:) = 0 do iCell=1, nCells - if (lu_index(iCell) /= iswater_lu) landmask(iCell) = 1 + if (lu_index(iCell) /= iswater_lu .and. lu_index(iCell) /= lake) landmask(iCell) = 1 end do end subroutine derive_landmask diff --git a/testing_and_setup/ufs-community/ics/README.md b/testing_and_setup/ufs-community/ics/README.md new file mode 100644 index 0000000000..f792fba254 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/README.md @@ -0,0 +1,66 @@ +# make_ics: init_atmosphere tests + +`.github/workflows/make_ics.yml` builds `init_atmosphere_model` from the branch under test and creates the static, initial-condition, lateral-boundary (and, for GFS, surface-update) files for six 120 km CONUS cases: + +| case | source | date | static land use | +|---|---|---|---| +| `conus_gfs` | GFS | 2023-03-10 15Z | 20-class MODIS | +| `conus_gfs_lake` | GFS | 2023-03-10 15Z | 21-class MODIS with lakes | +| `conus_gfs_noahmp` | GFS | 2023-03-10 15Z | 20-class MODIS; ICs for Noah-MP (see below) | +| `conus_gfs_noahmp10` | GFS | 2023-03-10 15Z | 20-class MODIS; ICs for Noah-MP with 10 soil layers | +| `conus_raps` | RAP | 2024-08-15 18Z | 20-class MODIS | +| `conus_raps_lake` | RAP | 2024-08-15 18Z | 21-class MODIS with lakes (`config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH_LAKES'`) | + +`conus_gfs`, `conus_gfs_noahmp`, `conus_gfs_noahmp10` and `conus_raps` share the 20-class static file, and `conus_gfs_lake` and `conus_raps_lake` share the 21-class one, so there are two static jobs. The summer RAP date is used because its inputs are small (1.3 GB of ungrib files, against 16 GB for winter RAP). `cases/` also defines `conus_rapw` and `conus_rapw_lake`, which can be run by hand or added to the workflow matrix. + +`conus_gfs_noahmp` makes ICs for Noah-MP, which needs 4 soil levels (the GSL namelists use 9, for RUC). Its init, LBC and sfc_update namelists are the NCAR ones from barlage/mpas_testcase (55 levels, 30 km model top, `case_files/step*/gfs.2023031015.noahmp`), as used for the `mesoscale_reference_noahmp` run tests. The Noah-MP static fields (`soilcomp`, `soilcl1`-`soilcl4`) are already in every static file, because `config_noahmp_static` defaults to true. A case picks its own init/LBC/sfc_update namelists with `nml_variant` in `cases/.sh`. + +`conus_gfs_noahmp10` is the same with `config_nsoillevels = 10`. `init_atmosphere` sets the 10 layer thicknesses (`dzs` = 0.05, 0.10, 0.10, 0.10, 0.30, 0.35, 0.50, 1.00, 1.00, 1.50 m, 5 m in all) in `src/core_atmosphere/physics/mpas_atmphys_initialize_real.F` and interpolates soil temperature and moisture to them as for 4 layers. GFS soil data and the deep soil temperature reach only 3 m, so the deepest layer (centered at 4.25 m) takes the deepest input values. + +Each case is checked with `check_ics.py`: +- the expected files exist; +- `nlcat` is 21 for the `_lake` cases and 20 for the others; +- `islake_lu` is 21 for the `_lake` cases and -1 for the others; +- in the `_lake` cases the lake points (category 21) exist and all have `landmask` 0; the others have none; +- the init file has 4 soil levels for `conus_gfs_noahmp`, 10 for `conus_gfs_noahmp10` and 9 for the others; +- for the Noah-MP cases, the static and init files hold valid `soilcomp` and `soilcl1`-`soilcl4` values over land, and every soil level of `tslb` and `smois` is plausible over land; +- the main init fields contain no NaN or Inf; +- the LBC file has the expected number of times (17 for GFS over 48 h, 2 for RAP), and GFS has an `sfc_update` file. + +The files are uploaded as `ics-` artifacts. + +The existing `run_mpas*` workflows still use the staged files from `data/get_data.sh` and are unchanged. + +## Layout + +``` +cases/.sh case settings (sourced by create_case.sh) +case_files/ init_atmosphere namelists and streams per step + step1_static/ 20-class static file + step1_static_lakes/ 21-class static file with lakes + step2_init/, step3_lbc/, step4_sst/ per source and date (.[.]) +scripts/create_case.sh runs the steps for one case +scripts/fetch_inputs.sh downloads and unpacks input bundles from a release +check_ics.py sanity checks on one case's files +copy_inputs_release.sh copies the input release from mpas-ic-factory +``` + +`scripts/` and `case_files/` come from [dustinswales/mpas-ic-factory](https://github.com/dustinswales/mpas-ic-factory), with two changes. `create_case.sh` reads `cases/.sh` instead of `cases.yaml`, so it needs no Python. `fetch_inputs.sh` streams bundle parts into `tar` one at a time, which keeps disk use down. + +## Inputs + +The workflow downloads its inputs from the release named by `INPUTS_TAG` in `make_ics.yml` (`v8.4.2-1.19`) of the repository it runs in. Copy them once from the factory release, then do the same for any other repository that runs the workflow, such as ufs-community/MPAS-Model. By default only the bundles the workflow uses are copied (grids, aerosols, geographic data including the lakes dataset, summer RAP, GFS and its SST: about 14 GB). Bundles already in the release are skipped, so re-running adds only what is missing. Add `-a` for every bundle (about 30 GB), or `-b "..."` to choose: + +```bash +bash testing_and_setup/ufs-community/ics/copy_inputs_release.sh dustinswales/MPAS-Model /path/to/work +``` + +## Running by hand + +```bash +bash scripts/fetch_inputs.sh -r dustinswales/MPAS-Model -t v8.4.2-1.19 -d inputs \ + grids geog aerosols ungrib-rap.2024081518 +MPIRUN="mpirun -np" bash scripts/create_case.sh -c conus_raps_lake \ + -e /path/to/init_atmosphere_model -i inputs -o out -n 4 +python check_ics.py out/conus.120km.rap.2024081518.lakes/case_files --source rap --lakes --lbc-times 2 +``` diff --git a/testing_and_setup/ufs-community/ics/case_files/step1_static/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step1_static/namelist.init_atmosphere new file mode 100644 index 0000000000..46a59b5cfd --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step1_static/namelist.init_atmosphere @@ -0,0 +1,57 @@ +&nhyd_model + config_init_case = 7 + config_start_time = '2023-01-01_00:00:00' + config_stop_time = '2023-01-01_00:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 59 + config_nsoillevels = 9 + config_nfglevels = 51 + config_nfgsoillevels = 9 + config_nsoilcat = 16 + config_nvegopt = 2 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'RAP' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_30s_supersample_factor = 1 + config_use_spechumd = true +/ +&vertical_grid + config_ztop = 25878.712 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = false +/ +&interpolation_control + config_extrap_airtemp = 'lapse-rate' +/ +&preproc_stages + config_static_interp = true + config_native_gwd_static = true + config_native_gwd_gsl_static = true + config_vertical_grid = false + config_met_interp = false + config_input_sst = false + config_frac_seaice = false +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step1_static/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step1_static/streams.init_atmosphere new file mode 100644 index 0000000000..ec9474c4aa --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step1_static/streams.init_atmosphere @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step1_static_lakes/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step1_static_lakes/namelist.init_atmosphere new file mode 100644 index 0000000000..95ff3e2d44 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step1_static_lakes/namelist.init_atmosphere @@ -0,0 +1,57 @@ +&nhyd_model + config_init_case = 7 + config_start_time = '2023-01-01_00:00:00' + config_stop_time = '2023-01-01_00:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 59 + config_nsoillevels = 9 + config_nfglevels = 51 + config_nfgsoillevels = 9 + config_nsoilcat = 16 + config_nvegopt = 2 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'RAP' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH_LAKES' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_30s_supersample_factor = 1 + config_use_spechumd = true +/ +&vertical_grid + config_ztop = 25878.712 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = false +/ +&interpolation_control + config_extrap_airtemp = 'lapse-rate' +/ +&preproc_stages + config_static_interp = true + config_native_gwd_static = true + config_native_gwd_gsl_static = true + config_vertical_grid = false + config_met_interp = false + config_input_sst = false + config_frac_seaice = false +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step1_static_lakes/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step1_static_lakes/streams.init_atmosphere new file mode 100644 index 0000000000..ec9474c4aa --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step1_static_lakes/streams.init_atmosphere @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp/namelist.init_atmosphere new file mode 100644 index 0000000000..08ca4ebc90 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp/namelist.init_atmosphere @@ -0,0 +1,53 @@ +&nhyd_model + config_init_case = 7 + config_start_time = '2023-03-10_15:00:00' + config_stop_time = '2023-03-10_15:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 55 + config_nsoillevels = 4 + config_nfglevels = 38 + config_nfgsoillevels = 4 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'GFS' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_use_spechumd = false +/ +&vertical_grid + config_ztop = 30000.0 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'linear' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp/streams.init_atmosphere new file mode 100644 index 0000000000..12f602304d --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp/streams.init_atmosphere @@ -0,0 +1,14 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp10/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp10/namelist.init_atmosphere new file mode 100644 index 0000000000..987a88a307 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp10/namelist.init_atmosphere @@ -0,0 +1,53 @@ +&nhyd_model + config_init_case = 7 + config_start_time = '2023-03-10_15:00:00' + config_stop_time = '2023-03-10_15:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 55 + config_nsoillevels = 10 + config_nfglevels = 38 + config_nfgsoillevels = 4 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'GFS' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_use_spechumd = false +/ +&vertical_grid + config_ztop = 30000.0 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'linear' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp10/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp10/streams.init_atmosphere new file mode 100644 index 0000000000..12f602304d --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015.noahmp10/streams.init_atmosphere @@ -0,0 +1,14 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015/namelist.init_atmosphere new file mode 100644 index 0000000000..9d651ed25a --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015/namelist.init_atmosphere @@ -0,0 +1,57 @@ +&nhyd_model + config_init_case = 7 + config_start_time = '2023-03-10_15:00:00' + config_stop_time = '2023-03-10_15:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 59 + config_nsoillevels = 9 + config_nfglevels = 38 + config_nfgsoillevels = 4 + config_nsoilcat = 16 + config_nvegopt = 1 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'GFS' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_30s_supersample_factor = 1 + config_use_spechumd = true +/ +&vertical_grid + config_ztop = 25878.712 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'lapse-rate' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_native_gwd_gsl_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015/streams.init_atmosphere new file mode 100644 index 0000000000..12f602304d --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/gfs.2023031015/streams.init_atmosphere @@ -0,0 +1,14 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024020218/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024020218/namelist.init_atmosphere new file mode 100644 index 0000000000..0baea2bd3a --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024020218/namelist.init_atmosphere @@ -0,0 +1,57 @@ +&nhyd_model + config_init_case = 7 + config_start_time = '2024-02-02_18:00:00' + config_stop_time = '2024-02-02_18:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 59 + config_nsoillevels = 9 + config_nfglevels = 51 + config_nfgsoillevels = 9 + config_nsoilcat = 16 + config_nvegopt = 2 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'RAP' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_30s_supersample_factor = 1 + config_use_spechumd = true +/ +&vertical_grid + config_ztop = 25878.712 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'lapse-rate' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_native_gwd_gsl_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024020218/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024020218/streams.init_atmosphere new file mode 100644 index 0000000000..12f602304d --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024020218/streams.init_atmosphere @@ -0,0 +1,14 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024081518/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024081518/namelist.init_atmosphere new file mode 100644 index 0000000000..c13f456a73 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024081518/namelist.init_atmosphere @@ -0,0 +1,57 @@ +&nhyd_model + config_init_case = 7 + config_start_time = '2024-08-15_18:00:00' + config_stop_time = '2024-08-15_18:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 59 + config_nsoillevels = 9 + config_nfglevels = 51 + config_nfgsoillevels = 9 + config_nsoilcat = 16 + config_nvegopt = 2 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'RAP' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_30s_supersample_factor = 1 + config_use_spechumd = true +/ +&vertical_grid + config_ztop = 25878.712 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'lapse-rate' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_native_gwd_gsl_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024081518/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024081518/streams.init_atmosphere new file mode 100644 index 0000000000..12f602304d --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step2_init/rap.2024081518/streams.init_atmosphere @@ -0,0 +1,14 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp/namelist.init_atmosphere new file mode 100644 index 0000000000..7add9adccf --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp/namelist.init_atmosphere @@ -0,0 +1,53 @@ +&nhyd_model + config_init_case = 9 + config_start_time = '2023-03-10_15:00:00' + config_stop_time = '2023-03-12_15:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 55 + config_nsoillevels = 4 + config_nfglevels = 38 + config_nfgsoillevels = 4 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'GFS' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_use_spechumd = false +/ +&vertical_grid + config_ztop = 30000.0 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'linear' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp/streams.init_atmosphere new file mode 100644 index 0000000000..5856fe52eb --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp/streams.init_atmosphere @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp10/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp10/namelist.init_atmosphere new file mode 100644 index 0000000000..77c50bf914 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp10/namelist.init_atmosphere @@ -0,0 +1,53 @@ +&nhyd_model + config_init_case = 9 + config_start_time = '2023-03-10_15:00:00' + config_stop_time = '2023-03-12_15:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 55 + config_nsoillevels = 10 + config_nfglevels = 38 + config_nfgsoillevels = 4 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'GFS' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_use_spechumd = false +/ +&vertical_grid + config_ztop = 30000.0 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'linear' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp10/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp10/streams.init_atmosphere new file mode 100644 index 0000000000..5856fe52eb --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015.noahmp10/streams.init_atmosphere @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015/namelist.init_atmosphere new file mode 100644 index 0000000000..a491e48f41 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015/namelist.init_atmosphere @@ -0,0 +1,57 @@ +&nhyd_model + config_init_case = 9 + config_start_time = '2023-03-10_15:00:00' + config_stop_time = '2023-03-12_15:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 59 + config_nsoillevels = 9 + config_nfglevels = 38 + config_nfgsoillevels = 4 + config_nsoilcat = 16 + config_nvegopt = 1 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'GFS' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_30s_supersample_factor = 1 + config_use_spechumd = true +/ +&vertical_grid + config_ztop = 25878.712 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'lapse-rate' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_native_gwd_gsl_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015/streams.init_atmosphere new file mode 100644 index 0000000000..5856fe52eb --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/gfs.2023031015/streams.init_atmosphere @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024020218/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024020218/namelist.init_atmosphere new file mode 100644 index 0000000000..16425d018c --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024020218/namelist.init_atmosphere @@ -0,0 +1,57 @@ +&nhyd_model + config_init_case = 9 + config_start_time = '2024-02-02_18:00:00' + config_stop_time = '2024-02-02_21:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 59 + config_nsoillevels = 9 + config_nfglevels = 51 + config_nfgsoillevels = 9 + config_nsoilcat = 16 + config_nvegopt = 2 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'RAP' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_30s_supersample_factor = 1 + config_use_spechumd = true +/ +&vertical_grid + config_ztop = 25878.712 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'lapse-rate' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_native_gwd_gsl_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024020218/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024020218/streams.init_atmosphere new file mode 100644 index 0000000000..5856fe52eb --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024020218/streams.init_atmosphere @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024081518/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024081518/namelist.init_atmosphere new file mode 100644 index 0000000000..c752e40c8c --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024081518/namelist.init_atmosphere @@ -0,0 +1,57 @@ +&nhyd_model + config_init_case = 9 + config_start_time = '2024-08-15_18:00:00' + config_stop_time = '2024-08-15_21:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 59 + config_nsoillevels = 9 + config_nfglevels = 51 + config_nfgsoillevels = 9 + config_nsoilcat = 16 + config_nvegopt = 2 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'RAP' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_30s_supersample_factor = 1 + config_use_spechumd = true +/ +&vertical_grid + config_ztop = 25878.712 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'lapse-rate' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_native_gwd_gsl_static = false + config_vertical_grid = true + config_met_interp = true + config_input_sst = false + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024081518/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024081518/streams.init_atmosphere new file mode 100644 index 0000000000..5856fe52eb --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step3_lbc/rap.2024081518/streams.init_atmosphere @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp/namelist.init_atmosphere new file mode 100644 index 0000000000..8cf4e3fcea --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp/namelist.init_atmosphere @@ -0,0 +1,53 @@ +&nhyd_model + config_init_case = 8 + config_start_time = '2023-03-10_15:00:00' + config_stop_time = '2023-03-12_15:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 55 + config_nsoillevels = 4 + config_nfglevels = 38 + config_nfgsoillevels = 4 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'GFS' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_use_spechumd = false +/ +&vertical_grid + config_ztop = 30000.0 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'linear' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_vertical_grid = false + config_met_interp = false + config_input_sst = true + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp/streams.init_atmosphere new file mode 100644 index 0000000000..edd7713999 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp/streams.init_atmosphere @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp10/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp10/namelist.init_atmosphere new file mode 100644 index 0000000000..bb99d55de0 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp10/namelist.init_atmosphere @@ -0,0 +1,53 @@ +&nhyd_model + config_init_case = 8 + config_start_time = '2023-03-10_15:00:00' + config_stop_time = '2023-03-12_15:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 55 + config_nsoillevels = 10 + config_nfglevels = 38 + config_nfgsoillevels = 4 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'GFS' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_use_spechumd = false +/ +&vertical_grid + config_ztop = 30000.0 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'linear' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_vertical_grid = false + config_met_interp = false + config_input_sst = true + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp10/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp10/streams.init_atmosphere new file mode 100644 index 0000000000..edd7713999 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015.noahmp10/streams.init_atmosphere @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015/namelist.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015/namelist.init_atmosphere new file mode 100644 index 0000000000..69434933b7 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015/namelist.init_atmosphere @@ -0,0 +1,57 @@ +&nhyd_model + config_init_case = 8 + config_start_time = '2023-03-10_15:00:00' + config_stop_time = '2023-03-12_15:00:00' + config_theta_adv_order = 3 + config_coef_3rd_order = 0.25 +/ +&dimensions + config_nvertlevels = 59 + config_nsoillevels = 9 + config_nfglevels = 38 + config_nfgsoillevels = 4 + config_nsoilcat = 16 + config_nvegopt = 1 +/ +&data_sources + config_geog_data_path = './mpas_static/' + config_met_prefix = 'GFS' + config_sfc_prefix = 'SST' + config_fg_interval = 10800 + config_landuse_data = 'MODIFIED_IGBP_MODIS_NOAH' + config_topo_data = 'GMTED2010' + config_vegfrac_data = 'MODIS' + config_albedo_data = 'MODIS' + config_maxsnowalbedo_data = 'MODIS' + config_supersample_factor = 3 + config_30s_supersample_factor = 1 + config_use_spechumd = true +/ +&vertical_grid + config_ztop = 25878.712 + config_nsmterrain = 1 + config_smooth_surfaces = true + config_dzmin = 0.3 + config_nsm = 30 + config_tc_vertical_grid = true + config_blend_bdy_terrain = true +/ +&interpolation_control + config_extrap_airtemp = 'lapse-rate' +/ +&preproc_stages + config_static_interp = false + config_native_gwd_static = false + config_native_gwd_gsl_static = false + config_vertical_grid = false + config_met_interp = false + config_input_sst = true + config_frac_seaice = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ diff --git a/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015/streams.init_atmosphere b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015/streams.init_atmosphere new file mode 100644 index 0000000000..edd7713999 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/case_files/step4_sst/gfs.2023031015/streams.init_atmosphere @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing_and_setup/ufs-community/ics/cases/conus_gfs.sh b/testing_and_setup/ufs-community/ics/cases/conus_gfs.sh new file mode 100644 index 0000000000..8579cefced --- /dev/null +++ b/testing_and_setup/ufs-community/ics/cases/conus_gfs.sh @@ -0,0 +1,11 @@ +# make_ics case conus_gfs (sourced by scripts/create_case.sh) +domain=conus +resolution=120km +mesh=conus.120km +source=gfs +date=2023031015 +case_dir=conus.120km.gfs.2023031015 +static_key=conus-120km +static_variant= +static_nml_dir=step1_static +use_climo_aerosols=true diff --git a/testing_and_setup/ufs-community/ics/cases/conus_gfs_lake.sh b/testing_and_setup/ufs-community/ics/cases/conus_gfs_lake.sh new file mode 100644 index 0000000000..a1242b26f8 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/cases/conus_gfs_lake.sh @@ -0,0 +1,11 @@ +# make_ics case conus_gfs_lake (sourced by scripts/create_case.sh) +domain=conus +resolution=120km +mesh=conus.120km +source=gfs +date=2023031015 +case_dir=conus.120km.gfs.2023031015.lakes +static_key=conus-120km-lakes +static_variant=lakes +static_nml_dir=step1_static_lakes +use_climo_aerosols=true diff --git a/testing_and_setup/ufs-community/ics/cases/conus_gfs_noahmp.sh b/testing_and_setup/ufs-community/ics/cases/conus_gfs_noahmp.sh new file mode 100644 index 0000000000..92d1d1e219 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/cases/conus_gfs_noahmp.sh @@ -0,0 +1,17 @@ +# make_ics case conus_gfs_noahmp (sourced by scripts/create_case.sh) +# GFS ICs for Noah-MP: 4 soil levels (Noah-MP needs 4; the GSL namelists use 9 for RUC). +# The init/lbc/sfc_update namelists are the NCAR ones from barlage/mpas_testcase +# (55 levels, 30 km model top), as used for mesoscale_reference_noahmp. The static +# file is the 20-class one shared with conus_gfs; it already holds the Noah-MP fields +# (soilcomp, soilcl1-4), since config_noahmp_static defaults to true. +domain=conus +resolution=120km +mesh=conus.120km +source=gfs +date=2023031015 +case_dir=conus.120km.gfs.2023031015.noahmp +static_key=conus-120km +static_variant= +static_nml_dir=step1_static +nml_variant=noahmp +use_climo_aerosols=true diff --git a/testing_and_setup/ufs-community/ics/cases/conus_gfs_noahmp10.sh b/testing_and_setup/ufs-community/ics/cases/conus_gfs_noahmp10.sh new file mode 100644 index 0000000000..9b0a411168 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/cases/conus_gfs_noahmp10.sh @@ -0,0 +1,17 @@ +# make_ics case conus_gfs_noahmp10 (sourced by scripts/create_case.sh) +# As conus_gfs_noahmp, with 10 soil layers for Noah-MP instead of 4: +# dzs = 0.05 0.10 0.10 0.10 0.30 0.35 0.50 1.00 1.00 1.50 m (5 m deep), set in +# init_atmosphere (src/core_atmosphere/physics/mpas_atmphys_initialize_real.F) +# when config_nsoillevels = 10. Layers centered below 3 m (the deepest GFS input +# level, where the deep soil temperature is used) take the deepest input values. +domain=conus +resolution=120km +mesh=conus.120km +source=gfs +date=2023031015 +case_dir=conus.120km.gfs.2023031015.noahmp10 +static_key=conus-120km +static_variant= +static_nml_dir=step1_static +nml_variant=noahmp10 +use_climo_aerosols=true diff --git a/testing_and_setup/ufs-community/ics/cases/conus_raps.sh b/testing_and_setup/ufs-community/ics/cases/conus_raps.sh new file mode 100644 index 0000000000..7c3901fed8 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/cases/conus_raps.sh @@ -0,0 +1,11 @@ +# make_ics case conus_raps (sourced by scripts/create_case.sh) +domain=conus +resolution=120km +mesh=conus.120km +source=rap +date=2024081518 +case_dir=conus.120km.rap.2024081518 +static_key=conus-120km +static_variant= +static_nml_dir=step1_static +use_climo_aerosols=true diff --git a/testing_and_setup/ufs-community/ics/cases/conus_raps_lake.sh b/testing_and_setup/ufs-community/ics/cases/conus_raps_lake.sh new file mode 100644 index 0000000000..138fd9bb45 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/cases/conus_raps_lake.sh @@ -0,0 +1,11 @@ +# make_ics case conus_raps_lake (sourced by scripts/create_case.sh) +domain=conus +resolution=120km +mesh=conus.120km +source=rap +date=2024081518 +case_dir=conus.120km.rap.2024081518.lakes +static_key=conus-120km-lakes +static_variant=lakes +static_nml_dir=step1_static_lakes +use_climo_aerosols=true diff --git a/testing_and_setup/ufs-community/ics/cases/conus_rapw.sh b/testing_and_setup/ufs-community/ics/cases/conus_rapw.sh new file mode 100644 index 0000000000..e6e4d8d757 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/cases/conus_rapw.sh @@ -0,0 +1,11 @@ +# make_ics case conus_rapw (sourced by scripts/create_case.sh) +domain=conus +resolution=120km +mesh=conus.120km +source=rap +date=2024020218 +case_dir=conus.120km.rap.2024020218 +static_key=conus-120km +static_variant= +static_nml_dir=step1_static +use_climo_aerosols=true diff --git a/testing_and_setup/ufs-community/ics/cases/conus_rapw_lake.sh b/testing_and_setup/ufs-community/ics/cases/conus_rapw_lake.sh new file mode 100644 index 0000000000..d27d260da6 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/cases/conus_rapw_lake.sh @@ -0,0 +1,11 @@ +# make_ics case conus_rapw_lake (sourced by scripts/create_case.sh) +domain=conus +resolution=120km +mesh=conus.120km +source=rap +date=2024020218 +case_dir=conus.120km.rap.2024020218.lakes +static_key=conus-120km-lakes +static_variant=lakes +static_nml_dir=step1_static_lakes +use_climo_aerosols=true diff --git a/testing_and_setup/ufs-community/ics/check_ics.py b/testing_and_setup/ufs-community/ics/check_ics.py new file mode 100755 index 0000000000..773fcf3d28 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/check_ics.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python3 +"""Sanity checks on the files made by scripts/create_case.sh for one make_ics case. + + check_ics.py CASE_FILES_DIR --source {gfs,rap} [--lakes] [--noahmp] [--soil-levels N] + [--lbc-times N] + +Checks: + - static, ugwp_oro_data, init and lbc files exist (and sfc_update for gfs) + - nlcat is 21 with --lakes, 20 otherwise + - islake_lu is 21 with --lakes, -1 (no lake category) otherwise + - with --lakes: lake points (ivgtyp == 21) exist and are all water (landmask 0); + without: no point has category 21 + - the init file has --soil-levels soil levels (default 4 with --noahmp, 9 otherwise) + - with --noahmp: the Noah-MP static fields (soilcomp, soilcl1-4) are in the static + and init files and hold valid values over land, and every soil level of tslb + and smois holds a plausible value over land (150-350 K, 0-1) + - no NaN/Inf in the main init fields + - the lbc file has --lbc-times time records (when given) +Exit status 1 if any check fails. +""" +import argparse +import glob +import os +import sys + +import numpy as np +from netCDF4 import Dataset + +NOAHMP_FIELDS = ["soilcomp", "soilcl1", "soilcl2", "soilcl3", "soilcl4"] +INIT_FIELDS = ["theta", "rho", "u", "w", "qv", "surface_pressure", "skintemp", "tslb", "smois"] + + +def one(pattern, what, failures): + files = sorted(glob.glob(pattern)) + if len(files) != 1: + failures.append(f"expected one {what} file ({os.path.basename(pattern)}), found {len(files)}") + return None + return files[0] + + +def main(): + p = argparse.ArgumentParser() + p.add_argument("case_files") + p.add_argument("--source", choices=["gfs", "rap"], required=True) + p.add_argument("--lakes", action="store_true") + p.add_argument("--noahmp", action="store_true") + p.add_argument("--soil-levels", type=int) + p.add_argument("--lbc-times", type=int) + a = p.parse_args() + + d = a.case_files + failures = [] + ok = [] + + static = one(f"{d}/mpas.*.static.nc", "static", failures) + one(f"{d}/mpas.*.ugwp_oro_data.nc", "ugwp_oro_data", failures) + init = one(f"{d}/mpas.*.init.*.nc", "init", failures) + lbc = one(f"{d}/mpas.*.lbc.*.nc", "lbc", failures) + if a.source == "gfs": + one(f"{d}/mpas.*.sfc_update.*.nc", "sfc_update", failures) + + want_nlcat = 21 if a.lakes else 20 + want_islake = 21 if a.lakes else -1 + + for path in [x for x in (static, init) if x]: + name = os.path.basename(path) + with Dataset(path) as nc: + nlcat = len(nc.dimensions["nlcat"]) if "nlcat" in nc.dimensions else None + if nlcat != want_nlcat: + failures.append(f"{name}: nlcat = {nlcat}, expected {want_nlcat}") + else: + ok.append(f"{name}: nlcat = {nlcat}") + if "islake_lu" in nc.variables: + islake = int(np.asarray(nc.variables["islake_lu"][...]).ravel()[0]) + if islake != want_islake: + failures.append(f"{name}: islake_lu = {islake}, expected {want_islake}") + else: + ok.append(f"{name}: islake_lu = {islake}") + else: + failures.append(f"{name}: no islake_lu variable") + + lu = np.asarray(nc.variables["ivgtyp"][:]).ravel() + lm = np.asarray(nc.variables["landmask"][:]).ravel() + nlake = int((lu == 21).sum()) + if a.lakes: + if nlake == 0: + failures.append(f"{name}: no lake points (ivgtyp == 21)") + elif np.any(lm[lu == 21] != 0): + failures.append(f"{name}: {int((lm[lu == 21] != 0).sum())} of {nlake} lake points have landmask != 0") + else: + ok.append(f"{name}: {nlake} lake points, all landmask = 0") + elif nlake: + failures.append(f"{name}: {nlake} points with ivgtyp == 21 without the lakes option") + + if a.noahmp: + land = lm == 1 + for v in NOAHMP_FIELDS: + if v not in nc.variables: + failures.append(f"{name}: no {v} variable (Noah-MP static field)") + continue + var = nc.variables[v] + x = np.asarray(var[:], dtype=np.float64) + # land points only: move the nCells axis first, then select + x = np.moveaxis(x, var.dimensions.index("nCells"), 0) + xl = x[land] + if not np.all(np.isfinite(xl)): + failures.append(f"{name}: {v} has NaN/Inf over land") + elif v == "soilcomp" and not np.any((xl > 0) & (xl <= 100)): + failures.append(f"{name}: soilcomp has no values in (0, 100] over land") + elif v != "soilcomp" and not np.any(xl >= 1): + failures.append(f"{name}: {v} has no soil texture class >= 1 over land") + else: + ok.append(f"{name}: {v} valid over land") + + if init: + with Dataset(init) as nc: + want_soil = a.soil_levels or (4 if a.noahmp else 9) + nsoil = len(nc.dimensions["nSoilLevels"]) if "nSoilLevels" in nc.dimensions else None + if nsoil != want_soil: + failures.append(f"{os.path.basename(init)}: nSoilLevels = {nsoil}, expected {want_soil}") + else: + ok.append(f"{os.path.basename(init)}: nSoilLevels = {nsoil}") + if a.noahmp: + land = np.asarray(nc.variables["landmask"][:]).ravel() == 1 + for v, lo, hi in (("tslb", 150.0, 350.0), ("smois", 0.0, 1.0)): + if v not in nc.variables: + continue + var = nc.variables[v] + x = np.moveaxis(np.asarray(var[:], dtype=np.float64), var.dimensions.index("nCells"), 0)[land] + x = x.reshape(x.shape[0], -1) + bad = [k + 1 for k in range(x.shape[1]) if not np.all((x[:, k] >= lo) & (x[:, k] <= hi))] + if bad: + failures.append(f"{os.path.basename(init)}: {v} outside [{lo:g}, {hi:g}] over land at soil level(s) {bad}") + else: + ok.append(f"{os.path.basename(init)}: {v} in [{lo:g}, {hi:g}] over land at all {x.shape[1]} soil levels") + for v in INIT_FIELDS: + if v not in nc.variables: + failures.append(f"{os.path.basename(init)}: missing required init field {v}") + continue + x = np.asarray(nc.variables[v][:], dtype=np.float64) + bad = int((~np.isfinite(x)).sum()) + if bad: + failures.append(f"{os.path.basename(init)}: {v} has {bad} NaN/Inf values") + ok.append(f"{os.path.basename(init)}: no NaN/Inf in {', '.join(v for v in INIT_FIELDS if v in nc.variables)}") + + if lbc and a.lbc_times is not None: + with Dataset(lbc) as nc: + nt = len(nc.dimensions["Time"]) + if nt != a.lbc_times: + failures.append(f"{os.path.basename(lbc)}: {nt} time records, expected {a.lbc_times}") + else: + ok.append(f"{os.path.basename(lbc)}: {nt} time records") + + for line in ok: + print(f" ok {line}") + for line in failures: + print(f" FAIL {line}") + sys.exit(1 if failures else 0) + + +if __name__ == "__main__": + main() diff --git a/testing_and_setup/ufs-community/ics/scripts/create_case.sh b/testing_and_setup/ufs-community/ics/scripts/create_case.sh new file mode 100755 index 0000000000..f594d2e4d4 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/scripts/create_case.sh @@ -0,0 +1,341 @@ +#!/usr/bin/env bash +# +# Create MPAS static / init / lbc / sfc_update files for one case in cases/. +# Copied from dustinswales/mpas-ic-factory (scripts/create_case.sh); case settings +# come from cases/.sh instead of cases.yaml. +# Portable version of barlage/mpas_testcase create_case/create_mpas_testcase_caseNN.sh +# (GSL code and namelists): +# no Slurm, no site paths. Runs on a laptop, a GitHub runner or an HPC node. +# +# Usage: +# scripts/create_case.sh -c CASE -e INIT_ATMOSPHERE_EXE -i INPUT_DIR -o OUTPUT_DIR [options] +# +# Options: +# -c CASE case id: a file cases/CASE.sh (e.g. conus_gfs) +# -e EXE init_atmosphere_model executable +# -i INPUT_DIR input tree (see scripts/fetch_inputs.sh): +# grids/.grid.nc, grids/.graph.info +# geog/mpas_static/... (static step only) +# ungrib/./: +# ungrib/sst./SST: (gfs only) +# aerosols/QNWFA_QNIFA_SIGMA_MONTHLY.dat (use_climo_aerosols) +# -o OUTPUT_DIR final files go to OUTPUT_DIR//case_files +# -n NTASKS MPI tasks (default: nproc) +# -s STEPS comma list from static,init,lbc,sst (default: all that apply) +# -S STATIC_DIR directory holding an existing mpas.*.static.nc (and ugwp_oro_data) +# for this case; used instead of running the static step +# -w WORK_DIR run directories (default: OUTPUT_DIR/) +# -k keep the step run directories (default: remove after success) +# +# Environment: +# MPIRUN launcher prefix, task count appended (default "mpirun -n"; e.g. "srun -n") +# GPMETIS gpmetis executable (default "gpmetis") +# DESCRIBE_EXTRA file whose contents are appended to case_files/description +# +set -euo pipefail + +script_home="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +die() { echo "ERROR: $*" >&2; exit 1; } +banner() { + echo + echo "################################################################" + echo "# $*" + echo "################################################################" +} + +case_id="" exe="" input_dir="" output_dir="" ntasks="" steps="" static_dir="" work_root="" keep="false" +while getopts "c:e:i:o:n:s:S:w:kh" opt; do + case $opt in + c) case_id=$OPTARG ;; + e) exe=$OPTARG ;; + i) input_dir=$OPTARG ;; + o) output_dir=$OPTARG ;; + n) ntasks=$OPTARG ;; + s) steps=$OPTARG ;; + S) static_dir=$OPTARG ;; + w) work_root=$OPTARG ;; + k) keep="true" ;; + h) sed -n '2,32p' "$0"; exit 0 ;; + *) die "bad option (see -h)" ;; + esac +done +[ -n "$case_id" ] || die "-c CASE is required" +[ -n "$exe" ] || die "-e EXE is required" +[ -n "$input_dir" ] || die "-i INPUT_DIR is required" +[ -n "$output_dir" ] || die "-o OUTPUT_DIR is required" +[ -x "$exe" ] || die "executable not found: $exe" +exe="$(cd "$(dirname "$exe")" && pwd)/$(basename "$exe")" +input_dir="$(cd "$input_dir" && pwd)" +mkdir -p "$output_dir"; output_dir="$(cd "$output_dir" && pwd)" +ntasks=${ntasks:-$(nproc)} +MPIRUN=${MPIRUN:-"mpirun -n"} +GPMETIS=${GPMETIS:-gpmetis} + +# Case settings: case_id domain resolution source season date mesh case_dir +# static_key use_climo_aerosols; optional static_variant static_nml_dir +# nml_variant (init/lbc/sst namelists from case_files//..) +domain="" resolution="" source="" date="" mesh="" case_dir="" use_climo_aerosols="" +static_variant="" static_nml_dir="step1_static" nml_variant="" +case_file="$script_home/cases/$case_id.sh" +[ -f "$case_file" ] || die "unknown case '$case_id' (no $case_file)" +# shellcheck source=/dev/null +. "$case_file" + +nml_dir="$source.$date${nml_variant:+.$nml_variant}" +yyyy=${date:0:4} mm=${date:4:2} dd=${date:6:2} hh=${date:8:2} +datestring="${yyyy}-${mm}-${dd}_${hh}.00.00" +prefix="mpas.$domain.$resolution" +static_file="$prefix.static.nc" +ugwp_file="$prefix.ugwp_oro_data.nc" +init_file="$prefix.$source.init.$datestring.nc" +lbc_file="$prefix.$source.lbc.$datestring.nc" +sst_file="$prefix.$source.sfc_update.$datestring.nc" + +has_lbc=false; [ "$domain" = "conus" ] && has_lbc=true +has_sst=false; [ "$source" = "gfs" ] && has_sst=true + +if [ -z "$steps" ]; then + steps="init" + [ -z "$static_dir" ] && steps="static,$steps" + $has_lbc && steps="$steps,lbc" + $has_sst && steps="$steps,sst" +fi +want() { [[ ",$steps," == *",$1,"* ]]; } +want lbc && ! $has_lbc && die "lbc step only applies to conus (case $case_id is $domain)" +want sst && ! $has_sst && die "sst step only applies to gfs source (case $case_id is $source)" +if want init && ! want static && [ -z "$static_dir" ]; then + die "init without static: pass -S STATIC_DIR or include the static step" +fi + +case_root="$output_dir/$case_dir" +work=${work_root:-$case_root} +final="$case_root/case_files" +mkdir -p "$work" "$final" +work="$(cd "$work" && pwd)" + +grid_file="$input_dir/grids/$mesh.grid.nc" +graph_file="$input_dir/grids/$mesh.graph.info" +ungrib_met="$input_dir/ungrib/$source.$date" +ungrib_sst="$input_dir/ungrib/sst.$date" +geog_dir="$input_dir/geog/mpas_static" +aerosol_file="$input_dir/aerosols/QNWFA_QNIFA_SIGMA_MONTHLY.dat" + +# Check every input up front so a missing bundle fails before any long step runs. +if want static; then + [ -s "$grid_file" ] || die "missing $grid_file" + [ -d "$geog_dir" ] || die "missing $geog_dir" +fi +if want init || want lbc; then + [ -d "$ungrib_met" ] || die "missing $ungrib_met" + if [ "$use_climo_aerosols" = "true" ]; then + [ -s "$aerosol_file" ] || die "missing $aerosol_file (use_climo_aerosols=true)" + fi +fi +if want sst; then [ -d "$ungrib_sst" ] || die "missing $ungrib_sst"; fi + +# MPAS needs a large stack (the MPAS user guide says "ulimit -s unlimited"); +# the 8 MB default segfaults init_atmosphere on some compilers/inputs. +ulimit -s unlimited 2>/dev/null || ulimit -s "$(ulimit -H -s)" 2>/dev/null || true +export OMP_STACKSIZE=${OMP_STACKSIZE:-512M} + +banner "Configuration settings" +cat </dev/null) \ + || die "gpmetis failed for $mesh with $ntasks parts" + fi + fi + ln -sf "$part" "graph.info.part.$ntasks" +} + +stage_namelist() { # $1 = step directory name, $2 = optional dated subdirectory + local src="$script_home/case_files/$1${2:+/$2}" + [ -d "$src" ] || die "no namelist directory $src" + cp "$src"/namelist.init_atmosphere "$src"/streams.init_atmosphere . +} + +run_init_atmosphere() { # $1 = expected output file + ln -sf "$exe" init_atmosphere_model + rm -f log.init_atmosphere.* + local t0=$SECONDS rc=0 + $MPIRUN "$ntasks" ./init_atmosphere_model || rc=$? + echo "init_atmosphere_model finished in $((SECONDS - t0)) s (rc=$rc)" + local errs=(log.init_atmosphere.*.err) + [ -e "${errs[0]}" ] || errs=() + if [ $rc -ne 0 ] || [ ! -s "$1" ]; then + # Full .out log first, then the warnings/errors, so the cause ends up at the + # bottom of the CI log. ("SEAICE_FRACTIONAL/OMLD file not found" lines are + # informational: those are optional inputs.) + if [ -e log.init_atmosphere.0000.out ]; then + echo "---- tail -80 log.init_atmosphere.0000.out"; tail -80 log.init_atmosphere.0000.out + fi + for f in "${errs[@]}"; do echo "---- $f"; cat "$f"; done + echo "---- ERROR/CRITICAL lines" + grep -hE "ERROR|CRITICAL" log.init_atmosphere.* 2>/dev/null | sort -u || echo "(none in logs)" + [ -s "$1" ] || die "$1 was not created in $PWD (rc=$rc)" + die "init_atmosphere_model exited with $rc in $PWD" + elif [ ${#errs[@]} -gt 0 ]; then + echo "---- warnings (run succeeded)"; cat "${errs[@]}" + fi +} + +save_log() { # $1 = step run dir, $2 = name in case_files + [ -e "$1/log.init_atmosphere.0000.out" ] && cp "$1/log.init_atmosphere.0000.out" "$final/$2" + return 0 +} + +link_aerosols() { + if [ "$use_climo_aerosols" = "true" ]; then + [ -s "$aerosol_file" ] || die "missing $aerosol_file (use_climo_aerosols=true)" + ln -sf "$aerosol_file" . + fi +} + +banner "Start processing time: $(date -u)" + +# ------------------------------------------------------------------ +# step 1: static +# ------------------------------------------------------------------ +static_run="$work/step1_static" +if want static; then + banner "Start creating: $static_file" + [ -s "$grid_file" ] || die "missing $grid_file" + [ -d "$geog_dir" ] || die "missing $geog_dir" + rm -rf "$static_run"; mkdir -p "$static_run"; cd "$static_run" + stage_namelist "$static_nml_dir" + ln -sf "$geog_dir" mpas_static + ln -sf "$grid_file" grid.nc + partition + run_init_atmosphere static.nc + [ -s ugwp_oro_data.nc ] || die "ugwp_oro_data.nc was not created" + cp static.nc "$final/$static_file" + cp ugwp_oro_data.nc "$final/$ugwp_file" + save_log "$static_run" log.static +fi + +# Static file for the later steps. +if want init; then + if [ -n "$static_dir" ]; then + static_src="$static_dir/$static_file" + [ -s "$static_src" ] || die "no $static_file in $static_dir" + cp "$static_src" "$final/$static_file" + [ -s "$static_dir/$ugwp_file" ] || die "no $ugwp_file in $static_dir" + cp "$static_dir/$ugwp_file" "$final/$ugwp_file" + [ -e "$static_dir/log.static" ] && cp "$static_dir/log.static" "$final/log.static" + fi + [ -s "$final/$static_file" ] || die "no static file $final/$static_file" +fi + +# ------------------------------------------------------------------ +# step 2: init +# ------------------------------------------------------------------ +init_run="$work/step2_init" +if want init; then + banner "Start creating: $init_file" + [ -d "$ungrib_met" ] || die "missing $ungrib_met" + rm -rf "$init_run"; mkdir -p "$init_run"; cd "$init_run" + stage_namelist step2_init "$nml_dir" + partition + shopt -s nullglob + met0=("$ungrib_met"/*"${yyyy}-${mm}-${dd}_${hh}") + shopt -u nullglob + [ ${#met0[@]} -gt 0 ] || die "no intermediate file for ${yyyy}-${mm}-${dd}_${hh} in $ungrib_met" + ln -sf "${met0[@]}" . + ln -sf "$final/$static_file" static.nc + link_aerosols + run_init_atmosphere init.nc + mv init.nc "$final/$init_file" + save_log "$init_run" log.init +fi + +# ------------------------------------------------------------------ +# step 3: lbc (conus) +# ------------------------------------------------------------------ +lbc_run="$work/step3_lbc" +if want lbc; then + banner "Start creating: $lbc_file" + [ -s "$final/$init_file" ] || die "lbc needs $final/$init_file" + rm -rf "$lbc_run"; mkdir -p "$lbc_run"; cd "$lbc_run" + stage_namelist step3_lbc "$nml_dir" + partition + ln -sf "$ungrib_met"/* . + ln -sf "$final/$init_file" init.nc + link_aerosols + run_init_atmosphere lbc.nc + mv lbc.nc "$final/$lbc_file" + save_log "$lbc_run" log.lbc +fi + +# ------------------------------------------------------------------ +# step 4: sfc_update (gfs) +# ------------------------------------------------------------------ +sst_run="$work/step4_sst" +if want sst; then + banner "Start creating: $sst_file" + [ -s "$final/$init_file" ] || die "sst needs $final/$init_file" + [ -d "$ungrib_sst" ] || die "missing $ungrib_sst" + rm -rf "$sst_run"; mkdir -p "$sst_run"; cd "$sst_run" + stage_namelist step4_sst "$nml_dir" + partition + ln -sf "$ungrib_sst"/SST* . + ln -sf "$final/$init_file" init.nc + run_init_atmosphere sfc_update.nc + mv sfc_update.nc "$final/$sst_file" + save_log "$sst_run" log.sst +fi + +# ------------------------------------------------------------------ +# provenance +# ------------------------------------------------------------------ +cd "$final" +{ + echo "These files were created with:" + echo "case: $case_id" + echo "created (UTC): $(date -u +%Y-%m-%dT%H:%M:%SZ)" + echo "host: $(hostname)" + echo "executable: $exe" + echo "executable sha256: $(sha256sum "$exe" | cut -d' ' -f1)" + echo "launcher: $MPIRUN $ntasks" + echo "use_climo_aerosols: $use_climo_aerosols" + echo "input dir: $input_dir" + [ -s "$input_dir/INPUTS_TAG" ] && echo "inputs tag: $(cat "$input_dir/INPUTS_TAG")" + [ -n "${DESCRIBE_EXTRA:-}" ] && [ -s "$DESCRIBE_EXTRA" ] && cat "$DESCRIBE_EXTRA" + true +} > description +sha256sum mpas.*.nc > SHA256SUMS + +if [ "$keep" = "false" ]; then + rm -rf "$static_run" "$init_run" "$lbc_run" "$sst_run" "$work/partitions" +fi + +banner "Successful completion of case: $case_dir ($steps)" +ls -l "$final" +banner "End processing time: $(date -u)" diff --git a/testing_and_setup/ufs-community/ics/scripts/fetch_inputs.sh b/testing_and_setup/ufs-community/ics/scripts/fetch_inputs.sh new file mode 100755 index 0000000000..2d37dcc202 --- /dev/null +++ b/testing_and_setup/ufs-community/ics/scripts/fetch_inputs.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash +# +# Download input bundles from a GitHub release and unpack them into INPUT_DIR. +# Copied from dustinswales/mpas-ic-factory (scripts/fetch_inputs.sh), with parts +# streamed into tar one at a time to keep disk use down on CI runners. +# +# Usage: +# scripts/fetch_inputs.sh -r OWNER/REPO -t TAG -d INPUT_DIR BUNDLE [BUNDLE ...] +# +# BUNDLE names (assets are BUNDLE.tar.gz, or BUNDLE.tar.gz.part-aa, -ab, ... when split): +# grids -> INPUT_DIR/grids/ +# geog -> INPUT_DIR/geog/mpas_static/ +# (also fetches every geog- bundle in the release, +# see tools/add_geog_dataset.sh) +# aerosols -> INPUT_DIR/aerosols/ +# ungrib-. -> INPUT_DIR/ungrib/./ (e.g. ungrib-gfs.2023031015) +# +# Every asset is checked against MANIFEST.sha256 from the same release. +# Uses the gh CLI when available (GH_TOKEN), otherwise plain https downloads +# (public repositories only). +set -euo pipefail + +die() { echo "ERROR: $*" >&2; exit 1; } + +repo="" tag="" input_dir="" +while getopts "r:t:d:" opt; do + case $opt in + r) repo=$OPTARG ;; + t) tag=$OPTARG ;; + d) input_dir=$OPTARG ;; + *) die "usage: $0 -r OWNER/REPO -t TAG -d INPUT_DIR BUNDLE..." ;; + esac +done +shift $((OPTIND - 1)) +[ -n "$repo" ] && [ -n "$tag" ] && [ -n "$input_dir" ] || die "-r, -t and -d are required" +[ $# -gt 0 ] || die "no bundles requested" + +mkdir -p "$input_dir" +input_dir="$(cd "$input_dir" && pwd)" +dl="$input_dir/.download" +mkdir -p "$dl" + +use_gh=false +if command -v gh >/dev/null 2>&1 && [ -n "${GH_TOKEN:-${GITHUB_TOKEN:-}}" ]; then use_gh=true; fi + +fetch() { # fetch asset names into $dl + if $use_gh; then + local args=() + for a in "$@"; do args+=(-p "$a"); done + gh release download "$tag" -R "$repo" -D "$dl" --clobber "${args[@]}" + else + for a in "$@"; do + curl -fL --retry 5 --retry-delay 10 -sS -o "$dl/$a" \ + "https://github.com/$repo/releases/download/$tag/$a" + done + fi +} + +if [ -e "$input_dir/INPUTS_TAG" ] && [ "$(cat "$input_dir/INPUTS_TAG")" != "$repo@$tag" ]; then + die "$input_dir contains inputs from another release; use a fresh input directory" +fi +echo "$repo@$tag" > "$input_dir/INPUTS_TAG" + +[ -s "$dl/MANIFEST.sha256" ] || fetch MANIFEST.sha256 + +# "geog" also brings in extra datasets added later as geog- bundles. +bundles=("$@") +for b in "$@"; do + if [ "$b" = geog ]; then + mapfile -t extra < <(awk '{print $2}' "$dl/MANIFEST.sha256" \ + | sed -nE 's/^(geog-[^ ]+)\.tar\.gz(\.part-[a-z]+)?$/\1/p' | sort -u) + bundles+=("${extra[@]}") + fi +done + +for bundle in "${bundles[@]}"; do + marker="$input_dir/.done.$bundle" + if [ -e "$marker" ]; then echo "$bundle: already unpacked"; continue; fi + + mapfile -t assets < <(awk '{print $2}' "$dl/MANIFEST.sha256" \ + | grep -E "^${bundle//./\\.}\.tar\.gz(\.part-[a-z]+)?$" | sort) + [ ${#assets[@]} -gt 0 ] || die "bundle '$bundle' not in release $repo@$tag" + + # One part at a time: download, verify, feed to tar, delete. Peak disk use is the + # unpacked data plus one part, instead of every part plus the unpacked data. + echo "$bundle: downloading and unpacking ${#assets[@]} asset(s)" + for a in "${assets[@]}"; do + fetch "$a" >&2 + (cd "$dl" && awk -v f="$a" '$2 == f' MANIFEST.sha256 | sha256sum -c --quiet -) >&2 \ + || { echo "ERROR: $a: checksum mismatch" >&2; exit 1; } + cat "$dl/$a" + rm -f "$dl/$a" + done | tar -xzf - -C "$input_dir" || die "$bundle: download or unpack failed" + touch "$marker" +done + +echo "$repo@$tag" > "$input_dir/INPUTS_TAG" +du -sh "$input_dir"/* 2>/dev/null || true From f567f593bcffa27a6ab11397c2d2d090a9ba8cd7 Mon Sep 17 00:00:00 2001 From: mdtoyNOAA <73618848+mdtoyNOAA@users.noreply.github.com> Date: Fri, 13 Nov 2026 16:57:37 -0600 Subject: [PATCH 07/10] v8.4.2-2.3: Added namelist-designation capability for 'alpha fd' UGWP TOFD coefficient (#311) * Made UGWP alpha_fd coefficient for TOFD a namelist option * Updated Externals.cfg to current UGWP tag * Added output of 'alpha_fd' coefficient to log file in mpas_atmphys_init.F * Added 'kind=RKIND' to alpha_fd declaration in mpas_atmphys_driver_gwdo.F * Updated link to submodule 'physics_noaa/UGWP' * Update README.md --------- Co-authored-by: Dustin Swales --- README.md | 2 +- src/core_atmosphere/Externals.cfg | 2 +- src/core_atmosphere/Registry.xml | 5 +++++ src/core_atmosphere/physics/mpas_atmphys_driver_gwdo.F | 3 +++ src/core_atmosphere/physics/mpas_atmphys_init.F | 8 ++++++++ src/core_atmosphere/physics/physics_noaa/UGWP | 2 +- .../physics/physics_wrf/module_bl_ugwp_gwdo.F | 4 +++- 7 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8b6790606e..88677b7c29 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-2.2 +MPAS-v8.4.2-2.3 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_atmosphere/Externals.cfg b/src/core_atmosphere/Externals.cfg index 84dc47d1d8..3f0054f9a4 100644 --- a/src/core_atmosphere/Externals.cfg +++ b/src/core_atmosphere/Externals.cfg @@ -9,7 +9,7 @@ required = True local_path = ./physics_noaa/UGWP protocol = git repo_url = https://github.com/NOAA-GSL/UGWP.git -tag = MPAS_20241223 +tag = MPAS_20261104 required = True [externals_description] diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index 2221b94fa2..7485ef6964 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -2982,6 +2982,11 @@ description="configuration of gravity wave drag over orography" possible_values="`suite',`bl_ysu_gwdo',`bl_ugwp_gwdo',`off'"/> + + Date: Thu, 19 Nov 2026 07:52:21 -0700 Subject: [PATCH 08/10] v8.4.2-2.4: remove 5 changing fields from the invariant stream (#316) * remove 5 changing fields from the invariant stream * Update README.md --------- Co-authored-by: Dustin Swales --- README.md | 2 +- src/core_atmosphere/Registry.xml | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 88677b7c29..b1877e6f42 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-2.3 +MPAS-v8.4.2-2.4 ==== 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 7485ef6964..2a5028b35f 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -619,15 +619,10 @@ #endif #ifdef DO_PHYSICS - - - - - @@ -676,6 +671,11 @@ #ifdef DO_PHYSICS + + + + + @@ -748,6 +748,11 @@ #ifdef DO_PHYSICS + + + + + From 64cd269168d4e35bda8f207fe8ee64272f480920 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Thu, 19 Nov 2026 07:55:36 -0700 Subject: [PATCH 09/10] v8.4.2-2.5: updating MYNN-SFC pointer (#310) * updating MYNN-SFC pointer * updating MYNN-SFC pointer with fixes suggested by Claude * Update version number --------- Co-authored-by: Dustin Swales Co-authored-by: Clark Evans --- README.md | 2 +- .../physics/mpas_atmphys_driver_sfclayer.F | 18 ++++++++++++------ .../physics/physics_noaa/MYNN-SFC | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b1877e6f42..891f970f66 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-2.4 +MPAS-v8.4.2-2.5 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_sfclayer.F b/src/core_atmosphere/physics/mpas_atmphys_driver_sfclayer.F index a88d639dc1..8d30a1de63 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_sfclayer.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_sfclayer.F @@ -227,6 +227,8 @@ subroutine allocate_sfclayer(configs) if(.not.allocated(ch_p) ) allocate(ch_p(ims:ime,jms:jme) ) if(.not.allocated(cqs_p) ) allocate(cqs_p(ims:ime,jms:jme) ) if(.not.allocated(qcg_p) ) allocate(qcg_p(ims:ime,jms:jme) ) + if(.not.allocated(uoce_p) ) allocate(uoce_p(ims:ime,jms:jme) ) + if(.not.allocated(voce_p) ) allocate(voce_p(ims:ime,jms:jme) ) if(config_frac_seaice) then if(.not.allocated(ch_sea) ) allocate(ch_sea(ims:ime,jms:jme) ) if(.not.allocated(cqs_sea)) allocate(cqs_sea(ims:ime,jms:jme)) @@ -389,6 +391,8 @@ subroutine deallocate_sfclayer(configs) if(allocated(snowh_p)) deallocate(snowh_p) if(allocated(ch_p) ) deallocate(ch_p ) if(allocated(qcg_p) ) deallocate(qcg_p ) + if(allocated(uoce_p) ) deallocate(uoce_p ) + if(allocated(voce_p) ) deallocate(voce_p ) if(config_frac_seaice) then if(allocated(ch_sea)) deallocate(ch_sea) endif @@ -689,6 +693,8 @@ subroutine sfclayer_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite) !inout variables: ch_p(i,j) = ch(i) cqs_p(i,j) = cqs(i) + uoce_p(i,j) = 0._RKIND + voce_p(i,j) = 0._RKIND if(config_frac_seaice) then ch_sea(i,j) = ch(i) cqs_sea(i,j) = cqs(i) @@ -1399,9 +1405,9 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite rho3d = rho_p , dz8w = dz_p , & chs = chs_p , chs2 = chs2_p , psfcpa = psfc_p , & cqs = cqs_p , cqs2 = cqs2_p , cpm = cpm_p , & - znt = znt_p , qgh = qgh_p , & + znt = znt_p , uoce = uoce_p , voce = voce_p , & ust = ust_p , pblh = hpbl_p , mavail = mavail_p , & - zol = zol_p , mol = mol_p , & + zol = zol_p , mol = mol_p , qgh = qgh_p , & psim = psim_p , psih = psih_p , xland = xland_p , & hfx = hfx_p , qfx = qfx_p , lh = lh_p , & tsk = tsk_p , flhc = flhc_p , flqc = flqc_p , & @@ -1412,7 +1418,7 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite isfflx = isfflx , dx = dx_p , & ustm = ustm_p , ck = ck_p , cka = cka_p , & cd = cd_p , cda = cda_p , ch = ch_p , & - xice =xice_P , xice_threshold = xice_threshold , & + xice = xice_p , xice_threshold = xice_threshold , & spp_pbl = spp_pbl , & sf_mynn_sfcflux_land = sf_mynn_sfcflux_land , & sf_mynn_sfcflux_water = sf_mynn_sfcflux_water , & @@ -1433,9 +1439,9 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite rho3d = rho_p , dz8w = dz_p , & chs = chs_sea , chs2 = chs2_sea , psfcpa = psfc_p , & cqs = cqs_sea , cqs2 = cqs2_sea , cpm = cpm_sea , & - znt = znt_sea , qgh = qgh_sea , & + znt = znt_sea , uoce = uoce_p , voce = voce_p , & ust = ust_sea , pblh = hpbl_p , mavail = mavail_sea , & - zol = zol_sea , mol = mol_sea , & + zol = zol_sea , mol = mol_sea , qgh = qgh_sea , & psim = psim_sea , psih = psih_sea , xland = xland_sea , & hfx = hfx_sea , qfx = qfx_sea , lh = lh_sea , & tsk = tsk_sea , flhc = flhc_sea , flqc = flqc_sea , & @@ -1446,7 +1452,7 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite isfflx = isfflx , dx = dx_p , & ustm = ustm_sea , ck = ck_sea , cka = cka_sea , & cd = cd_sea , cda = cda_sea , ch = ch_sea , & - xice =xice_P , xice_threshold = xice_threshold , & + xice = xice_p , xice_threshold = xice_threshold , & spp_pbl = spp_pbl , & sf_mynn_sfcflux_land = sf_mynn_sfcflux_land , & sf_mynn_sfcflux_water = sf_mynn_sfcflux_water , & diff --git a/src/core_atmosphere/physics/physics_noaa/MYNN-SFC b/src/core_atmosphere/physics/physics_noaa/MYNN-SFC index 13c3d29f7f..a038a9ea35 160000 --- a/src/core_atmosphere/physics/physics_noaa/MYNN-SFC +++ b/src/core_atmosphere/physics/physics_noaa/MYNN-SFC @@ -1 +1 @@ -Subproject commit 13c3d29f7f713610a24be9fa0e393d42a19d228b +Subproject commit a038a9ea35a12f0bf879fac8b64c99a77ffdae1c From 44aa5c6e24b4f446e0421463c50ae61e8c986c81 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Thu, 19 Nov 2026 07:56:56 -0700 Subject: [PATCH 10/10] v8.4.2-2.6: updating MYNN-EDMF pointer to v6.1.1 (#314) * updating MYNN-EDMF pointer to v6.1.1 * Update version number --------- Co-authored-by: Dustin Swales Co-authored-by: Clark Evans --- README.md | 2 +- src/core_atmosphere/physics/physics_noaa/MYNN-EDMF | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 891f970f66..319337dc53 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.4.2-2.5 +MPAS-v8.4.2-2.6 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF index 11f6bc115a..2b2da61b05 160000 --- a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF +++ b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF @@ -1 +1 @@ -Subproject commit 11f6bc115a68f2ec9a6aa24071c729a853ebdd1d +Subproject commit 2b2da61b05a8ef9f9b06795c816dc01e347e0736