diff --git a/.github/workflows/e3sm-gh-ci-cime-tests.yml b/.github/workflows/e3sm-gh-ci-cime-tests.yml
index 04d854b9317..04f7fcb4ffc 100644
--- a/.github/workflows/e3sm-gh-ci-cime-tests.yml
+++ b/.github/workflows/e3sm-gh-ci-cime-tests.yml
@@ -5,14 +5,18 @@ on:
branches: [ master ]
paths:
# first, yes to these
+ - '.github/workflows/e3sm-gh-ci-cime-tests.yml'
- 'cime_config/**'
- 'components/eam/**'
+ - 'components/eamxx/**'
- 'components/elm/**'
- 'driver-moab/**'
- 'driver-mct/**'
# second, no to these
- '!components/eam/docs/**'
- '!components/eam/mkdocs.yml'
+ - '!components/eamxx/docs/**'
+ - '!components/eamxx/mkdocs.yml'
- '!components/elm/docs/**'
- '!components/elm/mkdocs.yml'
@@ -26,17 +30,13 @@ jobs:
strategy:
fail-fast: false
matrix:
- test:
- - SMS_D_P4.ne4pg2_oQU480.F2010.singularity2_gnu
- - SMS_P4.ne4pg2_oQU480.F2010.singularity2_gnu
- - REP_P4.ne4pg2_oQU480.F2010.singularity2_gnu
- - ERS_P4.ne4pg2_oQU480.F2010.singularity2_gnu
- - ERS_P4.ne4pg2_oQU480.F2010.singularity2_gnu.eam-wcprod_F2010
- - ERP_P4.ne4pg2_oQU480.F2010.singularity2_gnu
- - PET_P4.ne4pg2_oQU480.F2010.singularity2_gnu
- - PEM_P4.ne4pg2_oQU480.F2010.singularity2_gnu
+ test:
+ - SMS_D_Ln5_P4.ne4pg2_oQU480.F2010.ghci-oci_gnu
+ - ERS_Ld5_P4.ne4pg2_oQU480.F2010.ghci-oci_gnu.eam-wcprod_F2010
+ - SMS_D_Ln5_P4.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.ghci-oci_gnu
+ - ERS_Ld5_P4.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.ghci-oci_gnu.eamxx-prod
container:
- image: ghcr.io/mahf708/e3sm-imgs:v0.0.9
+ image: ghcr.io/e3sm-project/containers-ghci:ghci-0.1.0
steps:
-
@@ -49,10 +49,6 @@ jobs:
name: CIME
working-directory: cime/scripts
run: |
- mkdir -p $HOME/projects/e3sm/cesm-inputdata/atm/cam/physprops/
- wget https://web.lcrc.anl.gov/public/e3sm/inputdata/atm/cam/physprops/p3_lookup_table_1.dat-v4.1.2
- mv p3_lookup_table_1.dat-v4.1.2 $HOME/projects/e3sm/cesm-inputdata/atm/cam/physprops/
- export USER=test
./create_test ${{ matrix.test }} --wait --debug
-
name: Artifacts
@@ -61,7 +57,7 @@ jobs:
with:
name: ${{ matrix.test }}
path: |
- ~/projects/e3sm/scratch/${{ matrix.test }}*/TestStatus.log
- ~/projects/e3sm/scratch/${{ matrix.test }}*/bld/*.bldlog.*
- ~/projects/e3sm/scratch/${{ matrix.test }}*/run/*.log.*
- ~/projects/e3sm/scratch/${{ matrix.test }}*/run/*.cprnc.out
+ /projects/e3sm/scratch/${{ matrix.test }}*/TestStatus.log
+ /projects/e3sm/scratch/${{ matrix.test }}*/bld/*.bldlog.*
+ /projects/e3sm/scratch/${{ matrix.test }}*/run/*.log.*
+ /projects/e3sm/scratch/${{ matrix.test }}*/run/*.cprnc.out
diff --git a/.github/workflows/e3sm-gh-ci-w-cime-tests.yml b/.github/workflows/e3sm-gh-ci-w-cime-tests.yml
index 6cadd056661..48c367c8f62 100644
--- a/.github/workflows/e3sm-gh-ci-w-cime-tests.yml
+++ b/.github/workflows/e3sm-gh-ci-w-cime-tests.yml
@@ -14,22 +14,16 @@ on:
jobs:
ci-w:
- if: false
+ if: ${{ github.event.repository.name == 'e3sm' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- test:
- - SMS_D_P8.ne4pg2_oQU480.WCYCL2010NS.singularity2_gnu
- - SMS_P8.ne4pg2_oQU480.WCYCL2010NS.singularity2_gnu
- - REP_P8.ne4pg2_oQU480.WCYCL2010NS.singularity2_gnu
- - ERS_P8.ne4pg2_oQU480.WCYCL2010NS.singularity2_gnu
- - ERS_P8.ne4pg2_oQU480.WCYCL2010NS.singularity2_gnu.allactive-wcprod_1850
- - ERP_P8.ne4pg2_oQU480.WCYCL2010NS.singularity2_gnu
- - PET_P8.ne4pg2_oQU480.WCYCL2010NS.singularity2_gnu
- - PEM_P8.ne4pg2_oQU480.WCYCL2010NS.singularity2_gnu
+ test:
+ - SMS_D_Ld1_P8.ne4pg2_oQU480.WCYCL2010NS.ghci-oci_gnu
+ - ERS_Ld3_P8.ne4pg2_oQU480.WCYCL2010NS.ghci-oci_gnu.allactive-wcprod_1850
container:
- image: ghcr.io/mahf708/e3sm-imgs:v0.0.9
+ image: ghcr.io/e3sm-project/containers-ghci:ghci-0.1.0
steps:
-
@@ -42,10 +36,6 @@ jobs:
name: CIME
working-directory: cime/scripts
run: |
- mkdir -p $HOME/projects/e3sm/cesm-inputdata/atm/cam/physprops/
- wget https://web.lcrc.anl.gov/public/e3sm/inputdata/atm/cam/physprops/p3_lookup_table_1.dat-v4.1.2
- mv p3_lookup_table_1.dat-v4.1.2 $HOME/projects/e3sm/cesm-inputdata/atm/cam/physprops/
- export USER=test
./create_test ${{ matrix.test }} --wait --debug
-
name: Artifacts
@@ -54,7 +44,7 @@ jobs:
with:
name: ${{ matrix.test }}
path: |
- ~/projects/e3sm/scratch/${{ matrix.test }}*/TestStatus.log
- ~/projects/e3sm/scratch/${{ matrix.test }}*/bld/*.bldlog.*
- ~/projects/e3sm/scratch/${{ matrix.test }}*/run/*.log.*
- ~/projects/e3sm/scratch/${{ matrix.test }}*/run/*.cprnc.out
+ /projects/e3sm/scratch/${{ matrix.test }}*/TestStatus.log
+ /projects/e3sm/scratch/${{ matrix.test }}*/bld/*.bldlog.*
+ /projects/e3sm/scratch/${{ matrix.test }}*/run/*.log.*
+ /projects/e3sm/scratch/${{ matrix.test }}*/run/*.cprnc.out
diff --git a/.github/workflows/e3sm-gh-pages.yml b/.github/workflows/e3sm-gh-pages.yml
index 709fecc623a..ebd2ac9c1e9 100644
--- a/.github/workflows/e3sm-gh-pages.yml
+++ b/.github/workflows/e3sm-gh-pages.yml
@@ -30,10 +30,10 @@ jobs:
submodules: true
- name: Show action trigger
run: echo "= The job was automatically triggered by a ${{github.event_name}} event on repo ${{github.event.repository.name}}."
- - name: Set up Python 3.10
- uses: actions/setup-python@v5.2.0
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.11"
- name: Install python deps
run: python3 -m pip install mkdocs-material pymdown-extensions mkdocs-monorepo-plugin mdutils mkdocs-bibtex
# build every time (PR or push to master)
diff --git a/.github/workflows/e3sm-gh-tools-mkatmsrffile-test.yml b/.github/workflows/e3sm-gh-tools-mkatmsrffile-test.yml
new file mode 100644
index 00000000000..8fe212886d9
--- /dev/null
+++ b/.github/workflows/e3sm-gh-tools-mkatmsrffile-test.yml
@@ -0,0 +1,86 @@
+name: mkatmsrffile
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'components/eam/tools/mkatmsrffile/mkatmsrffile.py'
+ schedule:
+ - cron: '00 15 * * 2'
+ workflow_dispatch:
+
+jobs:
+ mkatmsrffile-test:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ shell: bash -l {0}
+ outputs:
+ event_name: ${{ github.event_name }}
+ steps:
+ -
+ name: Repository checkout
+ uses: actions/checkout@v4
+ with:
+ show-progress: false
+ submodules: false
+ -
+ name: Conda setup
+ uses: conda-incubator/setup-miniconda@v3
+ with:
+ activate-environment: "envmkatmsrffile"
+ miniforge-variant: Mambaforge
+ miniforge-version: latest
+ use-mamba: true
+ mamba-version: "*"
+ channel-priority: strict
+ auto-update-conda: true
+ python-version: 3.11
+ -
+ name: Install dependencies
+ run: |
+ echo $CONDA_PREFIX
+ mamba install -y nco xarray numba numpy netcdf4
+ -
+ name: Run tests
+ working-directory: components/eam/tools/mkatmsrffile
+ run: |
+ echo $CONDA_PREFIX
+ wget https://web.lcrc.anl.gov/public/e3sm/inputdata/atm/cam/chem/trop_mozart/dvel/clim_soilw.nc
+ wget https://web.lcrc.anl.gov/public/e3sm/inputdata/atm/cam/chem/trop_mozart/dvel/regrid_vegetation.nc
+ wget https://web.lcrc.anl.gov/public/e3sm/inputdata/atm/cam/chem/trop_mozart/dvel/map_1x1_to_ne30pg2_traave_c20240903.nc
+ python mkatmsrffile.py --map_file=map_1x1_to_ne30pg2_traave_c20240903.nc --vegetation_file=regrid_vegetation.nc --soil_water_file=clim_soilw.nc --dst_grid=ne30pg2
+
+ mkatmsrffile-notify:
+ needs: mkatmsrffile-test
+ if: ${{ failure() && needs.mkatmsrffile-test.outputs.event_name != 'pull_request' }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Create issue
+ run: |
+ previous_issue_number=$(gh issue list \
+ --label "$LABELS" \
+ --json number \
+ --jq '.[0].number')
+ if [[ -n $previous_issue_number ]]; then
+ gh issue comment "$previous_issue_number" \
+ --body "$BODY"
+ else
+ gh issue create \
+ --title "$TITLE" \
+ --assignee "$ASSIGNEES" \
+ --label "$LABELS" \
+ --body "$BODY"
+ fi
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GH_REPO: ${{ github.repository }}
+ TITLE: mkatmsrffile test failure
+ ASSIGNEES: whannah1
+ LABELS: bug,notify-mkatmsrffile-gh-action
+ BODY: |
+ Workflow failed! There's likely an issue in the mkatmsrffile tool! For more information, please see:
+ - Workflow URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (number ${{ github.run_number }}, attempt ${{ github.run_attempt }})
+ - Workflow SHA: ${{ github.sha }}
diff --git a/.github/workflows/eamxx-gh-pages.yml b/.github/workflows/eamxx-gh-pages.yml
index 7c9da3264d6..2ce70d97843 100644
--- a/.github/workflows/eamxx-gh-pages.yml
+++ b/.github/workflows/eamxx-gh-pages.yml
@@ -54,7 +54,7 @@ jobs:
echo "= The job was automatically triggered by a ${{github.event_name}} event."
- name: Set up Python 3.11
- uses: actions/setup-python@v5.2.0
+ uses: actions/setup-python@v5
with:
python-version: "3.11"
diff --git a/.github/workflows/eamxx_default_files.yml b/.github/workflows/eamxx_default_files.yml
index 8decb315c9e..d3971758991 100644
--- a/.github/workflows/eamxx_default_files.yml
+++ b/.github/workflows/eamxx_default_files.yml
@@ -5,6 +5,8 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
+ paths:
+ - 'components/eamxx/cime_config/namelist_defaults_scream.xml'
schedule:
- cron: '00 00 * * *'
workflow_dispatch:
@@ -22,7 +24,7 @@ jobs:
show-progress: false
submodules: false
- name: Set up Python 3.11
- uses: actions/setup-python@v5.2.0
+ uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Run unit tests
diff --git a/cime b/cime
index f903115718e..0cdd4b1c5c5 160000
--- a/cime
+++ b/cime
@@ -1 +1 @@
-Subproject commit f903115718ebc30669ce557f511abaef231a1d88
+Subproject commit 0cdd4b1c5c5eb2e29c6ec64667724af434847bcf
diff --git a/cime_config/allactive/config_compsets.xml b/cime_config/allactive/config_compsets.xml
index 21032c48371..e66f1e473d8 100755
--- a/cime_config/allactive/config_compsets.xml
+++ b/cime_config/allactive/config_compsets.xml
@@ -86,23 +86,65 @@
20TRSOI_EAM%CMIP6_ELM%CNPRDCTCBCTOP_MPASSI_MPASO_MOSART_SGLC_SWAV
+
+
+
+ WCYCL20TR-GHG
+ 20TRSOI_EAM%CMIP6-GHG_ELM%CNPRDCTCBCTOP_MPASSI_MPASO_MOSART_SGLC_SWAV
+
+
+
+ WCYCL20TR-aer
+ 20TRSOI_EAM%CMIP6-AER_ELM%CNPRDCTCBCTOP_MPASSI_MPASO_MOSART_SGLC_SWAV
+
+
+
+ WCYCL20TR-xGHG-xaer
+ 20TRSOI_EAM%CMIP6-xGHG-xAER_ELM%CNPRDCTCBCTOP_MPASSI_MPASO_MOSART_SGLC_SWAV
+
+
+
+ WCYCL20TR-nat
+ 20TRSOI_EAM%CMIP6-NAT_ELM%CNPRDCTCBCTOP_MPASSI_MPASO_MOSART_SGLC_SWAV
+
+
+
+ WCYCL20TR-ozone
+ 20TRSOI_EAM%CMIP6-OZONE_ELM%CNPRDCTCBCTOP_MPASSI_MPASO_MOSART_SGLC_SWAV
+
+
+
+ WCYCL20TR-lulc
+ 20TRSOI_EAM%CMIP6-LULC_ELM%CNPRDCTCBCTOP_MPASSI_MPASO_MOSART_SGLC_SWAV
+
+
+
+ WCYCL20TR-volc
+ 20TRSOI_EAM%CMIP6-VOLC_ELM%CNPRDCTCBCTOP_MPASSI_MPASO_MOSART_SGLC_SWAV
+
+
+
+ WCYCL20TR-xaer
+ 20TRSOI_EAM%CMIP6-xAER_ELM%CNPRDCTCBCTOP_MPASSI_MPASO_MOSART_SGLC_SWAV
+
+
WCYCL1950-MMF1
- 1950SOI_EAM%CMIP6-MMF1_ELM%SPBC_MPASSI_MPASO_MOSART_SGLC_SWAV
+ 1950SOI_EAM%MMF1_ELM%SPBC_MPASSI_MPASO_MOSART_SGLC_SWAV
WCYCL20TR-MMF1
- 20TRSOI_EAM%CMIP6-MMF1_ELM%SP_MPASSI_MPASO_MOSART_SGLC_SWAV
+ 20TRSOI_EAM%MMF1_ELM%SP_MPASSI_MPASO_MOSART_SGLC_SWAV
WCYCL20TRNS-MMF1
- 20TR_EAM%CMIP6-MMF1_ELM%SP_MPASSI_MPASO_MOSART_SGLC_SWAV
+ 20TR_EAM%MMF1_ELM%SP_MPASSI_MPASO_MOSART_SGLC_SWAV
diff --git a/cime_config/allactive/config_pesall.xml b/cime_config/allactive/config_pesall.xml
index e99230e7cb0..3392ad71ca1 100644
--- a/cime_config/allactive/config_pesall.xml
+++ b/cime_config/allactive/config_pesall.xml
@@ -1472,6 +1472,21 @@
+
+
+ sunspot|aurora: --compset BGC* --res ne30pg2_r05_IcoswISC30E3r5 on 2 nodes pure-MPI
+
+ -2
+ -2
+ -2
+ -2
+ -2
+ -2
+ -2
+ -2
+
+
+
@@ -1744,6 +1759,21 @@
+
+
+ allactive+sunspot|aurora: default, 96 mpi x 1 omp @ root 0
+
+ 96
+ 96
+ 96
+ 96
+ 96
+ 96
+ 96
+ 96
+
+
+
diff --git a/cime_config/config_files.xml b/cime_config/config_files.xml
index 281291798db..e88a9d68f62 100644
--- a/cime_config/config_files.xml
+++ b/cime_config/config_files.xml
@@ -348,6 +348,7 @@
$COMP_ROOT_DIR_ICE/cime_config/testdefs/testmods_dirs
$COMP_ROOT_DIR_ROF/cime_config/testdefs/testmods_dirs
$COMP_ROOT_DIR_ATM/cime_config/testdefs/testmods_dirs
+ $COMP_ROOT_DIR_ATM/cime_config/testdefs/testmods_dirs
$COMP_ROOT_DIR_OCN/cime_config/testdefs/testmods_dirs
$COMP_ROOT_DIR_ICE/cime_config/testdefs/testmods_dirs
$COMP_ROOT_DIR_WAV/cime_config/testdefs/testmods_dirs
diff --git a/cime_config/machines/Depends.oneapi-ifxgpu.cmake b/cime_config/machines/Depends.oneapi-ifxgpu.cmake
index 0dd35e56bcc..5a958df26eb 100644
--- a/cime_config/machines/Depends.oneapi-ifxgpu.cmake
+++ b/cime_config/machines/Depends.oneapi-ifxgpu.cmake
@@ -1,14 +1,5 @@
-set(CPPDEFS "${CPPDEFS} -DMPAS_OPENMP_OFFLOAD")
-list(APPEND MPAS_ADD_ACC_FLAGS
- ${CMAKE_BINARY_DIR}/core_seaice/shared/mpas_seaice_mesh_pool.f90
- ${CMAKE_BINARY_DIR}/core_seaice/shared/mpas_seaice_velocity_solver_variational.f90
- ${CMAKE_BINARY_DIR}/core_seaice/shared/mpas_seaice_velocity_solver.f90
-)
-
-foreach(ITEM IN LISTS MPAS_ADD_ACC_FLAGS)
- e3sm_add_flags("${ITEM}" "-fiopenmp -fopenmp-targets=spir64")
-endforeach()
-
# compile mpas_seaice_core_interface.f90 with ifort, not ifx
-e3sm_add_flags("${CMAKE_BINARY_DIR}/core_seaice/model_forward/mpas_seaice_core_interface.f90" "-fc=ifort")
+if (NOT MPILIB STREQUAL "openmpi")
+ e3sm_add_flags("${CMAKE_BINARY_DIR}/core_seaice/model_forward/mpas_seaice_core_interface.f90" "-fc=ifort")
+endif()
diff --git a/cime_config/machines/cmake_macros/amdclang_frontier.cmake b/cime_config/machines/cmake_macros/amdclang_frontier.cmake
index 2df5074d11f..3727164933d 100644
--- a/cime_config/machines/cmake_macros/amdclang_frontier.cmake
+++ b/cime_config/machines/cmake_macros/amdclang_frontier.cmake
@@ -9,4 +9,7 @@ string(APPEND CPPDEFS " -DLINUX")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{CRAY_LIBSCI_PREFIX_DIR}/lib -lsci_amd")
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L/opt/cray/pe/gcc/12.2.0/snos/lib64 -lgfortran -lstdc++")
+
+# to support Fortran specific compiler intrinsic functions
+set(E3SM_LINK_WITH_FORTRAN "TRUE")
diff --git a/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake b/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake
index 6f3c0074798..4412ea0de7b 100644
--- a/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake
@@ -1,8 +1,8 @@
set(MPICC "cc")
-set(MPICXX "CC")
+set(MPICXX "mpicxx")
set(MPIFC "ftn")
set(SCC "cc")
-set(SCXX "CC")
+set(SCXX "hipcc")
set(SFC "ftn")
string(APPEND CPPDEFS " -DLINUX")
@@ -14,13 +14,12 @@ string(APPEND CMAKE_CXX_FLAGS_RELEASE " -O2")
string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -O2")
string(APPEND SPIO_CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
-string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{CRAY_LIBSCI_PREFIX_DIR}/lib -lsci_amd")
-set(MPICXX "hipcc")
-set(SCXX "hipcc")
-string(APPEND CMAKE_CXX_FLAGS " -I$ENV{MPICH_DIR}/include --offload-arch=gfx90a")
-string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{MPICH_DIR}/lib -lmpi -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa")
+string(APPEND CMAKE_CXX_FLAGS " --offload-arch=gfx90a")
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa")
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L/opt/cray/pe/gcc/12.2.0/snos/lib64 -lgfortran -lstdc++")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On")
set(USE_HIP "TRUE")
string(APPEND CMAKE_HIP_FLAGS "${CXXFLAGS} -munsafe-fp-atomics -x hip")
+set(E3SM_LINK_WITH_FORTRAN "TRUE")
diff --git a/cime_config/machines/cmake_macros/crayclang_frontier.cmake b/cime_config/machines/cmake_macros/crayclang_frontier.cmake
index 6c8d4164cb2..76ec41bdbe7 100644
--- a/cime_config/machines/cmake_macros/crayclang_frontier.cmake
+++ b/cime_config/machines/cmake_macros/crayclang_frontier.cmake
@@ -16,5 +16,7 @@ string(APPEND CMAKE_Fortran_FLAGS " -hipa0 -hzero")
# Scorpio installs
string(APPEND CMAKE_Fortran_FLAGS " -em -ef")
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L/opt/cray/pe/gcc/12.2.0/snos/lib64 -lgfortran -lstdc++")
+
# to support Fortran specific compiler intrinsic functions
set(E3SM_LINK_WITH_FORTRAN "TRUE")
diff --git a/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake b/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake
index 32f125947b5..a37ccde439e 100644
--- a/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake
@@ -1,5 +1,6 @@
set(MPICC "cc")
-set(MPICXX "hipcc")
+set(MPICXX "mpicxx")
+#set(MPICXX "CC")
set(MPIFC "ftn")
set(SCC "cc")
set(SCXX "hipcc")
@@ -33,7 +34,7 @@ set(HAS_F2008_CONTIGUOUS "TRUE")
# -Wl,--allow-shlib-undefined was added to address rocm 5.4.3 Fortran linker issue:
# /opt/rocm-5.4.3/lib/libhsa-runtime64.so.1: undefined reference to `std::condition_variable::wait(std::unique_lock&)@GLIBCXX_3.4.30'
# AMD started building with GCC 12.2.0, which brings in a GLIBCXX symbol that isn't in CCE's default GCC toolchain.
-string(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,--allow-multiple-definition -Wl,--allow-shlib-undefined")
+#string(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,--allow-multiple-definition -Wl,--allow-shlib-undefined")
# Switching to O3 for performance benchmarking
# Will revisit any failing tests
@@ -53,11 +54,13 @@ string(APPEND CMAKE_Fortran_FLAGS " -hipa0 -hzero -em -ef -hnoacc")
string(APPEND SPIO_CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
-string(APPEND CMAKE_CXX_FLAGS " -I$ENV{MPICH_DIR}/include --offload-arch=gfx90a")
-string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{MPICH_DIR}/lib -lmpi -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa")
+string(APPEND CMAKE_CXX_FLAGS " --offload-arch=gfx90a")
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa")
string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{ROCM_PATH}/lib -lamdhip64")
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L/opt/cray/pe/gcc/12.2.0/snos/lib64 -lgfortran -lstdc++")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On")
set(USE_HIP "TRUE")
string(APPEND CMAKE_HIP_FLAGS "${CXXFLAGS} -munsafe-fp-atomics -x hip")
+set(E3SM_LINK_WITH_FORTRAN "TRUE")
diff --git a/cime_config/machines/cmake_macros/gnu_frontier.cmake b/cime_config/machines/cmake_macros/gnu_frontier.cmake
index 9b242243989..ee44a2ca08f 100644
--- a/cime_config/machines/cmake_macros/gnu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/gnu_frontier.cmake
@@ -13,3 +13,8 @@ string(APPEND CMAKE_Fortran_FLAGS " -Wno-implicit-interface")
string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -O2")
string(APPEND CMAKE_C_FLAGS_RELEASE " -O2")
+
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L/opt/cray/pe/gcc/12.2.0/snos/lib64 -lgfortran -lstdc++")
+
+# to support Fortran specific compiler intrinsic functions
+set(E3SM_LINK_WITH_FORTRAN "TRUE")
diff --git a/cime_config/machines/cmake_macros/gnugpu_frontier.cmake b/cime_config/machines/cmake_macros/gnugpu_frontier.cmake
index 174f8207d0d..6ca4b83d9c2 100644
--- a/cime_config/machines/cmake_macros/gnugpu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_frontier.cmake
@@ -1,6 +1,6 @@
set(MPICC "cc")
-set(MPICXX "hipcc") # Needs MPICH_CXX to use hipcc
-set(MPIFC "ftn") # Linker needs to be the Cray wrapper ftn, not mpif90
+set(MPICXX "mpicxx")
+set(MPIFC "ftn")
set(SCC "cc")
set(SCXX "hipcc")
set(SFC "ftn")
@@ -16,11 +16,17 @@ string(APPEND CMAKE_CXX_FLAGS_RELEASE " -O2")
string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -O2")
string(APPEND SPIO_CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
-set(E3SM_LINK_WITH_FORTRAN "TRUE")
-string(APPEND CMAKE_CXX_FLAGS " -I$ENV{MPICH_DIR}/include --offload-arch=gfx90a")
-string(APPEND CMAKE_EXE_LINKER_FLAGS " -L/opt/cray/pe/gcc/11.2.0/snos/lib64/ -lgfortran -L/opt/rocm-5.4.0/lib -lhsa-runtime64 -L$ENV{MPICH_DIR}/lib -lmpi -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa ")
+string(APPEND CMAKE_CXX_FLAGS " --offload-arch=gfx90a")
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa")
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L$ENV{ROCM_PATH}/lib -lamdhip64")
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -L/opt/cray/pe/gcc/12.2.0/snos/lib64 -lgfortran -lstdc++")
+#
+#string(APPEND CMAKE_EXE_LINKER_FLAGS " -L/opt/rocm-5.4.0/lib -lhsa-runtime64 -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa ")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On -DKokkos_ENABLE_OPENMP=Off")
set(USE_HIP "TRUE")
string(APPEND CMAKE_HIP_FLAGS "${CXXFLAGS} -munsafe-fp-atomics -x hip")
+
+
+set(E3SM_LINK_WITH_FORTRAN "TRUE")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifx.cmake b/cime_config/machines/cmake_macros/oneapi-ifx.cmake
index e98a65d32a6..9ab0cdda7d5 100644
--- a/cime_config/machines/cmake_macros/oneapi-ifx.cmake
+++ b/cime_config/machines/cmake_macros/oneapi-ifx.cmake
@@ -7,7 +7,7 @@ endif()
string(APPEND CMAKE_C_FLAGS_RELEASE " -O2")
string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -O2")
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -O2")
-string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created")
+string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -O0 -g -fpe0")
string(APPEND CMAKE_C_FLAGS_DEBUG " -O0 -g")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -O0 -g")
string(APPEND CMAKE_C_FLAGS " -fp-model precise -std=gnu99")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifxgpu.cmake b/cime_config/machines/cmake_macros/oneapi-ifxgpu.cmake
index 9d08ca6c630..d7dfae00219 100644
--- a/cime_config/machines/cmake_macros/oneapi-ifxgpu.cmake
+++ b/cime_config/machines/cmake_macros/oneapi-ifxgpu.cmake
@@ -7,7 +7,7 @@ endif()
string(APPEND CMAKE_C_FLAGS_RELEASE " -O2")
string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -O2")
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -O2")
-string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created")
+string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -O0 -g -fpe0")
string(APPEND CMAKE_C_FLAGS_DEBUG " -O0 -g")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -O0 -g")
string(APPEND CMAKE_C_FLAGS " -fp-model precise -std=gnu99")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifxgpu_aurora.cmake b/cime_config/machines/cmake_macros/oneapi-ifxgpu_aurora.cmake
index 47d513408c2..6835515164f 100644
--- a/cime_config/machines/cmake_macros/oneapi-ifxgpu_aurora.cmake
+++ b/cime_config/machines/cmake_macros/oneapi-ifxgpu_aurora.cmake
@@ -3,5 +3,5 @@ string(APPEND CMAKE_EXE_LINKER_FLAGS " -lmkl_intel_lp64 -lmkl_sequential -lmkl_c
if (compile_threaded)
string(APPEND CMAKE_EXE_LINKER_FLAGS " -fiopenmp -fopenmp-targets=spir64")
endif()
-string(APPEND KOKKOS_OPTIONS " -DCMAKE_CXX_STANDARD=17 -DKokkos_ENABLE_SERIAL=On -DKokkos_ARCH_INTEL_PVC=On -DKokkos_ENABLE_SYCL=On -DKokkos_ENABLE_EXPLICIT_INSTANTIATION=Off")
string(APPEND SYCL_FLAGS " -\-intel -fsycl -fsycl-targets=spir64_gen -mlong-double-64 -Xsycl-target-backend \"-device 12.60.7\"")
+string(APPEND CMAKE_CXX_FLAGS " -Xclang -fsycl-allow-virtual-functions")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifxgpu_sunspot.cmake b/cime_config/machines/cmake_macros/oneapi-ifxgpu_sunspot.cmake
new file mode 100644
index 00000000000..6835515164f
--- /dev/null
+++ b/cime_config/machines/cmake_macros/oneapi-ifxgpu_sunspot.cmake
@@ -0,0 +1,7 @@
+
+string(APPEND CMAKE_EXE_LINKER_FLAGS " -lmkl_intel_lp64 -lmkl_sequential -lmkl_core")
+if (compile_threaded)
+ string(APPEND CMAKE_EXE_LINKER_FLAGS " -fiopenmp -fopenmp-targets=spir64")
+endif()
+string(APPEND SYCL_FLAGS " -\-intel -fsycl -fsycl-targets=spir64_gen -mlong-double-64 -Xsycl-target-backend \"-device 12.60.7\"")
+string(APPEND CMAKE_CXX_FLAGS " -Xclang -fsycl-allow-virtual-functions")
diff --git a/cime_config/machines/config_batch.xml b/cime_config/machines/config_batch.xml
index 448eefece21..13cfdfb337b 100644
--- a/cime_config/machines/config_batch.xml
+++ b/cime_config/machines/config_batch.xml
@@ -562,7 +562,7 @@
- /lus/gecko/projects/CSC249ADSE15_CNDA/tools/qsub/throttle
+ /lus/flare/projects/CSC249ADSE15_CNDA/tools/qsub/throttle
EarlyAppAccess
workq-route
diff --git a/cime_config/machines/config_machines.xml b/cime_config/machines/config_machines.xml
index 889fc03834e..f9e08fb444e 100644
--- a/cime_config/machines/config_machines.xml
+++ b/cime_config/machines/config_machines.xml
@@ -973,7 +973,7 @@
Frontier exascale supercomputer at ORNL. 9408 nodes, Node: 4 AMD MI250X GPUs (2 GCDs) ~ 8 GPUs, 512 GB HDB2E, AMD EPYC 64 cores, 512GB DDR4
.*frontier.*
Linux
- crayclang,gnu,amdclang,gnugpu,crayclanggpu,amdclanggpu
+ gnu,amdclang,crayclang,gnugpu,amdclanggpu,crayclanggpu
mpich
cli115
/lustre/orion/cli115/world-shared/frontier
@@ -1035,8 +1035,7 @@
PrgEnv-cray PrgEnv-gnu/8.3.3
-
- gcc gcc/11.2.0
+ gcc gcc/12.2.0
craype-accel-amd-gfx90a
@@ -1044,6 +1043,7 @@
cray-python/3.9.13.1
+ cray-libsci
subversion/1.14.1
git/2.36.1
cmake/3.21.3
@@ -1059,14 +1059,12 @@
0.25
0
+ $ENV{CRAY_LIBSCI_PREFIX_DIR}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}
$ENV{NETCDF_DIR}
$ENV{PNETCDF_DIR}
-
- $ENV{CRAY_LIBSCI_DIR}/amd/4.0/x86_64/lib:$ENV{LD_LIBRARY_PATH}
-
--ntasks-per-gpu=$SHELL{echo "`./xmlquery --value MAX_MPITASKS_PER_NODE`/8"|bc}
--gpu-bind=closest
@@ -1083,6 +1081,9 @@
spread
threads
+
@@ -1704,17 +1706,17 @@
-
- Singularity container 2.0
- singularity2
+
+ OCI-based container
+ ghci-oci
LINUX
gnu
mpich
- $ENV{HOME}/projects/e3sm/scratch
- $ENV{HOME}/projects/e3sm/cesm-inputdata
- $ENV{HOME}/projects/e3sm/ptclm-data
- $ENV{HOME}/projects/e3sm/scratch/archive/$CASE
- $ENV{HOME}/projects/e3sm/baselines/$COMPILER
+ /projects/e3sm/scratch
+ /projects/e3sm/inputdata
+ /projects/e3sm/ptclm-data
+ /projects/e3sm/scratch/archive/$CASE
+ /projects/e3sm/baselines/$COMPILER
/usr/local/packages/bin/cprnc
make
4
@@ -1730,8 +1732,8 @@
- $ENV{HOME}/projects/e3sm/scratch/$CASE/run
- $ENV{HOME}/projects/e3sm/scratch/$CASE/bld
+ /projects/e3sm/scratch/$CASE/run
+ /projects/e3sm/scratch/$CASE/bld
$SRCROOT
@@ -1851,31 +1853,33 @@
- /projects/sems/install/rhel7-x86_64/sems/v2/lmod/lmod/8.3/gcc/10.1.0/zbzzu7k/lmod/lmod/init/env_modules_python.py
- /projects/sems/install/rhel7-x86_64/sems/v2/lmod/lmod/8.3/gcc/10.1.0/zbzzu7k/lmod/lmod/init/perl
- /projects/sems/install/rhel7-x86_64/sems/v2/lmod/lmod/8.3/gcc/10.1.0/zbzzu7k/lmod/lmod/init/sh
- /projects/sems/install/rhel7-x86_64/sems/v2/lmod/lmod/8.3/gcc/10.1.0/zbzzu7k/lmod/lmod/init/csh
- /projects/sems/install/rhel7-x86_64/sems/v2/lmod/lmod/8.3/gcc/10.1.0/zbzzu7k/lmod/lmod/libexec/lmod python
- /projects/sems/install/rhel7-x86_64/sems/v2/lmod/lmod/8.3/gcc/10.1.0/zbzzu7k/lmod/lmod/libexec/lmod perl
+ /projects/sems/install/rhel9-x86_64/sems/lmod/lmod/8.7.24/gcc/11.4.1/base/lnirq74/lmod/lmod/init/env_modules_python.py
+ /projects/sems/install/rhel9-x86_64/sems/lmod/lmod/8.7.24/gcc/11.4.1/base/lnirq74/lmod/lmod/init/perl
+ /projects/sems/install/rhel9-x86_64/sems/lmod/lmod/8.7.24/gcc/11.4.1/base/lnirq74/lmod/lmod/init/sh
+ /projects/sems/install/rhel9-x86_64/sems/lmod/lmod/8.7.24/gcc/11.4.1/base/lnirq74/lmod/lmod/init/csh
+ /projects/sems/install/rhel9-x86_64/sems/lmod/lmod/8.7.24/gcc/11.4.1/base/lnirq74/lmod/lmod/libexec/lmod python
+ /projects/sems/install/rhel9-x86_64/sems/lmod/lmod/8.7.24/gcc/11.4.1/base/lnirq74/lmod/lmod/libexec/lmod perl
module
module
- sems-archive-env
- acme-env
- sems-archive-git
- acme-cmake/3.26.3
+ sems-git/2.42.0
+ sems-cmake/3.27.9
- acme-gcc/11.2.0
+ sems-gcc/11.4.0
+ sems-openblas
- acme-netcdf/4.4.1/exo_acme
- acme-pfunit/3.2.8/base
+ sems-netcdf-c-serial/4.9.2
+ sems-netcdf-fortran-serial/4.6.1
- acme-openmpi/4.1.4
- acme-netcdf/4.7.4/acme
+ sems-openmpi-no-cuda/4.1.6
+ sems-netcdf-c/4.9.2
+ sems-netcdf-cxx/4.2
+ sems-netcdf-fortran/4.6.1
+ sems-parallel-netcdf/1.12.3
$CIME_OUTPUT_ROOT/$CASE/run
@@ -1884,13 +1888,18 @@
0
- $ENV{SEMS_NETCDF_ROOT}
+ $ENV{NETCDF_C_ROOT}
+ $ENV{NETCDF_FORTRAN_ROOT}
+ $ENV{OPENBLAS_ROOT}
64M
spread
threads
- Generic
+ OpenBLAS
4000MB
+
+ $ENV{PARALLEL_NETCDF_ROOT}
+
@@ -3357,7 +3366,7 @@
uan-.*
LINUX
oneapi-ifx,oneapi-ifxgpu,gnu
- mpich,impi,openmpi
+ mpich
CSC249ADSE15_CNDA
/gila/CSC249ADSE15_CNDA/performance_archive
.*
@@ -3377,7 +3386,7 @@
104
104
104
- 12
+ 48
FALSE
mpiexec
@@ -3390,13 +3399,6 @@
$ENV{GPU_TILE_COMPACT}
-
- mpirun
-
- --tag-output -n {{ total_tasks }}
- --map-by ppr:{{ tasks_per_numa }}:socket:PE=$ENV{OMP_NUM_THREADS} --bind-to hwthread
-
-
/soft/packaging/lmod/lmod/init/sh
/soft/packaging/lmod/lmod/init/csh
@@ -3405,14 +3407,13 @@
module
/soft/packaging/lmod/lmod/libexec/lmod python
-
- /soft/modulefiles
- spack cmake/3.26.3-gcc-11.2.0-vnn7ncx
- prepend-deps/default
+ cmake
- gcc
- oneapi/eng-compiler/2023.05.15.007
+ oneapi/eng-compiler/2024.04.15.002
+
+
+ kokkos/git.7ff87a5-omp-sycl
spack cmake
@@ -3430,12 +3431,6 @@
1
-
- 10
- omp
- spread
- unit
-
level_zero:gpu
NO_GPU
@@ -3448,6 +3443,9 @@
/soft/tools/mpi_wrapper_utils/gpu_tile_compact.sh
131072
20
+ $ENV{KOKKOS_ROOT}
+ 1
+ 0:4,1:4,2:4,3:4:4:4,5:4,6:4,7:4
0
@@ -3477,14 +3475,14 @@
oneapi-ifx,oneapi-ifxgpu,gnu
mpich
CSC249ADSE15_CNDA
- /lus/gecko/projects/CSC249ADSE15_CNDA/performance_archive
+ /lus/flare/projects/CSC249ADSE15_CNDA/performance_archive
.*
- /lus/gecko/projects/CSC249ADSE15_CNDA/$USER/scratch
- /lus/gecko/projects/CSC249ADSE15_CNDA/inputdata
- /lus/gecko/projects/CSC249ADSE15_CNDA/inputdata/atm/datm7
+ /lus/flare/projects/CSC249ADSE15_CNDA/$USER/scratch
+ /lus/flare/projects/CSC249ADSE15_CNDA/inputdata
+ /lus/flare/projects/CSC249ADSE15_CNDA/inputdata/atm/datm7
$CIME_OUTPUT_ROOT/archive/$CASE
- /lus/gecko/projects/CSC249ADSE15_CNDA/baselines/$COMPILER
- /lus/gecko/projects/CSC249ADSE15_CNDA/tools/cprnc/cprnc
+ /lus/flare/projects/CSC249ADSE15_CNDA/baselines/$COMPILER
+ /lus/flare/projects/CSC249ADSE15_CNDA/tools/cprnc/cprnc
16
e3sm_developer
4
@@ -3493,54 +3491,48 @@
208
104
104
- 12
- FALSE
+ 48
+ FALSE
mpiexec
-np {{ total_tasks }} --label
-ppn {{ tasks_per_node }}
- --cpu-bind $ENV{RANKS_BIND} -envall
+ -envall
-d $ENV{OMP_NUM_THREADS}
$ENV{GPU_TILE_COMPACT}
- /lus/gecko/projects/CSC249ADSE15_CNDA/modules/lmod.sh
+ /lus/flare/projects/CSC249ADSE15_CNDA/modules/lmod.sh
/soft/sunspot_migrate/soft/packaging/lmod/lmod/init/csh
/soft/sunspot_migrate/soft/packaging/lmod/lmod/init/env_modules_python.py
module
module
/soft/sunspot_migrate/soft/packaging/lmod/lmod/libexec/lmod python
-
- /soft/modulefiles
- /soft/restricted/CNDA/updates/modulefiles
- spack-pe-gcc cmake
+ cmake
- oneapi/eng-compiler/2023.05.15.007
+ oneapi/eng-compiler/2024.04.15.002
+
+
+ kokkos/git.7ff87a5-omp-sycl
spack-pe-gcc cmake
gcc/10.3.0
-
- cray-pals
- libfabric/1.15.2.0
- cray-libpals/1.3.2
-
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
- /lus/gecko/projects/CSC249ADSE15_CNDA/software/netcdf-c/4.9.2/oneapi.eng.2023.05.15.007
- /lus/gecko/projects/CSC249ADSE15_CNDA/software/netcdf-fortran/4.6.1/oneapi.eng.2023.05.15.007
- /lus/gecko/projects/CSC249ADSE15_CNDA/software/pnetcdf/1.12.3/oneapi.eng.2023.05.15.007
- /lus/gecko/projects/CSC249ADSE15_CNDA/software/pnetcdf/1.12.3/oneapi.eng.2023.05.15.007/lib:/lus/gecko/projects/CSC249ADSE15_CNDA/software/netcdf-fortran/4.6.1/oneapi.eng.2023.05.15.007/lib:/lus/gecko/projects/CSC249ADSE15_CNDA/software/netcdf-c/4.9.2/oneapi.eng.2023.05.15.007/lib:$ENV{LD_LIBRARY_PATH}
- /lus/gecko/projects/CSC249ADSE15_CNDA/software/pnetcdf/1.12.3/oneapi.eng.2023.05.15.007/bin:/lus/gecko/projects/CSC249ADSE15_CNDA/software/netcdf-fortran/4.6.1/oneapi.eng.2023.05.15.007/bin:/lus/gecko/projects/CSC249ADSE15_CNDA/software/netcdf-c/4.9.2/oneapi.eng.2023.05.15.007/bin:$ENV{PATH}
- list:0-7,104-111:8-15,112-119:16-23,120-127:24-31,128-135:32-39,136-143:40-47,144-151:52-59,156-163:60-67,164-171:68-75,172-179:76-83,180-187:84-91,188-195:92-99,196-203
+ /lus/flare/projects/CSC249ADSE15_CNDA/software/netcdf-c/4.9.2/oneapi.eng.2024.04.15.002
+ /lus/flare/projects/CSC249ADSE15_CNDA/software/netcdf-fortran/4.6.1/oneapi.eng.2024.04.15.002
+ /lus/flare/projects/CSC249ADSE15_CNDA/software/pnetcdf/1.12.3/oneapi.eng.2024.04.15.002
+ /lus/flare/projects/CSC249ADSE15_CNDA/software/pnetcdf/1.12.3/oneapi.eng.2024.04.15.002/lib:/lus/flare/projects/CSC249ADSE15_CNDA/software/netcdf-fortran/4.6.1/oneapi.eng.2024.04.15.002/lib:/lus/flare/projects/CSC249ADSE15_CNDA/software/netcdf-c/4.9.2/oneapi.eng.2024.04.15.002/lib:$ENV{LD_LIBRARY_PATH}
+ /lus/flare/projects/CSC249ADSE15_CNDA/software/pnetcdf/1.12.3/oneapi.eng.2024.04.15.002/bin:/lus/flare/projects/CSC249ADSE15_CNDA/software/netcdf-fortran/4.6.1/oneapi.eng.2024.04.15.002/bin:/lus/flare/projects/CSC249ADSE15_CNDA/software/netcdf-c/4.9.2/oneapi.eng.2024.04.15.002/bin:$ENV{PATH}
1
@@ -3557,6 +3549,9 @@
/soft/tools/mpi_wrapper_utils/gpu_tile_compact.sh
131072
20
+ $ENV{KOKKOS_ROOT}
+ 1
+ 0:4,1:4,2:4,3:4:4:4,5:4,6:4,7:4
0
@@ -3869,7 +3864,7 @@
/compyfs/inputdata/atm/datm7
/compyfs/$USER/e3sm_scratch/archive/$CASE
/compyfs/e3sm_baselines/$COMPILER
- /compyfs/e3sm_baselines/cprnc/cprnc
+ /compyfs/e3sm_baselines/cprnc/cprnc.intel.v20.0.04/cprnc
8
e3sm_integration
4
@@ -3916,7 +3911,7 @@
gcc/8.1.0
- intel/19.0.5
+ intel/20.0.0
pgi/19.10
@@ -3925,7 +3920,7 @@
mvapich2/2.3.1
- intelmpi/2019u4
+ intelmpi/2020
intelmpi/2019u3
@@ -4290,7 +4285,7 @@
- Chicoma GPU nodes at LANL IC. Each GPU node has single
+ Chicoma GPU nodes at LANL IC. Each GPU node has single
AMD EPYC 7713 64-Core (Milan) (256GB) and 4 nvidia A100'
ch-fe*
Linux
diff --git a/cime_config/testmods_dirs/allactive/wcprod/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprod/user_nl_elm
index cd1adab7740..9224c77e0f0 100644
--- a/cime_config/testmods_dirs/allactive/wcprod/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprod/user_nl_elm
@@ -33,7 +33,7 @@ hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
-hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_elm
index cd1adab7740..9224c77e0f0 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850/user_nl_elm
@@ -33,7 +33,7 @@ hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
-hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_elm
index cd1adab7740..9224c77e0f0 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850_1pctCO2/user_nl_elm
@@ -33,7 +33,7 @@ hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
-hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_elm
index cd1adab7740..9224c77e0f0 100644
--- a/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprod_1850_4xCO2/user_nl_elm
@@ -33,7 +33,7 @@ hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
-hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_elm
index cd1adab7740..9224c77e0f0 100644
--- a/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprodrrm/user_nl_elm
@@ -33,7 +33,7 @@ hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
-hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_elm
index cd1adab7740..9224c77e0f0 100644
--- a/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprodrrm_1850/user_nl_elm
@@ -33,7 +33,7 @@ hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
-hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/cime_config/testmods_dirs/allactive/wcprodssp/user_nl_elm b/cime_config/testmods_dirs/allactive/wcprodssp/user_nl_elm
index 7bfdbac5c84..e2ac4d5d1ab 100644
--- a/cime_config/testmods_dirs/allactive/wcprodssp/user_nl_elm
+++ b/cime_config/testmods_dirs/allactive/wcprodssp/user_nl_elm
@@ -38,7 +38,7 @@
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
- hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+ hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/cime_config/testmods_dirs/config_pes_tests.xml b/cime_config/testmods_dirs/config_pes_tests.xml
index 080e496d205..1ac88ac5fe6 100644
--- a/cime_config/testmods_dirs/config_pes_tests.xml
+++ b/cime_config/testmods_dirs/config_pes_tests.xml
@@ -37,6 +37,8 @@
-4
-4
-4
+ -4
+ -4
-4
@@ -203,6 +205,23 @@
+
+
+
+ tests+anvil: --compset GMPAS-JRA1p5-DIB-PISMF, 8 nodes
+
+ -8
+ -8
+ -8
+ -8
+ -8
+ -8
+ -8
+ -8
+
+
+
+
diff --git a/cime_config/tests.py b/cime_config/tests.py
index 0c2f6f2647d..bce0c4fcc26 100644
--- a/cime_config/tests.py
+++ b/cime_config/tests.py
@@ -76,11 +76,10 @@
)
},
-
"e3sm_land_developer" : {
"share" : True,
"time" : "0:45:00",
- "inherit" : ("e3sm_mosart_developer", "e3sm_mosart_exenoshare", "e3sm_land_exeshare", "e3sm_land_exenoshare", "e3sm_land_debug", "fates_elm_developer"),
+ "inherit" : ("e3sm_mosart_developer", "e3sm_land_exeshare", "e3sm_land_exenoshare", "e3sm_land_debug", "fates_elm_developer"),
"tests" : (
"ERS.f19_f19.I1850ELMCN",
"ERS.f19_f19.I20TRELMCN",
@@ -95,6 +94,8 @@
"SMS.r05_r05.IELM.elm-topounit",
"ERS.ELM_USRDAT.I1850ELM.elm-usrdat",
"ERS.r05_r05.IELM.elm-lnd_rof_2way",
+ "ERS.ELM_USRDAT.I1850CNPRDCTCBC.elm-usrpft_default_I1850CNPRDCTCBC",
+ "ERS.ELM_USRDAT.I1850CNPRDCTCBC.elm-usrpft_codetest_I1850CNPRDCTCBC",
"ERS.r05_r05.IELM.elm-V2_ELM_MOSART_features",
"ERS.ELM_USRDAT.IELM.elm-surface_water_dynamics"
)
@@ -274,6 +275,7 @@
"ERS_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF.mpaso-jra_1958",
"PEM_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF.mpaso-jra_1958",
"SMS_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF-TMIX.mpaso-jra_1958",
+ "SMS_P480_Ld5.TL319_IcoswISC30E3r5.GMPAS-JRA1p5-DIB-PISMF-DSGR.mpaso-jra_1958",
)
},
@@ -302,7 +304,7 @@
"SMS.ne30_f19_g16_rx1.A",
"ERS_Ld5.T62_oQU120.CMPASO-NYF",
"ERS.f09_g16_g.MALISIA",
- "ERS_Ld5.TL319_oQU240wLI_ais20.MPAS_LISIO_JRA1p5.mpaso-ocn_glcshelf",
+ "ERS_Ld5.TL319_oQU240wLI_ais8to30.MPAS_LISIO_JRA1p5.mpaso-ocn_glcshelf",
"SMS_P12x2.ne4pg2_oQU480.WCYCL1850NS.allactive-mach_mods",
"ERS_Ln9.ne4pg2_ne4pg2.F2010-MMF1.eam-mmf_crmout",
)
@@ -321,6 +323,7 @@
"time" : "03:00:00",
"tests" : (
"ERS.ne4pg2_oQU480.WCYCL1850NS",
+ "ERS_Vmoab.ne4pg2_oQU480.WCYCL1850NS",
"SMS_D_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850.allactive-wcprod",
"SMS_D_Ld1.ne30pg2_r05_IcoswISC30E3r5.WCYCLSSP370.allactive-wcprodssp",
"ERS_Ld3.ne4pg2_oQU480.F2010",
@@ -337,6 +340,7 @@
"ERS_Ld3.ne30pg2_r05_IcoswISC30E3r5.WCYCL1850.allactive-nlmaps",
"SMS_D_Ld1.ne30pg2_r05_IcoswISC30E3r5.CRYO1850-DISMF",
"ERS.hcru_hcru.I20TRGSWCNPRDCTCBC.elm-erosion",
+ "ERS.ne30pg2_r05_IcoswISC30E3r5.GPMPAS-JRA.mosart-rof_ocn_2way",
)
},
diff --git a/components/eam/bld/namelist_files/namelist_definition.xml b/components/eam/bld/namelist_files/namelist_definition.xml
index b3ecb5e9290..8228c7d8d2e 100644
--- a/components/eam/bld/namelist_files/namelist_definition.xml
+++ b/components/eam/bld/namelist_files/namelist_definition.xml
@@ -5138,6 +5138,17 @@ Format: YYYY
Default: 0
+
+The cycle year of the volcanic SO2 forcing (3D emissions) data.
+Use this in place of ext_frc_cycle_yr if non-default, to allow different
+speciciations volcanic emission and aerosols/precursors, which may be
+invoked for single forcing simulation design.
+if ext_frc_volc_type is 'CYCLICAL'.
+Format: YYYY
+Default: -1
+
+
Default: current model date
@@ -5189,6 +5200,13 @@ Can be set to 'CYCLICAL', 'SERIAL', 'INTERP_MISSING_MONTHS', or 'FIXED'.
Default: 'CYCLICAL'
+
+Type of time interpolation for fixed lower boundary data. See also ext_frc_volc_cycle_yr.
+Can be set to 'NULL','CYCLICAL', 'SERIAL', 'INTERP_MISSING_MONTHS', or 'FIXED'.
+Default: 'NULL'
+
+
The cycle year of the fixed lower boundary data
diff --git a/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-GHG_chemUCI-Linoz-mam5-vbs.xml b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-GHG_chemUCI-Linoz-mam5-vbs.xml
new file mode 100644
index 00000000000..cd16d6a0d9a
--- /dev/null
+++ b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-GHG_chemUCI-Linoz-mam5-vbs.xml
@@ -0,0 +1,121 @@
+
+
+
+
+.true.
+
+
+.true.
+.true.
+.true.
+
+
+atm/cam/solar/Solar_1850control_input4MIPS_c20181106.nc
+18500101
+FIXED
+
+
+atm/cam/ggas/GHG_CMIP-1-2-0_Annual_Global_0000-2014_c20180105.nc
+RAMPED
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_NO2_aircraft_vertical_1750-2015_1.9x2.5_c20170608.nc
+
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_1850_2014_avg_so2_elev_strat_1850.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_elev_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_elev_1850-2014_c180205.nc
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H4_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H6_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C3H8_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH2O_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3CHO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3COCH3_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_MTERP_surface_1850-2014_1.9x2.5_c20230126.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_NO_surface_1850-2014_1.9x2.5_c20220425.nc
+atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160416.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_surf_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions_E90_surface_1750-2015_1.9x2.5_c20210408.nc
+
+
+
+
+CYCLICAL
+1849
+oxid_1.9x2.5_L26_1850-2015_c20181106.nc
+''
+atm/cam/chem/trop_mozart_aero/oxid
+'prsd_O3:O3','prsd_NO3:NO3','prsd_OH:OH'
+
+
+ch4_oxid_1.9x2.5_L26_1990-1999clim.c090804.nc
+atm/cam/chem/methane
+CYCLICAL
+1995
+''
+'prsd_ch4:CH4'
+
+
+
+ 'A:H2OLNZ:H2O', 'N:O2:O2', 'N:CO2:CO2',
+ 'A:O3:O3', 'A:N2OLNZ:N2O', 'A:CH4LNZ:CH4',
+ 'N:CFC11:CFC11', 'N:CFC12:CFC12',
+ 'M:mam5_mode1:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode1_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode2:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode2_rrtmg_c130628.nc',
+ 'M:mam5_mode3:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode3_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode4:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode4_rrtmg_c130628.nc',
+ 'M:mam5_mode5:$INPUTDATA_ROOT/atm/cam/physprops/mam5_mode5_rrtmg_sig1.2_dgnl.40_c03072023.nc'
+
+
+
+3
+1
+'atm/cam/chem/trop_mam/marine_BGC/'
+'CYCLICAL'
+'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc'
+0
+0
+'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC'
+
+
+atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_0003-2017_c20171114.nc
+18500101
+FIXED
+1850
+linv3_1849-2017_CMIP6_Hist_10deg_58km_c20230705.nc
+atm/cam/chem/trop_mozart/ub
+CYCLICAL
+
+
+SERIAL
+
+
+'xactive_lnd'
+'O3','H2O2','CH2O','CH3OOH','NO','NO2','HNO3','HO2NO2','PAN','CO','CH3COCH3','C2H5OOH','CH3CHO','H2SO4','SO2','NO3','N2O5','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'NEU'
+'C2H5OOH','CH2O','CH3CHO','CH3OOH','H2O2','H2SO4','HNO3','HO2NO2','SO2','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'CH2O', 'CH3O2', 'CH3OOH', 'PAN', 'CO', 'C2H6', 'C3H8', 'C2H4', 'ROHO2', 'CH3COCH3', 'C2H5O2', 'C2H5OOH', 'CH3CHO', 'CH3CO3', 'ISOP', 'ISOPO2', 'MVKMACR', 'MVKO2'
+''
+
diff --git a/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-LULC_chemUCI-Linoz-mam5-vbs.xml b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-LULC_chemUCI-Linoz-mam5-vbs.xml
new file mode 100644
index 00000000000..e2f53df4dc6
--- /dev/null
+++ b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-LULC_chemUCI-Linoz-mam5-vbs.xml
@@ -0,0 +1,124 @@
+
+
+
+
+.true.
+
+
+.true.
+.true.
+.true.
+
+
+atm/cam/solar/Solar_1850control_input4MIPS_c20181106.nc
+18500101
+FIXED
+
+
+
+808.249e-9
+273.0211e-9
+32.1102e-12
+0.0
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_NO2_aircraft_vertical_1750-2015_1.9x2.5_c20170608.nc
+
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_1850_2014_avg_so2_elev_strat_1850.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_elev_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_elev_1850-2014_c180205.nc
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H4_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H6_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C3H8_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH2O_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3CHO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3COCH3_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_MTERP_surface_1850-2014_1.9x2.5_c20230126.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_NO_surface_1850-2014_1.9x2.5_c20220425.nc
+atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160416.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_surf_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions_E90_surface_1750-2015_1.9x2.5_c20210408.nc
+
+
+
+
+CYCLICAL
+1849
+oxid_1.9x2.5_L26_1850-2015_c20181106.nc
+''
+atm/cam/chem/trop_mozart_aero/oxid
+'prsd_O3:O3','prsd_NO3:NO3','prsd_OH:OH'
+
+
+ch4_oxid_1.9x2.5_L26_1990-1999clim.c090804.nc
+atm/cam/chem/methane
+CYCLICAL
+1995
+''
+'prsd_ch4:CH4'
+
+
+
+ 'A:H2OLNZ:H2O', 'N:O2:O2', 'N:CO2:CO2',
+ 'A:O3:O3', 'A:N2OLNZ:N2O', 'A:CH4LNZ:CH4',
+ 'N:CFC11:CFC11', 'N:CFC12:CFC12',
+ 'M:mam5_mode1:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode1_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode2:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode2_rrtmg_c130628.nc',
+ 'M:mam5_mode3:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode3_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode4:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode4_rrtmg_c130628.nc',
+ 'M:mam5_mode5:$INPUTDATA_ROOT/atm/cam/physprops/mam5_mode5_rrtmg_sig1.2_dgnl.40_c03072023.nc'
+
+
+
+3
+1
+'atm/cam/chem/trop_mam/marine_BGC/'
+'CYCLICAL'
+'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc'
+0
+0
+'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC'
+
+
+atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_0003-2017_c20171114.nc
+18500101
+FIXED
+1850
+linv3_1849-2017_CMIP6_Hist_10deg_58km_c20230705.nc
+atm/cam/chem/trop_mozart/ub
+CYCLICAL
+
+
+SERIAL
+
+
+'xactive_lnd'
+'O3','H2O2','CH2O','CH3OOH','NO','NO2','HNO3','HO2NO2','PAN','CO','CH3COCH3','C2H5OOH','CH3CHO','H2SO4','SO2','NO3','N2O5','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'NEU'
+'C2H5OOH','CH2O','CH3CHO','CH3OOH','H2O2','H2SO4','HNO3','HO2NO2','SO2','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'CH2O', 'CH3O2', 'CH3OOH', 'PAN', 'CO', 'C2H6', 'C3H8', 'C2H4', 'ROHO2', 'CH3COCH3', 'C2H5O2', 'C2H5OOH', 'CH3CHO', 'CH3CO3', 'ISOP', 'ISOPO2', 'MVKMACR', 'MVKO2'
+''
+
diff --git a/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-aer_chemUCI-Linoz-mam5-vbs.xml b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-aer_chemUCI-Linoz-mam5-vbs.xml
new file mode 100644
index 00000000000..8aedc762728
--- /dev/null
+++ b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-aer_chemUCI-Linoz-mam5-vbs.xml
@@ -0,0 +1,119 @@
+
+
+
+
+.true.
+
+
+.true.
+.true.
+.true.
+
+
+atm/cam/solar/Solar_1850control_input4MIPS_c20181106.nc
+18500101
+FIXED
+
+
+
+808.249e-9
+273.0211e-9
+32.1102e-12
+0.0
+
+
+INTERP_MISSING_MONTHS
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_NO2_aircraft_vertical_1750-2015_1.9x2.5_c20170608.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_elev_1850-2014_c180205_hist-aero_1850-volcano.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_elev_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_elev_1850-2014_c180205.nc
+
+
+INTERP_MISSING_MONTHS
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H4_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H6_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C3H8_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH2O_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3CHO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3COCH3_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_MTERP_surface_1850-2014_1.9x2.5_c20230126.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_NO_surface_1850-2014_1.9x2.5_c20220425.nc
+atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850-2100.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160727.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_surf_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions_E90_surface_1750-2015_1.9x2.5_c20210408.nc
+
+
+
+
+INTERP_MISSING_MONTHS
+oxid_1.9x2.5_L26_1850-2015_c20181106.nc
+''
+atm/cam/chem/trop_mozart_aero/oxid
+'prsd_O3:O3','prsd_NO3:NO3','prsd_OH:OH'
+
+
+ch4_oxid_1.9x2.5_L26_1990-1999clim.c090804.nc
+atm/cam/chem/methane
+CYCLICAL
+1995
+''
+'prsd_ch4:CH4'
+
+
+
+ 'A:H2OLNZ:H2O', 'N:O2:O2', 'N:CO2:CO2',
+ 'A:O3:O3', 'A:N2OLNZ:N2O', 'A:CH4LNZ:CH4',
+ 'N:CFC11:CFC11', 'N:CFC12:CFC12',
+ 'M:mam5_mode1:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode1_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode2:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode2_rrtmg_c130628.nc',
+ 'M:mam5_mode3:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode3_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode4:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode4_rrtmg_c130628.nc',
+ 'M:mam5_mode5:$INPUTDATA_ROOT/atm/cam/physprops/mam5_mode5_rrtmg_sig1.2_dgnl.40_c03072023.nc'
+
+
+
+3
+1
+'atm/cam/chem/trop_mam/marine_BGC/'
+'CYCLICAL'
+'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc'
+0
+0
+'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC'
+
+atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_0003-2017_c20171114.nc
+18500101
+FIXED
+1850
+linv3_1849-2017_CMIP6_Hist_10deg_58km_c20230705.nc
+atm/cam/chem/trop_mozart/ub
+CYCLICAL
+
+
+SERIAL
+
+
+'xactive_lnd'
+'O3','H2O2','CH2O','CH3OOH','NO','NO2','HNO3','HO2NO2','PAN','CO','CH3COCH3','C2H5OOH','CH3CHO','H2SO4','SO2','NO3','N2O5','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'NEU'
+'C2H5OOH','CH2O','CH3CHO','CH3OOH','H2O2','H2SO4','HNO3','HO2NO2','SO2','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'CH2O', 'CH3O2', 'CH3OOH', 'PAN', 'CO', 'C2H6', 'C3H8', 'C2H4', 'ROHO2', 'CH3COCH3', 'C2H5O2', 'C2H5OOH', 'CH3CHO', 'CH3CO3', 'ISOP', 'ISOPO2', 'MVKMACR', 'MVKO2'
+''
+
diff --git a/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-nat_chemUCI-Linoz-mam5-vbs.xml b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-nat_chemUCI-Linoz-mam5-vbs.xml
new file mode 100644
index 00000000000..493affd9641
--- /dev/null
+++ b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-nat_chemUCI-Linoz-mam5-vbs.xml
@@ -0,0 +1,123 @@
+
+
+
+
+.true.
+
+
+.true.
+.true.
+.true.
+
+
+atm/cam/solar/Solar_1850-2299_input4MIPS_c20181106.nc
+SERIAL
+
+
+
+808.249e-9
+273.0211e-9
+32.1102e-12
+0.0
+
+
+
+INTERP_MISSING_MONTHS
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_NO2_aircraft_vertical_1750-2015_1.9x2.5_c20170608.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_elev_1850-2014_c180205_1850-aero_hist-volcano.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_elev_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_elev_1850-2014_c180205.nc
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H4_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H6_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C3H8_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH2O_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3CHO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3COCH3_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_MTERP_surface_1850-2014_1.9x2.5_c20230126.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_NO_surface_1850-2014_1.9x2.5_c20220425.nc
+atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160416.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_surf_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions_E90_surface_1750-2015_1.9x2.5_c20210408.nc
+
+
+
+
+CYCLICAL
+1849
+oxid_1.9x2.5_L26_1850-2015_c20181106.nc
+''
+atm/cam/chem/trop_mozart_aero/oxid
+'prsd_O3:O3','prsd_NO3:NO3','prsd_OH:OH'
+
+
+ch4_oxid_1.9x2.5_L26_1990-1999clim.c090804.nc
+atm/cam/chem/methane
+CYCLICAL
+1995
+''
+'prsd_ch4:CH4'
+
+
+
+ 'A:H2OLNZ:H2O', 'N:O2:O2', 'N:CO2:CO2',
+ 'A:O3:O3', 'A:N2OLNZ:N2O', 'A:CH4LNZ:CH4',
+ 'N:CFC11:CFC11', 'N:CFC12:CFC12',
+ 'M:mam5_mode1:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode1_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode2:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode2_rrtmg_c130628.nc',
+ 'M:mam5_mode3:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode3_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode4:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode4_rrtmg_c130628.nc',
+ 'M:mam5_mode5:$INPUTDATA_ROOT/atm/cam/physprops/mam5_mode5_rrtmg_sig1.2_dgnl.40_c03072023.nc'
+
+
+
+3
+1
+'atm/cam/chem/trop_mam/marine_BGC/'
+'CYCLICAL'
+'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc'
+0
+0
+'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC'
+
+atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_0003-2017_c20171114.nc
+18500101
+FIXED
+1850
+linv3_1849-2017_CMIP6_Hist_10deg_58km_c20230705.nc
+atm/cam/chem/trop_mozart/ub
+CYCLICAL
+
+
+SERIAL
+
+
+'xactive_lnd'
+'O3','H2O2','CH2O','CH3OOH','NO','NO2','HNO3','HO2NO2','PAN','CO','CH3COCH3','C2H5OOH','CH3CHO','H2SO4','SO2','NO3','N2O5','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'NEU'
+'C2H5OOH','CH2O','CH3CHO','CH3OOH','H2O2','H2SO4','HNO3','HO2NO2','SO2','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'CH2O', 'CH3O2', 'CH3OOH', 'PAN', 'CO', 'C2H6', 'C3H8', 'C2H4', 'ROHO2', 'CH3COCH3', 'C2H5O2', 'C2H5OOH', 'CH3CHO', 'CH3CO3', 'ISOP', 'ISOPO2', 'MVKMACR', 'MVKO2'
+''
+
diff --git a/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-ozone_chemUCI-Linoz-mam5-vbs.xml b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-ozone_chemUCI-Linoz-mam5-vbs.xml
new file mode 100644
index 00000000000..58f69d8fe97
--- /dev/null
+++ b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-ozone_chemUCI-Linoz-mam5-vbs.xml
@@ -0,0 +1,121 @@
+
+
+
+
+.true.
+
+
+.true.
+.true.
+.true.
+
+
+atm/cam/solar/Solar_1850control_input4MIPS_c20181106.nc
+18500101
+FIXED
+
+
+
+808.249e-9
+273.0211e-9
+32.1102e-12
+0.0
+
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_NO2_aircraft_vertical_1750-2015_1.9x2.5_c20170608.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_1850_2014_avg_so2_elev_strat_1850.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_elev_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_elev_1850-2014_c180205.nc
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H4_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H6_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C3H8_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH2O_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3CHO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3COCH3_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_MTERP_surface_1850-2014_1.9x2.5_c20230126.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_NO_surface_1850-2014_1.9x2.5_c20220425.nc
+atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160416.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_surf_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions_E90_surface_1750-2015_1.9x2.5_c20210408.nc
+
+
+
+
+CYCLICAL
+1849
+oxid_1.9x2.5_L26_1850-2015_c20181106.nc
+''
+atm/cam/chem/trop_mozart_aero/oxid
+'prsd_O3:O3','prsd_NO3:NO3','prsd_OH:OH'
+
+
+ch4_oxid_1.9x2.5_L26_1990-1999clim.c090804.nc
+atm/cam/chem/methane
+CYCLICAL
+1995
+''
+'prsd_ch4:CH4'
+
+
+
+ 'A:H2OLNZ:H2O', 'N:O2:O2', 'N:CO2:CO2',
+ 'A:O3:O3', 'A:N2OLNZ:N2O', 'A:CH4LNZ:CH4',
+ 'N:CFC11:CFC11', 'N:CFC12:CFC12',
+ 'M:mam5_mode1:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode1_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode2:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode2_rrtmg_c130628.nc',
+ 'M:mam5_mode3:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode3_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode4:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode4_rrtmg_c130628.nc',
+ 'M:mam5_mode5:$INPUTDATA_ROOT/atm/cam/physprops/mam5_mode5_rrtmg_sig1.2_dgnl.40_c03072023.nc'
+
+
+
+3
+1
+'atm/cam/chem/trop_mam/marine_BGC/'
+'CYCLICAL'
+'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc'
+0
+0
+'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC'
+
+atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_0003-2017_c20171114.nc
+SERIAL
+linv3_1849-2017_CMIP6_Hist_10deg_58km_c20230705.nc
+atm/cam/chem/trop_mozart/ub
+INTERP_MISSING_MONTHS
+
+
+SERIAL
+
+
+'xactive_lnd'
+'O3','H2O2','CH2O','CH3OOH','NO','NO2','HNO3','HO2NO2','PAN','CO','CH3COCH3','C2H5OOH','CH3CHO','H2SO4','SO2','NO3','N2O5','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'NEU'
+'C2H5OOH','CH2O','CH3CHO','CH3OOH','H2O2','H2SO4','HNO3','HO2NO2','SO2','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'CH2O', 'CH3O2', 'CH3OOH', 'PAN', 'CO', 'C2H6', 'C3H8', 'C2H4', 'ROHO2', 'CH3COCH3', 'C2H5O2', 'C2H5OOH', 'CH3CHO', 'CH3CO3', 'ISOP', 'ISOPO2', 'MVKMACR', 'MVKO2'
+''
+
diff --git a/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-volc_chemUCI-Linoz-mam5-vbs.xml b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-volc_chemUCI-Linoz-mam5-vbs.xml
new file mode 100644
index 00000000000..83d4c4d9271
--- /dev/null
+++ b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-volc_chemUCI-Linoz-mam5-vbs.xml
@@ -0,0 +1,124 @@
+
+
+
+
+.true.
+
+
+.true.
+.true.
+.true.
+
+
+atm/cam/solar/Solar_1850control_input4MIPS_c20181106.nc
+18500101
+FIXED
+
+
+
+808.249e-9
+273.0211e-9
+32.1102e-12
+0.0
+
+
+
+INTERP_MISSING_MONTHS
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_NO2_aircraft_vertical_1750-2015_1.9x2.5_c20170608.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_elev_1850-2014_c180205_1850-aero_hist-volcano.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_elev_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_elev_1850-2014_c180205.nc
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H4_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H6_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C3H8_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH2O_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3CHO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3COCH3_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_MTERP_surface_1850-2014_1.9x2.5_c20230126.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_NO_surface_1850-2014_1.9x2.5_c20220425.nc
+atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160416.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_surf_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions_E90_surface_1750-2015_1.9x2.5_c20210408.nc
+
+
+
+
+CYCLICAL
+1849
+oxid_1.9x2.5_L26_1850-2015_c20181106.nc
+''
+atm/cam/chem/trop_mozart_aero/oxid
+'prsd_O3:O3','prsd_NO3:NO3','prsd_OH:OH'
+
+
+ch4_oxid_1.9x2.5_L26_1990-1999clim.c090804.nc
+atm/cam/chem/methane
+CYCLICAL
+1995
+''
+'prsd_ch4:CH4'
+
+
+
+ 'A:H2OLNZ:H2O', 'N:O2:O2', 'N:CO2:CO2',
+ 'A:O3:O3', 'A:N2OLNZ:N2O', 'A:CH4LNZ:CH4',
+ 'N:CFC11:CFC11', 'N:CFC12:CFC12',
+ 'M:mam5_mode1:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode1_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode2:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode2_rrtmg_c130628.nc',
+ 'M:mam5_mode3:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode3_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode4:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode4_rrtmg_c130628.nc',
+ 'M:mam5_mode5:$INPUTDATA_ROOT/atm/cam/physprops/mam5_mode5_rrtmg_sig1.2_dgnl.40_c03072023.nc'
+
+
+
+3
+1
+'atm/cam/chem/trop_mam/marine_BGC/'
+'CYCLICAL'
+'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc'
+0
+0
+'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC'
+
+atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_0003-2017_c20171114.nc
+18500101
+FIXED
+1850
+linv3_1849-2017_CMIP6_Hist_10deg_58km_c20230705.nc
+atm/cam/chem/trop_mozart/ub
+CYCLICAL
+
+
+SERIAL
+
+
+'xactive_lnd'
+'O3','H2O2','CH2O','CH3OOH','NO','NO2','HNO3','HO2NO2','PAN','CO','CH3COCH3','C2H5OOH','CH3CHO','H2SO4','SO2','NO3','N2O5','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'NEU'
+'C2H5OOH','CH2O','CH3CHO','CH3OOH','H2O2','H2SO4','HNO3','HO2NO2','SO2','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'CH2O', 'CH3O2', 'CH3OOH', 'PAN', 'CO', 'C2H6', 'C3H8', 'C2H4', 'ROHO2', 'CH3COCH3', 'C2H5O2', 'C2H5OOH', 'CH3CHO', 'CH3CO3', 'ISOP', 'ISOPO2', 'MVKMACR', 'MVKO2'
+''
+
diff --git a/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-xGHG-xaer_chemUCI-Linoz-mam5-vbs.xml b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-xGHG-xaer_chemUCI-Linoz-mam5-vbs.xml
new file mode 100644
index 00000000000..671eb826ef1
--- /dev/null
+++ b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-xGHG-xaer_chemUCI-Linoz-mam5-vbs.xml
@@ -0,0 +1,121 @@
+
+
+
+
+.true.
+
+
+.true.
+.true.
+.true.
+
+
+atm/cam/solar/Solar_1850-2299_input4MIPS_c20181106.nc
+SERIAL
+
+
+
+808.249e-9
+273.0211e-9
+32.1102e-12
+0.0
+
+
+
+INTERP_MISSING_MONTHS
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_NO2_aircraft_vertical_1750-2015_1.9x2.5_c20170608.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_elev_1850-2014_c180205_1850-aero_hist-volcano.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_elev_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_elev_1850-2014_c180205.nc
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H4_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H6_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C3H8_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH2O_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3CHO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3COCH3_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_MTERP_surface_1850-2014_1.9x2.5_c20230126.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_NO_surface_1850-2014_1.9x2.5_c20220425.nc
+atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160416.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_surf_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions_E90_surface_1750-2015_1.9x2.5_c20210408.nc
+
+
+
+
+CYCLICAL
+1849
+oxid_1.9x2.5_L26_1850-2015_c20181106.nc
+''
+atm/cam/chem/trop_mozart_aero/oxid
+'prsd_O3:O3','prsd_NO3:NO3','prsd_OH:OH'
+
+
+ch4_oxid_1.9x2.5_L26_1990-1999clim.c090804.nc
+atm/cam/chem/methane
+CYCLICAL
+1995
+''
+'prsd_ch4:CH4'
+
+
+
+ 'A:H2OLNZ:H2O', 'N:O2:O2', 'N:CO2:CO2',
+ 'A:O3:O3', 'A:N2OLNZ:N2O', 'A:CH4LNZ:CH4',
+ 'N:CFC11:CFC11', 'N:CFC12:CFC12',
+ 'M:mam5_mode1:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode1_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode2:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode2_rrtmg_c130628.nc',
+ 'M:mam5_mode3:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode3_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode4:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode4_rrtmg_c130628.nc',
+ 'M:mam5_mode5:$INPUTDATA_ROOT/atm/cam/physprops/mam5_mode5_rrtmg_sig1.2_dgnl.40_c03072023.nc'
+
+
+
+3
+1
+'atm/cam/chem/trop_mam/marine_BGC/'
+'CYCLICAL'
+'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc'
+0
+0
+'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC'
+
+atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_0003-2017_c20171114.nc
+SERIAL
+linv3_1849-2017_CMIP6_Hist_10deg_58km_c20230705.nc
+atm/cam/chem/trop_mozart/ub
+INTERP_MISSING_MONTHS
+
+
+SERIAL
+
+
+'xactive_lnd'
+'O3','H2O2','CH2O','CH3OOH','NO','NO2','HNO3','HO2NO2','PAN','CO','CH3COCH3','C2H5OOH','CH3CHO','H2SO4','SO2','NO3','N2O5','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'NEU'
+'C2H5OOH','CH2O','CH3CHO','CH3OOH','H2O2','H2SO4','HNO3','HO2NO2','SO2','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'CH2O', 'CH3O2', 'CH3OOH', 'PAN', 'CO', 'C2H6', 'C3H8', 'C2H4', 'ROHO2', 'CH3COCH3', 'C2H5O2', 'C2H5OOH', 'CH3CHO', 'CH3CO3', 'ISOP', 'ISOPO2', 'MVKMACR', 'MVKO2'
+''
+
diff --git a/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-xaer_chemUCI-Linoz-mam5-vbs.xml b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-xaer_chemUCI-Linoz-mam5-vbs.xml
new file mode 100644
index 00000000000..8dd525d7e5d
--- /dev/null
+++ b/components/eam/bld/namelist_files/use_cases/20TR_eam_CMIP6-xaer_chemUCI-Linoz-mam5-vbs.xml
@@ -0,0 +1,118 @@
+
+
+
+
+.true.
+
+
+.true.
+.true.
+.true.
+
+
+atm/cam/solar/Solar_1850-2299_input4MIPS_c20181106.nc
+SERIAL
+
+
+atm/cam/ggas/GHG_CMIP-1-2-0_Annual_Global_0000-2014_c20180105.nc
+RAMPED
+
+
+
+INTERP_MISSING_MONTHS
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_NO2_aircraft_vertical_1750-2015_1.9x2.5_c20170608.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_elev_1850-2014_c180205_1850-aero_hist-volcano.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_elev_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_elev_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_elev_1850-2014_c180205.nc
+
+
+CYCLICAL
+1850
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H4_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C2H6_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_C3H8_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH2O_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3CHO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CH3COCH3_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_CO_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_ISOP_surface_1850-2014_1.9x2.5_c20210323.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_MTERP_surface_1850-2014_1.9x2.5_c20230126.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions-cmip6_e3sm_NO_surface_1850-2014_1.9x2.5_c20220425.nc
+atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160416.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/emissions-cmip6_e3sm_SOAG0_surf_1850-2014_1.9x2.5_c20230201.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_bc_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_num_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_pom_a4_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a1_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/DECK_ne30/cmip6_mam4_so4_a2_surf_1850-2014_c180205.nc
+atm/cam/chem/trop_mozart_aero/emis/chem_gases/2degrees/emissions_E90_surface_1750-2015_1.9x2.5_c20210408.nc
+
+
+
+
+CYCLICAL
+1849
+oxid_1.9x2.5_L26_1850-2015_c20181106.nc
+''
+atm/cam/chem/trop_mozart_aero/oxid
+'prsd_O3:O3','prsd_NO3:NO3','prsd_OH:OH'
+
+
+ch4_oxid_1.9x2.5_L26_1990-1999clim.c090804.nc
+atm/cam/chem/methane
+CYCLICAL
+1995
+''
+'prsd_ch4:CH4'
+
+
+
+ 'A:H2OLNZ:H2O', 'N:O2:O2', 'N:CO2:CO2',
+ 'A:O3:O3', 'A:N2OLNZ:N2O', 'A:CH4LNZ:CH4',
+ 'N:CFC11:CFC11', 'N:CFC12:CFC12',
+ 'M:mam5_mode1:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode1_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode2:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode2_rrtmg_c130628.nc',
+ 'M:mam5_mode3:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode3_rrtmg_aeronetdust_c141106.nc',
+ 'M:mam5_mode4:$INPUTDATA_ROOT/atm/cam/physprops/mam4_mode4_rrtmg_c130628.nc',
+ 'M:mam5_mode5:$INPUTDATA_ROOT/atm/cam/physprops/mam5_mode5_rrtmg_sig1.2_dgnl.40_c03072023.nc'
+
+
+
+3
+1
+'atm/cam/chem/trop_mam/marine_BGC/'
+'CYCLICAL'
+'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc'
+0
+0
+'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC'
+
+atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_0003-2017_c20171114.nc
+SERIAL
+linv3_1849-2017_CMIP6_Hist_10deg_58km_c20230705.nc
+atm/cam/chem/trop_mozart/ub
+INTERP_MISSING_MONTHS
+
+
+SERIAL
+
+
+'xactive_lnd'
+'O3','H2O2','CH2O','CH3OOH','NO','NO2','HNO3','HO2NO2','PAN','CO','CH3COCH3','C2H5OOH','CH3CHO','H2SO4','SO2','NO3','N2O5','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'NEU'
+'C2H5OOH','CH2O','CH3CHO','CH3OOH','H2O2','H2SO4','HNO3','HO2NO2','SO2','SOAG0','SOAG15','SOAG24','SOAG35','SOAG34','SOAG33','SOAG32','SOAG31'
+'CH2O', 'CH3O2', 'CH3OOH', 'PAN', 'CO', 'C2H6', 'C3H8', 'C2H4', 'ROHO2', 'CH3COCH3', 'C2H5O2', 'C2H5OOH', 'CH3CHO', 'CH3CO3', 'ISOP', 'ISOPO2', 'MVKMACR', 'MVKO2'
+''
+
diff --git a/components/eam/cime_config/config_component.xml b/components/eam/cime_config/config_component.xml
index e2ef2ef7173..785a6469650 100755
--- a/components/eam/cime_config/config_component.xml
+++ b/components/eam/cime_config/config_component.xml
@@ -51,9 +51,7 @@
-mach $MACH
-phys default
- &eamv3_phys_defaults; &eamv3_chem_defaults;
- &eamv3_phys_defaults; &eamv3_chem_defaults;
- &eamv3_phys_defaults; &eamv3_chem_defaults;
+ &eamv3_phys_defaults; &eamv3_chem_defaults;
-bc_dep_to_snow_updates
-co2_cycle
@@ -126,6 +124,15 @@
1850_E3SMv1_superfast_ar5-emis
1850S_E3SMv1_superfast_ar5-emis
20TR_eam_CMIP6_chemUCI-Linoz-mam5-vbs
+ 20TR_eam_CMIP6_chemUCI-Linoz-mam5-vbs
+ 20TR_eam_CMIP6-GHG_chemUCI-Linoz-mam5-vbs
+ 20TR_eam_CMIP6-aer_chemUCI-Linoz-mam5-vbs
+ 20TR_eam_CMIP6-nat_chemUCI-Linoz-mam5-vbs
+ 20TR_eam_CMIP6-xGHG-xaer_chemUCI-Linoz-mam5-vbs
+ 20TR_eam_CMIP6-xaer_chemUCI-Linoz-mam5-vbs
+ 20TR_eam_CMIP6-ozone_chemUCI-Linoz-mam5-vbs
+ 20TR_eam_CMIP6-lulc_chemUCI-Linoz-mam5-vbs
+ 20TR_eam_CMIP6-volc_chemUCI-Linoz-mam5-vbs
20TR_eam_CMIP6_chemUCI-Linoz-mam5-vbs
SSP585_eam_CMIP6_chemUCI-Linoz-mam5-vbs
SSP370_eam_CMIP6_chemUCI-Linoz-mam5-vbs
diff --git a/components/eam/cime_config/config_compsets.xml b/components/eam/cime_config/config_compsets.xml
index 39971fbb094..7050bd0c8f9 100644
--- a/components/eam/cime_config/config_compsets.xml
+++ b/components/eam/cime_config/config_compsets.xml
@@ -272,12 +272,12 @@
F20TR-MMF1
- 20TR_EAM%CMIP6-MMF1_ELM%SP_MPASSI%PRES_DOCN%DOM_MOSART_SGLC_SWAV
+ 20TR_EAM%MMF1_ELM%SP_MPASSI%PRES_DOCN%DOM_MOSART_SGLC_SWAV
F20TR-MMF1
- 20TR_EAM%CMIP6-MMF2_ELM%SP_MPASSI%PRES_DOCN%DOM_MOSART_SGLC_SWAV
+ 20TR_EAM%MMF2_ELM%SP_MPASSI%PRES_DOCN%DOM_MOSART_SGLC_SWAV
diff --git a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod/user_nl_elm b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod/user_nl_elm
index cd1adab7740..9224c77e0f0 100644
--- a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod/user_nl_elm
+++ b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod/user_nl_elm
@@ -33,7 +33,7 @@ hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
-hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F2010/user_nl_elm b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F2010/user_nl_elm
index cd1adab7740..9224c77e0f0 100644
--- a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F2010/user_nl_elm
+++ b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F2010/user_nl_elm
@@ -33,7 +33,7 @@ hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
-hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F20TR/user_nl_elm b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F20TR/user_nl_elm
index cd1adab7740..9224c77e0f0 100644
--- a/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F20TR/user_nl_elm
+++ b/components/eam/cime_config/testdefs/testmods_dirs/eam/wcprod_F20TR/user_nl_elm
@@ -33,7 +33,7 @@ hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP',
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr',
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF',
'wlim_m','WOODC_LOSS','WTGQ'
-hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC'
+hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC','LND_FRC_DUST_MBL'
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
hist_nhtfrq = -24,-24
diff --git a/components/eam/src/chemistry/mozart/chemistry.F90 b/components/eam/src/chemistry/mozart/chemistry.F90
index f78ceda1dea..3412e1b9bf9 100644
--- a/components/eam/src/chemistry/mozart/chemistry.F90
+++ b/components/eam/src/chemistry/mozart/chemistry.F90
@@ -106,6 +106,13 @@ module chemistry
integer :: ext_frc_fixed_ymd = 0
integer :: ext_frc_fixed_tod = 0
+ ! alternative type and cycle year for volcanic and other SO2 for controlling single forcing experiments
+ ! if NULL, same treatment as for the other species.
+ ! Possible in the future to modify further and apply to volcanic sector of SO2 alone
+
+ character(len=24) :: ext_frc_volc_type = 'NULL' !'NULL'|'CYCLICAL'|'SERIAL'|'INTERP_MISSING_MONTHS'
+ integer :: ext_frc_volc_cycle_yr = -1
+
real(r8) :: dms_emis_scale = 1._r8
! fixed stratosphere
@@ -515,7 +522,7 @@ subroutine chem_readnl(nlfile)
srf_emis_type, srf_emis_cycle_yr, srf_emis_fixed_ymd, srf_emis_fixed_tod, srf_emis_specifier, &
fstrat_file, fstrat_list, fstrat_efold_list, &
ext_frc_specifier, ext_frc_type, ext_frc_cycle_yr, ext_frc_fixed_ymd, ext_frc_fixed_tod, &
- dms_emis_scale
+ ext_frc_volc_type, ext_frc_volc_cycle_yr, dms_emis_scale
namelist /chem_inparm/ chem_rad_passive
@@ -689,6 +696,8 @@ subroutine chem_readnl(nlfile)
call mpibcast (ext_frc_cycle_yr, 1, mpiint, 0, mpicom)
call mpibcast (ext_frc_fixed_ymd, 1, mpiint, 0, mpicom)
call mpibcast (ext_frc_fixed_tod, 1, mpiint, 0, mpicom)
+ call mpibcast (ext_frc_volc_type, len(ext_frc_volc_type), mpichar, 0, mpicom)
+ call mpibcast (ext_frc_volc_cycle_yr, 1, mpiint, 0, mpicom)
call mpibcast (dms_emis_scale, 1, mpir8, 0, mpicom)
@@ -1033,6 +1042,8 @@ subroutine chem_init(phys_state, pbuf2d, species_class)
, ext_frc_cycle_yr &
, ext_frc_fixed_ymd &
, ext_frc_fixed_tod &
+ , ext_frc_volc_type &
+ , ext_frc_volc_cycle_yr &
, xactive_prates &
, exo_coldens_file &
, tuv_xsect_file &
diff --git a/components/eam/src/chemistry/mozart/mo_chemini.F90 b/components/eam/src/chemistry/mozart/mo_chemini.F90
index ff0eb0df15f..564855d76dc 100644
--- a/components/eam/src/chemistry/mozart/mo_chemini.F90
+++ b/components/eam/src/chemistry/mozart/mo_chemini.F90
@@ -43,6 +43,8 @@ subroutine chemini &
, ext_frc_cycle_yr &
, ext_frc_fixed_ymd &
, ext_frc_fixed_tod &
+ , ext_frc_volc_type &
+ , ext_frc_volc_cycle_yr &
, xactive_prates &
, exo_coldens_file &
, tuv_xsect_file &
@@ -133,6 +135,8 @@ subroutine chemini &
integer, intent(in) :: ext_frc_cycle_yr
integer, intent(in) :: ext_frc_fixed_ymd
integer, intent(in) :: ext_frc_fixed_tod
+ character(len=*), intent(in) :: ext_frc_volc_type
+ integer, intent(in) :: ext_frc_volc_cycle_yr
character(len=*), intent(in) :: srf_emis_type
integer, intent(in) :: srf_emis_cycle_yr
integer, intent(in) :: srf_emis_fixed_ymd
@@ -183,7 +187,8 @@ subroutine chemini &
! ... initialize external forcings module
!-----------------------------------------------------------------------
call setext_inti()
- call extfrc_inti(ext_frc_specifier, ext_frc_type, ext_frc_cycle_yr, ext_frc_fixed_ymd, ext_frc_fixed_tod)
+ call extfrc_inti(ext_frc_specifier, ext_frc_type, ext_frc_cycle_yr, ext_frc_fixed_ymd, ext_frc_fixed_tod, &
+ ext_frc_volc_type, ext_frc_volc_cycle_yr)
if (masterproc) write(iulog,*) 'chemini: after extfrc_inti on node ',iam
!-----------------------------------------------------------------------
diff --git a/components/eam/src/chemistry/mozart/mo_extfrc.F90 b/components/eam/src/chemistry/mozart/mo_extfrc.F90
index 23b3f480882..d00e0d5673e 100644
--- a/components/eam/src/chemistry/mozart/mo_extfrc.F90
+++ b/components/eam/src/chemistry/mozart/mo_extfrc.F90
@@ -46,7 +46,8 @@ module mo_extfrc
contains
- subroutine extfrc_inti( extfrc_specifier, extfrc_type, extfrc_cycle_yr, extfrc_fixed_ymd, extfrc_fixed_tod)
+ subroutine extfrc_inti( extfrc_specifier, extfrc_type, extfrc_cycle_yr, extfrc_fixed_ymd, extfrc_fixed_tod, &
+ extfrc_volc_type, extfrc_volc_cycle_yr)
!-----------------------------------------------------------------------
! ... initialize the surface forcings
@@ -71,6 +72,8 @@ subroutine extfrc_inti( extfrc_specifier, extfrc_type, extfrc_cycle_yr, extfrc_f
integer , intent(in) :: extfrc_cycle_yr
integer , intent(in) :: extfrc_fixed_ymd
integer , intent(in) :: extfrc_fixed_tod
+ character(len=*), intent(in) :: extfrc_volc_type
+ integer , intent(in) :: extfrc_volc_cycle_yr
!-----------------------------------------------------------------------
! ... local variables
@@ -204,6 +207,14 @@ subroutine extfrc_inti( extfrc_specifier, extfrc_type, extfrc_cycle_yr, extfrc_f
else if( extfrc_type == 'CYCLICAL' ) then
write(iulog,*) ' cycle year = ',extfrc_cycle_yr
end if
+ if (extfrc_volc_type /= 'NULL' ) then
+ write(iulog,*) ' '
+ write(iulog,*) 'Volcanic SO2 type = ',extfrc_volc_type
+ if (extfrc_volc_type == 'CYCLICAL' ) then
+ write(iulog,*) ' '
+ write(iulog,*) 'Volcanic SO2 cycle year = ',extfrc_volc_cycle_yr
+ end if
+ end if
write(iulog,*) ' '
write(iulog,*) 'there are ',extfrc_cnt,' species with external forcing files'
do m = 1,extfrc_cnt
@@ -264,11 +275,19 @@ subroutine extfrc_inti( extfrc_specifier, extfrc_type, extfrc_cycle_yr, extfrc_f
allocate(forcings(m)%file%in_pbuf(size(forcings(m)%sectors)))
forcings(m)%file%in_pbuf(:) = .false.
- call trcdata_init( forcings(m)%sectors, &
- forcings(m)%filename, filelist, datapath, &
- forcings(m)%fields, &
- forcings(m)%file, &
- rmv_file, extfrc_cycle_yr, extfrc_fixed_ymd, extfrc_fixed_tod, extfrc_type)
+ if (trim(forcings(m)%species) == 'SO2' .and. extfrc_volc_type /= 'NULL') then
+ call trcdata_init( forcings(m)%sectors, &
+ forcings(m)%filename, filelist, datapath, &
+ forcings(m)%fields, &
+ forcings(m)%file, rmv_file, extfrc_volc_cycle_yr, &
+ extfrc_fixed_ymd, extfrc_fixed_tod, extfrc_volc_type)
+ else
+ call trcdata_init( forcings(m)%sectors, &
+ forcings(m)%filename, filelist, datapath, &
+ forcings(m)%fields, &
+ forcings(m)%file, &
+ rmv_file, extfrc_cycle_yr, extfrc_fixed_ymd, extfrc_fixed_tod, extfrc_type)
+ end if
enddo frcing_loop
diff --git a/components/eam/src/chemistry/utils/tracer_data.F90 b/components/eam/src/chemistry/utils/tracer_data.F90
index 073aacff6e4..62ccbcef8a2 100644
--- a/components/eam/src/chemistry/utils/tracer_data.F90
+++ b/components/eam/src/chemistry/utils/tracer_data.F90
@@ -660,7 +660,7 @@ subroutine advance_trcdata( flds, file, state, pbuf2d )
call t_startf('read_next_trcdata')
call read_next_trcdata(state, flds, file )
call t_stopf('read_next_trcdata')
- if(masterproc) write(iulog,*) 'READ_NEXT_TRCDATA ', flds%fldnam
+ if(masterproc) write(iulog,*) 'READ_NEXT_TRCDATA ', flds%fldnam,data_time
end if
endif
diff --git a/components/eam/src/dynamics/se/dyn_grid.F90 b/components/eam/src/dynamics/se/dyn_grid.F90
index c39b3aea730..a4a8424f887 100644
--- a/components/eam/src/dynamics/se/dyn_grid.F90
+++ b/components/eam/src/dynamics/se/dyn_grid.F90
@@ -1,28 +1,28 @@
module dyn_grid
- !-------------------------------------------------------------------------------------------------
- !
+ !-------------------------------------------------------------------------------------------------
+ !
! Purpose: Definition of dynamics computational grid.
- !
- ! The grid used by the SE dynamics is called the GLL grid, which is
- ! made up up of elements that correspond to "blocks". The columns
+ !
+ ! The grid used by the SE dynamics is called the GLL grid, which is
+ ! made up up of elements that correspond to "blocks". The columns
! within each element are located at the Gauss-Lobatto-Legendre (GLL)
! quadrature points. The GLL nodes can be used as the physics columns
! as well, but this can lead to grid imprinting. The physics can also
- ! be done on a quasi-equal area FV grid when fv_nphys>0, which will
+ ! be done on a quasi-equal area FV grid when fv_nphys>0, which will
! define fv_nphys^2 cells per element.
- !
+ !
! Method: Variables are private; interface routines used to extract
! information for use in user code. Global column index range
- ! defined using full (unreduced) grid.
- !
+ ! defined using full (unreduced) grid.
+ !
! Entry points:
- ! get_block_bounds_d get first and last indices in global
+ ! get_block_bounds_d get first and last indices in global
! block ordering
! get_block_gcol_d get column indices for given block
! get_block_gcol_cnt_d get number of columns in given block
! get_block_lvl_cnt_d get number of vertical levels in column
! get_block_levels_d get vertical levels in column
- ! get_gcol_block_d get global block indices and local columns
+ ! get_gcol_block_d get global block indices and local columns
! index for given global column index
! get_gcol_block_cnt_d get number of blocks containing data
! from a given global column index
@@ -31,14 +31,14 @@ module dyn_grid
! information
! get_horiz_grid_dim_d get horizontal dimensions of dynamics grid
! dyn_grid_get_pref get reference pressures for the dynamics grid
- ! dyn_grid_get_elem_coords get coordinates of a specified block element
+ ! dyn_grid_get_elem_coords get coordinates of a specified block element
! of the dynamics grid
! dyn_grid_find_gcols finds nearest column for given lat/lon
- ! dyn_grid_get_colndx get element block/column and MPI process indices
+ ! dyn_grid_get_colndx get element block/column and MPI process indices
! corresponding to a specified global column index
!
! Author: Jim Edwards and Patrick Worley
- !
+ !
!-------------------------------------------------------------------------------------------------
use element_mod, only: element_t
use cam_logfile, only: iulog
@@ -60,7 +60,7 @@ module dyn_grid
integer, parameter, public :: physgrid_d = 102
! FV physics grid resolution (physics on GLL grid if NPG=0)
- integer, parameter, public :: fv_nphys = NPG
+ integer, parameter, public :: fv_nphys = NPG
integer :: ngcols_d = 0 ! number of dynamics columns
logical :: gblocks_need_initialized = .true.
@@ -101,6 +101,7 @@ module dyn_grid
real(r8), allocatable :: pelon_deg(:) ! pe-local longitudes (degrees)
real(r8), pointer :: pearea(:) => null() ! pe-local areas
integer(iMap), pointer :: pemap(:) => null() ! pe-local map for PIO decomp
+ real(r8), pointer :: pearea_scm(:) => null() ! special case: area for SCM (only 1 value)
!===================================================================================================
contains
@@ -113,9 +114,9 @@ end subroutine dyn_grid_init
!=================================================================================================
!
subroutine get_block_bounds_d(block_first,block_last)
- !---------------------------------------------------------------------------
+ !---------------------------------------------------------------------------
! Purpose: Return first and last indices used in global block ordering
- !
+ !
! Author: Jim Edwards
!------------------------------Arguments------------------------------------
integer, intent(out) :: block_first ! first (global) index used for blocks
@@ -129,9 +130,9 @@ end subroutine get_block_bounds_d
!=================================================================================================
!
subroutine get_block_gcol_d(blockid,size,cdex)
- !---------------------------------------------------------------------------
+ !---------------------------------------------------------------------------
! Purpose: Return list of dynamics column indices in given block
- !
+ !
! Author: Jim Edwards
!---------------------------------------------------------------------------
implicit none
@@ -160,9 +161,9 @@ end subroutine get_block_gcol_d
!=================================================================================================
!
integer function get_block_gcol_cnt_d(blockid)
- !---------------------------------------------------------------------------
+ !---------------------------------------------------------------------------
! Purpose: Return number of dynamics columns in indicated block
- !
+ !
! Author: Jim Edwards
!------------------------------Arguments------------------------------------
integer, intent(in) :: blockid
@@ -243,11 +244,11 @@ subroutine get_gcol_block_d(gcol, cnt, blockid, bcid, localblockid)
use kinds, only: int_kind
use cam_abortutils, only: endrun
!---------------------------------------------------------------------------
- ! Purpose: Return global block index and local column index for
+ ! Purpose: Return global block index and local column index for
! global column index. Element array is naturally ordered.
- !
+ !
! Author: Jim Edwards
- ! Modified: replaced linear search with best guess and binary search
+ ! Modified: replaced linear search with best guess and binary search
! (Pat Worley, 7/2/09)
!---------------------------------------------------------------------------
implicit none
@@ -378,7 +379,7 @@ integer function get_gcol_block_cnt_d(gcol)
!---------------------------------------------------------------------------
! Purpose: Return number of blocks contain data for the vertical column
! with the given global column index
- !
+ !
! Author: Patrick Worley
!---------------------------------------------------------------------------
implicit none
@@ -392,9 +393,9 @@ end function get_gcol_block_cnt_d
!=================================================================================================
!
integer function get_block_owner_d(blockid)
- !---------------------------------------------------------------------------
+ !---------------------------------------------------------------------------
! Purpose: Return id of processor that "owns" the indicated block
- !
+ !
! Author: Jim Edwards
!---------------------------------------------------------------------------
implicit none
@@ -402,7 +403,7 @@ integer function get_block_owner_d(blockid)
integer, intent(in) :: blockid ! global block id
!---------------------------------------------------------------------------
if (gblocks_need_initialized) call gblocks_init()
-
+
if (gblocks(blockid)%Owner>-1) then
get_block_owner_d=gblocks(blockid)%Owner
else
@@ -419,7 +420,7 @@ subroutine get_horiz_grid_dim_d(hdim1_d,hdim2_d)
! Purpose: Returns declared horizontal dimensions of computational grid.
! For non-lon/lat grids, declare grid to be one-dimensional,
! i.e., (ngcols_d x 1)
- !
+ !
! Author: Patrick Worley
!------------------------------Arguments------------------------------------
integer, intent(out) :: hdim1_d ! first horizontal dimension
@@ -430,7 +431,7 @@ subroutine get_horiz_grid_dim_d(hdim1_d,hdim2_d)
else
hdim1_d = ngcols_d
end if ! fv_nphys > 0
-
+
if (present(hdim2_d)) hdim2_d = 1
return
@@ -441,7 +442,7 @@ end subroutine get_horiz_grid_dim_d
subroutine set_horiz_grid_cnt_d(NumUniqueCols)
!---------------------------------------------------------------------------
! Purpose: Set number of columns in the dynamics computational grid
- !
+ !
! Author: Jim Edwards
!---------------------------------------------------------------------------
use dimensions_mod, only: nelem, nelemd, np, npsq
@@ -454,7 +455,7 @@ subroutine set_horiz_grid_cnt_d(NumUniqueCols)
integer :: ie, i, j, ii
logical, save :: local_coords_initialized = .false.
real(r8) :: areaw(np, np)
- type(index_t), pointer :: idx
+ type(index_t), pointer :: idx
!---------------------------------------------------------------------------
if (.not. local_coords_initialized) then
ngcols_d = NumUniqueCols
@@ -463,12 +464,12 @@ subroutine set_horiz_grid_cnt_d(NumUniqueCols)
call endrun('set_horiz_grid_cnt_d: fdofp_local already defined')
end if
allocate(fdofp_local(npsq, nelemd))
- fdofp_local =0
+ fdofp_local =0
do ie = 1, nelemd
idx => elem(ie)%idxP
do ii = 1, idx%NumUniquePts
i = idx%ia(ii)
- j = idx%ja(ii)
+ j = idx%ja(ii)
fdofp_local((np*(j-1))+i,ie) = (idx%UniquePtoffset+ii-1)
end do
end do
@@ -480,7 +481,7 @@ subroutine set_horiz_grid_cnt_d(NumUniqueCols)
! Now, fill in the appropriate values
ii = 1
do ie = 1, nelemd
- areaw = 1.0_r8 / elem(ie)%rspheremp(:,:)
+ areaw = 1.0_r8 / elem(ie)%rspheremp(:,:)
pearea(ii:ii+npsq-1) = reshape(areaw, (/ np*np /))
pemap(ii:ii+npsq-1) = fdofp_local(:,ie)
do j = 1, np
@@ -503,14 +504,14 @@ end subroutine set_horiz_grid_cnt_d
!
subroutine get_horiz_grid_d(nxy,clat_d_out,clon_d_out,area_d_out, &
wght_d_out,lat_d_out,lon_d_out,cost_d_out)
- !---------------------------------------------------------------------------
+ !---------------------------------------------------------------------------
! Purpose: Return latitude and longitude (in radians), column surface
! area (in radians squared) and surface integration weights
! for global column indices that will be passed to/from
- ! physics. Optionally also return estimated physics
- ! computational cost per global column for use in load
+ ! physics. Optionally also return estimated physics
+ ! computational cost per global column for use in load
! balancing.
- !
+ !
! Author: Jim Edwards
!------------------------------Arguments------------------------------------
integer, intent(in ) :: nxy ! array sizes
@@ -572,7 +573,7 @@ subroutine get_horiz_grid_d(nxy,clat_d_out,clon_d_out,area_d_out, &
end if
if ( present(clat_d_out) .or. present(clon_d_out) ) then
-
+
allocate( lat_d_rad_temp(nxy) )
allocate( lon_d_rad_temp(nxy) )
allocate( lat_d_deg_temp(nxy) )
@@ -618,7 +619,7 @@ subroutine define_cam_grids()
integer(iMap), pointer :: grid_map_d(:,:)
integer(iMap), pointer :: grid_map_p(:,:)
integer :: ie, i, j, k, mapind ! Loop variables
- real(r8) :: area_scm(1), lat, lon
+ real(r8) :: lat, lon
integer :: ncols_p_lcl ! local column count
integer :: ncols_p_gbl ! global column count
integer(iMap), pointer :: physgrid_map(:)
@@ -628,7 +629,7 @@ subroutine define_cam_grids()
!---------------------------------------------------------------------------
! Create grid for data on HOMME GLL nodes
!---------------------------------------------------------------------------
- ! When the FV physs grid is used the GLL grid output
+ ! When the FV physs grid is used the GLL grid output
! variables will use coordinates with the '_d' suffix.
gridname = 'GLL'
if (fv_nphys > 0) then
@@ -670,12 +671,11 @@ subroutine define_cam_grids()
call cam_grid_attribute_register(trim(gridname), trim(areaname), &
'gll grid areas', trim(ncolname), pearea, pemap)
else
- ! if single column model, then this attribute has to be handled
- ! by assigning just the SCM point. Else, the model will bomb out
- ! when writing the header information to history output
- area_scm(1) = 1.0_r8 / elem(1)%rspheremp(1,1)
- call cam_grid_attribute_register(trim(gridname), trim(areaname), &
- 'gll grid areas', trim(ncolname), area_scm)
+ ! If single column model, set pearea_scm(1) to be the area as 1 value to simplify
+ allocate(pearea_scm(1))
+ pearea_scm(1) = 1.0_r8 / elem(1)%rspheremp(1,1)
+ call cam_grid_attribute_register(trim(gridname), trim(areaname), &
+ 'gll grid areas', trim(ncolname), pearea_scm)
end if ! .not. single_column
call cam_grid_attribute_register(trim(gridname), 'np', '', np)
@@ -687,15 +687,19 @@ subroutine define_cam_grids()
deallocate(pelon_deg)
! These can be nullified since the grid object has the reference
- nullify(grid_map_d)
+ nullify(grid_map_d)
nullify(pearea)
nullify(pemap)
+ if (.not.single_column .or. scm_multcols) then
+ else
+ nullify(pearea_scm)
+ endif
!---------------------------------------------------------------------------
! Create grid object for physics grid on the dynamics decomposition
!---------------------------------------------------------------------------
- ! Following CAM6-SE the 'physgrid_d' grid is created and used to load the
- ! PHIS field (i.e. surface topo) on the FV physics grid and then
+ ! Following CAM6-SE the 'physgrid_d' grid is created and used to load the
+ ! PHIS field (i.e. surface topo) on the FV physics grid and then
! interpolated to the GLL grid. This ensures consistent treatment of SGH.
if (fv_nphys>0) then
@@ -822,13 +826,13 @@ subroutine gblocks_init()
end do
end if
- do ie = 1,nelemdmax
+ do ie = 1,nelemdmax
if (ie<=nelemd) then
rdispls(iam+1)=elem(ie)%idxP%UniquePtOffset-1
gid(iam+1)=elem(ie)%GlobalID
lid(iam+1)=ie
recvcounts(iam+1)=elem(ie)%idxP%NumUniquePts
- else
+ else
rdispls(iam+1) = 0
recvcounts(iam+1) = 0
gid(iam+1)=0
@@ -882,7 +886,7 @@ subroutine compute_global_area(area_d)
end if
if (fv_nphys > 0) then
-
+
ncol_fv_gbl = fv_nphys*fv_nphys*nelem
ncol_fv_lcl = fv_nphys*fv_nphys*nelemd
allocate(rbuf(ncol_fv_gbl))
@@ -948,14 +952,14 @@ subroutine compute_global_area(area_d)
deallocate(col_id_global)
else ! physics is on GLL grid
-
+
allocate(rbuf(ngcols_d))
- do ie = 1, nelemdmax
+ do ie = 1, nelemdmax
if(ie <= nelemd) then
displace(iam+1) = elem(ie)%idxp%UniquePtOffset-1
recvcnts(iam+1) = elem(ie)%idxP%NumUniquePts
eb = displace(iam+1) + elem(ie)%idxp%NumUniquePts
- areaw = 1.0_r8 / elem(ie)%rspheremp(:,:)
+ areaw = 1.0_r8 / elem(ie)%rspheremp(:,:)
call UniquePoints(elem(ie)%idxP, areaw, area_d(displace(iam+1)+1:eb))
else
displace(iam+1) = 0
@@ -1065,7 +1069,7 @@ subroutine compute_global_coords(clat, clon, lat_out, lon_out, corner_lat_out, c
! Gather global latitudes
call mpi_allgatherv( lat_rad_local(:), recvcnts(iam+1), mpi_real8, rbuf, &
recvcnts(:), displace(:), mpi_real8, mpicom, ierr)
-
+
! sort latitude according to global element ID
do icol = 1,ncol_fv_gbl
clat( col_id_global(icol) ) = rbuf(icol)
@@ -1074,7 +1078,7 @@ subroutine compute_global_coords(clat, clon, lat_out, lon_out, corner_lat_out, c
! Gather global longitudes
call mpi_allgatherv( lon_rad_local(:), recvcnts(iam+1), mpi_real8, rbuf, &
recvcnts(:), displace(:), mpi_real8, mpicom, ierr)
-
+
! sort longitude according to global element ID
do icol = 1,ncol_fv_gbl
clon( col_id_global(icol) ) = rbuf(icol)
@@ -1107,14 +1111,14 @@ subroutine compute_global_coords(clat, clon, lat_out, lon_out, corner_lat_out, c
! Gather latitude
call mpi_allgatherv( corner_lat_rad_local(:,c), recvcnts(iam+1), mpi_real8, rbuf, &
recvcnts(:), displace(:), mpi_real8, mpicom, ierr)
- ! sort latitude
+ ! sort latitude
do icol = 1,ncol_fv_gbl
corner_lat_out( col_id_global(icol), c) = rbuf(icol) * rad2deg
end do
! Gather longitude
call mpi_allgatherv( corner_lon_rad_local(:,c), recvcnts(iam+1), mpi_real8, rbuf, &
recvcnts(:), displace(:), mpi_real8, mpicom, ierr)
- ! sort longitude
+ ! sort longitude
do icol = 1,ncol_fv_gbl
corner_lon_out( col_id_global(icol), c) = rbuf(icol) * rad2deg
end do
@@ -1179,7 +1183,7 @@ subroutine compute_global_coords(clat, clon, lat_out, lon_out, corner_lat_out, c
call mpi_allgatherv(rbuf, recvcnts(iam+1), mpi_real8, clat, &
recvcnts(:), displace(:), mpi_real8, mpicom, ierr)
if (present(lat_out)) then
- rbuf(1:recvcnts(iam+1)) = lat_out(sb:eb)
+ rbuf(1:recvcnts(iam+1)) = lat_out(sb:eb)
call mpi_allgatherv(rbuf, recvcnts(iam+1), mpi_real8, lat_out, &
recvcnts(:), displace(:), mpi_real8, mpicom, ierr)
end if
@@ -1188,12 +1192,12 @@ subroutine compute_global_coords(clat, clon, lat_out, lon_out, corner_lat_out, c
call mpi_allgatherv(rbuf, recvcnts(iam+1), mpi_real8, clon, &
recvcnts(:), displace(:), mpi_real8, mpicom, ierr)
if (present(lon_out)) then
- rbuf(1:recvcnts(iam+1)) = lon_out(sb:eb)
+ rbuf(1:recvcnts(iam+1)) = lon_out(sb:eb)
call mpi_allgatherv(rbuf, recvcnts(iam+1), mpi_real8, lon_out, &
recvcnts(:), displace(:), mpi_real8, mpicom, ierr)
end if
end do
-
+
deallocate(rbuf)
end if ! fv_nphys > 0
@@ -1275,7 +1279,7 @@ integer function get_dyn_grid_parm(name) result(ival)
ival = fv_nphys*fv_nphys*nelem
else
ival = ngcols_d
- end if
+ end if
else if(name.eq.'plev') then
ival = plev
else if(name.eq.'plevp') then
@@ -1318,10 +1322,10 @@ end subroutine dyn_grid_get_pref
!
!=================================================================================================
!
- subroutine dyn_grid_find_gcols( lat, lon, nclosest, owners, col, lbk, rlat, rlon, idyn_dists )
+ subroutine dyn_grid_find_gcols( lat, lon, nclosest, owners, col, lbk, rlat, rlon, idyn_dists )
!---------------------------------------------------------------------------
- ! This returns the lat/lon information (and corresponding MPI task
- ! numbers (owners)) of the global model grid columns nearest to the
+ ! This returns the lat/lon information (and corresponding MPI task
+ ! numbers (owners)) of the global model grid columns nearest to the
! input satellite coordinate (lat,lon)
!---------------------------------------------------------------------------
use shr_const_mod, only: SHR_CONST_REARTH
@@ -1415,7 +1419,7 @@ end subroutine dyn_grid_find_gcols
!
!=================================================================================================
!
- subroutine dyn_grid_get_colndx( igcol, nclosest, owners, col, lbk )
+ subroutine dyn_grid_get_colndx( igcol, nclosest, owners, col, lbk )
!------------------------------Arguments------------------------------------
integer, intent(in) :: nclosest
integer, intent(in) :: igcol(nclosest)
@@ -1437,7 +1441,7 @@ subroutine dyn_grid_get_colndx( igcol, nclosest, owners, col, lbk )
call get_gcol_block_d( igcol(i), 1, blockid, bcid, lclblockid )
owners(i) = get_block_owner_d(blockid(1))
-
+
if (owners(i)==iam) then
lbk(i) = lclblockid(1)
ii = igcol(i)-elem(lbk(i))%idxp%UniquePtoffset+1
@@ -1448,7 +1452,7 @@ subroutine dyn_grid_get_colndx( igcol, nclosest, owners, col, lbk )
lbk(i) = -1
col(i) = -1
endif
-
+
end do
end subroutine dyn_grid_get_colndx
diff --git a/components/eam/src/physics/p3/eam/micro_p3_interface.F90 b/components/eam/src/physics/p3/eam/micro_p3_interface.F90
index bb6e164b4a1..c6c533329a3 100644
--- a/components/eam/src/physics/p3/eam/micro_p3_interface.F90
+++ b/components/eam/src/physics/p3/eam/micro_p3_interface.F90
@@ -1630,6 +1630,12 @@ subroutine micro_p3_tend(state, ptend, dtime, pbuf)
call outfld('FREQI', freqi, pcols, lchnk)
call outfld('FREQR', freqr, psetcols, lchnk)
call outfld('CDNUMC', cdnumc, pcols, lchnk)
+!
call outfld('CLOUDFRAC_LIQ_MICRO', cld_frac_l, pcols, lchnk)
call outfld('CLOUDFRAC_ICE_MICRO', cld_frac_i, pcols, lchnk)
diff --git a/components/eam/tools/mkatmsrffile/mkatmsrffile.py b/components/eam/tools/mkatmsrffile/mkatmsrffile.py
new file mode 100644
index 00000000000..101671488f3
--- /dev/null
+++ b/components/eam/tools/mkatmsrffile/mkatmsrffile.py
@@ -0,0 +1,304 @@
+#!/usr/bin/env python3
+#---------------------------------------------------------------------------------------------------
+'''
+This is a replacement for the legacy mkatmsrffile tool created for CESM.
+All legacy functionality is reproduced.
+
+Created April, 2024 by Walter Hannah (LLNL)
+'''
+#---------------------------------------------------------------------------------------------------
+'''
+The map file used to generate the atmsrf files can be created a few different ways.
+For a typical E3SM configuration we recommend using a conservative, monotone map.
+Here is an example command that can be used to generate one as of NCO version 5.2.2
+
+ SRC_GRID=${DIN_LOC_ROOT}/../mapping/grids/1x1d.nc
+ DST_GRID=${GRID_ROOT}/ne${NE}pg2_scrip.nc
+ MAP_FILE=${MAP_ROOT}/map_1x1_to_ne${NE}pg2_traave.nc
+ ncremap -a traave --src_grd=${SRC_GRID} --dst_grd=${DST_GRID} --map_file=${MAP_FILE}
+
+'''
+#---------------------------------------------------------------------------------------------------
+import datetime, os, numpy as np, xarray as xr, numba, itertools, subprocess as sp
+user, host = os.getenv('USER'), os.getenv('HOST')
+source_code_meta = 'mkatmsrffile.py'
+#---------------------------------------------------------------------------------------------------
+class clr:END,RED,GREEN,MAGENTA,CYAN = '\033[0m','\033[31m','\033[32m','\033[35m','\033[36m'
+#---------------------------------------------------------------------------------------------------
+usage = '''
+python mkatmsrffile.py --map_file
+ --vegetation_file
+ --soil_water_file
+ --dst_grid
+ [--output-root ]
+ [--date-stamp ]
+
+Purpose:
+ This tool generates a file needed to prescribe atmospheric dry deposition of aerosols at the surface.
+
+Environment
+
+ This tool requires a few special packages, such as xarray, numba, and itertools.
+ These are all included in the E3SM unified environment:
+ https://e3sm.org/resources/tools/other-tools/e3sm-unified-environment/
+
+ Otherwise a simple conda environment can be created:
+ conda create --name example_env --channel conda-forge xarray numpy numba scikit-learn netcdf4
+
+The following output file is created:
+
+ atmsrf__.nc
+
+'''
+from optparse import OptionParser
+parser = OptionParser(usage=usage)
+parser.add_option('--map_file',
+ dest='map_file',
+ default=None,
+ help='Mapping file from a 1x1 degree grid to the target atmosphere grid')
+parser.add_option('--vegetation_file',
+ dest='vegetation_file',
+ default=None,
+ help='Path to file containing area fractions of surface types and plant functional type (PFT) data (regrid_vegetation.nc)')
+parser.add_option('--soil_water_file',
+ dest='soil_water_file',
+ default=None,
+ help='Path to file containing soil water data (clim_soilw.nc)')
+parser.add_option('--dst_grid',
+ dest='dst_grid',
+ default=None,
+ help='destination atmosphere grid name')
+parser.add_option('--output_root',
+ dest='output_root',
+ default='./',
+ help='Output path for atmsrf files')
+parser.add_option('--date-stamp',
+ dest='date_stamp',
+ default=None,
+ help='Creation date stamp for atmsrf files')
+(opts, args) = parser.parse_args()
+#---------------------------------------------------------------------------------------------------
+def main():
+ #-----------------------------------------------------------------------------
+ # check for valid input arguments
+ if opts.map_file is None:
+ raise ValueError(f'{clr.RED}map_file was not specified{clr.END}')
+ if opts.vegetation_file is None:
+ raise ValueError(f'{clr.RED}vegetation_file was not specified{clr.END}')
+ if opts.soil_water_file is None:
+ raise ValueError(f'{clr.RED}soil_water_file was not specified{clr.END}')
+ if opts.dst_grid is None:
+ raise ValueError(f'{clr.RED}dst_grid was not specified{clr.END}')
+ #-----------------------------------------------------------------------------
+ # check existence of input files and output path
+ if not os.path.exists(opts.vegetation_file) :
+ raise ValueError(f'{clr.RED}Vegetaion file does not exist:{clr.END} {opts.vegetation_file}')
+ if not os.path.exists(opts.soil_water_file) :
+ raise ValueError(f'{clr.RED}Soil water file does not exist:{clr.END} {opts.soil_water_file}')
+ if not os.path.exists(opts.output_root) :
+ raise ValueError(f'{clr.RED}Output root path does not exist:{clr.END} {opts.output_root}')
+
+ #-----------------------------------------------------------------------------
+ # Set date stamp for file name
+
+ if opts.date_stamp is None:
+ cdate = datetime.datetime.now().strftime('%Y%m%d')
+ else:
+ cdate = opts.date_stamp
+
+ #-----------------------------------------------------------------------------
+ # specify output file name
+
+ output_file = f'{opts.output_root}/atm_srf_{opts.dst_grid}_{cdate}.nc'
+
+ #-----------------------------------------------------------------------------
+ # open input files as datasets
+
+ ds_map = xr.open_dataset(opts.map_file)
+ ds_veg = xr.open_dataset(opts.vegetation_file)
+ ds_slw = xr.open_dataset(opts.soil_water_file)
+
+ #-----------------------------------------------------------------------------
+ # check that dimension sizes are consistent
+
+ nxy_veg = len(ds_veg.lat) * len(ds_veg.lon)
+ nxy_slw = len(ds_slw.lat) * len(ds_slw.lon)
+ n_a = len(ds_map.n_a)
+ n_b = len(ds_map.n_b)
+
+ if nxy_veg!=nxy_slw or n_a!=nxy_veg or n_a!=nxy_slw:
+ err_msg = f'{clr.RED}Input file dimension sizes are inconsistent:{clr.END}'
+ err_msg += f' n_a: {n_a} nxy_veg: {nxy_veg} nxy_slw: {nxy_slw}'
+ raise ValueError(err_msg)
+
+ ntime = 12 # expected length of time dimension
+
+ if len(ds_veg.time)!=ntime:
+ err_msg = f'vegetation_file time record error:'
+ err_msg += f' expected length = {ntime}, actual length = {len(ds_veg.time)}'
+ raise ValueError(err_msg)
+
+ if len(ds_slw.time)!=ntime:
+ err_msg = f'soil_water_file time record error:'
+ err_msg += f' expected length = {ntime}, actual length = {len(ds_slw.time)}'
+ raise ValueError(err_msg)
+
+ if len(ds_veg.lat)!=len(ds_slw.lat):
+ err_msg = f'inconsistent latitude coordinate lengths:'
+ err_msg += f' ds_veg.lat = {len(ds_veg.lat)}'
+ err_msg += f' ds_slw.lat = {len(ds_slw.lat)}'
+ raise ValueError(err_msg)
+
+ if len(ds_veg.lon)!=len(ds_slw.lon):
+ err_msg = f'inconsistent latitude coordinate lengths:'
+ err_msg += f' ds_veg.lon = {len(ds_veg.lon)}'
+ err_msg += f' ds_slw.lon = {len(ds_slw.lon)}'
+ raise ValueError(err_msg)
+
+ #-----------------------------------------------------------------------------
+ # print some informative stuff
+
+ print(f'''
+ File and parameter values:
+ {clr.GREEN}map_file {clr.END}: {opts.map_file}
+ {clr.GREEN}vegetation_file {clr.END}: {opts.vegetation_file}
+ {clr.GREEN}soil_water_file {clr.END}: {opts.soil_water_file}
+ {clr.GREEN}output_root {clr.END}: {opts.output_root}
+ {clr.GREEN}output_file {clr.END}: {output_file}
+ {clr.GREEN}dst_grid {clr.END}: {opts.dst_grid}
+ {clr.GREEN}map_file n_a {clr.END}: {n_a}
+ {clr.GREEN}map_file n_b {clr.END}: {n_b}
+ ''')
+
+ #-----------------------------------------------------------------------------
+ # Load input data
+ # (also convert percentage to fraction [0,1])
+ LANDMASK_in = ds_veg['LANDMASK' ].values
+ PCT_LAKE_in = ds_veg['PCT_LAKE' ].values/1e2
+ PCT_URBAN_in = ds_veg['PCT_URBAN' ].values/1e2
+ PCT_WETLAND_in = ds_veg['PCT_WETLAND'].values/1e2
+ PCT_PFT_in = ds_veg['PCT_PFT' ].values/1e2
+ SOILW_in = ds_slw['SOILW' ].values
+ #-----------------------------------------------------------------------------
+ # Adjust input data based on land fraction (for consistency with fortran tool)
+ nlat = len(ds_veg.lat)
+ nlon = len(ds_veg.lon)
+ adjust_inputs(ntime, nlat, nlon, LANDMASK_in, PCT_LAKE_in, PCT_URBAN_in, PCT_WETLAND_in, SOILW_in)
+ #-----------------------------------------------------------------------------
+ # Remap data to the atmosphere grid
+
+ n_s = len(ds_map.n_s)
+ wgt = ds_map.S.values
+ row = ds_map.row.values-1
+ col = ds_map.col.values-1
+
+ shp_1D = (n_b)
+ shp_2D = (ntime,n_b)
+
+ SOILW = apply_map_2D( np.zeros(shp_2D), ntime, n_s, wgt, row, col, np.reshape(SOILW_in,(ntime,-1)) )
+
+ PCT_LAKE = apply_map_1D( np.zeros(shp_1D), n_s, wgt, row, col, np.reshape(PCT_LAKE_in ,-1) )
+ PCT_URBAN = apply_map_1D( np.zeros(shp_1D), n_s, wgt, row, col, np.reshape(PCT_URBAN_in ,-1) )
+ PCT_WETLAND = apply_map_1D( np.zeros(shp_1D), n_s, wgt, row, col, np.reshape(PCT_WETLAND_in,-1) )
+
+ npft = len(ds_veg.PCT_PFT[:,0,0])
+ PCT_PFT = np.zeros((npft,n_b))
+ for p in range(npft):
+ PCT_PFT[p,:] = apply_map_1D( np.zeros(shp_1D), n_s, wgt, row, col, np.reshape(PCT_PFT_in[p,:,:],-1) )
+
+ #-----------------------------------------------------------------------------
+ # Compute fields to output
+
+ nclass_landuse = 11
+ fraction_landuse = np.zeros([nclass_landuse,n_b])
+ total_soilw = np.zeros([ntime,n_b])
+
+ for i in range(n_b):
+ # Calculate total_land as sum as all surface type fractions
+ total_land = PCT_LAKE[i] + PCT_URBAN[i] + PCT_WETLAND[i]
+ for p in range(npft): total_land += PCT_PFT[p,i]
+ # Adjust lake area fraction
+ if total_land<1.0:
+ PCT_LAKE[i] = PCT_LAKE[i] + (1.0 - total_land)
+ # Calculate total_soilw
+ fraction_soilw = total_land - ( PCT_LAKE[i] + PCT_WETLAND[i] )
+ for t in range(ntime):
+ total_soilw[t,i] = total_soilw[t,i] + SOILW[t,i] * fraction_soilw
+
+ # Calculate fraction_landuse - n-1 indexing is used to correspond to fortran indexing
+ fraction_landuse[ 1-1,i] = PCT_URBAN[i]
+ fraction_landuse[ 2-1,i] = np.sum( PCT_PFT[[n-1 for n in [16,17]] ,i], axis=0)
+ fraction_landuse[ 3-1,i] = np.sum( PCT_PFT[[n-1 for n in [13,14,15]] ,i], axis=0)
+ fraction_landuse[ 4-1,i] = np.sum( PCT_PFT[[n-1 for n in [5,6,7,8,9]],i], axis=0)
+ fraction_landuse[ 5-1,i] = np.sum( PCT_PFT[[n-1 for n in [2,3,4]] ,i], axis=0)
+ fraction_landuse[ 6-1,i] = PCT_WETLAND[i]
+ fraction_landuse[ 7-1,i] = PCT_LAKE[i]
+ fraction_landuse[ 8-1,i] = PCT_PFT[1-1,i]
+ fraction_landuse[11-1,i] = np.sum( PCT_PFT[[n-1 for n in [10,11,12]] ,i], axis=0)
+
+ # Normalize fraction_landuse if it does not sum to 1 +/- tolerance
+ fraction_landuse_tolerance = 0.001
+ fraction_landuse_sum = np.sum(fraction_landuse[:,i])
+ fraction_landuse_error = fraction_landuse_sum - 1.0
+ if np.absolute(fraction_landuse_error) > fraction_landuse_tolerance:
+ for c in range(nclass_landuse):
+ fraction_landuse[c,i] = fraction_landuse[c,i] / fraction_landuse_sum
+
+ #-----------------------------------------------------------------------------
+ # Create output file and add fields
+
+ ds_out = xr.Dataset()
+ ds_out['fraction_landuse'] = xr.DataArray(fraction_landuse,dims=['class','ncol'])
+ ds_out['soilw'] = xr.DataArray(SOILW ,dims=['month','ncol'])
+ ds_out['lon'] = ds_map.xc_b.rename({'n_b':'ncol'})
+ ds_out['lat'] = ds_map.yc_b.rename({'n_b':'ncol'})
+
+ ds_out.attrs['title'] = 'E3SM atmosphere surface data'
+ ds_out.attrs['source_code'] = source_code_meta
+ ds_out.attrs['hostname'] = str(host)
+ ds_out.attrs['history'] = f'created by {user}, '+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
+ ds_out.attrs['input_map_file'] = opts.map_file
+ ds_out.attrs['input_vegetation_file'] = opts.vegetation_file
+ ds_out.attrs['input_soil_water_file'] = opts.soil_water_file
+
+ ds_out.to_netcdf(path=output_file,mode='w')
+
+ #-----------------------------------------------------------------------------
+ # convert to 64bit_data
+
+ cmd = f'ncks -O --fl_fmt=64bit_data {output_file} {output_file} '
+ sp.check_call(cmd,shell=True)
+
+ #-----------------------------------------------------------------------------
+ # print status message
+
+ print(f'\nsuccessfully created atmsrf file: {clr.MAGENTA}{output_file}{clr.END}')
+ print()
+
+#---------------------------------------------------------------------------------------------------
+@numba.njit()
+def adjust_inputs(ntime, nlat, nlon, LANDMASK, PCT_LAKE, PCT_URBAN, PCT_WETLAND, SOILW):
+ for j in range(nlat):
+ for i in range(nlon):
+ if LANDMASK[j,i]==0:
+ PCT_LAKE[j,i] = 1.0
+ PCT_URBAN[j,i] = 0.0
+ PCT_WETLAND[j,i] = 0.0
+ for t in range(ntime): SOILW[t,j,i] = 0.0
+
+@numba.njit()
+def apply_map_1D( data_out, n_s, wgt, row, col, data_in ):
+ for k in range(n_s):
+ data_out[row[k]] = data_out[row[k]] + data_in[col[k]] * wgt[k]
+ return data_out
+
+@numba.njit()
+def apply_map_2D( data_out, ntime, n_s, wgt, row, col, data_in ):
+ for t in range(ntime):
+ for k in range(n_s):
+ data_out[t,row[k]] = data_out[t,row[k]] + data_in[t,col[k]] * wgt[k]
+ return data_out
+#---------------------------------------------------------------------------------------------------
+if __name__ == '__main__':
+ main()
+#---------------------------------------------------------------------------------------------------
diff --git a/components/eam/tools/mkatmsrffile/Makefile b/components/eam/tools/mkatmsrffile/old_mkatmsrffile/Makefile
similarity index 100%
rename from components/eam/tools/mkatmsrffile/Makefile
rename to components/eam/tools/mkatmsrffile/old_mkatmsrffile/Makefile
diff --git a/components/eam/tools/mkatmsrffile/README b/components/eam/tools/mkatmsrffile/old_mkatmsrffile/README
similarity index 100%
rename from components/eam/tools/mkatmsrffile/README
rename to components/eam/tools/mkatmsrffile/old_mkatmsrffile/README
diff --git a/components/eam/tools/mkatmsrffile/mkatmsrffile.F90 b/components/eam/tools/mkatmsrffile/old_mkatmsrffile/mkatmsrffile.F90
similarity index 100%
rename from components/eam/tools/mkatmsrffile/mkatmsrffile.F90
rename to components/eam/tools/mkatmsrffile/old_mkatmsrffile/mkatmsrffile.F90
diff --git a/components/eam/tools/mkatmsrffile/nml_atmsrf b/components/eam/tools/mkatmsrffile/old_mkatmsrffile/nml_atmsrf
similarity index 100%
rename from components/eam/tools/mkatmsrffile/nml_atmsrf
rename to components/eam/tools/mkatmsrffile/old_mkatmsrffile/nml_atmsrf
diff --git a/components/eam/tools/mkatmsrffile/test_mkatmsrffile.sh b/components/eam/tools/mkatmsrffile/old_mkatmsrffile/test_mkatmsrffile.sh
similarity index 100%
rename from components/eam/tools/mkatmsrffile/test_mkatmsrffile.sh
rename to components/eam/tools/mkatmsrffile/old_mkatmsrffile/test_mkatmsrffile.sh
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/shell_commands b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/shell_commands
new file mode 100644
index 00000000000..435556401a2
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/shell_commands
@@ -0,0 +1,97 @@
+#!/bin/bash
+
+cime_root=$(./xmlquery --value CIMEROOT)
+input_data_dir=$(./xmlquery --value DIN_LOC_ROOT)
+atmchange=$cime_root/../components/eamxx/scripts/atmchange
+
+# Change run length
+./xmlchange RUN_STARTDATE="1994-10-01"
+
+# Turn on budget reporting
+./xmlchange BUDGETS=TRUE
+
+# For big data
+./xmlchange PIO_NETCDF_FORMAT="64bit_data"
+./xmlchange PIO_TYPENAME=pnetcdf #adios #,PIO_TYPENAME_ATM=adios
+./xmlchange PIO_REARRANGER=1 # use PIO_REARRANGER=3, for ADIOS; PIO_REARRANGER=1 for pnetcdf
+
+# Turn on cosp and set frequency
+$atmchange -b physics::atm_procs_list="mac_aero_mic,rrtmgp,cosp"
+$atmchange -b physics::cosp::cosp_frequency_units="hours"
+$atmchange -b physics::cosp::cosp_frequency=1
+
+# Need to explicitly turn on computing tendencies
+$atmchange -b physics::mac_aero_mic::shoc::compute_tendencies=T_mid,qv
+$atmchange -b physics::mac_aero_mic::p3::compute_tendencies=T_mid,qv
+$atmchange -b physics::rrtmgp::compute_tendencies=T_mid
+$atmchange -b homme::compute_tendencies=T_mid,qv
+
+# Set temperature cut off in dycore threshold to 180K
+$atmchange -b vtheta_thresh=180
+
+# Change lambda_high
+$atmchange -b lambda_high=0.08
+
+# use GHG levels more appropriate for sim
+# Average from 19940101 - 20150101
+$atmchange -b co2vmr=377.2e-6
+$atmchange -b ch4vmr=1786.6e-9
+$atmchange -b n2ovmr=318.6e-9
+$atmchange -b orbital_year=-9999
+# use CO2 the same in land model
+./xmlchange CCSM_CO2_PPMV=377.2
+
+# determine grid and set remap files
+atm_grid=$(./xmlquery --value ATM_GRID)
+if [[ "${atm_grid}" = "ne30np4.pg2" ]]; then
+ hmapfile="${input_data_dir}/atm/scream/maps/map_ne30pg2_to_ne4pg2_20231201.nc"
+ armmapfile="${input_data_dir}/atm/scream/maps/map_ne30pg2_to_DecadalSites_c20240130.nc"
+ # Run with bugfixed SPA file
+ $atmchange -b spa_data_file="${input_data_dir}/atm/scream/init/spa_v3.LR.F2010.2011-2025.c_20240405.nc"
+elif [[ "${atm_grid}" = "ne4np4.pg2" ]]; then
+ hmapfile="${input_data_dir}/atm/scream/maps/map_ne4pg2_to_ne2pg2_c20240902.nc"
+ echo "Note: arm remap only works for ne30pg2 atm grids for now"
+ armmapfile="not-supported-yet"
+ # Keep default SPA file
+ # ... (do nothing)
+else
+ echo "Note: horiz/arm remaps only work for ne30pg2 and ne4pg2 atm grids for now"
+ hmapfile="not-supported-yet"
+ armmapfile="not-supported-yet"
+fi
+
+# set the output yaml files
+output_yaml_files=$(find ${cime_root}/../components/eamxx/cime_config/testdefs/testmods_dirs/scream/v1prod/yaml_outs/ -maxdepth 1 -type f)
+for file in ${output_yaml_files[@]}; do
+ # if the word "coarse" is in the file name, do nothing
+ if [[ "${file}" == *"_coarse.yaml" && "${hmapfile}" == "not-supported-yet" ]]; then
+ continue
+ elif [[ "${file}" == *"_arm.yaml" && "${armmapfile}" == "not-supported-yet" ]]; then
+ continue
+ else
+ # TODO: add remap file replacement for different grids
+ cp -v ${file} ./
+ if [ "${file}" == "${output_yaml_files[0]}" ]; then
+ # First file, reset output list
+ $atmchange -b output_yaml_files="./$(basename ${file})"
+ else
+ # Append to output list
+ $atmchange -b output_yaml_files+="./$(basename ${file})"
+ fi
+ # Replace remap files
+ sed -i "s|horiz_remap_file:.*_to_ne30.*|horiz_remap_file: ${hmapfile}|" ./$(basename ${file})
+ sed -i "s|horiz_remap_file:.*_to_DecadalSites.*|horiz_remap_file: ${armmapfile}|" ./$(basename ${file})
+ fi
+done
+
+# TODO:
+# the only thing remaining is to set the SST data, but for some reason, this is proving difficult
+# because it is not super important, leave it commented out for now, until a better solution can be found
+# ... also, not sure if the below are specific to a given ocn/sea-ice grid?
+
+# # Point to new SST forcing
+# ./xmlchange --file env_run.xml --id SSTICE_DATA_FILENAME --val "${input_data_dir}/atm/cam/sst/sst_ostia_3600x7200_19940930_20151231_c20240125.nc"
+# ./xmlchange --file env_run.xml --id SSTICE_GRID_FILENAME --val "${input_data_dir}/ocn/docn7/domain.ocn.3600x7200.230522.nc"
+# ./xmlchange --file env_run.xml --id SSTICE_YEAR_ALIGN --val 1994
+# ./xmlchange --file env_run.xml --id SSTICE_YEAR_START --val 1994
+# ./xmlchange --file env_run.xml --id SSTICE_YEAR_END --val 2015
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/user_nl_cpl b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/user_nl_cpl
new file mode 100644
index 00000000000..3e3a0580721
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/user_nl_cpl
@@ -0,0 +1 @@
+ocn_surface_flux_scheme = 2
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/user_nl_elm b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/user_nl_elm
new file mode 100644
index 00000000000..93b7ec9e277
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/user_nl_elm
@@ -0,0 +1,14 @@
+! Override consistency checks since we know our surface data is inconsistent
+check_finidat_fsurdat_consistency = .false.
+check_finidat_year_consistency = .false.
+check_finidat_pct_consistency = .false.
+check_dynpft_consistency = .false.
+
+hist_dov2xy = .true.,.true.
+hist_mfilt = 1,1
+hist_nhtfrq = -24,-24
+hist_avgflag_pertape = 'A','A'
+hist_fincl1 = 'FIRE', 'FPSN', 'QDRAI', 'QRUNOFF', 'ZWT', 'FSAT', 'H2OSOI', 'EFLX_LH_TOT',
+ 'QVEGT', 'QVEGE', 'FSH', 'ALBD', 'ALBI', 'TBOT', 'QBOT', 'RAIN', 'SNOW',
+ 'FSDS', 'FSDSND', 'FSDSNI', 'FSDSVD', 'FSDSVI', 'FLDS'
+hist_fincl2 = 'H2OSNO','SOILWATER_10CM','TG'
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1dailyAVG_native.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1dailyAVG_native.yaml
new file mode 100644
index 00000000000..4e1239b5c33
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1dailyAVG_native.yaml
@@ -0,0 +1,16 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.1dailyAVG_native.h
+iotype: pnetcdf
+Averaging Type: Average
+Max Snapshots Per File: 1
+Fields:
+ Physics PG2:
+ Field Names:
+ - snow_depth_land
+output_control:
+ Frequency: 1
+ frequency_units: ndays
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1dailyMAX_native.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1dailyMAX_native.yaml
new file mode 100644
index 00000000000..a7d10efe070
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1dailyMAX_native.yaml
@@ -0,0 +1,17 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.1dailyMAX_native.h
+iotype: pnetcdf
+Averaging Type: Max
+Max Snapshots Per File: 1
+Fields:
+ Physics PG2:
+ Field Names:
+ - T_2m
+ - precip_total_surf_mass_flux
+output_control:
+ Frequency: 1
+ frequency_units: ndays
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1dailyMIN_native.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1dailyMIN_native.yaml
new file mode 100644
index 00000000000..653e194d278
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1dailyMIN_native.yaml
@@ -0,0 +1,16 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.1dailyMIN_native.h
+iotype: pnetcdf
+Averaging Type: Min
+Max Snapshots Per File: 1
+Fields:
+ Physics PG2:
+ Field Names:
+ - T_2m
+output_control:
+ Frequency: 1
+ frequency_units: ndays
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1hourlyINST_arm.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1hourlyINST_arm.yaml
new file mode 100644
index 00000000000..5bb07048aed
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1hourlyINST_arm.yaml
@@ -0,0 +1,40 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.1hourlyINST_arm.h
+iotype: pnetcdf
+Averaging Type: Instant
+Max Snapshots Per File: 24 # one file per day
+horiz_remap_file: ${DIN_LOC_ROOT}/atm/scream/maps/map_ne1024pg2_to_DecadalSites_c20240130.nc
+Fields:
+ Physics PG2:
+ Field Names:
+ # 3D
+ - T_mid
+ - RelativeHumidity
+ - qc
+ - qi
+ - qr
+ - qm
+ - ps
+ - cldfrac_tot_for_analysis
+ - cldfrac_liq
+ - cldfrac_ice_for_analysis
+ - omega
+ - tke
+ - eff_radius_qc
+ - eff_radius_qi
+ - nc
+ - ni
+ - nr
+ - bm
+ - p_mid
+ - z_mid
+ - U
+ - V
+ - landfrac
+output_control:
+ Frequency: 1
+ frequency_units: nhours
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1hourlyINST_native.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1hourlyINST_native.yaml
new file mode 100644
index 00000000000..7a221e89f1c
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.1hourlyINST_native.yaml
@@ -0,0 +1,19 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.1hourlyINST_native.h
+iotype: pnetcdf
+Averaging Type: Instant
+Max Snapshots Per File: 24
+Fields:
+ Physics PG2:
+ Field Names:
+ # For cloud morphology
+ - SW_flux_up_at_model_top
+ - LW_flux_up_at_model_top
+ - precip_total_surf_mass_flux
+output_control:
+ Frequency: 1
+ frequency_units: nhours
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.3hourlyAVG_coarse.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.3hourlyAVG_coarse.yaml
new file mode 100644
index 00000000000..665294c6227
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.3hourlyAVG_coarse.yaml
@@ -0,0 +1,69 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.3hourlyAVG_coarse.h
+iotype: pnetcdf
+Averaging Type: Average
+Max Snapshots Per File: 8 # one file per day
+horiz_remap_file: ${DIN_LOC_ROOT}/atm/scream/maps/map_ne1024pg2_to_ne30pg2_mono.20230901.nc
+Fields:
+ Physics PG2:
+ Field Names:
+ # 3D fields
+ - T_mid
+ - qv
+ - qc
+ - qr
+ - qi
+ - cldfrac_tot
+ - cldfrac_liq
+ - omega
+ - U
+ - V
+ - pseudo_density
+ - z_mid
+ # Surface
+ - surf_sens_flux
+ - surf_evap
+ - surface_upward_latent_heat_flux
+ - ps
+ - precip_liq_surf_mass_flux
+ - precip_ice_surf_mass_flux
+ - surf_mom_flux
+ - surf_radiative_T
+ - T_2m
+ - sfc_flux_dir_nir
+ - sfc_flux_dir_vis
+ - sfc_flux_dif_nir
+ - sfc_flux_dif_vis
+ - sfc_flux_sw_net
+ - sfc_flux_lw_dn
+ # Lowest Level
+ - U_at_model_bot
+ - V_at_model_bot
+ - T_mid_at_model_bot
+ - qv_at_model_bot
+ - qc_at_model_bot
+ - qi_at_model_bot
+ - qr_at_model_bot
+ - qm_at_model_bot
+ - bm_at_model_bot
+ - SW_flux_up_at_model_top
+ - SW_flux_dn_at_model_top
+ - LW_flux_up_at_model_top
+ - SW_clrsky_flux_up_at_model_top
+ - LW_clrsky_flux_up_at_model_top
+ - SW_flux_dn_at_model_bot
+ - SW_clrsky_flux_dn_at_model_bot
+ - SW_flux_up_at_model_bot
+ - SW_clrsky_flux_up_at_model_bot
+ - LW_flux_dn_at_model_bot
+ - LW_clrsky_flux_dn_at_model_bot
+ - LW_flux_up_at_model_bot
+ - LongwaveCloudForcing
+ - ShortwaveCloudForcing
+output_control:
+ Frequency: 3
+ frequency_units: nhours
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.3hourlyINST_coarse.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.3hourlyINST_coarse.yaml
new file mode 100644
index 00000000000..42c64954508
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.3hourlyINST_coarse.yaml
@@ -0,0 +1,68 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.3hourlyINST_coarse.h
+iotype: pnetcdf
+Averaging Type: Instant
+Max Snapshots Per File: 8 # one file per day
+horiz_remap_file: ${DIN_LOC_ROOT}/atm/scream/maps/map_ne1024pg2_to_ne30pg2_mono.20230901.nc
+Fields:
+ Physics PG2:
+ Field Names:
+ # 2D vars for storm analysis
+ - SeaLevelPressure
+ - U_at_model_bot
+ - V_at_model_bot
+ - wind_speed_10m
+ - U_at_925hPa
+ - V_at_925hPa
+ - U_at_850hPa
+ - V_at_850hPa
+ - U_at_700hPa
+ - V_at_700hPa
+ - U_at_500hPa
+ - V_at_500hPa
+ - U_at_300hPa
+ - V_at_300hPa
+ - ZonalVapFlux
+ - MeridionalVapFlux
+ - T_2m
+ - qv_2m
+ - T_mid_at_925hPa
+ - T_mid_at_850hPa
+ - T_mid_at_700hPa
+ - T_mid_at_500hPa
+ - T_mid_at_300hPa
+ - RelativeHumidity_at_925hPa
+ - RelativeHumidity_at_850hPa
+ - RelativeHumidity_at_700hPa
+ - RelativeHumidity_at_500hPa
+ - RelativeHumidity_at_300hPa
+ - z_mid_at_925hPa
+ - z_mid_at_850hPa
+ - z_mid_at_700hPa
+ - z_mid_at_500hPa
+ - z_mid_at_300hPa
+ # 2D vars For ACI diagnostics
+ - SW_clrsky_flux_up_at_model_top
+ - SW_flux_up_at_model_top
+ - SW_flux_dn_at_model_top
+ - LiqWaterPath
+ - precip_liq_surf_mass_flux
+ - precip_ice_surf_mass_flux
+ - IceWaterPath
+ - cldfrac_tot_for_analysis
+ - cldfrac_liq
+ - omega_at_500hPa
+ - omega_at_700hPa
+ - omega_at_850hPa
+ - PotentialTemperature_at_700hPa
+ - PotentialTemperature_at_1000hPa
+ # 3D vars for nudging
+ - U
+ - V
+output_control:
+ Frequency: 3
+ frequency_units: nhours
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.6hourlyAVG_coarse.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.6hourlyAVG_coarse.yaml
new file mode 100644
index 00000000000..5e4aaed0738
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.6hourlyAVG_coarse.yaml
@@ -0,0 +1,48 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.6hourlyAVG_coarse.h
+iotype: pnetcdf
+Averaging Type: Average
+Max Snapshots Per File: 4 # one file per day
+horiz_remap_file: ${DIN_LOC_ROOT}/atm/scream/maps/map_ne1024pg2_to_ne30pg2_mono.20230901.nc
+Fields:
+ Physics PG2:
+ Field Names:
+ # Full 3D Profile
+ - p3_T_mid_tend
+ - shoc_T_mid_tend
+ - rrtmgp_T_mid_tend
+ - homme_T_mid_tend
+ - p3_qv_tend
+ - shoc_qv_tend
+ - homme_qv_tend
+ - SW_flux_dn
+ - SW_flux_up
+ - LW_flux_dn
+ - LW_flux_up
+ # Surface
+ - surf_sens_flux
+ - surf_evap
+ - surface_upward_latent_heat_flux
+ - ps
+ - precip_liq_surf_mass_flux
+ - precip_ice_surf_mass_flux
+ - surf_mom_flux
+ - surf_radiative_T
+ - T_2m
+ # Lowest Level
+ - U_at_model_bot
+ - V_at_model_bot
+ - SW_flux_dn_at_model_bot
+ - SW_flux_up_at_model_bot
+ - LW_flux_dn_at_model_bot
+ - LW_flux_up_at_model_bot
+ - SW_flux_up_at_model_top
+ - SW_flux_dn_at_model_top
+ - LW_flux_up_at_model_top
+output_control:
+ Frequency: 6
+ frequency_units: nhours
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.6hourlyINST_coarse.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.6hourlyINST_coarse.yaml
new file mode 100644
index 00000000000..e9e0f34d5e0
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.6hourlyINST_coarse.yaml
@@ -0,0 +1,39 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.6hourlyINST_coarse.h
+iotype: pnetcdf
+Averaging Type: Instant
+Max Snapshots Per File: 4 # one file per day
+horiz_remap_file: ${DIN_LOC_ROOT}/atm/scream/maps/map_ne1024pg2_to_ne30pg2_mono.20230901.nc
+Fields:
+ Physics PG2:
+ Field Names:
+ # 3D fields on model levels
+ - T_mid
+ - qv
+ - RelativeHumidity
+ - U
+ - V
+ - omega
+ - qc
+ - nc
+ - qr
+ - qi
+ - tke
+ - o3_volume_mix_ratio
+ # 2D fields
+ - VapWaterPath
+ - LiqWaterPath
+ - IceWaterPath
+ - surf_radiative_T
+ - ps
+ - qv_2m
+ - T_2m
+ - ocnfrac
+ - landfrac
+output_control:
+ Frequency: 6
+ frequency_units: nhours
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.6hourlyINST_native.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.6hourlyINST_native.yaml
new file mode 100644
index 00000000000..bb7fd275abf
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.6hourlyINST_native.yaml
@@ -0,0 +1,28 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.6hourlyINST_native.h
+iotype: pnetcdf
+Averaging Type: Instant
+Max Snapshots Per File: 4 # one file per day
+Fields:
+ Physics PG2:
+ Field Names:
+ # For storm analysis
+ - SeaLevelPressure
+ - wind_speed_10m
+ - z_mid_at_500hPa
+ - z_mid_at_200hPa
+ # For wind turbine study
+ - wind_speed_at_100m_above_surface
+ # For atmospheric rivers
+ - ZonalVapFlux
+ - MeridionalVapFlux
+ # Others
+ - omega_at_500hPa
+ - omega_at_850hPa
+output_control:
+ Frequency: 6
+ frequency_units: nhours
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.dailyAVG_coarse.yaml b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.dailyAVG_coarse.yaml
new file mode 100644
index 00000000000..7c1990a7b56
--- /dev/null
+++ b/components/eamxx/cime_config/testdefs/testmods_dirs/eamxx/prod/yaml_outs/scream_output.decadal.dailyAVG_coarse.yaml
@@ -0,0 +1,95 @@
+%YAML 1.1
+---
+filename_prefix: scream_output.decadal.dailyAVG_coarse.h
+iotype: pnetcdf
+Averaging Type: Average
+Max Snapshots Per File: 1
+horiz_remap_file: ${DIN_LOC_ROOT}/atm/scream/maps/map_ne1024pg2_to_ne30pg2_mono.20230901.nc
+Fields:
+ Physics PG2:
+ Field Names:
+ # 3D fields
+ - T_mid
+ - qv
+ - RelativeHumidity
+ - qc
+ - qi
+ - qr
+ - qm
+ - nc
+ - ni
+ - nr
+ - cldfrac_tot_for_analysis
+ - cldfrac_ice_for_analysis
+ - cldfrac_liq
+ - omega
+ - U
+ - V
+ - z_mid
+ - p_mid
+ - tke
+ # 2D fields
+ - SW_flux_up_at_model_top
+ - SW_flux_dn_at_model_top
+ - LW_flux_up_at_model_top
+ - SW_clrsky_flux_up_at_model_top
+ - SW_clrsky_flux_dn_at_model_top
+ - LW_clrsky_flux_up_at_model_top
+ - SW_flux_up_at_model_bot
+ - SW_flux_dn_at_model_bot
+ - LW_flux_up_at_model_bot
+ - LW_flux_dn_at_model_bot
+ - SW_clrsky_flux_up_at_model_bot
+ - SW_clrsky_flux_dn_at_model_bot
+ - LW_clrsky_flux_dn_at_model_bot
+ - ShortwaveCloudForcing
+ - LongwaveCloudForcing
+ - ps
+ - SeaLevelPressure
+ - T_2m
+ - qv_2m
+ - surf_radiative_T
+ - VapWaterPath
+ - IceWaterPath
+ - LiqWaterPath
+ - RainWaterPath
+ - ZonalVapFlux
+ - MeridionalVapFlux
+ - surf_evap
+ - surf_sens_flux
+ - surface_upward_latent_heat_flux
+ - precip_liq_surf_mass_flux
+ - precip_ice_surf_mass_flux
+ - landfrac
+ - ocnfrac
+ - PotentialTemperature_at_700hPa
+ - PotentialTemperature_at_850hPa
+ - PotentialTemperature_at_1000hPa
+ - PotentialTemperature_at_2m_above_surface
+ - omega_at_500hPa
+ - omega_at_700hPa
+ - omega_at_850hPa
+ - RelativeHumidity_at_700hPa
+ - RelativeHumidity_at_1000hPa
+ - RelativeHumidity_at_2m_above_surface
+ - wind_speed_10m
+ - z_mid_at_700hPa
+ - z_mid_at_1000hPa
+ - T_mid_at_850hPa
+ - T_mid_at_700hPa
+ # For SST advection
+ - U_at_10m_above_surface
+ - V_at_10m_above_surface
+ # COSP
+ - isccp_ctptau
+ - modis_ctptau
+ - misr_cthtau
+ - cosp_sunlit
+ - isccp_cldtot
+
+output_control:
+ Frequency: 1
+ frequency_units: ndays
+ MPI Ranks in Filename: false
+Restart:
+ force_new_file: true
diff --git a/components/eamxx/cmake/machine-files/aurora.cmake b/components/eamxx/cmake/machine-files/aurora.cmake
new file mode 100644
index 00000000000..59157285bab
--- /dev/null
+++ b/components/eamxx/cmake/machine-files/aurora.cmake
@@ -0,0 +1,14 @@
+include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)
+common_setup()
+
+include (${EKAT_MACH_FILES_PATH}/kokkos/serial.cmake)
+include (${EKAT_MACH_FILES_PATH}/mpi/other.cmake)
+
+set(EKAT_MPIRUN_EXE "mpiexec" CACHE STRING "" FORCE)
+set(EKAT_MPI_NP_FLAG "-np" CACHE STRING "" FORCE)
+set(EKAT_MPI_EXTRA_ARGS "--label --cpu-bind depth -envall" CACHE STRING "")
+set(EKAT_MPI_THREAD_FLAG "-d" CACHE STRING "")
+
+set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
+set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
+set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/components/eamxx/cmake/machine-files/ghci-oci.cmake b/components/eamxx/cmake/machine-files/ghci-oci.cmake
new file mode 100644
index 00000000000..86a2fb1d530
--- /dev/null
+++ b/components/eamxx/cmake/machine-files/ghci-oci.cmake
@@ -0,0 +1,2 @@
+include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)
+common_setup()
diff --git a/components/eamxx/cmake/machine-files/mappy.cmake b/components/eamxx/cmake/machine-files/mappy.cmake
index 29fb2e74b8a..976db822325 100644
--- a/components/eamxx/cmake/machine-files/mappy.cmake
+++ b/components/eamxx/cmake/machine-files/mappy.cmake
@@ -1,5 +1,4 @@
include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)
common_setup()
-set(PYTHON_EXECUTABLE "/ascldap/users/jgfouca/packages/Python-3.8.5/bin/python3.8" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS "-fallow-argument-mismatch" CACHE STRING "" FORCE)
diff --git a/components/eamxx/cmake/machine-files/sunspot.cmake b/components/eamxx/cmake/machine-files/sunspot.cmake
new file mode 100644
index 00000000000..09ff6d4e6c4
--- /dev/null
+++ b/components/eamxx/cmake/machine-files/sunspot.cmake
@@ -0,0 +1,10 @@
+include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)
+common_setup()
+
+include (${EKAT_MACH_FILES_PATH}/kokkos/serial.cmake)
+include (${EKAT_MACH_FILES_PATH}/mpi/other.cmake)
+
+set(EKAT_MPIRUN_EXE "mpiexec" CACHE STRING "" FORCE)
+set(EKAT_MPI_NP_FLAG "-np" CACHE STRING "" FORCE)
+set(EKAT_MPI_EXTRA_ARGS "--label --cpu-bind depth -envall" CACHE STRING "")
+set(EKAT_MPI_THREAD_FLAG "-d" CACHE STRING "")
diff --git a/components/eamxx/scripts/jenkins/mappy_setup b/components/eamxx/scripts/jenkins/mappy_setup
index 8796d5fa60f..c261cb8a682 100644
--- a/components/eamxx/scripts/jenkins/mappy_setup
+++ b/components/eamxx/scripts/jenkins/mappy_setup
@@ -1,8 +1,5 @@
module purge
-source /projects/sems/modulefiles/utils/sems-archive-modules-init.sh
-module load sems-archive-env
-export PATH=/ascldap/users/jgfouca/packages/Python-3.8.5/bin:$PATH
-module load sems-archive-git/2.10.1
+module load sems-git/2.42.0
source $JENKINS_SCRIPT_DIR/sandia_son_proxy
diff --git a/components/eamxx/scripts/machines_specs.py b/components/eamxx/scripts/machines_specs.py
index 713f49200fb..479d402e709 100644
--- a/components/eamxx/scripts/machines_specs.py
+++ b/components/eamxx/scripts/machines_specs.py
@@ -28,9 +28,8 @@
["mpicxx","mpifort","mpicc"],
"bsub -I -q rhel8 -n 4 -gpu num=4",
"/home/projects/e3sm/scream/pr-autotester/master-baselines/weaver/"),
- "mappy" : (["module purge", "module load sems-archive-env acme-env acme-cmake/3.26.3 acme-gcc/11.2.0 sems-archive-git/2.10.1 acme-openmpi/4.1.4 acme-netcdf/4.7.4/acme",
+ "mappy" : (["module purge", "module load sems-cmake/3.27.9 sems-git/2.42.0 sems-gcc/11.4.0 sems-openmpi-no-cuda/4.1.6 sems-netcdf-c/4.9.2 sems-netcdf-cxx/4.2 sems-netcdf-fortran/4.6.1 sems-parallel-netcdf/1.12.3 sems-openblas",
"export GATOR_INITIAL_MB=4000MB",
- "export PATH=/ascldap/users/jgfouca/packages/valgrind-3.22.0/bin:$PATH",
],
["mpicxx","mpifort","mpicc"],
"",
@@ -238,9 +237,9 @@ def is_cuda_machine(machine):
assert_machine_supported(machine)
env_setup_raw = MACHINE_METADATA[machine][0]
- env_setup_str = " ".join(env_setup_raw)
+ env_setup_str = " ".join(env_setup_raw).lower()
- return "cuda" in env_setup_str.lower()
+ return ("no-cuda" not in env_setup_str and "cuda" in env_setup_str)
###############################################################################
def setup_mach_env(machine, ctest_j=None):
diff --git a/components/elm/bld/ELMBuildNamelist.pm b/components/elm/bld/ELMBuildNamelist.pm
index 68afd92e132..cbf067e6760 100755
--- a/components/elm/bld/ELMBuildNamelist.pm
+++ b/components/elm/bld/ELMBuildNamelist.pm
@@ -1552,13 +1552,19 @@ sub setup_cmdl_maxpft {
$nl_flags->{'maxpft'} = $val;
if ( ($nl_flags->{'bgc_mode'} ne "sp") && ($nl_flags->{'maxpft'} != $maxpatchpft{$nl_flags->{'use_crop'}}) ) {
- fatal_error("** For CN or BGC mode you MUST set max patch PFT's to $maxpatchpft{$nl_flags->{'use_crop'}}\n" .
- "**\n" .
- "** When the crop model is on then it must be set to $maxpatchpft{'crop'} otherwise to $maxpatchpft{'nocrop'}\n" .
- "** Set the bgc mode, crop and maxpft by the following means from highest to lowest precedence:\n" .
- "** * by the command-line options -bgc, -crop and -maxpft\n" .
- "** * by a default configuration file, specified by -defaults\n" .
- "**\n");
+ if ($opts->{$var} eq "default") {
+ fatal_error("** For CN or BGC mode you MUST set max patch PFT $val to $maxpatchpft{$nl_flags->{'use_crop'}}\n" .
+ "**\n" .
+ "** When the crop model is on then it must be set to $maxpatchpft{'crop'} otherwise to $maxpatchpft{'nocrop'}\n" .
+ "** Set the bgc mode, crop and maxpft by the following means from highest to lowest precedence:\n" .
+ "** * by the command-line options -bgc, -crop and -maxpft\n" .
+ "** * by a default configuration file, specified by -defaults\n" .
+ "**\n");
+ } else {
+ message("running with maxpft NOT equal to $maxpatchpft{$nl_flags->{'use_crop'}} is " .
+ "NOT validated / scientifically supported.\n");
+
+ }
}
if ( $nl_flags->{'maxpft'} > $maxpatchpft{$nl_flags->{'use_crop'}} ) {
fatal_error("** Max patch PFT's can NOT exceed $maxpatchpft{$nl_flags->{'use_crop'}}\n" .
diff --git a/components/elm/bld/namelist_files/namelist_defaults.xml b/components/elm/bld/namelist_files/namelist_defaults.xml
index 2aae1d37e90..b2d7a95a3fc 100644
--- a/components/elm/bld/namelist_files/namelist_defaults.xml
+++ b/components/elm/bld/namelist_files/namelist_defaults.xml
@@ -487,48 +487,48 @@ lnd/clm2/surfdata_map/surfdata_conusx4v1_simyr2000_c160503.nc
dataset (arbitrarily, RCP8.5) for the historical period, because all of the
RCP datasets contain the 1850-2000 period as well as the future period. -->
-lnd/clm2/surfdata_map/landuse.timeseries_360x720cru_hist_simyr1850-2015_c180220.nc
-lnd/clm2/surfdata_map/landuse.timeseries_0.9x1.25_hist_simyr1850-2015_c180306.nc
-lnd/clm2/surfdata_map/landuse.timeseries_1.9x2.5_hist_simyr1850-2015_c180306.nc
-lnd/clm2/surfdata_map/surfdata.pftdyn_10x15_rcp8.5_simyr1850-2100_c130524.nc
-lnd/clm2/surfdata_map/surfdata.pftdyn_48x96_rcp8.5_simyr1850-2100_c130524.nc
lnd/clm2/surfdata_map/landuse.timeseries_antarcticax4v1pg2_hist_simyr1850-2015_c210131.nc
-lnd/clm2/surfdata_map/surfdata.pftdyn_1x1_tropicAtl_hist_simyr1850-2005_c130627.nc
-lnd/clm2/surfdata_map/landuse.timeseries_1x1_brazil_rcp8.5_simyr1850-2100_c140610.nc
-lnd/clm2/surfdata_map/landuse.timeseries_ne30np4_hist_simyr1850-2015_c180306.nc
- lnd/clm2/surfdata_map/landuse.timeseries_ne30np4.pg2_hist_simyr1850-2015_c210113.nc
- lnd/clm2/surfdata_map/landuse.timeseries_ne4pg2_hist_simyr1850-2015_c210722.nc
- lnd/clm2/surfdata_map/landuse.timeseries_ne0np4_northamericax4v1.pg2_hist_simyr1850-2015_c211015.nc
-lnd/clm2/surfdata_map/surfdata.pftdyn_ne16np4_hist_simyr1850-2005_c160803.nc
-lnd/clm2/surfdata_map/surfdata.pftdyn_ne11np4_hist_simyr1850-2005_c160803.nc
lnd/clm2/surfdata_map/landuse.timeseries_ne1024pg2_historical_simyr1990-2014_c240109.nc
lnd/clm2/surfdata_map/landuse.timeseries_ne256pg2_hist_simyr1850-2015_c240131.nc
-lnd/clm2/surfdata_map/landuse.timeseries_0.125x0.125_hist_simyr1850-2015_c191004.nc
-lnd/clm2/surfdata_map/landuse.timeseries_0.5x0.5_HIST_simyr1850-2015_c211019.nc
-lnd/clm2/surfdata_map/landuse.timeseries_0.5x0.5_hist_simyr1850-2015_c191004.nc
@@ -668,7 +668,7 @@ this mask will have smb calculated over the entire global land surface
2000
2100
-lnd/clm2/ndepdata/fndep_elm_cbgc_exp_simyr1849-2101_1.9x2.5_c190103.nc
+lnd/clm2/ndepdata/fndep_elm_cbgc_exp_simyr1849-2101_1.9x2.5_ssp245_c240903.nc
lnd/clm2/ndepdata/fndep_clm_rcp8.5_simyr1849-2106_1.9x2.5_c100428.nc
lnd/clm2/ndepdata/fndep_clm_rcp6.0_simyr1849-2106_1.9x2.5_c100810.nc
lnd/clm2/ndepdata/fndep_clm_rcp4.5_simyr1849-2106_1.9x2.5_c100428.nc
@@ -901,8 +901,8 @@ this mask will have smb calculated over the entire global land surface
1850
2010
-lnd/clm2/firedata/elmforc.ssp5_hdm_0.5x0.5_simyr1850-2100_c190109.nc
-lnd/clm2/firedata/elmforc.ssp5_hdm_0.5x0.5_simyr1850-2100_c190109.nc
+lnd/clm2/firedata/elmforc.Li_20181205_mod_hist_SSP2_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c240906.nc
+lnd/clm2/firedata/elmforc.Li_20181205_mod_hist_SSP2_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c240906.nc
bilinear
diff --git a/components/elm/bld/namelist_files/use_cases/2015-2100_SSP245_transient.xml b/components/elm/bld/namelist_files/use_cases/2015-2100_SSP245_transient.xml
index e313dab6b16..6e664162609 100755
--- a/components/elm/bld/namelist_files/use_cases/2015-2100_SSP245_transient.xml
+++ b/components/elm/bld/namelist_files/use_cases/2015-2100_SSP245_transient.xml
@@ -17,8 +17,10 @@
+
+
1850
-2005
+2101
1850
2000
@@ -26,7 +28,7 @@
2000
1850
-2010
+2100
1850
diff --git a/components/elm/bld/namelist_files/use_cases/2015-2100_SSP370_transient.xml b/components/elm/bld/namelist_files/use_cases/2015-2100_SSP370_transient.xml
index 0e8415d3c1a..0c54a8ce603 100755
--- a/components/elm/bld/namelist_files/use_cases/2015-2100_SSP370_transient.xml
+++ b/components/elm/bld/namelist_files/use_cases/2015-2100_SSP370_transient.xml
@@ -18,16 +18,18 @@
1850
-2005
+2101
1850
+lnd/clm2/ndepdata/fndep_elm_cbgc_exp_simyr1849-2101_1.9x2.5_ssp370_c220614.nc
2000
2000
2000
1850
-2010
+2100
1850
+lnd/clm2/firedata/elmforc.Li_20181205_mod_hist_SSP3_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c240906.nc
diff --git a/components/elm/bld/namelist_files/use_cases/2015-2100_SSP585_transient.xml b/components/elm/bld/namelist_files/use_cases/2015-2100_SSP585_transient.xml
index 2db3549ce5f..c297dffe113 100644
--- a/components/elm/bld/namelist_files/use_cases/2015-2100_SSP585_transient.xml
+++ b/components/elm/bld/namelist_files/use_cases/2015-2100_SSP585_transient.xml
@@ -18,16 +18,18 @@
1850
-2005
+2101
1850
+lnd/clm2/ndepdata/fndep_elm_cbgc_exp_simyr1849-2101_1.9x2.5_ssp585_c190103.nc
2000
2000
2000
1850
-2010
+2100
1850
+lnd/clm2/firedata/elmforc.Li_20181205_mod_hist_SSP5_CMIP6_hdm_0.5x0.5_AVHRR_simyr1850-2100_c240906.nc
diff --git a/components/elm/bld/namelist_files/use_cases/20thC_CMIP6_transient.xml b/components/elm/bld/namelist_files/use_cases/20thC_CMIP6_transient.xml
index 4f48bf6326a..a919a484791 100644
--- a/components/elm/bld/namelist_files/use_cases/20thC_CMIP6_transient.xml
+++ b/components/elm/bld/namelist_files/use_cases/20thC_CMIP6_transient.xml
@@ -9,7 +9,7 @@
1850
-1850-2000
+1850-2015
arb_ic
@@ -18,7 +18,7 @@
1850
-2005
+2101
1850
@@ -27,7 +27,7 @@
2000
1850
-2010
+2100
1850
@@ -38,6 +38,7 @@
lnd/clm2/initdata_map/20180316.DECKv1b_A1.ne30_oEC.edison.clm2.r.1980-01-01-00000.8575c3f_c20190904.nc
lnd/clm2/surfdata_map/landuse.timeseries_0.5x0.5_hist_simyr1850-2015_c240308.nc
+lnd/clm2/surfdata_map/landuse.timeseries_0.25x0.25_hist_simyr1850-2015_c240125.nc
lnd/clm2/surfdata_map/landuse.timeseries_ne120np4_historical_simyr1850-2015_c190904.nc
diff --git a/components/elm/bld/namelist_files/use_cases/20thC_CMIP6xLULC_transient.xml b/components/elm/bld/namelist_files/use_cases/20thC_CMIP6xLULC_transient.xml
new file mode 100644
index 00000000000..7a6247bbe27
--- /dev/null
+++ b/components/elm/bld/namelist_files/use_cases/20thC_CMIP6xLULC_transient.xml
@@ -0,0 +1,48 @@
+
+
+
+
+Historical single forcing simulation with land held at 1850 condition
+Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to 2005
+Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to 2005
+Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to 2005
+
+1850
+
+1850-2000
+
+arb_ic
+
+
+1850
+1850
+1850
+
+
+2000
+2000
+2000
+
+1850
+1850
+1850
+
+
+
+
+lnd/clm2/surfdata_map/surfdata_ne30np4_simyr1850_2015_c171018.nc
+lnd/clm2/surfdata_map/landuse.timeseries_ne30np4_hist_simyr1850_2015_c20171018.nc
+lnd/clm2/initdata_map/20180316.DECKv1b_A1.ne30_oEC.edison.clm2.r.1980-01-01-00000.8575c3f_c20190904.nc
+
+lnd/clm2/surfdata_map/surfdata_0.125x0.125_simyr1850_c190730.nc
+
+lnd/clm2/surfdata_map/surfdata_0.5x0.5_simyr1850_c200609_with_TOP.nc
+
+
+lnd/clm2/surfdata_map/surfdata_ne1024pg2_simyr2010_c211021.nc
+
+.false.
+.false.
+
+
+
diff --git a/components/elm/bld/namelist_files/use_cases/20thC_transient.xml b/components/elm/bld/namelist_files/use_cases/20thC_transient.xml
index 86035ec6e08..1fe1f286049 100644
--- a/components/elm/bld/namelist_files/use_cases/20thC_transient.xml
+++ b/components/elm/bld/namelist_files/use_cases/20thC_transient.xml
@@ -9,7 +9,7 @@
1850
-1850-2000
+1850-2015
arb_ic
diff --git a/components/elm/cime_config/config_component.xml b/components/elm/cime_config/config_component.xml
index da060584cfb..4e637ef5580 100755
--- a/components/elm/cime_config/config_component.xml
+++ b/components/elm/cime_config/config_component.xml
@@ -72,7 +72,16 @@
1850_CMIP6bgc_control
1850_SCMIP6_control
1850_SCMIP6_control
- 20thC_CMIP6_transient
+ 20thC_CMIP6_transient
+ 20thC_CMIP6xLULC_transient
+ 20thC_CMIP6xLULC_transient
+ 20thC_CMIP6xLULC_transient
+ 20thC_CMIP6xLULC_transient
+ 20thC_CMIP6xLULC_transient
+ 20thC_CMIP6_transient
+ 20thC_CMIP6_transient
+ 20thC_CMIP6_transient
+ 20thC_CMIP6_transient
20thC_CMIP6bgc_transient
20thC_CMIP6bgc_transient
20thC_bgc_transient
diff --git a/components/elm/cime_config/config_pes.xml b/components/elm/cime_config/config_pes.xml
index 4af0da69965..39e36221175 100644
--- a/components/elm/cime_config/config_pes.xml
+++ b/components/elm/cime_config/config_pes.xml
@@ -237,16 +237,16 @@
- elm: pm-cpu 2 nodes for grid l%360x720cru
+ elm: pm-cpu 3 nodes for grid l%360x720cru
- 192
- 192
- 192
- 192
- 192
- 192
- 192
- 192
+ -3
+ -3
+ -3
+ -3
+ -3
+ -3
+ -3
+ -3
@@ -568,7 +568,7 @@
-
+
GIS 20km (low-res) testing config
128
@@ -606,7 +606,7 @@
-
+
GIS 1-to-10km (high-res) config
128
diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_arctic_I1850CNPRDCTCBC/clm_params_c180524-sub12_updated20240201.nc b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_arctic_I1850CNPRDCTCBC/clm_params_c180524-sub12_updated20240201.nc
new file mode 100644
index 00000000000..2ec124ef779
Binary files /dev/null and b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_arctic_I1850CNPRDCTCBC/clm_params_c180524-sub12_updated20240201.nc differ
diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_arctic_I1850CNPRDCTCBC/shell_commands b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_arctic_I1850CNPRDCTCBC/shell_commands
new file mode 100644
index 00000000000..96e201b6319
--- /dev/null
+++ b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_arctic_I1850CNPRDCTCBC/shell_commands
@@ -0,0 +1,11 @@
+./xmlchange LND_DOMAIN_FILE=domain.lnd.6x1pt_kougarok-NGEE_TransA_navy.nc
+./xmlchange ATM_DOMAIN_FILE=domain.lnd.6x1pt_kougarok-NGEE_TransA_navy.nc
+./xmlchange LND_DOMAIN_PATH="$DIN_LOC_ROOT/share/domains/domain.clm"
+./xmlchange ATM_DOMAIN_PATH="$DIN_LOC_ROOT/share/domains/domain.clm"
+./xmlchange ELM_USRDAT_NAME=6x1pt_kougarok-NGEE_TransA
+./xmlchange ELM_BLDNML_OPTS=" -maxpft 12 -bgc bgc -nutrient cnp -nutrient_comp_pathway rd -soil_decomp ctc -methane "
+./xmlchange DATM_MODE=CLMGSWP3v1
+./xmlchange DATM_CLMNCEP_YR_START=1901
+./xmlchange DATM_CLMNCEP_YR_END=1920
+./xmlchange NTASKS=1
+./xmlchange NTHRDS=1
diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_arctic_I1850CNPRDCTCBC/user_nl_elm b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_arctic_I1850CNPRDCTCBC/user_nl_elm
new file mode 100644
index 00000000000..1a20f087a94
--- /dev/null
+++ b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_arctic_I1850CNPRDCTCBC/user_nl_elm
@@ -0,0 +1,7 @@
+fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_map/surfdata_6x1pt_kougarok-NGEE_TransA_simyr1850_c20201008-sub12.nc'
+! below is user-pft file example, developed by B. Sulman et al. (2021)
+! 12(+2) arctic PFTs: not_vegetated, arctic_lichen, arctic_bryophyte, (arctic_needleleaf_tree, arctic_broadleaf_tree,)
+! arctic_evergreen_shrub_dwarf, arctic_evergreen_shrub_tall,
+! arctic_deciduous_shrub_dwarf, arctic_deciduous_shrub_low, arctic_deciduous_shrub_tall, arctic_decidous_shrub_alder,
+! arctic_forb, arctic_dry_graminoid, arctic_wet_graminoid
+ paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm_params_c180524-sub12_updated20240201.nc'
diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_codetest_I1850CNPRDCTCBC/clm_params_c211124vpft.nc b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_codetest_I1850CNPRDCTCBC/clm_params_c211124vpft.nc
new file mode 100644
index 00000000000..fce6dda3ca3
Binary files /dev/null and b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_codetest_I1850CNPRDCTCBC/clm_params_c211124vpft.nc differ
diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_codetest_I1850CNPRDCTCBC/shell_commands b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_codetest_I1850CNPRDCTCBC/shell_commands
new file mode 100644
index 00000000000..396d8cea8d6
--- /dev/null
+++ b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_codetest_I1850CNPRDCTCBC/shell_commands
@@ -0,0 +1,10 @@
+./xmlchange LND_DOMAIN_FILE=domain_42_FLUXNETSITES_simyr1850_c170912.nc
+./xmlchange ATM_DOMAIN_FILE=domain_42_FLUXNETSITES_simyr1850_c170912.nc
+./xmlchange LND_DOMAIN_PATH="\$DIN_LOC_ROOT/share/domains/domain.clm"
+./xmlchange ATM_DOMAIN_PATH="\$DIN_LOC_ROOT/share/domains/domain.clm"
+./xmlchange DATM_MODE=CLM1PT
+./xmlchange DATM_CLMNCEP_YR_START=2000
+./xmlchange DATM_CLMNCEP_YR_END=2000
+./xmlchange ELM_USRDAT_NAME=42_FLUXNETSITES
+./xmlchange NTASKS=1
+./xmlchange NTHRDS=1
diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_codetest_I1850CNPRDCTCBC/user_nl_elm b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_codetest_I1850CNPRDCTCBC/user_nl_elm
new file mode 100644
index 00000000000..921f5d7714b
--- /dev/null
+++ b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_codetest_I1850CNPRDCTCBC/user_nl_elm
@@ -0,0 +1,10 @@
+fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_map/surfdata_42_FLUXNETSITES_simyr1850_c170912.nc'
+! paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm_params_c211124.nc'
+!
+! When 'user-pft' codes ready, comment out the above line while let the following in.
+!
+! below is user-pft file example, by editing default one as following
+! woody=1 for tree, or =2 for shrub, and defined other pft flags:
+! climatezone(0-4), nonvascular(0/1), graminoid(0/1), generic_crop(0/1), nfixer(0/1), needleleaf(0/1)
+! for not going by default, changing one PFT name by appending '_unexpected'.
+ paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm_params_c211124vpft.nc'
diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_default_I1850CNPRDCTCBC/shell_commands b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_default_I1850CNPRDCTCBC/shell_commands
new file mode 100644
index 00000000000..39d8b8813ed
--- /dev/null
+++ b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_default_I1850CNPRDCTCBC/shell_commands
@@ -0,0 +1,11 @@
+./xmlchange LND_DOMAIN_FILE=domain_42_FLUXNETSITES_simyr1850_c170912.nc
+./xmlchange ATM_DOMAIN_FILE=domain_42_FLUXNETSITES_simyr1850_c170912.nc
+./xmlchange LND_DOMAIN_PATH="\$DIN_LOC_ROOT/share/domains/domain.clm"
+./xmlchange ATM_DOMAIN_PATH="\$DIN_LOC_ROOT/share/domains/domain.clm"
+./xmlchange DATM_MODE=CLM1PT
+./xmlchange DATM_CLMNCEP_YR_START=2000
+./xmlchange DATM_CLMNCEP_YR_END=2000
+./xmlchange ELM_USRDAT_NAME=42_FLUXNETSITES
+./xmlchange NTASKS=1
+./xmlchange NTHRDS=1
+
diff --git a/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_default_I1850CNPRDCTCBC/user_nl_elm b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_default_I1850CNPRDCTCBC/user_nl_elm
new file mode 100644
index 00000000000..89670835e09
--- /dev/null
+++ b/components/elm/cime_config/testdefs/testmods_dirs/elm/usrpft_default_I1850CNPRDCTCBC/user_nl_elm
@@ -0,0 +1,2 @@
+fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_map/surfdata_42_FLUXNETSITES_simyr1850_c170912.nc'
+paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm_params_c211124.nc'
\ No newline at end of file
diff --git a/components/elm/src/biogeochem/AllocationMod.F90 b/components/elm/src/biogeochem/AllocationMod.F90
index 2795fd42c8e..141194397fb 100644
--- a/components/elm/src/biogeochem/AllocationMod.F90
+++ b/components/elm/src/biogeochem/AllocationMod.F90
@@ -386,7 +386,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
use elm_varctl , only : carbonphosphorus_only!
use pftvarcon , only: npcropmin, declfact, bfact, aleaff, arootf, astemf, noveg
use pftvarcon , only: arooti, fleafi, allconsl, allconss, grperc, grpnow, nsoybean
- use pftvarcon , only: percrop
+ use pftvarcon , only: iscft, percrop
use elm_varpar , only: nlevdecomp
use elm_varcon , only: nitrif_n2o_loss_frac, secspday
!
@@ -583,9 +583,9 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
! These fluxes should already be in gC/m2/s
mr = leaf_mr(p) + froot_mr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
mr = mr + livestem_mr(p) + livecroot_mr(p)
- else if (ivt(p) >= npcropmin) then
+ else if (iscft(ivt(p))) then
if (croplive(p)) mr = mr + livestem_mr(p) + grain_mr(p)
end if
@@ -672,7 +672,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
f5 = 0._r8 ! continued intializations from above
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
if (croplive(p) .and. percrop(ivt(p)) == 0.0_r8 ) then
! same phases appear in subroutine CropPhenology
@@ -815,14 +815,14 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
! determine N requirements
! determine P requirements -X. YANG
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f3*(1._r8+f2))
n_allometry(p) = 1._r8/cnl + f1/cnfr + (f3*f4*(1._r8+f2))/cnlw + &
(f3*(1._r8-f4)*(1._r8+f2))/cndw
p_allometry(p) = 1._r8/cpl + f1/cpfr + (f3*f4*(1._r8+f2))/cplw + &
(f3*(1._r8-f4)*(1._r8+f2))/cpdw
- else if (ivt(p) >= npcropmin) then ! skip generic crops
+ else if (iscft(ivt(p))) then ! skip generic crops
cng = graincn(ivt(p))
cpg = graincp(ivt(p))
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f5+f3*(1._r8+f2))
@@ -852,10 +852,10 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
! retransn pool has N from leaves, stems, and roots for
! retranslocation
- if (ivt(p) >= npcropmin .and. grain_flag(p) == 1._r8) then
+ if (iscft(ivt(p)) .and. grain_flag(p) == 1._r8) then
avail_retransn(p) = plant_ndemand(p)
avail_retransp(p) = plant_pdemand(p)
- else if (ivt(p) < npcropmin .and. annsum_potential_gpp(p) > 0._r8) then
+ else if ((.not. iscft(ivt(p))) .and. annsum_potential_gpp(p) > 0._r8) then
avail_retransn(p) = (annmax_retransn(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
avail_retransp(p) = (annmax_retransp(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
else
@@ -1859,7 +1859,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
!$acc routine seq
use elm_varctl , only: iulog
use pftvarcon , only: noveg
- use pftvarcon , only: npcropmin, grperc, grpnow
+ use pftvarcon , only: iscft, grperc, grpnow
use elm_varpar , only: nlevdecomp
use elm_varcon , only: nitrif_n2o_loss_frac, secspday
!
@@ -2142,7 +2142,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
fcur = fcur2(ivt(p))
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
if (croplive(p)) then
f1 = aroot(p) / aleaf(p)
f3 = astem(p) / aleaf(p)
@@ -2328,7 +2328,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
fcur = fcur2(ivt(p))
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
if (croplive(p)) then
f1 = aroot(p) / aleaf(p)
f3 = astem(p) / aleaf(p)
@@ -2345,10 +2345,10 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
sminn_to_npool(p) = sminn_to_plant_patch(p)
sminp_to_ppool(p) = sminp_to_plant_patch(p)
- if (ivt(p) >= npcropmin .and. grain_flag(p) == 1._r8) then
+ if (iscft(ivt(p)) .and. grain_flag(p) == 1._r8) then
avail_retransn(p) = retransn(p)/dt
avail_retransp(p) = retransp(p)/dt
- else if (ivt(p) < npcropmin .and. annsum_potential_gpp(p) > 0._r8) then
+ else if ((.not. iscft(ivt(p))) .and. annsum_potential_gpp(p) > 0._r8) then
avail_retransn(p) = (annmax_retransn(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
avail_retransp(p) = (annmax_retransp(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
else
@@ -2372,9 +2372,9 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
endif
mr = leaf_mr(p) + froot_mr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
mr = mr + livestem_mr(p) + livecroot_mr(p)
- else if (ivt(p) >= npcropmin) then
+ else if (iscft(ivt(p))) then
if (croplive(p)) mr = mr + livestem_mr(p) + grain_mr(p)
end if
@@ -2466,14 +2466,14 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
plant_calloc(p) = availc(p)
! here no down-regulation on allocatable C here, NP limitation is implemented in leaf-level NP control on GPP
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f3*(1._r8+f2))
n_allometry(p) = 1._r8/cnl + f1/cnfr + (f3*f4*(1._r8+f2))/cnlw + &
(f3*(1._r8-f4)*(1._r8+f2))/cndw
p_allometry(p) = 1._r8/cpl + f1/cpfr + (f3*f4*(1._r8+f2))/cplw + &
(f3*(1._r8-f4)*(1._r8+f2))/cpdw
- else if (ivt(p) >= npcropmin) then ! skip generic crops
+ else if (iscft(ivt(p))) then ! skip generic crops
cng = graincn(ivt(p))
cpg = graincp(ivt(p))
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f5+f3*(1._r8+f2))
@@ -2549,7 +2549,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * (1._r8 - fcur) * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f1 * fcur * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f1 * (1._r8 - fcur) * (1 + g1)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * fcur * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * (1._r8 - fcur) * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * (1._r8 - f4) * fcur * (1 + g1)
@@ -2559,7 +2559,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f2 * f3 * (1._r8 - f4) * fcur * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f2 * f3 * (1._r8 - f4) * (1._r8 - fcur) * (1 + g1)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * fcur * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * (1._r8 - fcur) * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * (1._r8 - f4) * fcur * (1 + g1)
@@ -2580,7 +2580,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
cpool_to_leafc_storage(p) = nlc * (1._r8 - fcur)
cpool_to_frootc(p) = nlc * f1 * fcur
cpool_to_frootc_storage(p) = nlc * f1 * (1._r8 - fcur)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
cpool_to_livestemc(p) = nlc * f3 * f4 * fcur
cpool_to_livestemc_storage(p) = nlc * f3 * f4 * (1._r8 - fcur)
cpool_to_deadstemc(p) = nlc * f3 * (1._r8 - f4) * fcur
@@ -2590,7 +2590,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
cpool_to_deadcrootc(p) = nlc * f2 * f3 * (1._r8 - f4) * fcur
cpool_to_deadcrootc_storage(p) = nlc * f2 * f3 * (1._r8 - f4) * (1._r8 - fcur)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cpool_to_livestemc(p) = nlc * f3 * f4 * fcur
cpool_to_livestemc_storage(p) = nlc * f3 * f4 * (1._r8 - fcur)
cpool_to_deadstemc(p) = nlc * f3 * (1._r8 - f4) * fcur
@@ -2633,7 +2633,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
npool_to_leafn_storage(p) = (nlc / cnl) * (1._r8 - fcur)
npool_to_frootn(p) = (nlc * f1 / cnfr) * fcur
npool_to_frootn_storage(p) = (nlc * f1 / cnfr) * (1._r8 - fcur)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
npool_to_livestemn(p) = (nlc * f3 * f4 / cnlw) * fcur
npool_to_livestemn_storage(p) = (nlc * f3 * f4 / cnlw) * (1._r8 - fcur)
npool_to_deadstemn(p) = (nlc * f3 * (1._r8 - f4) / cndw) * fcur
@@ -2643,7 +2643,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
npool_to_deadcrootn(p) = (nlc * f2 * f3 * (1._r8 - f4) / cndw) * fcur
npool_to_deadcrootn_storage(p) = (nlc * f2 * f3 * (1._r8 - f4) / cndw) * (1._r8 - fcur)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cng = graincn(ivt(p))
npool_to_livestemn(p) = (nlc * f3 * f4 / cnlw) * fcur
npool_to_livestemn_storage(p) = (nlc * f3 * f4 / cnlw) * (1._r8 - fcur)
@@ -2677,7 +2677,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
ppool_to_leafp_storage(p) = (nlc / cpl) * (1._r8 - fcur)
ppool_to_frootp(p) = (nlc * f1 / cpfr) * fcur
ppool_to_frootp_storage(p) = (nlc * f1 / cpfr) * (1._r8 - fcur)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
ppool_to_livestemp(p) = (nlc * f3 * f4 / cplw) * fcur
ppool_to_livestemp_storage(p) = (nlc * f3 * f4 / cplw) * (1._r8 -fcur)
ppool_to_deadstemp(p) = (nlc * f3 * (1._r8 - f4) / cpdw) *fcur
@@ -2687,7 +2687,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
ppool_to_deadcrootp(p) = (nlc * f2 * f3 * (1._r8 - f4) / cpdw)* fcur
ppool_to_deadcrootp_storage(p) = (nlc * f2 * f3 * (1._r8 - f4) / cpdw)* (1._r8 - fcur)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cpg = graincp(ivt(p))
ppool_to_livestemp(p) = (nlc * f3 * f4 / cplw) * fcur
ppool_to_livestemp_storage(p) = (nlc * f3 * f4 / cplw) * (1._r8 -fcur)
@@ -2711,13 +2711,13 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
! growth is assigned here.
gresp_storage = cpool_to_leafc_storage(p) + cpool_to_frootc_storage(p)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
gresp_storage = gresp_storage + cpool_to_livestemc_storage(p)
gresp_storage = gresp_storage + cpool_to_deadstemc_storage(p)
gresp_storage = gresp_storage + cpool_to_livecrootc_storage(p)
gresp_storage = gresp_storage + cpool_to_deadcrootc_storage(p)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
gresp_storage = gresp_storage + cpool_to_livestemc_storage(p)
gresp_storage = gresp_storage + cpool_to_grainc_storage(p)
end if
@@ -2748,7 +2748,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
npool_to_frootn(p) = cpool_to_frootc(p) / cnfr
npool_to_frootn_storage(p) = cpool_to_frootc_storage(p) / cnfr
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
supplement_to_plantn(p) = supplement_to_plantn(p) + cpool_to_livestemc(p) / cnlw - npool_to_livestemn(p)
supplement_to_plantn(p) = supplement_to_plantn(p) + cpool_to_livestemc_storage(p) / cnlw &
- npool_to_livestemn_storage(p)
@@ -2771,7 +2771,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
npool_to_deadcrootn(p) = cpool_to_deadcrootc(p) / cndw
npool_to_deadcrootn_storage(p) = cpool_to_deadcrootc_storage(p) / cndw
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cng = graincn(ivt(p))
supplement_to_plantn(p) = supplement_to_plantn(p) + cpool_to_livestemc(p) / cnlw - npool_to_livestemn(p)
supplement_to_plantn(p) = supplement_to_plantn(p) + cpool_to_livestemc_storage(p) / cnlw &
@@ -2815,7 +2815,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
ppool_to_frootp(p) = cpool_to_frootc(p) / cpfr
ppool_to_frootp_storage(p) = cpool_to_frootc_storage(p) / cpfr
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
supplement_to_plantp(p) = supplement_to_plantp(p) + max(cpool_to_livestemc(p) / cplw &
- ppool_to_livestemp(p),0._r8)
@@ -2843,7 +2843,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
ppool_to_deadcrootp(p) = cpool_to_deadcrootc(p) / cpdw
ppool_to_deadcrootp_storage(p) = cpool_to_deadcrootc_storage(p) / cpdw
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cpg = graincp(ivt(p))
supplement_to_plantp(p) = supplement_to_plantp(p) + max(cpool_to_livestemc(p) / cplw &
- ppool_to_livestemp(p),0._r8)
@@ -3891,7 +3891,7 @@ subroutine dynamic_plant_alloc( nutrient_scalar, water_scalar, laindex, alloc_le
alloc_froot = min(alloc_froot, 0.4_r8)
! stem allocation
- if (woody == 1.0_r8) then
+ if (woody >= 1.0_r8) then
alloc_stem = alloc_s0 * 3.0_r8 * min(nu_scalar,w_scalar) / (2.0_r8 * light_scalar + min(nu_scalar,w_scalar))
else
alloc_stem = 0.0_r8
@@ -3908,7 +3908,7 @@ subroutine dynamic_plant_alloc( nutrient_scalar, water_scalar, laindex, alloc_le
! if lai greater than laimax then no allocation to leaf; leaf allocation goes to stem or fine root
if (laindex > laimax) then
- if (woody == 1.0_r8) then
+ if (woody >= 1.0_r8) then
alloc_stem = alloc_stem + alloc_leaf/2._r8 - 0.005_r8
alloc_froot = alloc_froot + alloc_leaf/2._r8 - 0.005_r8
else
diff --git a/components/elm/src/biogeochem/CH4Mod.F90 b/components/elm/src/biogeochem/CH4Mod.F90
index ce2378049fd..3b3c1fa8061 100644
--- a/components/elm/src/biogeochem/CH4Mod.F90
+++ b/components/elm/src/biogeochem/CH4Mod.F90
@@ -2426,7 +2426,7 @@ subroutine ch4_aere (bounds, &
! !USES:
!$acc routine seq
use elm_varcon , only : rpi
- use pftvarcon , only : nc3_arctic_grass, crop, nc3_nonarctic_grass, nc4_grass, noveg
+ use pftvarcon , only : graminoid, crop, noveg
use CH4varcon , only : transpirationloss, usefrootc, use_aereoxid_prog
!
! !ARGUMENTS:
@@ -2563,8 +2563,7 @@ subroutine ch4_aere (bounds, &
is_vegetated = .false.
end if
- if (veg_pp%itype(p) == nc3_arctic_grass .or. crop(veg_pp%itype(p)) == 1 .or. &
- veg_pp%itype(p) == nc3_nonarctic_grass .or. veg_pp%itype(p) == nc4_grass) then
+ if (graminoid(veg_pp%itype(p)) == 1 .or. crop(veg_pp%itype(p)) == 1) then
poros_tiller = 0.3_r8 ! Colmer 2003
else
poros_tiller = 0.3_r8 * CH4ParamsInst%nongrassporosratio
diff --git a/components/elm/src/biogeochem/CNAllocationBetrMod.F90 b/components/elm/src/biogeochem/CNAllocationBetrMod.F90
index 9701eebda60..8cfc342bb40 100644
--- a/components/elm/src/biogeochem/CNAllocationBetrMod.F90
+++ b/components/elm/src/biogeochem/CNAllocationBetrMod.F90
@@ -246,7 +246,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
use shr_sys_mod , only: shr_sys_flush
use elm_varctl , only: iulog,cnallocate_carbon_only,cnallocate_carbonnitrogen_only,&
cnallocate_carbonphosphorus_only
- use pftvarcon , only: npcropmin, declfact, bfact, aleaff, arootf, astemf, noveg
+ use pftvarcon , only: iscft, declfact, bfact, aleaff, arootf, astemf, noveg
use pftvarcon , only: arooti, fleafi, allconsl, allconss, grperc, grpnow, nsoybean
use elm_varpar , only: nlevdecomp
use elm_varcon , only: nitrif_n2o_loss_frac, secspday
@@ -643,9 +643,9 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
! These fluxes should already be in gC/m2/s
mr = leaf_mr(p) + froot_mr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
mr = mr + livestem_mr(p) + livecroot_mr(p)
- else if (ivt(p) >= npcropmin) then
+ else if (iscft(ivt(p))) then
if (croplive(p)) mr = mr + livestem_mr(p) + grain_mr(p)
end if
@@ -726,7 +726,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
f5 = 0._r8 ! continued intializations from above
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
if (croplive(p)) then
! same phases appear in subroutine CropPhenology
@@ -852,14 +852,14 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
! based on available C, use constant allometric relationships to
! determine N requirements
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f3*(1._r8+f2))
n_allometry(p) = 1._r8/cnl + f1/cnfr + (f3*f4*(1._r8+f2))/cnlw + &
(f3*(1._r8-f4)*(1._r8+f2))/cndw
p_allometry(p) = 1._r8/cpl + f1/cpfr + (f3*f4*(1._r8+f2))/cplw + &
(f3*(1._r8-f4)*(1._r8+f2))/cpdw
- else if (ivt(p) >= npcropmin) then ! skip generic crops
+ else if (iscft(ivt(p))) then ! skip generic crops
cng = graincn(ivt(p))
cpg = graincp(ivt(p))
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f5+f3*(1._r8+f2))
@@ -889,10 +889,10 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
! retransn pool has N from leaves, stems, and roots for
! retranslocation
- if (ivt(p) >= npcropmin .and. grain_flag(p) == 1._r8) then
+ if (iscft(ivt(p)) .and. grain_flag(p) == 1._r8) then
avail_retransn(p) = plant_ndemand(p)
avail_retransp(p) = plant_pdemand(p)
- else if (ivt(p) < npcropmin .and. annsum_potential_gpp(p) > 0._r8) then
+ else if ((.not. iscft(ivt(p))) .and. annsum_potential_gpp(p) > 0._r8) then
avail_retransn(p) = (annmax_retransn(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
avail_retransp(p) = (annmax_retransp(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
else
@@ -1105,14 +1105,10 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
use shr_sys_mod , only: shr_sys_flush
use elm_varctl , only: iulog,cnallocate_carbon_only,cnallocate_carbonnitrogen_only,&
cnallocate_carbonphosphorus_only
-! use pftvarcon , only: npcropmin, declfact, bfact, aleaff, arootf, astemf
-! use pftvarcon , only: arooti, fleafi, allconsl, allconss, grperc, grpnow, nsoybean
use pftvarcon , only: noveg
- use pftvarcon , only: npcropmin, grperc, grpnow
+ use pftvarcon , only: iscft, grperc, grpnow
use elm_varpar , only: nlevdecomp !!nlevsoi,
use elm_varcon , only: nitrif_n2o_loss_frac, secspday
-! use landunit_varcon , only: istsoil, istcrop
-! use elm_time_manager , only: get_step_size
!
! !ARGUMENTS:
type(bounds_type) , intent(in) :: bounds
@@ -1393,7 +1389,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
fcur = fcur2(ivt(p))
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
if (croplive(p)) then
f1 = aroot(p) / aleaf(p)
f3 = astem(p) / aleaf(p)
@@ -1412,10 +1408,10 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
plant_n_buffer_patch(p) = plant_n_buffer_patch(p) * (1._r8-dt/taun)
plant_p_buffer_patch(p) = plant_p_buffer_patch(p) * (1._r8-dt/taun)
- if (ivt(p) >= npcropmin .and. grain_flag(p) == 1._r8) then
+ if (iscft(ivt(p)) .and. grain_flag(p) == 1._r8) then
avail_retransn(p) = retransn(p)/dt
avail_retransp(p) = retransp(p)/dt
- else if (ivt(p) < npcropmin .and. annsum_potential_gpp(p) > 0._r8) then
+ else if ((.not. iscft(ivt(p))) .and. annsum_potential_gpp(p) > 0._r8) then
avail_retransn(p) = (annmax_retransn(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
avail_retransp(p) = (annmax_retransp(p)/2._r8)*(gpp(p)/annsum_potential_gpp(p))/dt
else
@@ -1434,9 +1430,9 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
plant_palloc(p) = sminp_to_ppool(p) + retransp_to_ppool(p)
mr = leaf_mr(p) + froot_mr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
mr = mr + livestem_mr(p) + livecroot_mr(p)
- else if (ivt(p) >= npcropmin) then
+ else if (iscft(ivt(p))) then
if (croplive(p)) mr = mr + livestem_mr(p) + grain_mr(p)
end if
! try to take mr from xsmr storage pool first
@@ -1523,14 +1519,14 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
plant_calloc(p) = availc(p)
! here no down-regulation on allocatable C here, NP limitation is implemented in leaf-level NP control on GPP
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f3*(1._r8+f2))
n_allometry(p) = 1._r8/cnl + f1/cnfr + (f3*f4*(1._r8+f2))/cnlw + &
(f3*(1._r8-f4)*(1._r8+f2))/cndw
p_allometry(p) = 1._r8/cpl + f1/cpfr + (f3*f4*(1._r8+f2))/cplw + &
(f3*(1._r8-f4)*(1._r8+f2))/cpdw
- else if (ivt(p) >= npcropmin) then ! skip generic crops
+ else if (iscft(ivt(p))) then ! skip generic crops
cng = graincn(ivt(p))
cpg = graincp(ivt(p))
c_allometry(p) = (1._r8+g1)*(1._r8+f1+f5+f3*(1._r8+f2))
@@ -1604,7 +1600,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * (1._r8 - fcur) * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f1 * fcur * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f1 * (1._r8 - fcur) * (1 + g1)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * fcur * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * (1._r8 - fcur) * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * (1._r8 - f4) * fcur * (1 + g1)
@@ -1614,7 +1610,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f2 * f3 * (1._r8 - f4) * fcur * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f2 * f3 * (1._r8 - f4) * (1._r8 - fcur) * (1 + g1)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * fcur * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * f4 * (1._r8 - fcur) * (1 + g1)
cpool_to_xsmrpool(p) = cpool_to_xsmrpool(p) + nlc * f3 * (1._r8 - f4) * fcur * (1 + g1)
@@ -1635,7 +1631,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
cpool_to_leafc_storage(p) = nlc * (1._r8 - fcur)
cpool_to_frootc(p) = nlc * f1 * fcur
cpool_to_frootc_storage(p) = nlc * f1 * (1._r8 - fcur)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
cpool_to_livestemc(p) = nlc * f3 * f4 * fcur
cpool_to_livestemc_storage(p) = nlc * f3 * f4 * (1._r8 - fcur)
cpool_to_deadstemc(p) = nlc * f3 * (1._r8 - f4) * fcur
@@ -1645,7 +1641,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
cpool_to_deadcrootc(p) = nlc * f2 * f3 * (1._r8 - f4) * fcur
cpool_to_deadcrootc_storage(p) = nlc * f2 * f3 * (1._r8 - f4) * (1._r8 - fcur)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cpool_to_livestemc(p) = nlc * f3 * f4 * fcur
cpool_to_livestemc_storage(p) = nlc * f3 * f4 * (1._r8 - fcur)
cpool_to_deadstemc(p) = nlc * f3 * (1._r8 - f4) * fcur
@@ -1688,7 +1684,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
npool_to_leafn_storage(p) = (nlc / cnl) * (1._r8 - fcur)
npool_to_frootn(p) = (nlc * f1 / cnfr) * fcur
npool_to_frootn_storage(p) = (nlc * f1 / cnfr) * (1._r8 - fcur)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
npool_to_livestemn(p) = (nlc * f3 * f4 / cnlw) * fcur
npool_to_livestemn_storage(p) = (nlc * f3 * f4 / cnlw) * (1._r8 - fcur)
npool_to_deadstemn(p) = (nlc * f3 * (1._r8 - f4) / cndw) * fcur
@@ -1698,7 +1694,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
npool_to_deadcrootn(p) = (nlc * f2 * f3 * (1._r8 - f4) / cndw) * fcur
npool_to_deadcrootn_storage(p) = (nlc * f2 * f3 * (1._r8 - f4) / cndw) * (1._r8 - fcur)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cng = graincn(ivt(p))
npool_to_livestemn(p) = (nlc * f3 * f4 / cnlw) * fcur
npool_to_livestemn_storage(p) = (nlc * f3 * f4 / cnlw) * (1._r8 - fcur)
@@ -1732,7 +1728,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
ppool_to_leafp_storage(p) = (nlc / cpl) * (1._r8 - fcur)
ppool_to_frootp(p) = (nlc * f1 / cpfr) * fcur
ppool_to_frootp_storage(p) = (nlc * f1 / cpfr) * (1._r8 - fcur)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
ppool_to_livestemp(p) = (nlc * f3 * f4 / cplw) * fcur
ppool_to_livestemp_storage(p) = (nlc * f3 * f4 / cplw) * (1._r8 -fcur)
ppool_to_deadstemp(p) = (nlc * f3 * (1._r8 - f4) / cpdw) *fcur
@@ -1742,7 +1738,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
ppool_to_deadcrootp(p) = (nlc * f2 * f3 * (1._r8 - f4) / cpdw)* fcur
ppool_to_deadcrootp_storage(p) = (nlc * f2 * f3 * (1._r8 - f4) / cpdw)* (1._r8 - fcur)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cpg = graincp(ivt(p))
ppool_to_livestemp(p) = (nlc * f3 * f4 / cplw) * fcur
ppool_to_livestemp_storage(p) = (nlc * f3 * f4 / cplw) * (1._r8 -fcur)
@@ -1766,13 +1762,13 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
! growth is assigned here.
gresp_storage = cpool_to_leafc_storage(p) + cpool_to_frootc_storage(p)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
gresp_storage = gresp_storage + cpool_to_livestemc_storage(p)
gresp_storage = gresp_storage + cpool_to_deadstemc_storage(p)
gresp_storage = gresp_storage + cpool_to_livecrootc_storage(p)
gresp_storage = gresp_storage + cpool_to_deadcrootc_storage(p)
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
gresp_storage = gresp_storage + cpool_to_livestemc_storage(p)
gresp_storage = gresp_storage + cpool_to_grainc_storage(p)
end if
@@ -1797,7 +1793,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
npool_to_frootn(p) = cpool_to_frootc(p) / cnfr
npool_to_frootn_storage(p) = cpool_to_frootc_storage(p) / cnfr
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
supplement_to_sminn_vr(c,1) = supplement_to_sminn_vr(c,1) + cpool_to_livestemc(p) / cnlw - npool_to_livestemn(p)
supplement_to_sminn_vr(c,1) = supplement_to_sminn_vr(c,1) + cpool_to_livestemc_storage(p) / cnlw &
- npool_to_livestemn_storage(p)
@@ -1820,7 +1816,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
npool_to_deadcrootn(p) = cpool_to_deadcrootc(p) / cndw
npool_to_deadcrootn_storage(p) = cpool_to_deadcrootc_storage(p) / cndw
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cng = graincn(ivt(p))
supplement_to_sminn_vr(c,1) = supplement_to_sminn_vr(c,1) + cpool_to_livestemc(p) / cnlw - npool_to_livestemn(p)
supplement_to_sminn_vr(c,1) = supplement_to_sminn_vr(c,1) + cpool_to_livestemc_storage(p) / cnlw &
@@ -1864,7 +1860,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
ppool_to_frootp(p) = cpool_to_frootc(p) / cpfr
ppool_to_frootp_storage(p) = cpool_to_frootc_storage(p) / cpfr
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
supplement_to_sminp_vr(c,1) = supplement_to_sminp_vr(c,1) + max(cpool_to_livestemc(p) / cplw &
- ppool_to_livestemp(p),0._r8)
supplement_to_sminp_vr(c,1) = supplement_to_sminp_vr(c,1) + max(cpool_to_livestemc_storage(p) / cplw &
@@ -1891,7 +1887,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
ppool_to_deadcrootp(p) = cpool_to_deadcrootc(p) / cpdw
ppool_to_deadcrootp_storage(p) = cpool_to_deadcrootc_storage(p) / cpdw
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cpg = graincp(ivt(p))
supplement_to_sminp_vr(c,1) = supplement_to_sminp_vr(c,1) + max(cpool_to_livestemc(p) / cplw &
- ppool_to_livestemp(p),0._r8)
diff --git a/components/elm/src/biogeochem/CNCarbonFluxType.F90 b/components/elm/src/biogeochem/CNCarbonFluxType.F90
index 092af4fa66b..a6c56a935f0 100644
--- a/components/elm/src/biogeochem/CNCarbonFluxType.F90
+++ b/components/elm/src/biogeochem/CNCarbonFluxType.F90
@@ -10,7 +10,7 @@ module CNCarbonFluxType
use landunit_varcon , only : istsoil, istcrop, istdlak
use elm_varctl , only : use_c13, use_fates
use CH4varcon , only : allowlakeprod
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
use CNDecompCascadeConType , only : decomp_cascade_con
use VegetationType , only : veg_pp
use ColumnType , only : col_pp
@@ -1675,7 +1675,7 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
this%cpool_livecroot_storage_gr_patch(p) + &
this%cpool_deadcroot_storage_gr_patch(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%mr_patch(p) = &
this%mr_patch(p) + &
this%grain_mr_patch(p)
@@ -1700,7 +1700,7 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
this%storage_gr_patch(p)
! autotrophic respiration (AR)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%ar_patch(p) = &
this%mr_patch(p) + &
this%gr_patch(p) + &
@@ -1812,7 +1812,7 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
this%wood_harvestc_patch(p) = &
this%hrv_deadstemc_to_prod10c_patch(p) + &
this%hrv_deadstemc_to_prod100c_patch(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%wood_harvestc_patch(p) = &
this%wood_harvestc_patch(p) + &
this%hrv_cropc_to_prod1c_patch(p)
@@ -1842,7 +1842,7 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
this%m_gresp_xfer_to_fire_patch(p) + &
this%m_cpool_to_fire_patch(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%litfall_patch(p) = &
this%litfall_patch(p) + &
@@ -1878,7 +1878,7 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
this%hrv_leafc_to_litter_patch(p) + &
this%leafc_to_litter_patch(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%leafc_loss_patch(p) = &
this%leafc_loss_patch(p) + &
this%hrv_leafc_to_prod1c_patch(p)
@@ -1920,7 +1920,7 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
this%hrv_deadcrootc_storage_to_litter_patch(p) + &
this%hrv_deadcrootc_xfer_to_litter_patch(p)
! putting the harvested crop stem and grain in the wood loss bdrewniak
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%woodc_loss_patch(p) = &
this%woodc_loss_patch(p) + &
this%hrv_grainc_to_prod1c_patch(p) + &
@@ -2592,7 +2592,7 @@ subroutine summary_cflux_for_ch4( this, bounds, num_soilp, filter_soilp, num_soi
this%cpool_to_deadstemc_patch(p) + &
this%deadstemc_xfer_to_deadstemc_patch(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%agnpp_patch(p) = &
this%agnpp_patch(p) + &
this%cpool_to_grainc_patch(p) + &
diff --git a/components/elm/src/biogeochem/CNCarbonStateType.F90 b/components/elm/src/biogeochem/CNCarbonStateType.F90
index 2ed04f03231..b733773fb20 100644
--- a/components/elm/src/biogeochem/CNCarbonStateType.F90
+++ b/components/elm/src/biogeochem/CNCarbonStateType.F90
@@ -12,7 +12,7 @@ module CNCarbonStateType
use elm_varctl , only : iulog, use_vertsoilc, spinup_state
use decompMod , only : bounds_type
use CNStateType , only : cnstate_type
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
use CNDecompCascadeConType , only : decomp_cascade_con
use VegetationPropertiesType , only : veg_vp
use abortutils , only : endrun
@@ -400,7 +400,7 @@ subroutine InitCold(this, bounds, ratio, c12_carbonstate_vars)
!
! !USES:
use landunit_varcon , only: istsoil
- use pftvarcon , only: noveg, npcropmin
+ use pftvarcon , only: noveg
!
! !ARGUMENTS:
class(carbonstate_type) :: this
@@ -459,7 +459,7 @@ subroutine InitCold(this, bounds, ratio, c12_carbonstate_vars)
if (veg_vp%evergreen(veg_pp%itype(p)) == 1._r8) then
this%leafc_patch(p) = 1._r8 * ratio
this%leafc_storage_patch(p) = 0._r8
- else if (veg_pp%itype(p) >= npcropmin) then ! prognostic crop types
+ else if (iscft(veg_pp%itype(p))) then ! prognostic crop types
this%leafc_patch(p) = 0._r8
this%leafc_storage_patch(p) = 0._r8
else
@@ -477,7 +477,7 @@ subroutine InitCold(this, bounds, ratio, c12_carbonstate_vars)
this%livestemc_storage_patch(p) = 0._r8
this%livestemc_xfer_patch(p) = 0._r8
- if (veg_vp%woody(veg_pp%itype(p)) == 1._r8) then
+ if (veg_vp%woody(veg_pp%itype(p)) >= 1.0_r8) then
this%deadstemc_patch(p) = 0.1_r8 * ratio
else
this%deadstemc_patch(p) = 0._r8
@@ -866,7 +866,7 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
this%gresp_storage_patch(p) + &
this%gresp_xfer_patch(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%storvegc_patch(p) = &
this%storvegc_patch(p) + &
this%grainc_storage_patch(p) + &
diff --git a/components/elm/src/biogeochem/CNGapMortalityBeTRMod.F90 b/components/elm/src/biogeochem/CNGapMortalityBeTRMod.F90
index e3965d6eea3..3bbbf1db1f6 100644
--- a/components/elm/src/biogeochem/CNGapMortalityBeTRMod.F90
+++ b/components/elm/src/biogeochem/CNGapMortalityBeTRMod.F90
@@ -91,7 +91,7 @@ subroutine CNGapMortality (&
! !USES:
use elm_time_manager , only: get_days_per_year
use elm_varcon , only: secspday
- use pftvarcon , only: npcropmin
+ use pftvarcon , only: iscft
use elm_varctl , only: spinup_state, spinup_mortality_factor
!
! !ARGUMENTS:
@@ -188,7 +188,7 @@ subroutine CNGapMortality (&
* gap_indicator(gid_m_deadcrootn_to_litter)
- if (ivt(p) < npcropmin) then
+ if (.not. iscft(veg_pp%itype(p))) then
veg_nf%m_retransn_to_litter(p) = veg_ns%retransn(p) * m &
* gap_indicator(gid_m_retransn_to_litter)
end if
@@ -239,7 +239,7 @@ subroutine CNGapMortality (&
veg_pf%m_deadstemp_to_litter(p) = veg_ps%deadstemp(p) * m
veg_pf%m_livecrootp_to_litter(p) = veg_ps%livecrootp(p) * m
veg_pf%m_deadcrootp_to_litter(p) = veg_ps%deadcrootp(p) * m
- if (ivt(p) < npcropmin) then
+ if (.not. iscft(veg_pp%itype(p))) then
veg_pf%m_retransp_to_litter(p) = veg_ps%retransp(p) * m
end if
diff --git a/components/elm/src/biogeochem/CNNStateUpdate1BeTRMod.F90 b/components/elm/src/biogeochem/CNNStateUpdate1BeTRMod.F90
index 6eee5f923da..465c92f82b4 100644
--- a/components/elm/src/biogeochem/CNNStateUpdate1BeTRMod.F90
+++ b/components/elm/src/biogeochem/CNNStateUpdate1BeTRMod.F90
@@ -10,7 +10,7 @@ module CNNStateUpdate1BeTRMod
use elm_varpar , only : crop_prog, i_met_lit, i_cel_lit, i_lig_lit, i_cwd
use elm_varctl , only : iulog
use elm_varcon , only : nitrif_n2o_loss_frac
- use pftvarcon , only : npcropmin, nc3crop
+ use pftvarcon , only : iscft
use VegetationPropertiesType , only : veg_vp
use CNDecompCascadeConType , only : decomp_cascade_con
use CNStateType , only : cnstate_type
@@ -90,7 +90,7 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_ns%frootn(p) = veg_ns%frootn(p) + veg_nf%frootn_xfer_to_frootn(p)*dt
veg_ns%frootn_xfer(p) = veg_ns%frootn_xfer(p) - veg_nf%frootn_xfer_to_frootn(p)*dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ns%livestemn(p) = veg_ns%livestemn(p) + veg_nf%livestemn_xfer_to_livestemn(p)*dt
veg_ns%livestemn_xfer(p) = veg_ns%livestemn_xfer(p) - veg_nf%livestemn_xfer_to_livestemn(p)*dt
veg_ns%deadstemn(p) = veg_ns%deadstemn(p) + veg_nf%deadstemn_xfer_to_deadstemn(p)*dt
@@ -101,7 +101,7 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_ns%deadcrootn_xfer(p) = veg_ns%deadcrootn_xfer(p) - veg_nf%deadcrootn_xfer_to_deadcrootn(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
! lines here for consistency; the transfer terms are zero
veg_ns%livestemn(p) = veg_ns%livestemn(p) + veg_nf%livestemn_xfer_to_livestemn(p)*dt
veg_ns%livestemn_xfer(p) = veg_ns%livestemn_xfer(p) - veg_nf%livestemn_xfer_to_livestemn(p)*dt
@@ -116,7 +116,7 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_ns%retransn(p) = veg_ns%retransn(p) + veg_nf%leafn_to_retransn(p)*dt
! live wood turnover and retranslocation fluxes
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ns%livestemn(p) = veg_ns%livestemn(p) - veg_nf%livestemn_to_deadstemn(p)*dt
veg_ns%deadstemn(p) = veg_ns%deadstemn(p) + veg_nf%livestemn_to_deadstemn(p)*dt
veg_ns%livestemn(p) = veg_ns%livestemn(p) - veg_nf%livestemn_to_retransn(p)*dt
@@ -126,7 +126,7 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_ns%livecrootn(p) = veg_ns%livecrootn(p) - veg_nf%livecrootn_to_retransn(p)*dt
veg_ns%retransn(p) = veg_ns%retransn(p) + veg_nf%livecrootn_to_retransn(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! Beth adds retrans from froot
+ if (iscft(ivt(p))) then ! Beth adds retrans from froot
veg_ns%frootn(p) = veg_ns%frootn(p) - veg_nf%frootn_to_retransn(p)*dt
veg_ns%retransn(p) = veg_ns%retransn(p) + veg_nf%frootn_to_retransn(p)*dt
veg_ns%livestemn(p) = veg_ns%livestemn(p) - veg_nf%livestemn_to_litter(p)*dt
@@ -153,7 +153,7 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_frootn_storage(p)*dt
veg_ns%frootn_storage(p) = veg_ns%frootn_storage(p) + veg_nf%npool_to_frootn_storage(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_livestemn(p)*dt
veg_ns%livestemn(p) = veg_ns%livestemn(p) + veg_nf%npool_to_livestemn(p)*dt
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_livestemn_storage(p)*dt
@@ -172,7 +172,7 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_ns%deadcrootn_storage(p) = veg_ns%deadcrootn_storage(p) + veg_nf%npool_to_deadcrootn_storage(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_livestemn(p)*dt
veg_ns%livestemn(p) = veg_ns%livestemn(p) + veg_nf%npool_to_livestemn(p)*dt
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_livestemn_storage(p)*dt
@@ -189,7 +189,7 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_ns%frootn_storage(p) = veg_ns%frootn_storage(p) - veg_nf%frootn_storage_to_xfer(p)*dt
veg_ns%frootn_xfer(p) = veg_ns%frootn_xfer(p) + veg_nf%frootn_storage_to_xfer(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ns%livestemn_storage(p) = veg_ns%livestemn_storage(p) - veg_nf%livestemn_storage_to_xfer(p)*dt
veg_ns%livestemn_xfer(p) = veg_ns%livestemn_xfer(p) + veg_nf%livestemn_storage_to_xfer(p)*dt
veg_ns%deadstemn_storage(p) = veg_ns%deadstemn_storage(p) - veg_nf%deadstemn_storage_to_xfer(p)*dt
@@ -200,7 +200,7 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_ns%deadcrootn_xfer(p) = veg_ns%deadcrootn_xfer(p) + veg_nf%deadcrootn_storage_to_xfer(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
! lines here for consistency; the transfer terms are zero
veg_ns%livestemn_storage(p) = veg_ns%livestemn_storage(p) - veg_nf%livestemn_storage_to_xfer(p)*dt
veg_ns%livestemn_xfer(p) = veg_ns%livestemn_xfer(p) + veg_nf%livestemn_storage_to_xfer(p)*dt
diff --git a/components/elm/src/biogeochem/CNNStateUpdate2BeTRMod.F90 b/components/elm/src/biogeochem/CNNStateUpdate2BeTRMod.F90
index 60100b657ae..70b56142c88 100644
--- a/components/elm/src/biogeochem/CNNStateUpdate2BeTRMod.F90
+++ b/components/elm/src/biogeochem/CNNStateUpdate2BeTRMod.F90
@@ -14,7 +14,7 @@ module CNNStateUpdate2BeTRMod
use CNNitrogenFLuxType , only : nitrogenflux_type
use VegetationType , only : veg_pp
use VegetationDataType , only : veg_ns, veg_nf
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
!! bgc interface & pflotran:
use elm_varctl , only : use_pflotran, pf_cmode
!
@@ -147,7 +147,7 @@ subroutine NStateUpdate2h(num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_ns%deadcrootn(p) = veg_ns%deadcrootn(p) - veg_nf%hrv_deadcrootn_to_litter(p) * dt
veg_ns%retransn(p) = veg_ns%retransn(p) - veg_nf%hrv_retransn_to_litter(p) * dt
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_ns%livestemn(p)= veg_ns%livestemn(p) - veg_nf%hrv_livestemn_to_prod1n(p) * dt
veg_ns%leafn(p) = veg_ns%leafn(p) - veg_nf%hrv_leafn_to_prod1n(p) * dt
veg_ns%grainn(p) = veg_ns%grainn(p) - veg_nf%hrv_grainn_to_prod1n(p) * dt
diff --git a/components/elm/src/biogeochem/CNNitrogenFluxType.F90 b/components/elm/src/biogeochem/CNNitrogenFluxType.F90
index d0b76c195af..5394e0d05fa 100644
--- a/components/elm/src/biogeochem/CNNitrogenFluxType.F90
+++ b/components/elm/src/biogeochem/CNNitrogenFluxType.F90
@@ -1078,7 +1078,6 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
! !USES:
use elm_varpar , only: nlevdecomp,ndecomp_cascade_transitions,ndecomp_pools
use subgridAveMod , only: p2c
- use pftvarcon , only : npcropmin
use tracer_varcon , only: is_active_betr_bgc
use elm_varpar , only: nlevdecomp_full
!
diff --git a/components/elm/src/biogeochem/CNNitrogenStateType.F90 b/components/elm/src/biogeochem/CNNitrogenStateType.F90
index 003e34e132d..a7f7315c6c8 100644
--- a/components/elm/src/biogeochem/CNNitrogenStateType.F90
+++ b/components/elm/src/biogeochem/CNNitrogenStateType.F90
@@ -12,7 +12,7 @@ module CNNitrogenStateType
use elm_varctl , only : use_vertsoilc, use_century_decomp, use_fan
use elm_varctl , only : iulog, override_bgc_restart_mismatch_dump, spinup_state
use decompMod , only : bounds_type
- use pftvarcon , only : npcropmin, nstor
+ use pftvarcon , only : iscft, nstor
use CNDecompCascadeConType , only : decomp_cascade_con
use VegetationPropertiesType , only : veg_vp
use abortutils , only : endrun
@@ -502,7 +502,7 @@ subroutine InitCold(this, bounds, &
! !USES:
use elm_varpar , only : crop_prog
use decompMod , only : bounds_type
- use pftvarcon , only : noveg, npcropmin
+ use pftvarcon , only : noveg, iscft
!
! !ARGUMENTS:
class(nitrogenstate_type) :: this
@@ -588,7 +588,7 @@ subroutine InitCold(this, bounds, &
! tree types need to be initialized with some stem mass so that
! roughness length is not zero in canopy flux calculation
- if (veg_vp%woody(veg_pp%itype(p)) == 1._r8) then
+ if (veg_vp%woody(veg_pp%itype(p)) >= 1.0_r8) then
this%deadstemn_patch(p) = deadstemc_patch(p) / veg_vp%deadwdcn(veg_pp%itype(p))
else
this%deadstemn_patch(p) = 0._r8
@@ -1007,7 +1007,7 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
this%npool_patch(p) + &
this%retransn_patch(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%dispvegn_patch(p) = &
this%dispvegn_patch(p) + &
this%grainn_patch(p)
diff --git a/components/elm/src/biogeochem/CNPhenologyBeTRMod.F90 b/components/elm/src/biogeochem/CNPhenologyBeTRMod.F90
index 4bc23896427..ac3b58538e8 100644
--- a/components/elm/src/biogeochem/CNPhenologyBeTRMod.F90
+++ b/components/elm/src/biogeochem/CNPhenologyBeTRMod.F90
@@ -693,7 +693,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
frootn_xfer_to_frootn(p) = 0.0_r8
leafp_xfer_to_leafp(p) = 0.0_r8
frootp_xfer_to_frootp(p) = 0.0_r8
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer_to_livestemc(p) = 0.0_r8
deadstemc_xfer_to_deadstemc(p) = 0.0_r8
livecrootc_xfer_to_livecrootc(p) = 0.0_r8
@@ -714,7 +714,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
frootc_xfer(p) = 0.0_r8
frootn_xfer(p) = 0.0_r8
frootp_xfer(p) = 0.0_r8
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer(p) = 0.0_r8
livestemn_xfer(p) = 0.0_r8
livestemp_xfer(p) = 0.0_r8
@@ -777,7 +777,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
! set carbon fluxes for shifting storage pools to transfer pools
leafc_storage_to_xfer(p) = fstor2tran * leafc_storage(p)/dt
frootc_storage_to_xfer(p) = fstor2tran * frootc_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_storage_to_xfer(p) = fstor2tran * livestemc_storage(p)/dt
deadstemc_storage_to_xfer(p) = fstor2tran * deadstemc_storage(p)/dt
livecrootc_storage_to_xfer(p) = fstor2tran * livecrootc_storage(p)/dt
@@ -788,7 +788,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
! set nitrogen fluxes for shifting storage pools to transfer pools
leafn_storage_to_xfer(p) = fstor2tran * leafn_storage(p)/dt
frootn_storage_to_xfer(p) = fstor2tran * frootn_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemn_storage_to_xfer(p) = fstor2tran * livestemn_storage(p)/dt
deadstemn_storage_to_xfer(p) = fstor2tran * deadstemn_storage(p)/dt
livecrootn_storage_to_xfer(p) = fstor2tran * livecrootn_storage(p)/dt
@@ -798,7 +798,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
! set phosphorus fluxes for shifting storage pools to transfer pools
leafp_storage_to_xfer(p) = fstor2tran * leafp_storage(p)/dt
frootp_storage_to_xfer(p) = fstor2tran * frootp_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemp_storage_to_xfer(p) = fstor2tran * livestemp_storage(p)/dt
deadstemp_storage_to_xfer(p) = fstor2tran * deadstemp_storage(p)/dt
livecrootp_storage_to_xfer(p) = fstor2tran * livecrootp_storage(p)/dt
@@ -1040,7 +1040,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
frootn_xfer_to_frootn(p) = 0._r8
leafp_xfer_to_leafp(p) = 0._r8
frootp_xfer_to_frootp(p) = 0._r8
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer_to_livestemc(p) = 0._r8
deadstemc_xfer_to_deadstemc(p) = 0._r8
livecrootc_xfer_to_livecrootc(p) = 0._r8
@@ -1061,7 +1061,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
frootc_xfer(p) = 0._r8
frootn_xfer(p) = 0._r8
frootp_xfer(p) = 0._r8
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer(p) = 0._r8
livestemn_xfer(p) = 0._r8
livestemp_xfer(p) = 0._r8
@@ -1148,7 +1148,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set carbon fluxes for shifting storage pools to transfer pools
leafc_storage_to_xfer(p) = fstor2tran * leafc_storage(p)/dt
frootc_storage_to_xfer(p) = fstor2tran * frootc_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_storage_to_xfer(p) = fstor2tran * livestemc_storage(p)/dt
deadstemc_storage_to_xfer(p) = fstor2tran * deadstemc_storage(p)/dt
livecrootc_storage_to_xfer(p) = fstor2tran * livecrootc_storage(p)/dt
@@ -1159,7 +1159,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set nitrogen fluxes for shifting storage pools to transfer pools
leafn_storage_to_xfer(p) = fstor2tran * leafn_storage(p)/dt
frootn_storage_to_xfer(p) = fstor2tran * frootn_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemn_storage_to_xfer(p) = fstor2tran * livestemn_storage(p)/dt
deadstemn_storage_to_xfer(p) = fstor2tran * deadstemn_storage(p)/dt
livecrootn_storage_to_xfer(p) = fstor2tran * livecrootn_storage(p)/dt
@@ -1169,7 +1169,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set phosphorus fluxes for shifting storage pools to transfer pools
leafp_storage_to_xfer(p) = fstor2tran * leafp_storage(p)/dt
frootp_storage_to_xfer(p) = fstor2tran * frootp_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemp_storage_to_xfer(p) = fstor2tran * livestemp_storage(p)/dt
deadstemp_storage_to_xfer(p) = fstor2tran * deadstemp_storage(p)/dt
livecrootp_storage_to_xfer(p) = fstor2tran * livecrootp_storage(p)/dt
@@ -1268,7 +1268,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
leafc_storage_to_xfer(p) = leafc_storage(p) * bgtr(p)
frootc_storage_to_xfer(p) = frootc_storage(p) * bgtr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_storage_to_xfer(p) = livestemc_storage(p) * bgtr(p)
deadstemc_storage_to_xfer(p) = deadstemc_storage(p) * bgtr(p)
livecrootc_storage_to_xfer(p) = livecrootc_storage(p) * bgtr(p)
@@ -1279,7 +1279,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set nitrogen fluxes for shifting storage pools to transfer pools
leafn_storage_to_xfer(p) = leafn_storage(p) * bgtr(p)
frootn_storage_to_xfer(p) = frootn_storage(p) * bgtr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemn_storage_to_xfer(p) = livestemn_storage(p) * bgtr(p)
deadstemn_storage_to_xfer(p) = deadstemn_storage(p) * bgtr(p)
livecrootn_storage_to_xfer(p) = livecrootn_storage(p) * bgtr(p)
@@ -1290,7 +1290,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set phosphorus fluxes for shifting storage pools to transfer pools
leafp_storage_to_xfer(p) = leafp_storage(p) * bgtr(p)
frootp_storage_to_xfer(p) = frootp_storage(p) * bgtr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemp_storage_to_xfer(p) = livestemp_storage(p) * bgtr(p)
deadstemp_storage_to_xfer(p) = deadstemp_storage(p) * bgtr(p)
livecrootp_storage_to_xfer(p) = livecrootp_storage(p) * bgtr(p)
@@ -1868,7 +1868,8 @@ subroutine CropPhenologyInit(bounds)
! initialized, and after ecophyscon file is read in.
!
! !USES:
- use pftvarcon , only: npcropmin, npcropmax, mnNHplantdate
+ use elm_varpar , only : mxpft
+ use pftvarcon , only: iscft, crop, mnNHplantdate
use pftvarcon , only: mnSHplantdate, mxNHplantdate
use pftvarcon , only: mxSHplantdate
use elm_time_manager, only: get_calday
@@ -1893,13 +1894,17 @@ subroutine CropPhenologyInit(bounds)
! Convert planting dates into julian day
minplantjday(:,:) = huge(1)
maxplantjday(:,:) = huge(1)
- do n = npcropmin, npcropmax
+ do n = 0, mxpft
+ if (iscft(n)) then
minplantjday(n,inNH) = int( get_calday( mnNHplantdate(n), 0 ) )
maxplantjday(n,inNH) = int( get_calday( mxNHplantdate(n), 0 ) )
+ end if
end do
- do n = npcropmin, npcropmax
+ do n = 0, mxpft
+ if (iscft(n)) then
minplantjday(n,inSH) = int( get_calday( mnSHplantdate(n), 0 ) )
maxplantjday(n,inSH) = int( get_calday( mxSHplantdate(n), 0 ) )
+ end if
end do
! Figure out what hemisphere each PFT is in
@@ -2362,7 +2367,7 @@ subroutine CNOnsetGrowth (num_soilp, filter_soilp, &
frootn_xfer_to_frootn(p) = t1 * frootn_xfer(p)
leafp_xfer_to_leafp(p) = t1 * leafp_xfer(p)
frootp_xfer_to_frootp(p) = t1 * frootp_xfer(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer_to_livestemc(p) = t1 * livestemc_xfer(p)
deadstemc_xfer_to_deadstemc(p) = t1 * deadstemc_xfer(p)
livecrootc_xfer_to_livecrootc(p) = t1 * livecrootc_xfer(p)
@@ -2391,7 +2396,7 @@ subroutine CNOnsetGrowth (num_soilp, filter_soilp, &
frootn_xfer_to_frootn(p) = frootn_xfer(p) / dt
leafp_xfer_to_leafp(p) = leafp_xfer(p) / dt
frootp_xfer_to_frootp(p) = frootp_xfer(p) / dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer_to_livestemc(p) = livestemc_xfer(p) / dt
deadstemc_xfer_to_deadstemc(p) = deadstemc_xfer(p) / dt
livecrootc_xfer_to_livecrootc(p) = livecrootc_xfer(p) / dt
@@ -2909,7 +2914,7 @@ subroutine CNLivewoodTurnover (num_soilp, filter_soilp, &
p = filter_soilp(fp)
! only calculate these fluxes for woody types
- if (woody(ivt(p)) > 0._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
if ( nu_com .eq. 'RD') then
! live stem to dead stem turnover
diff --git a/components/elm/src/biogeochem/CarbonStateUpdate1Mod.F90 b/components/elm/src/biogeochem/CarbonStateUpdate1Mod.F90
index 057fd0e56b6..1eb7f64d025 100644
--- a/components/elm/src/biogeochem/CarbonStateUpdate1Mod.F90
+++ b/components/elm/src/biogeochem/CarbonStateUpdate1Mod.F90
@@ -11,7 +11,7 @@ module CarbonStateUpdate1Mod
use elm_varcon , only : dzsoi_decomp
use elm_varctl , only : nu_com, use_c13, use_c14
use elm_varctl , only : use_pflotran, pf_cmode, use_fates
- use pftvarcon , only : npcropmin, nc3crop
+ use pftvarcon , only : iscft
use CNDecompCascadeConType , only : decomp_cascade_type
use CNStateType , only : cnstate_type
use CNDecompCascadeConType , only : decomp_cascade_con
@@ -274,7 +274,7 @@ subroutine CarbonStateUpdate1(bounds, &
veg_cs%leafc_xfer(p) = veg_cs%leafc_xfer(p) - veg_cf%leafc_xfer_to_leafc(p)*dt
veg_cs%frootc(p) = veg_cs%frootc(p) + veg_cf%frootc_xfer_to_frootc(p)*dt
veg_cs%frootc_xfer(p) = veg_cs%frootc_xfer(p) - veg_cf%frootc_xfer_to_frootc(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_cs%livestemc(p) = veg_cs%livestemc(p) + veg_cf%livestemc_xfer_to_livestemc(p)*dt
veg_cs%livestemc_xfer(p) = veg_cs%livestemc_xfer(p) - veg_cf%livestemc_xfer_to_livestemc(p)*dt
veg_cs%deadstemc(p) = veg_cs%deadstemc(p) + veg_cf%deadstemc_xfer_to_deadstemc(p)*dt
@@ -284,7 +284,7 @@ subroutine CarbonStateUpdate1(bounds, &
veg_cs%deadcrootc(p) = veg_cs%deadcrootc(p) + veg_cf%deadcrootc_xfer_to_deadcrootc(p)*dt
veg_cs%deadcrootc_xfer(p) = veg_cs%deadcrootc_xfer(p) - veg_cf%deadcrootc_xfer_to_deadcrootc(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
! lines here for consistency; the transfer terms are zero
veg_cs%livestemc(p) = veg_cs%livestemc(p) + veg_cf%livestemc_xfer_to_livestemc(p)*dt
veg_cs%livestemc_xfer(p) = veg_cs%livestemc_xfer(p) - veg_cf%livestemc_xfer_to_livestemc(p)*dt
@@ -297,13 +297,13 @@ subroutine CarbonStateUpdate1(bounds, &
veg_cs%frootc(p) = veg_cs%frootc(p) - veg_cf%frootc_to_litter(p)*dt
! livewood turnover fluxes
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_cs%livestemc(p) = veg_cs%livestemc(p) - veg_cf%livestemc_to_deadstemc(p)*dt
veg_cs%deadstemc(p) = veg_cs%deadstemc(p) + veg_cf%livestemc_to_deadstemc(p)*dt
veg_cs%livecrootc(p) = veg_cs%livecrootc(p) - veg_cf%livecrootc_to_deadcrootc(p)*dt
veg_cs%deadcrootc(p) = veg_cs%deadcrootc(p) + veg_cf%livecrootc_to_deadcrootc(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_cs%livestemc(p) = veg_cs%livestemc(p) - veg_cf%livestemc_to_litter(p)*dt
veg_cs%grainc(p) = veg_cs%grainc(p) - veg_cf%grainc_to_food(p)*dt
@@ -315,11 +315,11 @@ subroutine CarbonStateUpdate1(bounds, &
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_to_xsmrpool(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%leaf_curmr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%froot_curmr(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%livestem_curmr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%livecroot_curmr(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%livestem_curmr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%grain_curmr(p)*dt
end if
@@ -333,11 +333,11 @@ subroutine CarbonStateUpdate1(bounds, &
if (nu_com .ne. 'RD') then
veg_cs%xsmrpool(p) = veg_cs%xsmrpool(p) - veg_cf%xsmrpool_turnover(p)*dt
end if
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_cs%xsmrpool(p) = veg_cs%xsmrpool(p) - veg_cf%livestem_xsmr(p)*dt
veg_cs%xsmrpool(p) = veg_cs%xsmrpool(p) - veg_cf%livecroot_xsmr(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_cs%xsmrpool(p) = veg_cs%xsmrpool(p) - veg_cf%livestem_xsmr(p)*dt
veg_cs%xsmrpool(p) = veg_cs%xsmrpool(p) - veg_cf%grain_xsmr(p)*dt
if (harvdate(p) < 999) then ! beginning at harvest, send to atm
@@ -355,7 +355,7 @@ subroutine CarbonStateUpdate1(bounds, &
veg_cs%frootc(p) = veg_cs%frootc(p) + veg_cf%cpool_to_frootc(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_to_frootc_storage(p)*dt
veg_cs%frootc_storage(p) = veg_cs%frootc_storage(p) + veg_cf%cpool_to_frootc_storage(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_to_livestemc(p)*dt
veg_cs%livestemc(p) = veg_cs%livestemc(p) + veg_cf%cpool_to_livestemc(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_to_livestemc_storage(p)*dt
@@ -373,7 +373,7 @@ subroutine CarbonStateUpdate1(bounds, &
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_to_deadcrootc_storage(p)*dt
veg_cs%deadcrootc_storage(p) = veg_cs%deadcrootc_storage(p) + veg_cf%cpool_to_deadcrootc_storage(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if ( iscft(ivt(p))) then ! skip 2 generic crops
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_to_livestemc(p)*dt
veg_cs%livestemc(p) = veg_cs%livestemc(p) + veg_cf%cpool_to_livestemc(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_to_livestemc_storage(p)*dt
@@ -387,13 +387,13 @@ subroutine CarbonStateUpdate1(bounds, &
! growth respiration fluxes for current growth
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_leaf_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_froot_gr(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_livestem_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_deadstem_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_livecroot_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_deadcroot_gr(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_livestem_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_grain_gr(p)*dt
end if
@@ -401,13 +401,13 @@ subroutine CarbonStateUpdate1(bounds, &
! growth respiration for transfer growth
veg_cs%gresp_xfer(p) = veg_cs%gresp_xfer(p) - veg_cf%transfer_leaf_gr(p)*dt
veg_cs%gresp_xfer(p) = veg_cs%gresp_xfer(p) - veg_cf%transfer_froot_gr(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_cs%gresp_xfer(p) = veg_cs%gresp_xfer(p) - veg_cf%transfer_livestem_gr(p)*dt
veg_cs%gresp_xfer(p) = veg_cs%gresp_xfer(p) - veg_cf%transfer_deadstem_gr(p)*dt
veg_cs%gresp_xfer(p) = veg_cs%gresp_xfer(p) - veg_cf%transfer_livecroot_gr(p)*dt
veg_cs%gresp_xfer(p) = veg_cs%gresp_xfer(p) - veg_cf%transfer_deadcroot_gr(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_cs%gresp_xfer(p) = veg_cs%gresp_xfer(p) - veg_cf%transfer_livestem_gr(p)*dt
veg_cs%gresp_xfer(p) = veg_cs%gresp_xfer(p) - veg_cf%transfer_grain_gr(p)*dt
end if
@@ -415,13 +415,13 @@ subroutine CarbonStateUpdate1(bounds, &
! growth respiration at time of storage
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_leaf_storage_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_froot_storage_gr(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_livestem_storage_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_deadstem_storage_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_livecroot_storage_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_deadcroot_storage_gr(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if ( iscft(ivt(p))) then ! skip 2 generic crops
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_livestem_storage_gr(p)*dt
veg_cs%cpool(p) = veg_cs%cpool(p) - veg_cf%cpool_grain_storage_gr(p)*dt
end if
@@ -435,7 +435,7 @@ subroutine CarbonStateUpdate1(bounds, &
veg_cs%leafc_xfer(p) = veg_cs%leafc_xfer(p) + veg_cf%leafc_storage_to_xfer(p)*dt
veg_cs%frootc_storage(p) = veg_cs%frootc_storage(p) - veg_cf%frootc_storage_to_xfer(p)*dt
veg_cs%frootc_xfer(p) = veg_cs%frootc_xfer(p) + veg_cf%frootc_storage_to_xfer(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_cs%livestemc_storage(p) = veg_cs%livestemc_storage(p) - veg_cf%livestemc_storage_to_xfer(p)*dt
veg_cs%livestemc_xfer(p) = veg_cs%livestemc_xfer(p) + veg_cf%livestemc_storage_to_xfer(p)*dt
veg_cs%deadstemc_storage(p) = veg_cs%deadstemc_storage(p) - veg_cf%deadstemc_storage_to_xfer(p)*dt
@@ -447,7 +447,7 @@ subroutine CarbonStateUpdate1(bounds, &
veg_cs%gresp_storage(p) = veg_cs%gresp_storage(p) - veg_cf%gresp_storage_to_xfer(p)*dt
veg_cs%gresp_xfer(p) = veg_cs%gresp_xfer(p) + veg_cf%gresp_storage_to_xfer(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if ( iscft(ivt(p))) then ! skip 2 generic crops
! lines here for consistency; the transfer terms are zero
veg_cs%livestemc_storage(p) = veg_cs%livestemc_storage(p) - veg_cf%livestemc_storage_to_xfer(p)*dt
veg_cs%livestemc_xfer(p) = veg_cs%livestemc_xfer(p) + veg_cf%livestemc_storage_to_xfer(p)*dt
diff --git a/components/elm/src/biogeochem/CarbonStateUpdate2Mod.F90 b/components/elm/src/biogeochem/CarbonStateUpdate2Mod.F90
index 48174fb8ddf..4676a1e351d 100644
--- a/components/elm/src/biogeochem/CarbonStateUpdate2Mod.F90
+++ b/components/elm/src/biogeochem/CarbonStateUpdate2Mod.F90
@@ -9,7 +9,7 @@ module CarbonStateUpdate2Mod
use shr_log_mod , only : errMsg => shr_log_errMsg
use abortutils , only : endrun
use elm_varpar , only : nlevdecomp, i_met_lit, i_cel_lit, i_lig_lit, i_cwd
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
use elm_varctl , only : use_pflotran, pf_cmode
use VegetationType , only : veg_pp
use tracer_varcon , only : is_active_betr_bgc
@@ -186,7 +186,7 @@ subroutine CarbonStateUpdate2h(num_soilc, filter_soilc, num_soilp, filter_soilp,
veg_cs%deadcrootc(p) = veg_cs%deadcrootc(p) - veg_cf%hrv_deadcrootc_to_litter(p) * dt
! crops
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_cs%livestemc(p) = veg_cs%livestemc(p) - veg_cf%hrv_livestemc_to_prod1c(p) *dt
veg_cs%leafc(p) = veg_cs%leafc(p) - veg_cf%hrv_leafc_to_prod1c(p) *dt
veg_cs%grainc(p) = veg_cs%grainc(p) - veg_cf%hrv_grainc_to_prod1c(p) *dt
diff --git a/components/elm/src/biogeochem/ComputeSeedMod.F90 b/components/elm/src/biogeochem/ComputeSeedMod.F90
index 61b916d64f3..9b7ebf8838d 100644
--- a/components/elm/src/biogeochem/ComputeSeedMod.F90
+++ b/components/elm/src/biogeochem/ComputeSeedMod.F90
@@ -124,7 +124,7 @@ subroutine ComputeSeedAmounts(p, &
if (pft_type /= noveg) then
my_leaf_seed = leafc_seed_param * &
SpeciesTypeMultiplier(species, pft_type, COMPONENT_LEAF)
- if (veg_vp%woody(pft_type) == 1._r8) then
+ if (veg_vp%woody(pft_type) >= 1.0_r8) then
my_deadstem_seed = deadstemc_seed_param * &
SpeciesTypeMultiplier(species, pft_type, COMPONENT_DEADWOOD)
end if
diff --git a/components/elm/src/biogeochem/CropType.F90 b/components/elm/src/biogeochem/CropType.F90
index bc3d8c44ff4..8394d21ca34 100644
--- a/components/elm/src/biogeochem/CropType.F90
+++ b/components/elm/src/biogeochem/CropType.F90
@@ -417,7 +417,7 @@ subroutine Restart(this, bounds, ncid, flag)
use restUtilMod
use ncdio_pio
use VegetationType , only : veg_pp
- use pftvarcon , only : npcropmin, npcropmax
+ use pftvarcon , only : iscft
!
! !ARGUMENTS:
class(crop_type), intent(inout) :: this
@@ -454,7 +454,7 @@ subroutine Restart(this, bounds, ncid, flag)
interpinic_flag='copy', readvar=readvar, data=restyear)
if (readvar) then
do p = bounds%begp, bounds%endp
- if (veg_pp%itype(p) >= npcropmin .and. veg_pp%itype(p) <= npcropmax .and. &
+ if (iscft(veg_pp%itype(p)) .and. &
veg_pp%active(p)) then
this%nyrs_crop_active_patch(p) = restyear
end if
diff --git a/components/elm/src/biogeochem/DUSTMod.F90 b/components/elm/src/biogeochem/DUSTMod.F90
index ba24f259669..f53e970423b 100644
--- a/components/elm/src/biogeochem/DUSTMod.F90
+++ b/components/elm/src/biogeochem/DUSTMod.F90
@@ -69,6 +69,7 @@ module DUSTMod
real(r8), pointer, private :: vlc_trb_2_patch (:) ! turbulent deposition velocity 2(m/s)
real(r8), pointer, private :: vlc_trb_3_patch (:) ! turbulent deposition velocity 3(m/s)
real(r8), pointer, private :: vlc_trb_4_patch (:) ! turbulent deposition velocity 4(m/s)
+ real(r8), pointer, private :: lnd_frc_mbl_patch (:) ! land fraction for dust mobilization (-)
real(r8), pointer, private :: mbl_bsn_fct_col (:) ! basin factor
contains
@@ -121,7 +122,8 @@ subroutine InitAllocate(this, bounds)
allocate(this%vlc_trb_2_patch (begp:endp)) ; this%vlc_trb_2_patch (:) = nan
allocate(this%vlc_trb_3_patch (begp:endp)) ; this%vlc_trb_3_patch (:) = nan
allocate(this%vlc_trb_4_patch (begp:endp)) ; this%vlc_trb_4_patch (:) = nan
- allocate(this%mbl_bsn_fct_col (begc:endc)) ; this%mbl_bsn_fct_col (:) = nan
+ allocate(this%lnd_frc_mbl_patch (begp:endp)) ; this%lnd_frc_mbl_patch (:) = spval
+ allocate(this%mbl_bsn_fct_col (begc:endc)) ; this%mbl_bsn_fct_col (:) = nan
end subroutine InitAllocate
@@ -167,6 +169,11 @@ subroutine InitHistory(this, bounds)
avgflag='A', long_name='turbulent deposition velocity 4', &
ptr_patch=this%vlc_trb_4_patch, default='inactive')
+ this%lnd_frc_mbl_patch(begp:endp) = spval
+ call hist_addfld1d (fname='LND_FRC_DUST_MBL', units='-', &
+ avgflag='A', long_name='bare soil fraction for land fraction for dust mobilization', &
+ ptr_patch=this%lnd_frc_mbl_patch, default='inactive')
+
end subroutine InitHistory
!-----------------------------------------------------------------------
@@ -239,7 +246,6 @@ subroutine DustEmission (bounds, &
real(r8) :: Cd ! [dimless] The dust emission coefficient, which depends on
! the soil's standardized threshold friction speed -YF
real(r8) :: wnd_frc_slt
- real(r8) :: lnd_frc_mbl(bounds%begp:bounds%endp)
real(r8) :: bd
real(r8) :: gwc_sfc
real(r8) :: ttlai(bounds%begp:bounds%endp)
@@ -287,6 +293,7 @@ subroutine DustEmission (bounds, &
u10 => frictionvel_vars%u10_patch , & ! Input: [real(r8) (:) ] 10-m wind (m/s) (created for dust model)
mbl_bsn_fct => dust_vars%mbl_bsn_fct_col , & ! Input: [real(r8) (:) ] basin factor
+ lnd_frc_mbl => dust_vars%lnd_frc_mbl_patch , & ! Output: [real(r8) (:) ] land fraction for dust mobilization
flx_mss_vrt_dst => dust_vars%flx_mss_vrt_dst_patch , & ! Output: [real(r8) (:,:) ] surface dust emission (kg/m**2/s)
flx_mss_vrt_dst_tot => dust_vars%flx_mss_vrt_dst_tot_patch & ! Output: [real(r8) (:) ] total dust flux back to atmosphere (pft)
)
diff --git a/components/elm/src/biogeochem/DryDepVelocity.F90 b/components/elm/src/biogeochem/DryDepVelocity.F90
index 009de700b45..b6ef82a632e 100644
--- a/components/elm/src/biogeochem/DryDepVelocity.F90
+++ b/components/elm/src/biogeochem/DryDepVelocity.F90
@@ -145,14 +145,9 @@ subroutine depvel_compute( bounds, &
use seq_drydep_mod , only : rcls, h2_a, h2_b, h2_c, ri, rac, rclo, rlu, rgss, rgso
use landunit_varcon, only : istsoil, istice, istice_mec, istdlak, istwet
use elm_varctl , only : iulog
- use pftvarcon , only : noveg, ndllf_evr_tmp_tree, ndllf_evr_brl_tree
- use pftvarcon , only : ndllf_dcd_brl_tree, nbrdlf_evr_trp_tree
- use pftvarcon , only : nbrdlf_evr_tmp_tree, nbrdlf_dcd_trp_tree
- use pftvarcon , only : nbrdlf_dcd_tmp_tree, nbrdlf_dcd_brl_tree
- use pftvarcon , only : nbrdlf_evr_shrub, nbrdlf_dcd_tmp_shrub
- use pftvarcon , only : nbrdlf_dcd_brl_shrub,nc3_arctic_grass
- use pftvarcon , only : nc3_nonarctic_grass, nc4_grass, nc3crop
- use pftvarcon , only : nc3irrig, npcropmin, npcropmax
+ use pftvarcon , only : noveg, nonvascular
+ use pftvarcon , only : woody, graminoid, iscft, crop
+ use pftvarcon , only : needleleaf
!
! !ARGUMENTS:
type(bounds_type) , intent(in) :: bounds
@@ -275,24 +270,31 @@ subroutine depvel_compute( bounds, &
!map ELM veg type into Wesely veg type
wesveg = wveg_unset
- if (elmveg == noveg ) wesveg = 8
- if (elmveg == ndllf_evr_tmp_tree ) wesveg = 5
- if (elmveg == ndllf_evr_brl_tree ) wesveg = 5
- if (elmveg == ndllf_dcd_brl_tree ) wesveg = 5
- if (elmveg == nbrdlf_evr_trp_tree ) wesveg = 4
- if (elmveg == nbrdlf_evr_tmp_tree ) wesveg = 4
- if (elmveg == nbrdlf_dcd_trp_tree ) wesveg = 4
- if (elmveg == nbrdlf_dcd_tmp_tree ) wesveg = 4
- if (elmveg == nbrdlf_dcd_brl_tree ) wesveg = 4
- if (elmveg == nbrdlf_evr_shrub ) wesveg = 11
- if (elmveg == nbrdlf_dcd_tmp_shrub ) wesveg = 11
- if (elmveg == nbrdlf_dcd_brl_shrub ) wesveg = 11
- if (elmveg == nc3_arctic_grass ) wesveg = 3
- if (elmveg == nc3_nonarctic_grass ) wesveg = 3
- if (elmveg == nc4_grass ) wesveg = 3
- if (elmveg == nc3crop ) wesveg = 2
- if (elmveg == nc3irrig ) wesveg = 2
- if (elmveg >= npcropmin .and. elmveg <= npcropmax ) wesveg = 2
+ if (elmveg == noveg ) wesveg = 8
+ if (nonvascular(elmveg) == 2.0_r8 ) wesveg = 8 ! assuming lichen like bare-ground
+ !if (elmveg == ndllf_evr_tmp_tree ) wesveg = 5
+ !if (elmveg == ndllf_evr_brl_tree ) wesveg = 5
+ !if (elmveg == ndllf_dcd_brl_tree ) wesveg = 5
+ if (woody(elmveg) == 1.0_r8 .and. needleleaf(elmveg) == 1) wesveg = 5
+ !if (elmveg == nbrdlf_evr_trp_tree ) wesveg = 4
+ !if (elmveg == nbrdlf_evr_tmp_tree ) wesveg = 4
+ !if (elmveg == nbrdlf_dcd_trp_tree ) wesveg = 4
+ !if (elmveg == nbrdlf_dcd_tmp_tree ) wesveg = 4
+ !if (elmveg == nbrdlf_dcd_brl_tree ) wesveg = 4
+ if (woody(elmveg) == 1.0_r8 .and. needleleaf(elmveg) == 0) wesveg = 4
+ !if (elmveg == nbrdlf_evr_shrub ) wesveg = 11
+ !if (elmveg == nbrdlf_dcd_tmp_shrub ) wesveg = 11
+ !if (elmveg == nbrdlf_dcd_brl_shrub ) wesveg = 11
+ if (woody(elmveg) == 2.0_r8 ) wesveg = 11
+ !if (elmveg == nc3_arctic_grass ) wesveg = 3
+ !if (elmveg == nc3_nonarctic_grass ) wesveg = 3
+ !if (elmveg == nc4_grass ) wesveg = 3
+ if (graminoid(elmveg) == 1.0_r8 ) wesveg = 3
+ if (nonvascular(elmveg) == 1.0_r8 ) wesveg = 3 ! assuming moss like grass
+ !if (elmveg == nc3crop ) wesveg = 2
+ !if (elmveg == nc3irrig ) wesveg = 2
+ !if (elmveg >= npcropmin .and. elmveg <= npcropmax ) wesveg = 2
+ if (crop(elmveg) == 1.0_r8 .or. iscft(elmveg)) wesveg = 2
#ifndef _OPENACC
if (wesveg == wveg_unset )then
write(iulog,*) 'elmveg = ', elmveg, 'lun_pp%itype = ', lun_pp%itype(l)
diff --git a/components/elm/src/biogeochem/FireMod.F90 b/components/elm/src/biogeochem/FireMod.F90
index 0dec0c08a50..b84aa2c3ab6 100644
--- a/components/elm/src/biogeochem/FireMod.F90
+++ b/components/elm/src/biogeochem/FireMod.F90
@@ -126,8 +126,8 @@ subroutine FireArea (bounds, &
use elm_varcon , only: secspday, spval
use elm_varctl , only: use_nofire, spinup_state, spinup_mortality_factor
use dynSubgridControlMod , only: run_has_transient_landcover
- use pftvarcon , only: nc4_grass, nc3crop, ndllf_evr_tmp_tree
- use pftvarcon , only: nbrdlf_evr_trp_tree, nbrdlf_dcd_trp_tree, nbrdlf_evr_shrub
+ use pftvarcon , only: noveg, woody, graminoid, iscft, crop
+ use pftvarcon , only: climatezone, needleleaf, evergreen
!
! !ARGUMENTS:
type(bounds_type) , intent(in) :: bounds
@@ -305,11 +305,12 @@ subroutine FireArea (bounds, &
if (pi <= col_pp%npfts(c)) then
p = col_pp%pfti(c) + pi - 1
! For crop veg types
- if( veg_pp%itype(p) > nc4_grass )then
+ if( crop(veg_pp%itype(p)) == 1 .or. iscft(veg_pp%itype(p)))then
cropf_col(c) = cropf_col(c) + veg_pp%wtcol(p)
end if
! For natural vegetation (non-crop and non-bare-soil)
- if( veg_pp%itype(p) >= ndllf_evr_tmp_tree .and. veg_pp%itype(p) <= nc4_grass )then
+ if( veg_pp%itype(p) /= noveg .and. &
+ (crop(veg_pp%itype(p)) == 0 .and. .not. iscft(veg_pp%itype(p))) )then
lfwt(c) = lfwt(c) + veg_pp%wtcol(p)
end if
end if
@@ -331,7 +332,8 @@ subroutine FireArea (bounds, &
! column-level litter carbon
! is available, so we use leaf carbon to estimate the
! litter carbon for crop PFTs
- if( veg_pp%itype(p) > nc4_grass .and. veg_pp%wtcol(p) > 0._r8 .and. leafc_col(c) > 0._r8 )then
+ if( (crop(veg_pp%itype(p)) == 1 .or. iscft(veg_pp%itype(p))) .and. &
+ veg_pp%wtcol(p) > 0._r8 .and. leafc_col(c) > 0._r8 )then
fuelc_crop(c)=fuelc_crop(c) + (leafc(p) + leafc_storage(p) + &
leafc_xfer(p))*veg_pp%wtcol(p)/cropf_col(c) + &
totlitc(c)*leafc(p)/leafc_col(c)*veg_pp%wtcol(p)/cropf_col(c)
@@ -368,21 +370,35 @@ subroutine FireArea (bounds, &
p = col_pp%pfti(c) + pi - 1
! For non-crop -- natural vegetation and bare-soil
- if( veg_pp%itype(p) < nc3crop .and. cropf_col(c) < 1.0_r8 )then
+ if( (crop(veg_pp%itype(p)) == 0 .and. .not. iscft(veg_pp%itype(p))) .and. &
+ cropf_col(c) < 1.0_r8 ) then
if( btran2(p) .ne. spval) then
if (btran2(p) <= 1._r8 ) then
btran_col(c) = btran_col(c)+btran2(p)*veg_pp%wtcol(p)
wtlf(c) = wtlf(c)+veg_pp%wtcol(p)
end if
end if
- if( veg_pp%itype(p) == nbrdlf_evr_trp_tree .and. veg_pp%wtcol(p) > 0._r8 )then
+ ! broadleaf evergreen tropical tree
+ if( (needleleaf(veg_pp%itype(p)) == 0 .and. &
+ evergreen(veg_pp%itype(p)) == 1 .and. &
+ climatezone(veg_pp%itype(p)) == 1 .and. &
+ woody(veg_pp%itype(p)) == 1.0_r8) .and. &
+ veg_pp%wtcol(p) > 0._r8 )then
trotr1_col(c)=trotr1_col(c)+veg_pp%wtcol(p)*col_pp%wttopounit(c)
end if
- if( veg_pp%itype(p) == nbrdlf_dcd_trp_tree .and. veg_pp%wtcol(p) > 0._r8 )then
+ ! broadleaf deciduous tropical tree
+ if( (needleleaf(veg_pp%itype(p)) == 0 .and. &
+ evergreen(veg_pp%itype(p)) == 0 .and. &
+ climatezone(veg_pp%itype(p)) == 1 .and. &
+ woody(veg_pp%itype(p)) == 1.0_r8) .and. &
+ veg_pp%wtcol(p) > 0._r8 ) then
trotr2_col(c)=trotr2_col(c)+veg_pp%wtcol(p)*col_pp%wttopounit(c)
end if
if (transient_landcover) then !true when landuse data is used
- if( veg_pp%itype(p) == nbrdlf_evr_trp_tree .or. veg_pp%itype(p) == nbrdlf_dcd_trp_tree )then
+ ! broadleaf tropical tree
+ if(needleleaf(veg_pp%itype(p)) == 0 .and. &
+ climatezone(veg_pp%itype(p)) == 1 .and. &
+ woody(veg_pp%itype(p)) == 1.0_r8)then
if(lfpftd(p) > 0._r8)then
dtrotr_col(c)=dtrotr_col(c)+lfpftd(p)*col_pp%wttopounit(c)
end if
@@ -405,7 +421,8 @@ subroutine FireArea (bounds, &
! For NOT bare-soil
if( veg_pp%itype(p) /= noveg )then
! For shrub and grass (crop already excluded above)
- if( veg_pp%itype(p) >= nbrdlf_evr_shrub )then !for shurb and grass
+ if( woody(veg_pp%itype(p)) == 2.0_r8 .or. &
+ graminoid(veg_pp%itype(p)) == 1 )then !for shurb and grass
lgdp_col(c) = lgdp_col(c) + (0.1_r8 + 0.9_r8* &
exp(-1._r8*SHR_CONST_PI* &
(gdp_lf(c)/8._r8)**0.5_r8))*veg_pp%wtcol(p) &
@@ -416,7 +433,7 @@ subroutine FireArea (bounds, &
lpop_col(c) = lpop_col(c) + (0.2_r8 + 0.8_r8* &
exp(-1._r8*SHR_CONST_PI* &
(hdmlf/450._r8)**0.5_r8))*veg_pp%wtcol(p)/lfwt(c)
- else ! for trees
+ else if (woody(veg_pp%itype(p)) == 1.0_r8) then ! for trees
if( gdp_lf(c) > 20._r8 )then
lgdp_col(c) =lgdp_col(c)+0.39_r8*veg_pp%wtcol(p)/(1.0_r8 - cropf_col(c))
else
@@ -491,7 +508,8 @@ subroutine FireArea (bounds, &
if (pi <= col_pp%npfts(c)) then
p = col_pp%pfti(c) + pi - 1
! For crop
- if( forc_t(t) >= SHR_CONST_TKFRZ .and. veg_pp%itype(p) > nc4_grass .and. &
+ if( forc_t(t) >= SHR_CONST_TKFRZ .and. &
+ (crop(veg_pp%itype(p)) == 1 .or. iscft(veg_pp%itype(p))) .and. &
kmo == abm_lf(c) .and. forc_rain(t)+forc_snow(t) == 0._r8 .and. &
burndate(p) >= 999 .and. veg_pp%wtcol(p) > 0._r8 )then ! catch crop burn time
@@ -661,7 +679,8 @@ subroutine FireFluxes (num_soilc, filter_soilc, num_soilp, filter_soilp, &
! !USES:
!$acc routine seq
use pftvarcon , only: cc_leaf,cc_lstem,cc_dstem,cc_other,fm_leaf,fm_lstem,fm_other,fm_root,fm_lroot,fm_droot
- use pftvarcon , only: nc3crop,lf_flab,lf_fcel,lf_flig,fr_flab,fr_fcel,fr_flig
+ use pftvarcon , only: lf_flab,lf_fcel,lf_flig,fr_flab,fr_fcel,fr_flig
+ use pftvarcon , only: iscft, crop
use elm_varpar , only: max_patch_per_col
use elm_varctl , only: spinup_state, spinup_mortality_factor
use dynSubgridControlMod , only: get_flanduse_timeseries
@@ -706,8 +725,6 @@ subroutine FireFluxes (num_soilc, filter_soilc, num_soilp, filter_soilp, &
is_cwd => decomp_cascade_con%is_cwd , & ! Input: [logical (:) ] TRUE => pool is a cwd pool
is_litter => decomp_cascade_con%is_litter , & ! Input: [logical (:) ] TRUE => pool is a litter pool
- woody => veg_vp%woody , & ! Input: [real(r8) (:) ] woody lifeform (1=woody, 0=not woody)
-
cropf_col => cnstate_vars%cropf_col , & ! Input: [real(r8) (:) ] cropland fraction in veg column
croot_prof => cnstate_vars%croot_prof_patch , & ! Input: [real(r8) (:,:) ] (1/m) profile of coarse roots
stem_prof => cnstate_vars%stem_prof_patch , & ! Input: [real(r8) (:,:) ] (1/m) profile of stems
@@ -965,7 +982,8 @@ subroutine FireFluxes (num_soilc, filter_soilc, num_soilp, filter_soilp, &
c = veg_pp%column(p)
itype = veg_pp%itype(p)
- if( itype < nc3crop .and. cropf_col(c) < 1.0_r8)then
+ if( (crop(veg_pp%itype(p)) == 0 .and. .not. iscft(veg_pp%itype(p))) .and. &
+ cropf_col(c) < 1.0_r8)then
! For non-crop (bare-soil and natural vegetation)
if (transient_landcover) then !true when landuse data is used
f = (fbac(c)-baf_crop(c))/(1.0_r8-cropf_col(c))
diff --git a/components/elm/src/biogeochem/GapMortalityMod.F90 b/components/elm/src/biogeochem/GapMortalityMod.F90
index 495c46ed0df..3a58551ae07 100644
--- a/components/elm/src/biogeochem/GapMortalityMod.F90
+++ b/components/elm/src/biogeochem/GapMortalityMod.F90
@@ -87,7 +87,7 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, &
! !USES:
!$acc routine seq
use elm_varcon , only: secspday
- use pftvarcon , only: npcropmin
+ use pftvarcon , only: iscft
use elm_varctl , only: spinup_state, spinup_mortality_factor
!
! !ARGUMENTS:
@@ -110,7 +110,6 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, &
associate( &
ivt => veg_pp%itype , & ! Input: [integer (:) ] pft vegetation type
- woody => veg_vp%woody , & ! Input: [real(r8) (:) ] binary flag for woody lifeform
croplive => crop_vars%croplive_patch & ! Input: [logical (:) ] flag, true if planted, not harvested
)
@@ -143,7 +142,7 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, &
! displayed pools
veg_cf%m_leafc_to_litter(p) = 0._r8
veg_cf%m_livestemc_to_litter(p) = 0._r8
- if(ivt(p) < npcropmin .or. (ivt(p) >= npcropmin .and. croplive(p))) then
+ if((.not. iscft(ivt(p))) .or. (iscft(ivt(p)) .and. croplive(p))) then
veg_cf%m_leafc_to_litter(p) = veg_cs%leafc(p) * m
veg_cf%m_livestemc_to_litter(p) = veg_cs%livestemc(p) * m
end if
@@ -182,7 +181,7 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, &
! displayed pools
veg_nf%m_leafn_to_litter(p) = 0._r8
veg_nf%m_livestemn_to_litter(p) = 0._r8
- if(ivt(p) < npcropmin .or. (ivt(p) >= npcropmin .and. croplive(p))) then
+ if((.not. iscft(ivt(p))) .or. (iscft(ivt(p)) .and. croplive(p))) then
veg_nf%m_leafn_to_litter(p) = veg_ns%leafn(p) * m
veg_nf%m_livestemn_to_litter(p) = veg_ns%livestemn(p) * m
end if
@@ -191,7 +190,7 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_nf%m_livecrootn_to_litter(p) = veg_ns%livecrootn(p) * m
veg_nf%m_deadcrootn_to_litter(p) = veg_ns%deadcrootn(p) * m
veg_nf%m_retransn_to_litter(p) = 0._r8
- if (ivt(p) < npcropmin) then
+ if (.not. iscft(ivt(p))) then
veg_nf%m_retransn_to_litter(p) = veg_ns%retransn(p) * m
end if
veg_nf%m_npool_to_litter(p) = veg_ns%npool(p) * m
@@ -226,7 +225,7 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, &
! displayed pools
veg_pf%m_leafp_to_litter(p) = 0._r8
veg_pf%m_livestemp_to_litter(p) = 0._r8
- if(ivt(p) < npcropmin .or. (ivt(p) >= npcropmin .and. croplive(p))) then
+ if((.not. iscft(ivt(p))) .or. (iscft(ivt(p)) .and. croplive(p))) then
veg_pf%m_leafp_to_litter(p) = veg_ps%leafp(p) * m
veg_pf%m_livestemp_to_litter(p) = veg_ps%livestemp(p) * m
endif
@@ -236,7 +235,7 @@ subroutine GapMortality (num_soilc, filter_soilc, num_soilp, filter_soilp, &
veg_pf%m_deadcrootp_to_litter(p) = veg_ps%deadcrootp(p) * m
veg_pf%m_retransp_to_litter(p) = 0._r8
- if (ivt(p) < npcropmin) then
+ if (.not. iscft(ivt(p))) then
veg_pf%m_retransp_to_litter(p) = veg_ps%retransp(p) * m
end if
veg_pf%m_ppool_to_litter(p) = veg_ps%ppool(p) * m
@@ -564,7 +563,7 @@ subroutine mortality_rate_soilorder(&
! USES
!$acc routine seq
- use pftvarcon , only: nbrdlf_evr_trp_tree, nbrdlf_dcd_trp_tree
+ use pftvarcon , only: woody, needleleaf, climatezone
use soilorder_varcon, only: r_mort_soilorder
!
@@ -586,7 +585,10 @@ subroutine mortality_rate_soilorder(&
do fp = 1,num_soilp
p = filter_soilp(fp)
c = veg_pp%column(p)
- if( veg_pp%itype(p) == nbrdlf_evr_trp_tree .or. veg_pp%itype(p) == nbrdlf_dcd_trp_tree )then
+ ! broadleaf tropical trees
+ if( woody(veg_pp%itype(p)) == 1.0_r8 .and. &
+ needleleaf(veg_pp%itype(p)) == 0 .and. &
+ climatezone(veg_pp%itype(p)) == 1 )then
r_mort_cal(p) = r_mort_soilorder( isoilorder(c) )
else
r_mort_cal(p) = 0.02_r8 ! Default mortality rate
diff --git a/components/elm/src/biogeochem/GrowthRespMod.F90 b/components/elm/src/biogeochem/GrowthRespMod.F90
index f499dedb2e0..cb7ad522265 100644
--- a/components/elm/src/biogeochem/GrowthRespMod.F90
+++ b/components/elm/src/biogeochem/GrowthRespMod.F90
@@ -7,7 +7,7 @@ module GrowthRespMod
!
! !USES:
use shr_kind_mod , only : r8 => shr_kind_r8
- use pftvarcon , only : grperc, grpnow, npcropmin
+ use pftvarcon , only : grperc, grpnow, iscft
use VegetationPropertiesType , only : veg_vp
use VegetationType , only : veg_pp
use VegetationDataType , only : veg_cf
@@ -102,7 +102,7 @@ subroutine GrowthResp(num_soilp, filter_soilp)
do fp = 1,num_soilp
p = filter_soilp(fp)
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
cpool_livestem_gr(p) = cpool_to_livestemc(p) * grperc(ivt(p))
@@ -133,7 +133,7 @@ subroutine GrowthResp(num_soilp, filter_soilp)
transfer_froot_gr(p) = frootc_xfer_to_frootc(p) * grperc(ivt(p)) * &
(1._r8 - grpnow(ivt(p)))
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
cpool_livestem_gr(p) = cpool_to_livestemc(p) * grperc(ivt(p))
cpool_livestem_storage_gr(p) = cpool_to_livestemc_storage(p) * &
grperc(ivt(p)) * grpnow(ivt(p))
diff --git a/components/elm/src/biogeochem/MaintenanceRespMod.F90 b/components/elm/src/biogeochem/MaintenanceRespMod.F90
index ef83ca92ff6..54005275b29 100644
--- a/components/elm/src/biogeochem/MaintenanceRespMod.F90
+++ b/components/elm/src/biogeochem/MaintenanceRespMod.F90
@@ -12,7 +12,7 @@ module MaintenanceRespMod
use decompMod , only : bounds_type
use abortutils , only : endrun
use shr_log_mod , only : errMsg => shr_log_errMsg
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
use SharedParamsMod , only : ParamsShareInst
use VegetationPropertiesType , only : veg_vp
use SoilStateType , only : soilstate_type
@@ -182,10 +182,10 @@ subroutine MaintenanceResp(bounds, &
end if
- if (woody(ivt(p)) == 1) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestem_mr(p) = livestemn(p)*br_mr*tc
livecroot_mr(p) = livecrootn(p)*br_mr*tc
- else if (ivt(p) >= npcropmin .and. livestemn(p) .gt. 0._r8) then
+ else if (iscft(ivt(p)) .and. livestemn(p) .gt. 0._r8) then
livestem_mr(p) = livestemn(p)*br_mr*tc
grain_mr(p) = grainn(p)*br_mr*tc
end if
diff --git a/components/elm/src/biogeochem/NitrogenStateUpdate1Mod.F90 b/components/elm/src/biogeochem/NitrogenStateUpdate1Mod.F90
index 1eefadd7bea..c1b2bfc5d65 100644
--- a/components/elm/src/biogeochem/NitrogenStateUpdate1Mod.F90
+++ b/components/elm/src/biogeochem/NitrogenStateUpdate1Mod.F90
@@ -9,7 +9,7 @@ module NitrogenStateUpdate1Mod
use elm_varpar , only : crop_prog, i_met_lit, i_cel_lit, i_lig_lit, i_cwd
use elm_varctl , only : iulog
use elm_varcon , only : nitrif_n2o_loss_frac
- use pftvarcon , only : npcropmin, nc3crop
+ use pftvarcon , only : iscft
use VegetationPropertiesType , only : veg_vp
use CNDecompCascadeConType , only : decomp_cascade_con
use CNStateType , only : cnstate_type
@@ -286,7 +286,7 @@ subroutine NitrogenStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp
veg_ns%frootn(p) = veg_ns%frootn(p) + veg_nf%frootn_xfer_to_frootn(p)*dt
veg_ns%frootn_xfer(p) = veg_ns%frootn_xfer(p) - veg_nf%frootn_xfer_to_frootn(p)*dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ns%livestemn(p) = veg_ns%livestemn(p) + veg_nf%livestemn_xfer_to_livestemn(p)*dt
veg_ns%livestemn_xfer(p) = veg_ns%livestemn_xfer(p) - veg_nf%livestemn_xfer_to_livestemn(p)*dt
veg_ns%deadstemn(p) = veg_ns%deadstemn(p) + veg_nf%deadstemn_xfer_to_deadstemn(p)*dt
@@ -297,7 +297,7 @@ subroutine NitrogenStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp
veg_ns%deadcrootn_xfer(p) = veg_ns%deadcrootn_xfer(p) - veg_nf%deadcrootn_xfer_to_deadcrootn(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
! lines here for consistency; the transfer terms are zero
veg_ns%livestemn(p) = veg_ns%livestemn(p) + veg_nf%livestemn_xfer_to_livestemn(p)*dt
veg_ns%livestemn_xfer(p) = veg_ns%livestemn_xfer(p) - veg_nf%livestemn_xfer_to_livestemn(p)*dt
@@ -312,7 +312,7 @@ subroutine NitrogenStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp
veg_ns%retransn(p) = veg_ns%retransn(p) + veg_nf%leafn_to_retransn(p)*dt
! live wood turnover and retranslocation fluxes
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ns%livestemn(p) = veg_ns%livestemn(p) - veg_nf%livestemn_to_deadstemn(p)*dt
veg_ns%deadstemn(p) = veg_ns%deadstemn(p) + veg_nf%livestemn_to_deadstemn(p)*dt
veg_ns%livestemn(p) = veg_ns%livestemn(p) - veg_nf%livestemn_to_retransn(p)*dt
@@ -322,7 +322,7 @@ subroutine NitrogenStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp
veg_ns%livecrootn(p) = veg_ns%livecrootn(p) - veg_nf%livecrootn_to_retransn(p)*dt
veg_ns%retransn(p) = veg_ns%retransn(p) + veg_nf%livecrootn_to_retransn(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! Beth adds retrans from froot
+ if (iscft(ivt(p))) then ! Beth adds retrans from froot
veg_ns%frootn(p) = veg_ns%frootn(p) - veg_nf%frootn_to_retransn(p)*dt
veg_ns%retransn(p) = veg_ns%retransn(p) + veg_nf%frootn_to_retransn(p)*dt
veg_ns%livestemn(p) = veg_ns%livestemn(p) - veg_nf%livestemn_to_litter(p)*dt
@@ -354,7 +354,7 @@ subroutine NitrogenStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_frootn_storage(p)*dt
veg_ns%frootn_storage(p) = veg_ns%frootn_storage(p) + veg_nf%npool_to_frootn_storage(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_livestemn(p)*dt
veg_ns%livestemn(p) = veg_ns%livestemn(p) + veg_nf%npool_to_livestemn(p)*dt
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_livestemn_storage(p)*dt
@@ -373,7 +373,7 @@ subroutine NitrogenStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp
veg_ns%deadcrootn_storage(p) = veg_ns%deadcrootn_storage(p) + veg_nf%npool_to_deadcrootn_storage(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_livestemn(p)*dt
veg_ns%livestemn(p) = veg_ns%livestemn(p) + veg_nf%npool_to_livestemn(p)*dt
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%npool_to_livestemn_storage(p)*dt
@@ -390,7 +390,7 @@ subroutine NitrogenStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp
veg_ns%frootn_storage(p) = veg_ns%frootn_storage(p) - veg_nf%frootn_storage_to_xfer(p)*dt
veg_ns%frootn_xfer(p) = veg_ns%frootn_xfer(p) + veg_nf%frootn_storage_to_xfer(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ns%livestemn_storage(p) = veg_ns%livestemn_storage(p) - veg_nf%livestemn_storage_to_xfer(p)*dt
veg_ns%livestemn_xfer(p) = veg_ns%livestemn_xfer(p) + veg_nf%livestemn_storage_to_xfer(p)*dt
veg_ns%deadstemn_storage(p) = veg_ns%deadstemn_storage(p) - veg_nf%deadstemn_storage_to_xfer(p)*dt
@@ -401,7 +401,7 @@ subroutine NitrogenStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp
veg_ns%deadcrootn_xfer(p) = veg_ns%deadcrootn_xfer(p) + veg_nf%deadcrootn_storage_to_xfer(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
! lines here for consistency; the transfer terms are zero
veg_ns%livestemn_storage(p) = veg_ns%livestemn_storage(p) - veg_nf%livestemn_storage_to_xfer(p)*dt
veg_ns%livestemn_xfer(p) = veg_ns%livestemn_xfer(p) + veg_nf%livestemn_storage_to_xfer(p)*dt
diff --git a/components/elm/src/biogeochem/NitrogenStateUpdate2Mod.F90 b/components/elm/src/biogeochem/NitrogenStateUpdate2Mod.F90
index 9121954e636..d8e6785e52c 100644
--- a/components/elm/src/biogeochem/NitrogenStateUpdate2Mod.F90
+++ b/components/elm/src/biogeochem/NitrogenStateUpdate2Mod.F90
@@ -14,7 +14,7 @@ module NitrogenStateUpdate2Mod
use ColumnDataType , only : col_ns, col_nf
use VegetationType , only : veg_pp
use VegetationDataType , only : veg_ns, veg_nf
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
! bgc interface & pflotran:
use elm_varctl , only : use_pflotran, pf_cmode
!
@@ -172,7 +172,7 @@ subroutine NitrogenStateUpdate2h(num_soilc, filter_soilc, num_soilp, filter_soil
veg_ns%retransn(p) = veg_ns%retransn(p) - veg_nf%hrv_retransn_to_litter(p) * dt
veg_ns%npool(p) = veg_ns%npool(p) - veg_nf%hrv_npool_to_litter(p) * dt
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_ns%livestemn(p)= veg_ns%livestemn(p) - veg_nf%hrv_livestemn_to_prod1n(p) * dt
veg_ns%leafn(p) = veg_ns%leafn(p) - veg_nf%hrv_leafn_to_prod1n(p) * dt
veg_ns%grainn(p) = veg_ns%grainn(p) - veg_nf%hrv_grainn_to_prod1n(p) * dt
diff --git a/components/elm/src/biogeochem/PhenologyFluxLimitMod.F90 b/components/elm/src/biogeochem/PhenologyFluxLimitMod.F90
index b6d05460c0b..87b9637d551 100644
--- a/components/elm/src/biogeochem/PhenologyFluxLimitMod.F90
+++ b/components/elm/src/biogeochem/PhenologyFluxLimitMod.F90
@@ -10,7 +10,7 @@ module PhenologyFLuxLimitMod
use VegetationType , only : veg_pp
use VegetationPropertiesType , only : veg_vp
use elm_time_manager , only : get_step_size
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
use elm_varctl , only : iulog
use abortutils , only : endrun
implicit none
@@ -630,7 +630,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
ystates(s_frootc) = veg_cs%frootc(p)
ystates(s_frootc_xfer) = veg_cs%frootc_xfer(p)
ystates(s_frootc_storage) = veg_cs%frootc_storage(p)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
ystates(s_livestemc) = veg_cs%livestemc(p)
ystates(s_livestemc_xfer) = veg_cs%livestemc_xfer(p)
ystates(s_livestemc_storage) = veg_cs%livestemc_storage(p)
@@ -644,7 +644,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
ystates(s_deadcrootc_xfer) = veg_cs%deadcrootc_xfer(p)
ystates(s_deadcrootc_storage) = veg_cs%deadcrootc_storage(p)
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
ystates(s_livestemc) = veg_cs%livestemc(p)
ystates(s_livestemc_xfer) = veg_cs%livestemc_xfer(p)
ystates(s_livestemc_storage) = veg_cs%livestemc_storage(p)
@@ -662,7 +662,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
+ veg_cf%cpool_froot_gr(p) &
+ veg_cf%cpool_leaf_storage_gr(p) &
+ veg_cf%cpool_froot_storage_gr(p)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
ar_p = ar_p &
+ veg_cf%livestem_curmr(p) &
+ veg_cf%livecroot_curmr(p) &
@@ -675,7 +675,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
+ veg_cf%cpool_livecroot_storage_gr(p) &
+ veg_cf%cpool_deadcroot_storage_gr(p)
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
ar_p= ar_p &
+ veg_cf%livestem_curmr(p) &
+ veg_cf%grain_curmr(p) &
@@ -692,7 +692,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
rfluxes(f_cpool_to_xsmrpool) = veg_cf%cpool_to_xsmrpool(p)
rfluxes(f_cpool_to_gresp_storage) = veg_cf%cpool_to_gresp_storage(p)
rfluxes(f_cpool_to_ar) = ar_p
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
rfluxes(f_cpool_to_livestemc) = veg_cf%cpool_to_livestemc(p)
rfluxes(f_cpool_to_livestemc_storage) = veg_cf%cpool_to_livestemc_storage(p)
rfluxes(f_cpool_to_deadstemc) = veg_cf%cpool_to_deadstemc(p)
@@ -713,7 +713,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
rfluxes(f_deadcrootc_storage_to_xfer) = veg_cf%deadcrootc_storage_to_xfer(p)
rfluxes(f_gresp_storage_to_xfer) = veg_cf%gresp_storage_to_xfer(p)
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
rfluxes(f_cpool_to_livestemc) = veg_cf%cpool_to_livestemc(p)
rfluxes(f_cpool_to_livestemc_storage) = veg_cf%cpool_to_livestemc_storage(p)
rfluxes(f_cpool_to_grainc) = veg_cf%cpool_to_grainc(p)
@@ -746,7 +746,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
call fpmax(rfluxes(f_cpool_to_xsmrpool) , veg_cf%cpool_to_xsmrpool(p))
call fpmax(rfluxes(f_cpool_to_gresp_storage) , veg_cf%cpool_to_gresp_storage(p))
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
call fpmax(rfluxes(f_cpool_to_livestemc) , veg_cf%cpool_to_livestemc(p))
call fpmax(rfluxes(f_cpool_to_livestemc_storage) , veg_cf%cpool_to_livestemc_storage(p))
call fpmax(rfluxes(f_cpool_to_deadstemc) , veg_cf%cpool_to_deadstemc(p))
@@ -767,7 +767,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
call fpmax(rfluxes(f_deadcrootc_storage_to_xfer) , veg_cf%deadcrootc_storage_to_xfer(p))
call fpmax(rfluxes(f_gresp_storage_to_xfer) , veg_cf%gresp_storage_to_xfer(p))
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
call fpmax(rfluxes(f_cpool_to_livestemc) , veg_cf%cpool_to_livestemc(p))
call fpmax(rfluxes(f_cpool_to_livestemc_storage) , veg_cf%cpool_to_livestemc_storage(p))
call fpmax(rfluxes(f_cpool_to_grainc) , veg_cf%cpool_to_grainc(p))
@@ -794,7 +794,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
call ascal(veg_cf%cpool_froot_gr(p) , rscal)
call ascal(veg_cf%cpool_leaf_storage_gr(p) , rscal)
call ascal(veg_cf%cpool_froot_storage_gr(p) , rscal)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
call ascal(veg_cf%livestem_curmr(p) , rscal)
call ascal(veg_cf%livecroot_curmr(p) , rscal)
call ascal(veg_cf%cpool_livestem_gr(p) , rscal)
@@ -806,7 +806,7 @@ subroutine carbon_flux_limiter(bounds, num_soilc, filter_soilc,&
call ascal(veg_cf%cpool_livecroot_storage_gr(p), rscal)
call ascal(veg_cf%cpool_deadcroot_storage_gr(p), rscal)
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
call ascal(veg_cf%livestem_curmr(p) , rscal)
call ascal(veg_cf%grain_curmr(p) , rscal)
call ascal(veg_cf%cpool_livestem_gr(p) , rscal)
@@ -864,7 +864,7 @@ subroutine nitrogen_flux_limiter(bounds, num_soilc, filter_soilc,&
ystates(s_frootn) = veg_ns%frootn(p)
ystates(s_frootn_xfer) = veg_ns%frootn_xfer(p)
ystates(s_frootn_storage) = veg_ns%frootn_storage(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
ystates(s_livestemn) = veg_ns%livestemn(p)
ystates(s_livestemn_xfer) = veg_ns%livestemn_xfer(p)
ystates(s_livestemn_storage) = veg_ns%livestemn_storage(p)
@@ -878,7 +878,7 @@ subroutine nitrogen_flux_limiter(bounds, num_soilc, filter_soilc,&
ystates(s_deadcrootn_xfer) = veg_ns%deadcrootn_xfer(p)
ystates(s_deadcrootn_storage) = veg_ns%deadcrootn_storage(p)
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
ystates(s_grainn) = veg_ns%grainn(p)
ystates(s_grainn_xfer) = veg_ns%grainn_xfer(p)
ystates(s_grainn_storage) = veg_ns%grainn_storage(p)
@@ -894,7 +894,7 @@ subroutine nitrogen_flux_limiter(bounds, num_soilc, filter_soilc,&
rfluxes(f_npool_to_leafn_storage) = veg_nf%npool_to_leafn_storage(p)
rfluxes(f_npool_to_frootn) = veg_nf%npool_to_frootn(p)
rfluxes(f_npool_to_frootn_storage) = veg_nf%npool_to_frootn_storage(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
rfluxes(f_npool_to_livestemn) = veg_nf%npool_to_livestemn(p)
rfluxes(f_npool_to_livestemn_storage) = veg_nf%npool_to_livestemn_storage(p)
rfluxes(f_npool_to_livecrootn) = veg_nf%npool_to_livecrootn(p)
@@ -917,7 +917,7 @@ subroutine nitrogen_flux_limiter(bounds, num_soilc, filter_soilc,&
rfluxes(f_deadcrootn_xfer_to_deadcrootn) = veg_nf%deadcrootn_xfer_to_deadcrootn(p)
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
rfluxes(f_npool_to_livestemn) = veg_nf%npool_to_livestemn(p)
rfluxes(f_npool_to_livestemn_storage) = veg_nf%npool_to_livestemn_storage(p)
rfluxes(f_npool_to_grainn) = veg_nf%npool_to_grainn(p)
@@ -950,7 +950,7 @@ subroutine nitrogen_flux_limiter(bounds, num_soilc, filter_soilc,&
call fpmax(rfluxes(f_npool_to_leafn_storage) , veg_nf%npool_to_leafn_storage(p))
call fpmax(rfluxes(f_npool_to_frootn) , veg_nf%npool_to_frootn(p))
call fpmax(rfluxes(f_npool_to_frootn_storage) , veg_nf%npool_to_frootn_storage(p))
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
call fpmax(rfluxes(f_npool_to_livestemn) , veg_nf%npool_to_livestemn(p))
call fpmax(rfluxes(f_npool_to_livestemn_storage) , veg_nf%npool_to_livestemn_storage(p))
call fpmax(rfluxes(f_npool_to_livecrootn) , veg_nf%npool_to_livecrootn(p))
@@ -973,7 +973,7 @@ subroutine nitrogen_flux_limiter(bounds, num_soilc, filter_soilc,&
call fpmax(rfluxes(f_deadcrootn_xfer_to_deadcrootn) , veg_nf%deadcrootn_xfer_to_deadcrootn(p))
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
call fpmax(rfluxes(f_npool_to_livestemn) , veg_nf%npool_to_livestemn(p))
call fpmax(rfluxes(f_npool_to_livestemn_storage) , veg_nf%npool_to_livestemn_storage(p))
call fpmax(rfluxes(f_npool_to_grainn) , veg_nf%npool_to_grainn(p))
@@ -1049,7 +1049,7 @@ subroutine phosphorus_flux_limiter(bounds, num_soilc, filter_soilc,&
ystates(s_frootn) = veg_ps%frootp(p)
ystates(s_frootn_xfer) = veg_ps%frootp_xfer(p)
ystates(s_frootn_storage) = veg_ps%frootp_storage(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
ystates(s_livestemn) = veg_ps%livestemp(p)
ystates(s_livestemn_xfer) = veg_ps%livestemp_xfer(p)
ystates(s_livestemn_storage) = veg_ps%livestemp_storage(p)
@@ -1063,7 +1063,7 @@ subroutine phosphorus_flux_limiter(bounds, num_soilc, filter_soilc,&
ystates(s_deadcrootn_xfer) = veg_ps%deadcrootp_xfer(p)
ystates(s_deadcrootn_storage) = veg_ps%deadcrootp_storage(p)
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
ystates(s_grainn) = veg_ps%grainp(p)
ystates(s_grainn_xfer) = veg_ps%grainp_xfer(p)
ystates(s_grainn_storage) = veg_ps%grainp_storage(p)
@@ -1079,7 +1079,7 @@ subroutine phosphorus_flux_limiter(bounds, num_soilc, filter_soilc,&
rfluxes(f_npool_to_leafn_storage) = veg_pf%ppool_to_leafp_storage(p)
rfluxes(f_npool_to_frootn) = veg_pf%ppool_to_frootp(p)
rfluxes(f_npool_to_frootn_storage) = veg_pf%ppool_to_frootp_storage(p)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
rfluxes(f_npool_to_livestemn) = veg_pf%ppool_to_livestemp(p)
rfluxes(f_npool_to_livestemn_storage) = veg_pf%ppool_to_livestemp_storage(p)
rfluxes(f_npool_to_livecrootn) = veg_pf%ppool_to_livecrootp(p)
@@ -1102,7 +1102,7 @@ subroutine phosphorus_flux_limiter(bounds, num_soilc, filter_soilc,&
rfluxes(f_deadcrootn_xfer_to_deadcrootn) = veg_pf%deadcrootp_xfer_to_deadcrootp(p)
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
rfluxes(f_npool_to_livestemn) = veg_pf%ppool_to_livestemp(p)
rfluxes(f_npool_to_livestemn_storage) = veg_pf%ppool_to_livestemp_storage(p)
rfluxes(f_npool_to_grainn) = veg_pf%ppool_to_grainp(p)
@@ -1135,7 +1135,7 @@ subroutine phosphorus_flux_limiter(bounds, num_soilc, filter_soilc,&
call fpmax(rfluxes(f_npool_to_leafn_storage) , veg_pf%ppool_to_leafp_storage(p))
call fpmax(rfluxes(f_npool_to_frootn) , veg_pf%ppool_to_frootp(p))
call fpmax(rfluxes(f_npool_to_frootn_storage) , veg_pf%ppool_to_frootp_storage(p))
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
call fpmax(rfluxes(f_npool_to_livestemn) , veg_pf%ppool_to_livestemp(p))
call fpmax(rfluxes(f_npool_to_livestemn_storage) , veg_pf%ppool_to_livestemp_storage(p))
call fpmax(rfluxes(f_npool_to_livecrootn) , veg_pf%ppool_to_livecrootp(p))
@@ -1158,7 +1158,7 @@ subroutine phosphorus_flux_limiter(bounds, num_soilc, filter_soilc,&
call fpmax(rfluxes(f_deadcrootn_xfer_to_deadcrootn) , veg_pf%deadcrootp_xfer_to_deadcrootp(p))
endif
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
call fpmax(rfluxes(f_npool_to_livestemn) , veg_pf%ppool_to_livestemp(p))
call fpmax(rfluxes(f_npool_to_livestemn_storage) , veg_pf%ppool_to_livestemp_storage(p))
call fpmax(rfluxes(f_npool_to_grainn) , veg_pf%ppool_to_grainp(p))
diff --git a/components/elm/src/biogeochem/PhenologyMod.F90 b/components/elm/src/biogeochem/PhenologyMod.F90
index 9f51301acb7..08e9b94da52 100644
--- a/components/elm/src/biogeochem/PhenologyMod.F90
+++ b/components/elm/src/biogeochem/PhenologyMod.F90
@@ -771,7 +771,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp, cnstate_vars)
frootn_xfer_to_frootn(p) = 0.0_r8
leafp_xfer_to_leafp(p) = 0.0_r8
frootp_xfer_to_frootp(p) = 0.0_r8
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer_to_livestemc(p) = 0.0_r8
deadstemc_xfer_to_deadstemc(p) = 0.0_r8
livecrootc_xfer_to_livecrootc(p) = 0.0_r8
@@ -792,7 +792,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp, cnstate_vars)
frootc_xfer(p) = 0.0_r8
frootn_xfer(p) = 0.0_r8
frootp_xfer(p) = 0.0_r8
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer(p) = 0.0_r8
livestemn_xfer(p) = 0.0_r8
livestemp_xfer(p) = 0.0_r8
@@ -855,7 +855,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp, cnstate_vars)
! set carbon fluxes for shifting storage pools to transfer pools
leafc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * leafc_storage(p)/dt
frootc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * frootc_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livestemc_storage(p)/dt
deadstemc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * deadstemc_storage(p)/dt
livecrootc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livecrootc_storage(p)/dt
@@ -866,7 +866,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp, cnstate_vars)
! set nitrogen fluxes for shifting storage pools to transfer pools
leafn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * leafn_storage(p)/dt
frootn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * frootn_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livestemn_storage(p)/dt
deadstemn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * deadstemn_storage(p)/dt
livecrootn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livecrootn_storage(p)/dt
@@ -876,7 +876,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp, cnstate_vars)
! set phosphorus fluxes for shifting storage pools to transfer pools
leafp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * leafp_storage(p)/dt
frootp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * frootp_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livestemp_storage(p)/dt
deadstemp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * deadstemp_storage(p)/dt
livecrootp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livecrootp_storage(p)/dt
@@ -1116,7 +1116,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
frootn_xfer_to_frootn(p) = 0._r8
leafp_xfer_to_leafp(p) = 0._r8
frootp_xfer_to_frootp(p) = 0._r8
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer_to_livestemc(p) = 0._r8
deadstemc_xfer_to_deadstemc(p) = 0._r8
livecrootc_xfer_to_livecrootc(p) = 0._r8
@@ -1137,7 +1137,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
frootc_xfer(p) = 0._r8
frootn_xfer(p) = 0._r8
frootp_xfer(p) = 0._r8
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer(p) = 0._r8
livestemn_xfer(p) = 0._r8
livestemp_xfer(p) = 0._r8
@@ -1229,7 +1229,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set carbon fluxes for shifting storage pools to transfer pools
leafc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * leafc_storage(p)/dt
frootc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * frootc_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livestemc_storage(p)/dt
deadstemc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * deadstemc_storage(p)/dt
livecrootc_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livecrootc_storage(p)/dt
@@ -1240,7 +1240,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set nitrogen fluxes for shifting storage pools to transfer pools
leafn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * leafn_storage(p)/dt
frootn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * frootn_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livestemn_storage(p)/dt
deadstemn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * deadstemn_storage(p)/dt
livecrootn_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livecrootn_storage(p)/dt
@@ -1250,7 +1250,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set phosphorus fluxes for shifting storage pools to transfer pools
leafp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * leafp_storage(p)/dt
frootp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * frootp_storage(p)/dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livestemp_storage(p)/dt
deadstemp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * deadstemp_storage(p)/dt
livecrootp_storage_to_xfer(p) = PhenolParamsInst%fstor2tran * livecrootp_storage(p)/dt
@@ -1352,7 +1352,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
leafc_storage_to_xfer(p) = leafc_storage(p) * bgtr(p)
frootc_storage_to_xfer(p) = frootc_storage(p) * bgtr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_storage_to_xfer(p) = livestemc_storage(p) * bgtr(p)
deadstemc_storage_to_xfer(p) = deadstemc_storage(p) * bgtr(p)
livecrootc_storage_to_xfer(p) = livecrootc_storage(p) * bgtr(p)
@@ -1363,7 +1363,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set nitrogen fluxes for shifting storage pools to transfer pools
leafn_storage_to_xfer(p) = leafn_storage(p) * bgtr(p)
frootn_storage_to_xfer(p) = frootn_storage(p) * bgtr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemn_storage_to_xfer(p) = livestemn_storage(p) * bgtr(p)
deadstemn_storage_to_xfer(p) = deadstemn_storage(p) * bgtr(p)
livecrootn_storage_to_xfer(p) = livecrootn_storage(p) * bgtr(p)
@@ -1374,7 +1374,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &
! set phosphorus fluxes for shifting storage pools to transfer pools
leafp_storage_to_xfer(p) = leafp_storage(p) * bgtr(p)
frootp_storage_to_xfer(p) = frootp_storage(p) * bgtr(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemp_storage_to_xfer(p) = livestemp_storage(p) * bgtr(p)
deadstemp_storage_to_xfer(p) = deadstemp_storage(p) * bgtr(p)
livecrootp_storage_to_xfer(p) = livecrootp_storage(p) * bgtr(p)
@@ -2177,7 +2177,8 @@ subroutine CropPhenologyInit(bounds)
! initialized, and after ecophyscon file is read in.
!
! !USES:
- use pftvarcon , only: npcropmin, npcropmax, nppercropmin, nppercropmax, mnNHplantdate
+ use elm_varpar , only : mxpft
+ use pftvarcon , only: iscft, mnNHplantdate
use pftvarcon , only: mnSHplantdate, mxNHplantdate
use pftvarcon , only: mxSHplantdate
use elm_time_manager, only: get_calday
@@ -2203,22 +2204,17 @@ subroutine CropPhenologyInit(bounds)
! Convert planting dates into julian day
minplantjday(:,:) = huge(1)
maxplantjday(:,:) = huge(1)
- do n = npcropmin, npcropmax
+ do n = 0, mxpft
+ if (iscft(n)) then
minplantjday(n,inNH) = int( get_calday( mnNHplantdate(n), 0 ) )
maxplantjday(n,inNH) = int( get_calday( mxNHplantdate(n), 0 ) )
+ end if
end do
- do n = npcropmin, npcropmax
+ do n = 0, mxpft
+ if (iscft(n)) then
minplantjday(n,inSH) = int( get_calday( mnSHplantdate(n), 0 ) )
maxplantjday(n,inSH) = int( get_calday( mxSHplantdate(n), 0 ) )
- end do
-
- do n = nppercropmin, nppercropmax
- minplantjday(n,inNH) = int( get_calday( mnNHplantdate(n), 0 ) )
- maxplantjday(n,inNH) = int( get_calday( mxNHplantdate(n), 0 ) )
- end do
- do n = nppercropmin, nppercropmax
- minplantjday(n,inSH) = int( get_calday( mnSHplantdate(n), 0 ) )
- maxplantjday(n,inSH) = int( get_calday( mxSHplantdate(n), 0 ) )
+ end if
end do
! Figure out what hemisphere each PFT is in
@@ -2694,7 +2690,7 @@ subroutine CNOnsetGrowth (num_soilp, filter_soilp, &
frootn_xfer_to_frootn(p) = t1 * frootn_xfer(p)
leafp_xfer_to_leafp(p) = t1 * leafp_xfer(p)
frootp_xfer_to_frootp(p) = t1 * frootp_xfer(p)
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer_to_livestemc(p) = t1 * livestemc_xfer(p)
deadstemc_xfer_to_deadstemc(p) = t1 * deadstemc_xfer(p)
livecrootc_xfer_to_livecrootc(p) = t1 * livecrootc_xfer(p)
@@ -2723,7 +2719,7 @@ subroutine CNOnsetGrowth (num_soilp, filter_soilp, &
frootn_xfer_to_frootn(p) = frootn_xfer(p) / dt
leafp_xfer_to_leafp(p) = leafp_xfer(p) / dt
frootp_xfer_to_frootp(p) = frootp_xfer(p) / dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
livestemc_xfer_to_livestemc(p) = livestemc_xfer(p) / dt
deadstemc_xfer_to_deadstemc(p) = deadstemc_xfer(p) / dt
livecrootc_xfer_to_livecrootc(p) = livecrootc_xfer(p) / dt
@@ -2965,7 +2961,7 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &
!
! !USES:
!$acc routine seq
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
!
! !ARGUMENTS:
integer , intent(in) :: num_soilp ! number of soil patches in filter
@@ -3062,7 +3058,7 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &
if (offset_counter(p) == dt) then
t1 = 1.0_r8 / dt
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
! this assumes that offset_counter == dt for crops
! if this were ever changed, we'd need to add code to the "else"
leafc_to_litter(p) = (1.0_r8 - presharv(ivt(p))) * ((t1 * leafc(p)) + cpool_to_leafc(p))
@@ -3079,7 +3075,7 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &
end if
if ( nu_com .eq. 'RD') then
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
if (offset_counter(p) == dt) then
t1 = 1.0_r8 / dt
@@ -3113,7 +3109,7 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &
else
if (offset_counter(p) == dt) then
t1 = 1.0_r8 / dt
- if (ivt(p) >= npcropmin) then
+ if (iscft(ivt(p))) then
! this assumes that offset_counter == dt for crops
! if this were ever changed, we'd need to add code to the "else"
leafn_to_litter(p) = (1.0_r8 - presharv(ivt(p))) * ((t1 * leafn(p)) + npool_to_leafn(p))
@@ -3315,7 +3311,7 @@ subroutine CNLivewoodTurnover (num_soilp, filter_soilp)
p = filter_soilp(fp)
! only calculate these fluxes for woody types
- if (woody(ivt(p)) > 0._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
if ( nu_com .eq. 'RD') then
! live stem to dead stem turnover
@@ -3387,7 +3383,7 @@ subroutine CNLitterToColumn (num_soilp, filter_soilp, &
! !USES:
!$acc routine seq
use elm_varpar , only : max_patch_per_col, nlevdecomp
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
!
! !ARGUMENTS:
integer , intent(in) :: num_soilp ! number of soil columns in filter
@@ -3497,7 +3493,7 @@ subroutine CNLitterToColumn (num_soilp, filter_soilp, &
! new ones for now (slevis)
! The food is now directed to the product pools (BDrewniak)
- if (ivt(p) >= npcropmin) then ! add livestemc to litter
+ if (iscft(ivt(p))) then ! add livestemc to litter
! stem litter carbon fluxes
phenology_c_to_litr_met_c(c,j) = phenology_c_to_litr_met_c(c,j) &
+ livestemc_to_litter(p) * lf_flab(ivt(p)) * wt_col * leaf_prof(p,j)
diff --git a/components/elm/src/biogeochem/PhosphorusFluxType.F90 b/components/elm/src/biogeochem/PhosphorusFluxType.F90
index f34d7556f69..52bda3118fd 100644
--- a/components/elm/src/biogeochem/PhosphorusFluxType.F90
+++ b/components/elm/src/biogeochem/PhosphorusFluxType.F90
@@ -561,7 +561,6 @@ subroutine Summary(this, bounds, num_soilc, filter_soilc, num_soilp, filter_soil
! !USES:
use elm_varpar , only: nlevdecomp,ndecomp_cascade_transitions,ndecomp_pools
use subgridAveMod , only: p2c
- use pftvarcon , only: npcropmin
! pflotran
! use elm_varctl , only: use_pflotran, pf_cmode
!
diff --git a/components/elm/src/biogeochem/PhosphorusStateType.F90 b/components/elm/src/biogeochem/PhosphorusStateType.F90
index 0be7dd7f533..58dbe630c2e 100644
--- a/components/elm/src/biogeochem/PhosphorusStateType.F90
+++ b/components/elm/src/biogeochem/PhosphorusStateType.F90
@@ -12,7 +12,7 @@ module PhosphorusStateType
use elm_varctl , only : use_vertsoilc, use_century_decomp
use elm_varctl , only : iulog, override_bgc_restart_mismatch_dump, spinup_state
use decompMod , only : bounds_type
- use pftvarcon , only : npcropmin, nstor
+ use pftvarcon , only : iscft, nstor
use CNDecompCascadeConType , only : decomp_cascade_con
use VegetationPropertiesType , only : veg_vp
use abortutils , only : endrun
@@ -254,7 +254,7 @@ subroutine InitCold(this, bounds, &
! !USES:
use elm_varpar , only : crop_prog
use decompMod , only : bounds_type
- use pftvarcon , only : noveg, npcropmin
+ use pftvarcon , only : noveg, iscft
!
! !ARGUMENTS:
class(phosphorusstate_type) :: this
diff --git a/components/elm/src/biogeochem/PhosphorusStateUpdate1Mod.F90 b/components/elm/src/biogeochem/PhosphorusStateUpdate1Mod.F90
index 63390dc419e..6e111116922 100644
--- a/components/elm/src/biogeochem/PhosphorusStateUpdate1Mod.F90
+++ b/components/elm/src/biogeochem/PhosphorusStateUpdate1Mod.F90
@@ -8,7 +8,7 @@ module PhosphorusStateUpdate1Mod
use elm_varpar , only : nlevdecomp, ndecomp_pools, ndecomp_cascade_transitions
use elm_varpar , only : crop_prog, i_met_lit, i_cel_lit, i_lig_lit, i_cwd
use elm_varctl , only : iulog
- use pftvarcon , only : npcropmin, nc3crop
+ use pftvarcon , only : iscft
use soilorder_varcon , only : smax,ks_sorption
use VegetationPropertiesType , only : veg_vp
use CNDecompCascadeConType , only : decomp_cascade_con
@@ -244,7 +244,7 @@ subroutine PhosphorusStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soi
veg_ps%frootp(p) = veg_ps%frootp(p) + veg_pf%frootp_xfer_to_frootp(p)*dt
veg_ps%frootp_xfer(p) = veg_ps%frootp_xfer(p) - veg_pf%frootp_xfer_to_frootp(p)*dt
- if (woody(ivt(p)) == 1.0_r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ps%livestemp(p) = veg_ps%livestemp(p) + veg_pf%livestemp_xfer_to_livestemp(p)*dt
veg_ps%livestemp_xfer(p) = veg_ps%livestemp_xfer(p) - veg_pf%livestemp_xfer_to_livestemp(p)*dt
veg_ps%deadstemp(p) = veg_ps%deadstemp(p) + veg_pf%deadstemp_xfer_to_deadstemp(p)*dt
@@ -255,7 +255,7 @@ subroutine PhosphorusStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soi
veg_ps%deadcrootp_xfer(p) = veg_ps%deadcrootp_xfer(p) - veg_pf%deadcrootp_xfer_to_deadcrootp(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
! lines here for consistency; the transfer terms are zero
veg_ps%livestemp(p) = veg_ps%livestemp(p) + veg_pf%livestemp_xfer_to_livestemp(p)*dt
veg_ps%livestemp_xfer(p) = veg_ps%livestemp_xfer(p) - veg_pf%livestemp_xfer_to_livestemp(p)*dt
@@ -270,7 +270,7 @@ subroutine PhosphorusStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soi
veg_ps%retransp(p) = veg_ps%retransp(p) + veg_pf%leafp_to_retransp(p)*dt
! live wood turnover and retranslocation fluxes
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ps%livestemp(p) = veg_ps%livestemp(p) - veg_pf%livestemp_to_deadstemp(p)*dt
veg_ps%deadstemp(p) = veg_ps%deadstemp(p) + veg_pf%livestemp_to_deadstemp(p)*dt
veg_ps%livestemp(p) = veg_ps%livestemp(p) - veg_pf%livestemp_to_retransp(p)*dt
@@ -280,7 +280,7 @@ subroutine PhosphorusStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soi
veg_ps%livecrootp(p) = veg_ps%livecrootp(p) - veg_pf%livecrootp_to_retransp(p)*dt
veg_ps%retransp(p) = veg_ps%retransp(p) + veg_pf%livecrootp_to_retransp(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! Beth adds retrans from froot
+ if (iscft(ivt(p))) then ! Beth adds retrans from froot
veg_ps%frootp(p) = veg_ps%frootp(p) - veg_pf%frootp_to_retransp(p)*dt
veg_ps%retransp(p) = veg_ps%retransp(p) + veg_pf%frootp_to_retransp(p)*dt
veg_ps%livestemp(p) = veg_ps%livestemp(p) - veg_pf%livestemp_to_litter(p)*dt
@@ -312,7 +312,7 @@ subroutine PhosphorusStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soi
veg_ps%ppool(p) = veg_ps%ppool(p) - veg_pf%ppool_to_frootp_storage(p)*dt
veg_ps%frootp_storage(p) = veg_ps%frootp_storage(p) + veg_pf%ppool_to_frootp_storage(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ps%ppool(p) = veg_ps%ppool(p) - veg_pf%ppool_to_livestemp(p)*dt
veg_ps%livestemp(p) = veg_ps%livestemp(p) + veg_pf%ppool_to_livestemp(p)*dt
veg_ps%ppool(p) = veg_ps%ppool(p) - veg_pf%ppool_to_livestemp_storage(p)*dt
@@ -331,7 +331,7 @@ subroutine PhosphorusStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soi
veg_ps%deadcrootp_storage(p) = veg_ps%deadcrootp_storage(p) + veg_pf%ppool_to_deadcrootp_storage(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_ps%ppool(p) = veg_ps%ppool(p) - veg_pf%ppool_to_livestemp(p)*dt
veg_ps%livestemp(p) = veg_ps%livestemp(p) + veg_pf%ppool_to_livestemp(p)*dt
veg_ps%ppool(p) = veg_ps%ppool(p) - veg_pf%ppool_to_livestemp_storage(p)*dt
@@ -348,7 +348,7 @@ subroutine PhosphorusStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soi
veg_ps%frootp_storage(p) = veg_ps%frootp_storage(p) - veg_pf%frootp_storage_to_xfer(p)*dt
veg_ps%frootp_xfer(p) = veg_ps%frootp_xfer(p) + veg_pf%frootp_storage_to_xfer(p)*dt
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
veg_ps%livestemp_storage(p) = veg_ps%livestemp_storage(p) - veg_pf%livestemp_storage_to_xfer(p)*dt
veg_ps%livestemp_xfer(p) = veg_ps%livestemp_xfer(p) + veg_pf%livestemp_storage_to_xfer(p)*dt
veg_ps%deadstemp_storage(p) = veg_ps%deadstemp_storage(p) - veg_pf%deadstemp_storage_to_xfer(p)*dt
@@ -359,7 +359,7 @@ subroutine PhosphorusStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soi
veg_ps%deadcrootp_xfer(p) = veg_ps%deadcrootp_xfer(p) + veg_pf%deadcrootp_storage_to_xfer(p)*dt
end if
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
! lines here for consistency; the transfer terms are zero
veg_ps%livestemp_storage(p) = veg_ps%livestemp_storage(p) - veg_pf%livestemp_storage_to_xfer(p)*dt
veg_ps%livestemp_xfer(p) = veg_ps%livestemp_xfer(p) + veg_pf%livestemp_storage_to_xfer(p)*dt
diff --git a/components/elm/src/biogeochem/PhosphorusStateUpdate2Mod.F90 b/components/elm/src/biogeochem/PhosphorusStateUpdate2Mod.F90
index 2385083451c..c6b6cd8ee6d 100644
--- a/components/elm/src/biogeochem/PhosphorusStateUpdate2Mod.F90
+++ b/components/elm/src/biogeochem/PhosphorusStateUpdate2Mod.F90
@@ -12,7 +12,7 @@ module PhosphorusStateUpdate2Mod
!use PhosphorusStateType , only : phosphorusstate_type
!use PhosphorusFLuxType , only : phosphorusflux_type
use VegetationType , only : veg_pp
- use pftvarcon , only : npcropmin
+ use pftvarcon , only : iscft
use tracer_varcon , only : is_active_betr_bgc
! bgc interface & pflotran:
use elm_varctl , only : use_pflotran, pf_cmode
@@ -182,7 +182,7 @@ subroutine PhosphorusStateUpdate2h(num_soilc, filter_soilc, num_soilp, filter_so
veg_ps%retransp(p) = veg_ps%retransp(p) - veg_pf%hrv_retransp_to_litter(p) * dt
veg_ps%ppool(p) = veg_ps%ppool(p) - veg_pf%hrv_ppool_to_litter(p) * dt
- if (ivt(p) >= npcropmin) then ! skip 2 generic crops
+ if (iscft(ivt(p))) then ! skip 2 generic crops
veg_ps%livestemp(p)= veg_ps%livestemp(p) - veg_pf%hrv_livestemp_to_prod1p(p) * dt
veg_ps%leafp(p) = veg_ps%leafp(p) - veg_pf%hrv_leafp_to_prod1p(p) * dt
veg_ps%grainp(p) = veg_ps%grainp(p) - veg_pf%hrv_grainp_to_prod1p(p) * dt
diff --git a/components/elm/src/biogeochem/PrecisionControlMod.F90 b/components/elm/src/biogeochem/PrecisionControlMod.F90
index 89e30c83fd1..10f601487cd 100644
--- a/components/elm/src/biogeochem/PrecisionControlMod.F90
+++ b/components/elm/src/biogeochem/PrecisionControlMod.F90
@@ -39,7 +39,7 @@ subroutine PrecisionControl(num_soilc, filter_soilc, num_soilp, filter_soilp)
!$acc routine seq
use elm_varctl , only : iulog, use_c13, use_c14, use_fates
use elm_varpar , only : nlevdecomp_full, crop_prog
- use pftvarcon , only : nc3crop
+ use pftvarcon , only : iscft
use tracer_varcon , only : is_active_betr_bgc
use CNDecompCascadeConType , only : decomp_cascade_con
!
@@ -211,7 +211,7 @@ subroutine PrecisionControl(num_soilc, filter_soilc, num_soilp, filter_soilp)
veg_ps%frootp_xfer(p) = 0._r8
end if
- if ( crop_prog .and. veg_pp%itype(p) >= nc3crop )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
! grain C and N
if (abs(veg_cs%grainc(p)) < ccrit) then
pc = pc + veg_cs%grainc(p)
@@ -513,7 +513,7 @@ subroutine PrecisionControl(num_soilc, filter_soilc, num_soilp, filter_soilp)
endif
end if
- if ( crop_prog .and. veg_pp%itype(p) >= nc3crop )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
! xsmrpool (C only)
if (abs(veg_cs%xsmrpool(p)) < ccrit) then
pc = pc + veg_cs%xsmrpool(p)
diff --git a/components/elm/src/biogeochem/RootDynamicsMod.F90 b/components/elm/src/biogeochem/RootDynamicsMod.F90
index 3c78043aa6a..9ea6a9812b0 100644
--- a/components/elm/src/biogeochem/RootDynamicsMod.F90
+++ b/components/elm/src/biogeochem/RootDynamicsMod.F90
@@ -10,7 +10,7 @@ module RootDynamicsMod
use elm_varpar , only : nlevsoi, nlevgrnd
use elm_varctl , only : use_vertsoilc
use decompMod , only : bounds_type
- use pftvarcon , only : noveg, npcropmin, roota_par, rootb_par, root_dmx, evergreen
+ use pftvarcon , only : noveg, iscft, roota_par, rootb_par, root_dmx, evergreen
use CanopyStateType , only: canopystate_type
use CNStateType , only : cnstate_type
use CNCarbonStateType , only : carbonstate_type
@@ -136,7 +136,7 @@ subroutine RootDynamics(bounds, num_soilc, filter_soilc, num_soilp, filter_soilp
p = filter_soilp(f)
c = pcolumn(p)
if (ivt(p) /= noveg) then
- if ((ivt(p)) >= npcropmin) then !skip generic crop types
+ if (iscft(ivt(p))) then !skip generic crop types
if (huigrain(p) > 0._r8) then
root_depth(p) = max(zi(c,2), min(hui(p)/huigrain(p)* root_dmx(ivt(p)), root_dmx(ivt(p))))
end if
diff --git a/components/elm/src/biogeochem/SatellitePhenologyMod.F90 b/components/elm/src/biogeochem/SatellitePhenologyMod.F90
index b5d9b1bd3a4..688b254bd83 100644
--- a/components/elm/src/biogeochem/SatellitePhenologyMod.F90
+++ b/components/elm/src/biogeochem/SatellitePhenologyMod.F90
@@ -304,7 +304,7 @@ subroutine SatellitePhenology(bounds, num_filter, filter, &
! Calculates leaf areas (tlai, elai), stem areas (tsai, esai) and height (htop).
!
! !USES:
- use pftvarcon, only : noveg, nbrdlf_dcd_brl_shrub
+ use pftvarcon, only : woody
use elm_varctl, only : use_fates_sp
!
! !ARGUMENTS:
@@ -371,7 +371,7 @@ subroutine SatellitePhenology(bounds, num_filter, filter, &
! snow burial fraction for short vegetation (e.g. grasses) as in
! Wang and Zeng, 2007.
- if (veg_pp%itype(p) > noveg .and. veg_pp%itype(p) <= nbrdlf_dcd_brl_shrub ) then
+ if (woody(veg_pp%itype(p)) >= 1.0_r8) then
ol = min( max(snow_depth(c)-hbot(p), 0._r8), htop(p)-hbot(p))
fb = 1._r8 - ol / max(1.e-06_r8, htop(p)-hbot(p))
else
diff --git a/components/elm/src/biogeochem/VOCEmissionMod.F90 b/components/elm/src/biogeochem/VOCEmissionMod.F90
index cb58227b523..0a17f8803e7 100644
--- a/components/elm/src/biogeochem/VOCEmissionMod.F90
+++ b/components/elm/src/biogeochem/VOCEmissionMod.F90
@@ -9,13 +9,9 @@ module VOCEmissionMod
use shr_log_mod , only : errMsg => shr_log_errMsg
use elm_varctl , only : iulog
use elm_varpar , only : numpft, nlevcan
- use pftvarcon , only : ndllf_evr_tmp_tree, ndllf_evr_brl_tree
- use pftvarcon , only : ndllf_dcd_brl_tree, nbrdlf_evr_trp_tree
- use pftvarcon , only : nbrdlf_evr_tmp_tree, nbrdlf_dcd_brl_shrub
- use pftvarcon , only : nbrdlf_dcd_trp_tree, nbrdlf_dcd_tmp_tree
- use pftvarcon , only : nbrdlf_dcd_brl_tree, nbrdlf_evr_shrub
- use pftvarcon , only : nc3_arctic_grass , nc3crop
- use pftvarcon , only : nc4_grass, noveg
+ use elm_varpar , only : numveg ! fixed as 16, while numpft above may be variable
+ use pftvarcon , only : woody, graminoid, iscft, crop
+ use pftvarcon , only : needleleaf, evergreen
use shr_megan_mod , only : shr_megan_megcomps_n, shr_megan_megcomp_t, shr_megan_linkedlist
use shr_megan_mod , only : shr_megan_mechcomps_n, shr_megan_mechcomps, shr_megan_mapped_emisfctrs
use MEGANFactorsMod , only : Agro, Amat, Anew, Aold, betaT, ct1, ct2, LDF, Ceo
@@ -114,7 +110,7 @@ subroutine InitAllocate(this, bounds)
! !LOCAL VARIABLES:
integer :: i, imeg
integer :: class_num
- real(r8) :: factors(numpft)
+ real(r8) :: factors(numveg)
real(r8) :: molec_wght
integer :: begg, endg
integer :: begp, endp
@@ -128,7 +124,8 @@ subroutine InitAllocate(this, bounds)
meg_cmp => shr_megan_linkedlist
do while(associated(meg_cmp))
- allocate(meg_cmp%emis_factors(numpft))
+ !allocate(meg_cmp%emis_factors(numpft))
+ allocate(meg_cmp%emis_factors(numveg)) ! TODO: VOCEmission input is with a hard-wired num of pft (16)
call megan_factors_get( trim(meg_cmp%name), factors, class_num, molec_wght )
meg_cmp%emis_factors = factors
meg_cmp%class_number = class_num
@@ -693,21 +690,20 @@ function get_map_EF(ivt_in, g_in, ti_in, vocemis_vars)
get_map_EF = 0._r8
- if ( ivt_in == ndllf_evr_tmp_tree &
- .or. ivt_in == ndllf_evr_brl_tree) then !fineleaf evergreen
+ if (woody(ivt_in) == 1.0_r8 .and. evergreen(ivt_in) == 1 &
+ .and. needleleaf(ivt_in) == 1) then !fineleaf evergreen trees
get_map_EF = vocemis_vars%efisop_grc(2,g_in, ti_in)
- else if (ivt_in == ndllf_dcd_brl_tree) then !fineleaf deciduous
+ else if (woody(ivt_in) == 1.0_r8 .and. evergreen(ivt_in) == 0 &
+ .and. needleleaf(ivt_in) == 1) then !fineleaf deciduous trees
get_map_EF = vocemis_vars%efisop_grc(3,g_in, ti_in)
- else if (ivt_in >= nbrdlf_evr_trp_tree &
- .and. ivt_in <= nbrdlf_dcd_brl_tree) then !broadleaf trees
+ else if (woody(ivt_in) == 1.0_r8 &
+ .and. needleleaf(ivt_in) == 0) then !broadleaf trees
get_map_EF = vocemis_vars%efisop_grc(1,g_in,ti_in)
- else if (ivt_in >= nbrdlf_evr_shrub &
- .and. ivt_in <= nbrdlf_dcd_brl_shrub) then !shrubs
+ else if (woody(ivt_in) == 2.0_r8) then !shrubs
get_map_EF = vocemis_vars%efisop_grc(4,g_in, ti_in)
- else if (ivt_in >= nc3_arctic_grass &
- .and. ivt_in <= nc4_grass) then !grass
+ else if (graminoid(ivt_in) == 1) then !grass
get_map_EF = vocemis_vars%efisop_grc(5,g_in, ti_in)
- else if (ivt_in >= nc3crop) then !crops
+ else if (crop(ivt_in) == 1 .or. iscft(ivt_in)) then !crops
get_map_EF = vocemis_vars%efisop_grc(6,g_in, ti_in)
end if
@@ -970,7 +966,8 @@ function get_gamma_A(ivt_in, elai240_in,elai_in,nclass_in)
real(r8) :: elai_prev ! lai for previous timestep
real(r8) :: fnew, fgro, fmat, fold ! fractions of leaves at different phenological stages
!-----------------------------------------------------------------------
- if ( (ivt_in == ndllf_dcd_brl_tree) .or. (ivt_in >= nbrdlf_dcd_trp_tree) ) then ! non-evergreen
+ !if ( (ivt_in == ndllf_dcd_brl_tree) .or. (ivt_in >= nbrdlf_dcd_trp_tree) ) then ! non-evergreen
+ if ( (woody(ivt_in) == 1.0_r8) .and. (evergreen(ivt_in) <= 0) ) then ! non-evergreen tree
if ( (elai240_in > 0.0_r8) .and. (elai240_in < 1.e30_r8) )then
elai_prev = 2._r8*elai240_in-elai_in ! have accumulated average lai over last timestep
diff --git a/components/elm/src/biogeochem/VegStructUpdateMod.F90 b/components/elm/src/biogeochem/VegStructUpdateMod.F90
index 6796ab1993a..5943da355a0 100644
--- a/components/elm/src/biogeochem/VegStructUpdateMod.F90
+++ b/components/elm/src/biogeochem/VegStructUpdateMod.F90
@@ -37,8 +37,8 @@ subroutine VegStructUpdate(num_soilp, filter_soilp, &
! vegetation structure (LAI, SAI, height)
!
! !USES:
- use pftvarcon , only : noveg, nc3crop, nc3irrig, nbrdlf_evr_shrub, nbrdlf_dcd_brl_shrub
- use pftvarcon , only : ncorn, ncornirrig, npcropmin, ztopmx, laimx
+ use pftvarcon , only : noveg, woody, iscft, crop
+ use pftvarcon , only : ncorn, ncornirrig, ztopmx, laimx
use pftvarcon , only : nmiscanthus, nmiscanthusirrig, nswitchgrass, nswitchgrassirrig
use elm_time_manager , only : get_rad_step_size
use elm_varctl , only : spinup_state, spinup_mortality_factor
@@ -83,7 +83,6 @@ subroutine VegStructUpdate(num_soilp, filter_soilp, &
associate( &
ivt => veg_pp%itype , & ! Input: [integer (:) ] pft vegetation type
- woody => veg_vp%woody , & ! Input: [real(r8) (:) ] binary flag for woody lifeform (1=woody, 0=not woody)
slatop => veg_vp%slatop , & ! Input: [real(r8) (:) ] specific leaf area at top of canopy, projected area basis [m^2/gC]
dsladlai => veg_vp%dsladlai , & ! Input: [real(r8) (:) ] dSLA/dLAI, projected area basis [m^2/gC]
z0mr => veg_vp%z0mr , & ! Input: [real(r8) (:) ] ratio of momentum roughness length to canopy top height (-)
@@ -148,7 +147,7 @@ subroutine VegStructUpdate(num_soilp, filter_soilp, &
! alpha are set by PFT, and alpha is scaled to CLM time step by multiplying by
! dt and dividing by dtsmonth (seconds in average 30 day month)
! tsai_min scaled by 0.5 to match MODIS satellite derived values
- if (ivt(p) == nc3crop .or. ivt(p) == nc3irrig) then ! generic crops
+ if (crop(ivt(p)) == 1 .and. .not. iscft(ivt(p))) then ! generic crops
tsai_alpha = 1.0_r8-1.0_r8*dt/dtsmonth
tsai_min = 0.1_r8
@@ -159,12 +158,12 @@ subroutine VegStructUpdate(num_soilp, filter_soilp, &
tsai_min = tsai_min * 0.5_r8
tsai(p) = max(tsai_alpha*tsai_old+max(tlai_old-tlai(p),0._r8),tsai_min)
- if (woody(ivt(p)) == 1._r8) then
+ if (woody(ivt(p)) >= 1.0_r8) then
! trees and shrubs
! if shrubs have a squat taper
- if (ivt(p) >= nbrdlf_evr_shrub .and. ivt(p) <= nbrdlf_dcd_brl_shrub) then
+ if (woody(ivt(p)) == 2.0_r8) then
taper = 10._r8
! otherwise have a tall taper
else
@@ -194,7 +193,7 @@ subroutine VegStructUpdate(num_soilp, filter_soilp, &
hbot(p) = max(0._r8, min(3._r8, htop(p)-1._r8))
- else if (ivt(p) >= npcropmin) then ! prognostic crops
+ else if (iscft(ivt(p))) then ! prognostic crops
if (tlai(p) >= laimx(ivt(p))) peaklai(p) = 1 ! used in CNAllocation
@@ -248,7 +247,7 @@ subroutine VegStructUpdate(num_soilp, filter_soilp, &
! adjust lai and sai for burying by snow.
! snow burial fraction for short vegetation (e.g. grasses) as in
! Wang and Zeng, 2007.
- if (ivt(p) > noveg .and. ivt(p) <= nbrdlf_dcd_brl_shrub ) then
+ if (woody(ivt(p)) >= 1.0_r8 ) then
ol = min( max(snow_depth(c)-hbot(p), 0._r8), htop(p)-hbot(p))
fb = 1._r8 - ol / max(1.e-06_r8, htop(p)-hbot(p))
else
diff --git a/components/elm/src/biogeophys/CanopyFluxesMod.F90 b/components/elm/src/biogeophys/CanopyFluxesMod.F90
index 6c96e70e172..fd6cd3ab163 100755
--- a/components/elm/src/biogeophys/CanopyFluxesMod.F90
+++ b/components/elm/src/biogeophys/CanopyFluxesMod.F90
@@ -17,7 +17,7 @@ module CanopyFluxesMod
use elm_varctl , only : use_hydrstress
use elm_varpar , only : nlevgrnd, nlevsno
use elm_varcon , only : namep
- use pftvarcon , only : nbrdlf_dcd_tmp_shrub, nsoybean , nsoybeanirrig
+ use pftvarcon , only : crop, nfixer
use decompMod , only : bounds_type
use PhotosynthesisMod , only : Photosynthesis, PhotosynthesisTotal, Fractionation, PhotoSynthesisHydraulicStress
use SoilMoistStressMod , only : calc_effective_soilporosity, calc_volumetric_h2oliq
@@ -869,7 +869,8 @@ subroutine CanopyFluxes(bounds, num_nolakeurbanp, filter_nolakeurbanp, &
p = filterp(f)
c = veg_pp%column(p)
if(.not.veg_pp%is_fates(p)) then
- if (veg_pp%itype(p) == nsoybean .or. veg_pp%itype(p) == nsoybeanirrig) then
+ ! soybean (crop with N fixation)
+ if (crop(veg_pp%itype(p)) >= 1 .and. nfixer(veg_pp%itype(p)) == 1) then
btran(p) = min(1._r8, btran(p) * 1.25_r8)
end if
@@ -909,7 +910,8 @@ subroutine CanopyFluxes(bounds, num_nolakeurbanp, filter_nolakeurbanp, &
do f = 1, fn
p = filterp(f)
c = veg_pp%column(p)
- if (veg_pp%itype(p) == nsoybean .or. veg_pp%itype(p) == nsoybeanirrig) then
+ ! soybean (crop with N fixation)
+ if (crop(veg_pp%itype(p)) >= 1 .and. nfixer(veg_pp%itype(p)) == 1) then
btran(p) = min(1._r8, btran(p) * 1.25_r8)
end if
end do
diff --git a/components/elm/src/biogeophys/PhotosynthesisMod.F90 b/components/elm/src/biogeophys/PhotosynthesisMod.F90
index 65ddbbb7155..aee433610da 100644
--- a/components/elm/src/biogeophys/PhotosynthesisMod.F90
+++ b/components/elm/src/biogeophys/PhotosynthesisMod.F90
@@ -225,7 +225,6 @@ subroutine Photosynthesis ( bounds, fn, filterp, &
!$acc routine seq
use elm_varcon , only : rgas, tfrz
use elm_varctl , only : carbon_only
- use pftvarcon , only : nbrdlf_dcd_tmp_shrub, nsoybean, nsoybeanirrig, npcropmin
use pftvarcon , only : vcmax_np1, vcmax_np2, vcmax_np3, vcmax_np4, jmax_np1, jmax_np2, jmax_np3
!
! !ARGUMENTS:
@@ -388,6 +387,7 @@ subroutine Photosynthesis ( bounds, fn, filterp, &
gb_mol => photosyns_vars%gb_mol_patch , & ! Output: [real(r8) (:) ] leaf boundary layer conductance (umol H2O/m**2/s)
gs_mol => photosyns_vars%gs_mol_patch , & ! Output: [real(r8) (:,:) ] leaf stomatal conductance (umol H2O/m**2/s)
vcmax_z => photosyns_vars%vcmax_z_patch , & ! Output: [real(r8) (:,:) ] maximum rate of carboxylation (umol co2/m**2/s)
+ vcmax25_top => photosyns_vars%vcmax25_top_patch , & ! Output: [real(r8) (:) ] maximum rate of carboxylation at top canopy at 25oC (umol co2/m**2/s)
cp => photosyns_vars%cp_patch , & ! Output: [real(r8) (:) ] CO2 compensation point (Pa)
kc => photosyns_vars%kc_patch , & ! Output: [real(r8) (:) ] Michaelis-Menten constant for CO2 (Pa)
ko => photosyns_vars%ko_patch , & ! Output: [real(r8) (:) ] Michaelis-Menten constant for O2 (Pa)
@@ -789,6 +789,9 @@ subroutine Photosynthesis ( bounds, fn, filterp, &
vcmax_z(p,iv) = vcmax_z(p,iv) * btran(p)
lmr_z(p,iv) = lmr_z(p,iv) * btran(p)
+
+ ! output variable
+ vcmax25_top(p) = vcmax25top
end do ! canopy layer loop
end do ! patch loop
@@ -1594,7 +1597,6 @@ subroutine PhotosynthesisHydraulicStress ( bounds, fn, filterp, &
use elm_varctl , only : carbon_only
!use elm_varctl , only : lnc_opt, reduce_dayl_factor, vcmax_opt
use elm_varpar , only : nlevsoi
- use pftvarcon , only : nbrdlf_dcd_tmp_shrub, npcropmin
use pftvarcon , only : vcmax_np1, vcmax_np2, vcmax_np3, vcmax_np4, jmax_np1, jmax_np2, jmax_np3
use ColumnType , only : col_pp
diff --git a/components/elm/src/biogeophys/PhotosynthesisType.F90 b/components/elm/src/biogeophys/PhotosynthesisType.F90
index 59ae928c23a..5cb94628d8d 100644
--- a/components/elm/src/biogeophys/PhotosynthesisType.F90
+++ b/components/elm/src/biogeophys/PhotosynthesisType.F90
@@ -26,6 +26,7 @@ module PhotosynthesisType
real(r8), pointer :: ag_patch (:,:) => null()! patch co-limited gross leaf photosynthesis (umol CO2/m**2/s)
real(r8), pointer :: an_patch (:,:) => null()! patch net leaf photosynthesis (umol CO2/m**2/s)
real(r8), pointer :: vcmax_z_patch (:,:) => null()! patch maximum rate of carboxylation (umol co2/m**2/s)
+ real(r8), pointer :: vcmax25_top_patch (:) => null()! patch maximum rate of carboxylation at top canopy at 25oC (umol co2/m**2/s)
real(r8), pointer :: cp_patch (:) => null()! patch CO2 compensation point (Pa)
real(r8), pointer :: kc_patch (:) => null()! patch Michaelis-Menten constant for CO2 (Pa)
real(r8), pointer :: ko_patch (:) => null()! patch Michaelis-Menten constant for O2 (Pa)
@@ -143,6 +144,7 @@ subroutine InitAllocate(this, bounds)
allocate(this%ag_patch (begp:endp,1:nlevcan)) ; this%ag_patch (:,:) = spval
allocate(this%an_patch (begp:endp,1:nlevcan)) ; this%an_patch (:,:) = spval
allocate(this%vcmax_z_patch (begp:endp,1:nlevcan)) ; this%vcmax_z_patch (:,:) = spval
+ allocate(this%vcmax25_top_patch (begp:endp)) ; this%vcmax25_top_patch (:) = spval
allocate(this%cp_patch (begp:endp)) ; this%cp_patch (:) = spval
allocate(this%kc_patch (begp:endp)) ; this%kc_patch (:) = spval
allocate(this%ko_patch (begp:endp)) ; this%ko_patch (:) = spval
@@ -263,6 +265,12 @@ subroutine InitHistory(this, bounds)
call hist_addfld1d (fname='PSNSHA', units='umolCO2/m^2/s', &
avgflag='A', long_name='shaded leaf photosynthesis', &
ptr_patch=this%psnsha_patch)
+
+ this%vcmax25_top_patch(begp:endp) = spval
+ call hist_addfld1d (fname='VCMAX25TOP', units='umolCO2/m^2/s', &
+ avgflag='A', long_name='vcmax at top canopy at 25oC', &
+ ptr_patch=this%vcmax25_top_patch, default='inactive')
+
end if
if ( use_c13 ) then
@@ -423,6 +431,8 @@ subroutine TimeStepInit (this, bounds)
this%psnsun_wj_patch(p) = 0._r8
this%psnsun_wp_patch(p) = 0._r8
+ this%vcmax25_top_patch(p) = 0._r8
+
this%psnsha_patch(p) = 0._r8
this%psnsha_wc_patch(p) = 0._r8
this%psnsha_wj_patch(p) = 0._r8
diff --git a/components/elm/src/biogeophys/SedYieldMod.F90 b/components/elm/src/biogeophys/SedYieldMod.F90
index 10b0db72814..250929f4a42 100644
--- a/components/elm/src/biogeophys/SedYieldMod.F90
+++ b/components/elm/src/biogeophys/SedYieldMod.F90
@@ -63,7 +63,7 @@ subroutine SoilErosion (bounds, num_soilc, filter_soilc, &
use elm_time_manager, only : get_step_size
use landunit_varcon , only : istcrop, istsoil, istice
use pftvarcon , only : gcbc_p, gcbc_q, gcbr_p, gcbr_q
- use pftvarcon , only : nc4_grass
+ use pftvarcon , only : crop, iscft
!
! !ARGUMENTS:
type(bounds_type) , intent(in) :: bounds
@@ -218,7 +218,7 @@ subroutine SoilErosion (bounds, num_soilc, filter_soilc, &
(veg_cs%livecrootc(p)+veg_cs%deadcrootc(p))*croot_prof(p,1) )
fgndcov = exp( -gcbc_p(veg_pp%itype(p))*PCT_gnd - &
gcbr_p(veg_pp%itype(p))*Broot )
- if( veg_pp%itype(p) > nc4_grass )then
+ if( crop(veg_pp%itype(p)) >= 1 .or. iscft(veg_pp%itype(p)))then
Es_Pcrp = Es_Pcrp + pfactor(c) * ftillage * flitho * &
fgndcov * veg_pp%wtcol(p) * K * (KE_DT+KE_LD)
@@ -266,7 +266,7 @@ subroutine SoilErosion (bounds, num_soilc, filter_soilc, &
nh = 0.03_r8 + 0.05_r8*max(Crsd,Clai)
fsr = fsr + veg_pp%wtcol(p) * (0.03_r8/nh)**0.6_r8
- if ( veg_pp%itype(p) > nc4_grass ) then
+ if ( crop(veg_pp%itype(p)) >= 1 .or. iscft(veg_pp%itype(p))) then
ftillage_tc = ftillage_tc + ftillage * veg_pp%wtcol(p)
Es_Q = Es_Q + 19.1_r8 * qfactor(c) * 2._r8/COH * flitho * fslp * &
diff --git a/components/elm/src/data_types/ColumnDataType.F90 b/components/elm/src/data_types/ColumnDataType.F90
index 724cefb5cfd..d0a4a10cd3d 100644
--- a/components/elm/src/data_types/ColumnDataType.F90
+++ b/components/elm/src/data_types/ColumnDataType.F90
@@ -7538,14 +7538,16 @@ subroutine col_cf_summary(this, bounds, num_soilc, filter_soilc, isotope)
c = filter_soilc(fc)
this%decomp_cpools_leached(c,l) = 0._r8
end do
- do j = 1, nlev
- do fc = 1,num_soilc
+ if(l /= i_cwd)then
+ do j = 1, nlev
+ do fc = 1,num_soilc
c = filter_soilc(fc)
this%decomp_cpools_leached(c,l) = &
this%decomp_cpools_leached(c,l) + &
this%decomp_cpools_transport_tendency(c,j,l) * dzsoi_decomp(j)
- end do
- end do
+ end do
+ end do
+ endif
do fc = 1,num_soilc
c = filter_soilc(fc)
this%som_c_leached(c) = &
@@ -9784,8 +9786,9 @@ subroutine col_nf_summary(this, bounds, num_soilc, filter_soilc)
c = filter_soilc(fc)
this%decomp_npools_leached(c,l) = 0._r8
end do
- do j = 1, nlev
- do fc = 1,num_soilc
+ if(l /= i_cwd)then
+ do j = 1, nlev
+ do fc = 1,num_soilc
c = filter_soilc(fc)
this%decomp_npools_leached(c,l) = &
this%decomp_npools_leached(c,l) + &
@@ -9793,8 +9796,9 @@ subroutine col_nf_summary(this, bounds, num_soilc, filter_soilc)
this%bgc_npool_inputs(c,l) = this%bgc_npool_inputs(c,l) + &
(this%bgc_npool_ext_inputs_vr(c,j,l)-this%bgc_npool_ext_loss_vr(c,j,l))*dzsoi_decomp(j)
- end do
- end do
+ end do
+ end do
+ endif
do fc = 1,num_soilc
c = filter_soilc(fc)
this%som_n_leached(c) = &
@@ -11314,16 +11318,16 @@ subroutine col_pf_summary(this, bounds, num_soilc, filter_soilc)
c = filter_soilc(fc)
this%decomp_ppools_leached(c,l) = 0._r8
end do
-
- do j = 1, nlevdecomp
- do fc = 1,num_soilc
+ if(l /= i_cwd)then
+ do j = 1, nlevdecomp
+ do fc = 1,num_soilc
c = filter_soilc(fc)
this%decomp_ppools_leached(c,l) = &
this%decomp_ppools_leached(c,l) + &
this%decomp_ppools_transport_tendency(c,j,l) * dzsoi_decomp(j)
- end do
- end do
-
+ end do
+ end do
+ endif
do fc = 1,num_soilc
c = filter_soilc(fc)
this%som_p_leached(c) = &
diff --git a/components/elm/src/data_types/VegetationDataType.F90 b/components/elm/src/data_types/VegetationDataType.F90
index 45dc063b853..3bc7021f150 100644
--- a/components/elm/src/data_types/VegetationDataType.F90
+++ b/components/elm/src/data_types/VegetationDataType.F90
@@ -17,7 +17,7 @@ module VegetationDataType
use elm_varcon , only : spval, ispval, sb
use elm_varcon , only : c13ratio, c14ratio
use landunit_varcon , only : istsoil, istcrop
- use pftvarcon , only : npcropmin, noveg, nstor
+ use pftvarcon , only : iscft, noveg, nstor
use elm_varctl , only : iulog, use_cn, spinup_state, spinup_mortality_factor, use_fates
use elm_varctl , only : nu_com, use_crop, use_c13
use elm_varctl , only : use_lch4, use_betr
@@ -2447,7 +2447,7 @@ subroutine veg_cs_init(this, begp, endp, carbon_type, ratio)
if (veg_vp%evergreen(veg_pp%itype(p)) == 1._r8) then
this%leafc(p) = 1._r8 * ratio
this%leafc_storage(p) = 0._r8
- else if (veg_pp%itype(p) >= npcropmin) then ! prognostic crop types
+ else if (iscft(veg_pp%itype(p))) then ! prognostic crop types
this%leafc(p) = 0._r8
this%leafc_storage(p) = 0._r8
else
@@ -2465,7 +2465,7 @@ subroutine veg_cs_init(this, begp, endp, carbon_type, ratio)
this%livestemc_storage(p) = 0._r8
this%livestemc_xfer(p) = 0._r8
- if (veg_vp%woody(veg_pp%itype(p)) == 1._r8) then
+ if (veg_vp%woody(veg_pp%itype(p)) >= 1.0_r8) then
this%deadstemc(p) = 0.1_r8 * ratio
else
this%deadstemc(p) = 0._r8
@@ -3572,7 +3572,7 @@ subroutine veg_cs_summary(this, bounds, num_soilc, filter_soilc, num_soilp, filt
this%gresp_storage(p) + &
this%gresp_xfer(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%storvegc(p) = &
this%storvegc(p) + &
this%grainc_storage(p) + &
@@ -3937,7 +3937,7 @@ subroutine veg_ns_init(this, begp, endp, veg_cs)
! tree types need to be initialized with some stem mass so that
! roughness length is not zero in canopy flux calculation
- if (veg_vp%woody(veg_pp%itype(p)) == 1._r8) then
+ if (veg_vp%woody(veg_pp%itype(p)) >= 1.0_r8) then
this%deadstemn(p) = veg_cs%deadstemc(p) / veg_vp%deadwdcn(veg_pp%itype(p))
else
this%deadstemn(p) = 0._r8
@@ -4249,7 +4249,7 @@ subroutine veg_ns_summary(this, bounds, num_soilc, filter_soilc, num_soilp, filt
this%npool(p) + &
this%retransn(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%dispvegn(p) = &
this%dispvegn(p) + &
this%grainn(p)
@@ -4621,7 +4621,7 @@ subroutine veg_ps_init(this, begp, endp, veg_cs)
! tree types need to be initialized with some stem mass so that
! roughness length is not zero in canopy flux calculation
- if (veg_vp%woody(veg_pp%itype(p)) == 1._r8) then
+ if (veg_vp%woody(veg_pp%itype(p)) >= 1.0_r8) then
this%deadstemp(p) = veg_cs%deadstemc(p) / veg_vp%deadwdcp(veg_pp%itype(p))
else
this%deadstemp(p) = 0._r8
@@ -4997,7 +4997,7 @@ subroutine veg_ps_summary (this, bounds, num_soilc, filter_soilc, num_soilp, fil
this%ppool(p) + &
this%retransp(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%dispvegp(p) = &
this%dispvegp(p) + &
this%grainp(p)
@@ -8189,7 +8189,7 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt
this%cpool_livecroot_storage_gr(p) + &
this%cpool_deadcroot_storage_gr(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%mr(p) = &
this%mr(p) + &
this%grain_mr(p)
@@ -8214,7 +8214,7 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt
this%storage_gr(p)
! autotrophic respiration (AR)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%ar(p) = &
this%mr(p) + &
this%gr(p) + &
@@ -8324,8 +8324,7 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt
this%wood_harvestc(p) = &
this%hrv_deadstemc_to_prod10c(p) + &
this%hrv_deadstemc_to_prod100c(p)
-
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%wood_harvestc(p) = &
this%wood_harvestc(p) + &
this%hrv_cropc_to_prod1c(p)
@@ -8355,7 +8354,7 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt
this%m_gresp_xfer_to_fire(p) + &
this%m_cpool_to_fire(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%litfall(p) = &
this%litfall(p) + &
this%livestemc_to_litter(p) + &
@@ -8394,7 +8393,7 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt
this%leafc_loss(p) = this%leafc_loss(p) + &
this%hrv_leafc_to_litter(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%leafc_loss(p) = &
this%leafc_loss(p) + &
this%hrv_leafc_to_prod1c(p)
@@ -8438,7 +8437,7 @@ subroutine veg_cf_summary(this, bounds, num_soilp, filter_soilp, num_soilc, filt
this%hrv_deadcrootc_storage_to_litter(p) + &
this%hrv_deadcrootc_xfer_to_litter(p)
! putting the harvested crop stem and grain in the wood loss bdrewniak
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%woodc_loss(p) = &
this%woodc_loss(p) + &
this%hrv_grainc_to_prod1c(p) + &
@@ -8563,7 +8562,7 @@ subroutine veg_cf_summary_for_ch4( this, bounds, num_soilp, filter_soilp)
this%cpool_to_deadstemc(p) + &
this%deadstemc_xfer_to_deadstemc(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%agnpp(p) = &
this%agnpp(p) + &
this%cpool_to_grainc(p) + &
@@ -9721,7 +9720,7 @@ subroutine veg_nf_summary(this, bounds, num_soilc, filter_soilc, num_soilp, filt
this%wood_harvestn(p) = &
this%hrv_deadstemn_to_prod10n(p) + &
this%hrv_deadstemn_to_prod100n(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%wood_harvestn(p) = &
this%wood_harvestn(p) + &
this%hrv_cropn_to_prod1n(p)
@@ -10777,7 +10776,7 @@ subroutine veg_pf_summary(this, bounds, num_soilc, filter_soilc, num_soilp, filt
this%wood_harvestp(p) = &
this%hrv_deadstemp_to_prod10p(p) + &
this%hrv_deadstemp_to_prod100p(p)
- if ( crop_prog .and. veg_pp%itype(p) >= npcropmin )then
+ if ( crop_prog .and. iscft(veg_pp%itype(p)))then
this%wood_harvestp(p) = &
this%wood_harvestp(p) + &
this%hrv_cropp_to_prod1p(p)
diff --git a/components/elm/src/data_types/VegetationPropertiesType.F90 b/components/elm/src/data_types/VegetationPropertiesType.F90
index 20547779195..12f9a7b22ff 100644
--- a/components/elm/src/data_types/VegetationPropertiesType.F90
+++ b/components/elm/src/data_types/VegetationPropertiesType.F90
@@ -17,7 +17,7 @@ module VegetationPropertiesType
! !PUBLIC TYPES:
type, public :: vegetation_properties_type
integer , pointer :: noveg (:) => null() ! value for not vegetated
- integer , pointer :: tree (:) => null() ! tree or not?
+ !integer , pointer :: tree (:) => null() ! tree or not?
real(r8), pointer :: smpso (:) => null() ! soil water potential at full stomatal opening (mm)
real(r8), pointer :: smpsc (:) => null() ! soil water potential at full stomatal closure (mm)
real(r8), pointer :: fnitr (:) => null() ! foliage nitrogen limitation factor (-)
@@ -143,6 +143,13 @@ module VegetationPropertiesType
real(r8), pointer :: nstor(:) => null() !Nitrogen storage pool timescale
real(r8), pointer :: br_xr(:) => null() !Base rate for excess respiration
real(r8), pointer :: tc_stress => null() !Critial temperature for moisture stress
+ ! new properties for flexible PFT
+ real(r8), pointer :: climatezone(:) => null() !climate zone adapted
+ real(r8), pointer :: nonvascular(:) => null() !nonvascular type or vascular
+ real(r8), pointer :: graminoid(:) => null() !graminoid or not
+ logical, pointer :: iscft(:) => null() !.false. = generic crop, .true. = prognostic crop
+ real(r8), pointer :: needleleaf(:) => null() !needleleaf or broadleaf
+ real(r8), pointer :: nfixer(:) => null() !cablity of nitrogen fixation from atm. N2
contains
@@ -159,7 +166,7 @@ subroutine veg_vp_init(this)
!
! !USES:
use elm_varpar, only : numrad, numpft
- use pftvarcon , only : ntree, smpso, smpsc, fnitr
+ use pftvarcon , only : smpso, smpsc, fnitr
use pftvarcon , only : z0mr, displar, dleaf, rhol, rhos, taul, taus, xl
use pftvarcon , only : c3psn, slatop, dsladlai, leafcn, flnr, woody
use pftvarcon , only : lflitcn, frootcn, livewdcn, deadwdcn, froot_leaf, stem_leaf, croot_stem
@@ -181,6 +188,8 @@ subroutine veg_vp_init(this)
use pftvarcon , only : fnr, act25, kcha, koha, cpha, vcmaxha, jmaxha, tpuha
use pftvarcon , only : lmrha, vcmaxhd, jmaxhd, tpuhd, lmrse, qe, theta_cj
use pftvarcon , only : bbbopt, mbbopt, nstor, br_xr, tc_stress, lmrhd
+ ! new properties for flexible PFT
+ use pftvarcon , only : climatezone, nonvascular, graminoid, iscft,needleleaf, nfixer
!
class (vegetation_properties_type) :: this
@@ -190,7 +199,7 @@ subroutine veg_vp_init(this)
!------------------------------------------------------------------------
allocate(this%noveg (0:numpft)) ; this%noveg (:) =huge(1)
- allocate(this%tree (0:numpft)) ; this%tree (:) =huge(1)
+ !allocate(this%tree (0:numpft)) ; this%tree (:) =huge(1)
allocate(this%smpso (0:numpft)) ; this%smpso (:) =spval
allocate(this%smpsc (0:numpft)) ; this%smpsc (:) =spval
allocate(this%fnitr (0:numpft)) ; this%fnitr (:) =spval
@@ -305,14 +314,23 @@ subroutine veg_vp_init(this)
allocate(this%tc_stress )
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! new properties for flexible PFT
+ allocate( this%climatezone(0:numpft)) ; this%climatezone(:) =spval
+ allocate( this%nonvascular(0:numpft)) ; this%nonvascular(:) =spval
+ allocate( this%graminoid(0:numpft)) ; this%graminoid(:) =spval
+ allocate( this%iscft(0:numpft)) ; this%iscft(:) =.false.
+ allocate( this%needleleaf(0:numpft)) ; this%needleleaf(:) =spval
+ allocate( this%nfixer(0:numpft)) ; this%nfixer(:) =spval
+ ! -----------------------------------------------------------------------------------------------------------
do m = 0,numpft
- if (m <= ntree) then
- this%tree(m) = 1
- else
- this%tree(m) = 0
- end if
+ ! not needed anymore: woody(m)=1 for tree, 2 for shrub, or 0 for any other
+ !if (woody(m) == 1) then
+ ! this%tree(m) = 1
+ !else
+ ! this%tree(m) = 0
+ !end if
do ib = 1,numrad
this%rhol(m,ib) = rhol(m,ib)
@@ -392,6 +410,13 @@ subroutine veg_vp_init(this)
this%mbbopt(m) = mbbopt(m)
this%nstor(m) = nstor(m)
this%br_xr(m) = br_xr(m)
+ ! new properties for flexible PFT
+ this%climatezone(m) = climatezone(m)
+ this%nonvascular(m) = nonvascular(m)
+ this%graminoid(m) = graminoid(m)
+ this%iscft(m) = iscft(m)
+ this%needleleaf(m) = needleleaf(m)
+ this%nfixer(m) = nfixer(m)
end do
diff --git a/components/elm/src/data_types/VegetationType.F90 b/components/elm/src/data_types/VegetationType.F90
index a3711f7c117..dd8bd7d842d 100644
--- a/components/elm/src/data_types/VegetationType.F90
+++ b/components/elm/src/data_types/VegetationType.F90
@@ -33,6 +33,11 @@ module VegetationType
! 24 => irrigated soybean
! --------------------------------------------------------
!
+
+ ! ----------------------user-defined parameter file ---------------------------------------------------------------------
+ ! NOTE: if user provides own parameter file, with different 'pft_name' or order,
+ ! the above ilist of default PFTs will be replaced, and arrays of sizes as below will be changed as well.
+
use shr_kind_mod , only : r8 => shr_kind_r8
use elm_varcon , only : ispval, spval
diff --git a/components/elm/src/dyn_subgrid/dynHarvestMod.F90 b/components/elm/src/dyn_subgrid/dynHarvestMod.F90
index 5256f415efe..07455f77ec6 100644
--- a/components/elm/src/dyn_subgrid/dynHarvestMod.F90
+++ b/components/elm/src/dyn_subgrid/dynHarvestMod.F90
@@ -202,7 +202,8 @@ subroutine CNHarvest (num_soilc, filter_soilc, num_soilp, filter_soilp, cnstate_
! Harvest mortality routine for coupled carbon-nitrogen code (CN)
! !USES:
- use pftvarcon , only : noveg, nbrdlf_evr_shrub, pprodharv10
+ use pftvarcon , only : pprodharv10
+ use pftvarcon , only : woody
use elm_varcon , only : secspday
use elm_time_manager, only : get_days_per_year
use GridcellType , only : grc_pp
@@ -377,7 +378,7 @@ subroutine CNHarvest (num_soilc, filter_soilc, num_soilp, filter_soilp, cnstate_
! If this is a tree pft, then
! get the annual harvest "mortality" rate (am) from harvest array
! and convert to rate per second
- if (ivt(p) > noveg .and. ivt(p) < nbrdlf_evr_shrub) then
+ if (woody(ivt(p)) == 1.0_r8) then
if (do_harvest) then
am = 0._r8
diff --git a/components/elm/src/main/elm_initializeMod.F90 b/components/elm/src/main/elm_initializeMod.F90
index 86e72030b94..b7fe36f24ed 100755
--- a/components/elm/src/main/elm_initializeMod.F90
+++ b/components/elm/src/main/elm_initializeMod.F90
@@ -59,6 +59,7 @@ subroutine initialize1( )
! !USES:
use elm_varpar , only: elm_varpar_init, natpft_lb, natpft_ub
use elm_varpar , only: cft_lb, cft_ub, maxpatch_glcmec
+ use elm_varpar , only: mxpft, numveg, mxpft_nc, numpft
use elm_varpar , only: update_pft_array_bounds
use elm_varpar , only: surfpft_lb, surfpft_ub
use elm_varcon , only: elm_varcon_init
@@ -268,10 +269,10 @@ subroutine initialize1( )
allocate (wt_lunit (begg:endg,1:max_topounits, max_lunit ))
allocate (urban_valid (begg:endg,1:max_topounits ))
- allocate (wt_nat_patch (begg:endg,1:max_topounits, surfpft_lb:surfpft_ub ))
- allocate (wt_cft (begg:endg,1:max_topounits, cft_lb:cft_ub ))
- allocate (fert_cft (begg:endg,1:max_topounits, cft_lb:cft_ub ))
- allocate (fert_p_cft (begg:endg,1:max_topounits, cft_lb:cft_ub ))
+ !allocate (wt_nat_patch (begg:endg,1:max_topounits, surfpft_lb:surfpft_ub ))
+ !allocate (wt_cft (begg:endg,1:max_topounits, cft_lb:cft_ub ))
+ !allocate (fert_cft (begg:endg,1:max_topounits, cft_lb:cft_ub ))
+ !allocate (fert_p_cft (begg:endg,1:max_topounits, cft_lb:cft_ub ))
if (create_glacier_mec_landunit) then
allocate (wt_glc_mec (begg:endg,1:max_topounits, maxpatch_glcmec))
allocate (topo_glc_mec(begg:endg,1:max_topounits, maxpatch_glcmec))
@@ -293,6 +294,14 @@ subroutine initialize1( )
! Independent of model resolution, Needs to stay before surfrd_get_data
call pftconrd()
+ ! if by user-defined PFT (numbers and names), 'numpft/mxpft_nc' may be changed including other derived indices
+ !
+ ! a few arrays allocation previously done above is moved here i.e. after this 'pftconrd' call
+ allocate (wt_nat_patch (begg:endg,1:max_topounits, surfpft_lb:surfpft_ub ))
+ allocate (wt_cft (begg:endg,1:max_topounits, cft_lb:cft_ub ))
+ allocate (fert_cft (begg:endg,1:max_topounits, cft_lb:cft_ub ))
+ allocate (fert_p_cft (begg:endg,1:max_topounits, cft_lb:cft_ub ))
+
call soilorder_conrd()
! Read in FATES parameter values early in the call sequence as well
diff --git a/components/elm/src/main/elm_varpar.F90 b/components/elm/src/main/elm_varpar.F90
index 21e8f659210..1f82d65ec7e 100644
--- a/components/elm/src/main/elm_varpar.F90
+++ b/components/elm/src/main/elm_varpar.F90
@@ -48,20 +48,23 @@ module elm_varpar
integer, parameter :: ndst = 4 ! number of dust size classes (BGC only)
integer, parameter :: dst_src_nbr = 3 ! number of size distns in src soil (BGC only)
integer, parameter :: sz_nbr = 200 ! number of sub-grid bins in large bin of dust size distribution (BGC only)
- integer, parameter :: mxpft = 50 ! maximum number of PFT's for any mode;
+ !integer, parameter :: mxpft = 50 ! maximum number of PFT's for any mode;
+ integer :: mxpft = 50 ! maximum number of PFT's for any mode;
+ ! can be modified from reading pft-physiology in 'main/pftvarcon.F90:pftconrd'
! FIX(RF,032414) might we set some of these automatically from reading pft-physiology?
integer, parameter :: numveg = 16 ! number of veg types (without specific crop)
integer, parameter :: nlayer = 3 ! number of VIC soil layer --Added by AWang
integer :: nlayert ! number of VIC soil layer + 3 lower thermal layers
- integer :: numpft = mxpft ! actual # of patches (without bare), a total that spans LUs
+ integer :: numpft = 50 ! actual # of patches (without bare), a total that spans LUs
integer :: numcft = 36 ! actual # of crops
logical :: crop_prog = .true. ! If prognostic crops is turned on
integer :: maxpatch_urb= 5 ! max number of urban patches (columns) in urban landunit
integer :: mxpft_nc ! maximum number of PFT's when use_crop=False;
- integer :: maxpatch_pft ! max number of plant functional types in naturally vegetated landunit (namelist setting)
+ integer :: maxpatch_pft ! max number of plant functional types in naturally vegetated landunit (namelist setting: maxpft)
+ ! This number must be exactly matched with 'natpft' in surfdata.nc
integer, parameter :: nsoilorder = 15 ! number of soil orders
diff --git a/components/elm/src/main/filterMod.F90 b/components/elm/src/main/filterMod.F90
index 768235bea40..e1dde944559 100644
--- a/components/elm/src/main/filterMod.F90
+++ b/components/elm/src/main/filterMod.F90
@@ -272,7 +272,7 @@ subroutine setFiltersOneGroup(bounds, this_filter, include_inactive, icemask_grc
!
! !USES:
use decompMod , only : BOUNDS_LEVEL_CLUMP
- use pftvarcon , only : npcropmin, nppercropmin
+ use pftvarcon , only : iscft, crop, percrop
use landunit_varcon, only : istsoil, istcrop, istice_mec
use column_varcon, only : icol_road_perv
!
@@ -420,17 +420,17 @@ subroutine setFiltersOneGroup(bounds, this_filter, include_inactive, icemask_grc
t =veg_pp%topounit(p)
if (top_pp%active(t)) then
if (veg_pp%active(p) .or. include_inactive) then
- if (veg_pp%itype(p) < npcropmin) then
+ if (.not. iscft(veg_pp%itype(p))) then
l =veg_pp%landunit(p)
if (lun_pp%itype(l) == istsoil .or. lun_pp%itype(l) == istcrop) then
fnc = fnc + 1
this_filter(nc)%soilnopcropp(fnc) = p
end if
else
- if (veg_pp%itype(p) < nppercropmin) then
+ if (percrop(veg_pp%itype(p)) < 1) then
fc = fc + 1
this_filter(nc)%pcropp(fc) = p
- else if (veg_pp%itype(p) >= nppercropmin) then
+ else if (percrop(veg_pp%itype(p)) >= 1) then
fpc = fpc + 1
this_filter(nc)%ppercropp(fpc) = p
end if
diff --git a/components/elm/src/main/pftvarcon.F90 b/components/elm/src/main/pftvarcon.F90
index 2e2a00f4b4e..fc5bfd54e7d 100644
--- a/components/elm/src/main/pftvarcon.F90
+++ b/components/elm/src/main/pftvarcon.F90
@@ -9,11 +9,19 @@ module pftvarcon
use shr_kind_mod, only : r8 => shr_kind_r8
use shr_log_mod , only : errMsg => shr_log_errMsg
use abortutils , only : endrun
- use elm_varpar , only : mxpft, numrad, ivis, inir, cft_lb, cft_ub
+ use elm_varpar , only : mxpft, numrad, ivis, inir
use elm_varpar , only: mxpft_nc
use elm_varctl , only : iulog, use_vertsoilc
use elm_varpar , only : nlevdecomp_full, nsoilorder
use elm_varctl , only : nu_com
+ !-------------------------------------------------------------------------------------------
+ use elm_varpar , only : crop_prog
+ use elm_varpar , only : natpft_size, natpft_lb, natpft_ub
+ use elm_varpar , only : cft_size, cft_lb, cft_ub
+ use elm_varpar , only : surfpft_size, surfpft_lb, surfpft_ub
+ use elm_varpar , only : numpft, numcft, maxpatch_pft, max_patch_per_col, maxpatch_urb
+ use elm_varctl , only : create_crop_landunit
+ !-------------------------------------------------------------------------------------------
!
! !PUBLIC TYPES:
implicit none
@@ -107,7 +115,7 @@ module pftvarcon
real(r8), allocatable :: dsladlai(:) !dSLA/dLAI [m^2/gC]
real(r8), allocatable :: leafcn(:) !leaf C:N [gC/gN]
real(r8), allocatable :: flnr(:) !fraction of leaf N in Rubisco [no units]
- real(r8), allocatable :: woody(:) !woody lifeform flag (0 or 1)
+ real(r8), allocatable :: woody(:) !woody lifeform flag (0 = non-woody, 1 = tree, 2 = shrub)
real(r8), allocatable :: lflitcn(:) !leaf litter C:N (gC/gN)
real(r8), allocatable :: frootcn(:) !fine root C:N (gC/gN)
real(r8), allocatable :: livewdcn(:) !live wood (phloem and ray parenchyma) C:N (gC/gN)
@@ -116,6 +124,7 @@ module pftvarcon
real(r8), allocatable :: grpnow(:) !growth respiration parameter
real(r8), allocatable :: rootprof_beta(:) !CLM rooting distribution parameter for C and N inputs [unitless]
+
! add pft dependent parameters for phosphorus -X.YANG
real(r8), allocatable :: leafcp(:) !leaf C:P [gC/gP]
real(r8), allocatable :: lflitcp(:) !leaf litter C:P (gC/gP)
@@ -303,6 +312,17 @@ module pftvarcon
real(r8), allocatable :: gcbr_p(:) !effectiveness of roots in reducing rainfall-driven erosion
real(r8), allocatable :: gcbr_q(:) !effectiveness of roots in reducing runoff-driven erosion
+ ! new pft properties, together with woody, crop, percrop, evergreen, stress_decid, season_decid, defined above,
+ ! are introduced to define vegetation properties. This will be well defineing a pft so that no indices needed for codes.
+ real(r8), allocatable :: climatezone(:) ! distributed climate zone (0 = any zone, 1 = tropical, 2 = temperate, 3 = boreal, 4 = arctic)
+ real(r8), allocatable :: nonvascular(:) ! nonvascular lifeform flag (0 = vascular, 1 = moss, 2 = lichen)
+ real(r8), allocatable :: needleleaf(:) ! needleleaf lifeform flag (0 = broadleaf, 1 = needleleaf)
+ real(r8), allocatable :: graminoid(:) ! graminoid lifeform flag (0 = nonvascular+woody+crop+percrop, 1 = graminoid)
+ logical , allocatable :: iscft(:) ! crop function type flag (.false. = non_crop or generic crop, i.e. crop when use_crop=false, .true. = prognostic crop with cft created)
+ real(r8), allocatable :: temp_iscft(:) ! for file read, translated to logical afterwards
+ real(r8), allocatable :: nfixer(:) ! nitrogen fixer flag (0 = inable, 1 = able to nitrogen fixation from atm. N2)
+
+
!
! !PUBLIC MEMBER FUNCTIONS:
public :: pftconrd ! Read and initialize vegetation (PFT) constants
@@ -347,6 +367,10 @@ subroutine pftconrd
integer :: dimid ! netCDF dimension id
integer :: npft ! number of pfts on pft-physiology file
logical :: readv ! read variable in or not
+ logical :: PFT_DEFAULT ! pft names are default, i.e. NOT user-defined
+ integer :: ncft0, ncft ! crop pft index of first/last when 'create_crop_landunit' is true
+ integer :: noncropmax ! max non-crop pft index (to check when 'create_crop_landunit' is true)
+ real(r8) :: local_iscft ! a local transfer of iscft from logical to integer for use in error checks
character(len=32) :: subname = 'pftconrd' ! subroutine name
!
! Expected PFT names: The names expected on the paramfile file and the order they are expected to be in.
@@ -410,6 +434,24 @@ subroutine pftconrd
expected_pftnames(49) = 'willow '
expected_pftnames(50) = 'irrigated_willow '
+ ! read actual 'npft' from parameter file
+ if (masterproc) then
+ write(iulog,*) 'Attempting to read PFT physiological data .....'
+ end if
+ call getfil (paramfile, locfn, 0)
+ call ncd_pio_openfile (ncid, trim(locfn), 0)
+ call ncd_inqdid(ncid,'pft',dimid)
+ call ncd_inqdlen(ncid,dimid,npft)
+
+ ! now 'mxpft' in 'elm_varpar' updated by npft here
+ mxpft = npft - 1
+ mxpft_nc = npft - 1 ! when .not.use_crop, so here temporarily set and may be changed after read-through PFT-physiology
+
+ ! NOTES:
+ ! In parameter file, 'npft' (mxpft) [number of pfts in parameter file] can be greater than 'maxpatch_pft' [number of pfts in surfdata file] which also set by namelist 'maxpft',
+ ! but cannot be less, i.e. there cannot be more pfts in the surface file than there are set of pft parameters, if running the non-crop version of model.
+ if (npft mxpft_nc) EXIT ! exit the do loop
+ if(.not. use_fates)then
if ( trim(adjustl(pftname(i))) /= trim(expected_pftnames(i)) )then
write(iulog,*)'pftconrd: pftname is NOT what is expected, name = ', &
trim(pftname(i)), ', expected name = ', trim(expected_pftnames(i))
call endrun(msg='pftconrd: bad name for pft on paramfile dataset'//errMsg(__FILE__, __LINE__))
end if
+ end if
if ( trim(pftname(i)) == 'not_vegetated' ) noveg = i
if ( trim(pftname(i)) == 'needleleaf_evergreen_temperate_tree' ) ndllf_evr_tmp_tree = i
@@ -1103,12 +1231,210 @@ subroutine pftconrd
nppercropmax = nwillowirrig ! last prognostic perennial crop in list
end if
+ !-------------------------------------------------------------------------------------------
+ ! default: for tree and shrub always 1, now hard-coded as following
+ woody(ndllf_evr_tmp_tree:nbrdlf_dcd_brl_tree) = 1
+ woody(nbrdlf_evr_shrub:nbrdlf_dcd_brl_shrub) = 2
+
+ ! the following is initialized as 0 above for all PFT.
+ ! here the hard-coded values (or flags) for default ELM PFT physiology will be working as original
+ ! when not using those indexing of PFT orders anymore in other codes than here.
+ needleleaf(noveg+1:ndllf_dcd_brl_tree) = 1
+ graminoid(nc3_arctic_grass:nc4_grass) = 1
+ iscft(npcropmin:max(npcropmax,nppercropmax)) = .true.
+ nfixer(nsoybean) = 1
+ nfixer(nsoybeanirrig) = 1
+
+ climatezone(ndllf_evr_tmp_tree) = 2
+ climatezone(ndllf_evr_brl_tree) = 3
+ climatezone(ndllf_dcd_brl_tree) = 3
+ climatezone(nbrdlf_evr_trp_tree) = 1
+ climatezone(nbrdlf_evr_tmp_tree) = 2
+ climatezone(nbrdlf_dcd_trp_tree) = 1
+ climatezone(nbrdlf_dcd_tmp_tree) = 2
+ climatezone(nbrdlf_dcd_brl_tree) = 3
+ climatezone(nbrdlf_dcd_tmp_shrub)= 2
+ climatezone(nbrdlf_dcd_brl_shrub)= 3
+ climatezone(nc3_arctic_grass) = 4
+ !-------------------------------------------------------------------------------------------
+
+
+ ! NOT default PFT file
+ else
+
+ ! not vegetated checking
+ noveg = -1
+
+ ! when user-defined PFTs, if crop included, it must be the default way:
+ ! cropts must be in one block and after nat-pft if 'create_crop_landunit' or 'use_crop' is true
+ npcropmin = -1 ! first prognostic crop
+ npcropmax = -1 ! last prognostic crop in list
+ nppercropmin = -1 ! first prognostic perennial crop
+ nppercropmax = -1 ! last prognostic perennial crop in list
+
+ numcft = 0
+ ncft = -1
+ ncft0 = -1
+ noncropmax = 0
+ do i = 0, npft-1
+ if (crop(i)>=1 .or. percrop(i)>=1 .or. iscft(i)) then
+ numcft = numcft + 1 ! includes generic_crop, while cft_size NOT (???? todo checking)
+
+ if(use_crop) then
+
+ ! the following assumes that all crop pfts are in a block
+
+ ! if 'generic crop' (crop=1) specifically flagged by iscft=.false.
+ ! 'crop' will not be counted into prognostic
+ if (crop(i)>=1 .and. iscft(i)) then
+ npcropmax = i
+ if(npcropmin<=0) npcropmin = i
+ end if
+
+ ! NOTE: there is a misunderstanding in pft physiology parameter file: 'perennial crop' IS NOT 'crop',
+ ! but still counted into 'numcft'
+ if(percrop(i)==1) then
+ nppercropmax = i
+ if(nppercropmin<=0) nppercropmin = i
+ end if
+
+ else
+ if(crop(i)>=1 .or. percrop(i)>=1) then
+ ! in case either 'crop' or 'generic crop' or both defined, it must be generic, when not use_crop=.true.
+ iscft(i) = .false.
+ end if
+ end if
+
+ !
+ if (create_crop_landunit) then
+ ! make sure all crop-pft are in one block and following nat-pft SO THAT creating crop landunit is possible
+ ncft = ncft + 1
+ if (ncft0<0) ncft0=i
+ end if
+
+ !
+ else if (create_crop_landunit) then
+ noncropmax = i
+
+ end if
+
+ ! need to check 'noveg'
+ if ( woody(i)<=0 .and. graminoid(i)<=0 .and. nonvascular(i)<=0 .and. &
+ .not. iscft(i) .and. crop(i)<=0 .and. percrop(i)<=0) then
+ if (noveg>=0) then
+ ! not yet support multiple non-vegetated PFT
+ ! this also will catch error of no actual PFT if npft>1
+ call endrun(msg=' ERROR: more than 1 not vegetated in physiology parameter nc file.'//errMsg(__FILE__, __LINE__))
+ else
+ noveg = i
+ end if
+ end if
+
+ !
+ end do
+
+ ! make sure non-generic crop indices always beyond natural-pft, even if not available - used in filterMod.F90)
+ if (npcropmin < 0 .and. npcropmax < 0) then
+ npcropmin = npft
+ npcropmax = npft
+ end if
+
+ ! MUST re-do some constants which already set in 'elm_varpar.F90:elm_varpar_init()'
+ mxpft_nc = min(maxpatch_pft,npft) - 1 ! user-defined is what max.
+ numpft = min(maxpatch_pft,npft) - 1 ! actual # of patches (without bare)
+
+ if (create_crop_landunit) then
+ if (ncft0 /= noncropmax+1) then
+ call endrun(msg=' ERROR: when create_crop_landunit is true, crop must be following non-crop PFT .'//errMsg(__FILE__, __LINE__))
+ end if
+ if (ncft /= npft-1) then
+ call endrun(msg=' ERROR: when create_crop_landunit is true, last crop must be the last one of all PFTs .'//errMsg(__FILE__, __LINE__))
+ end if
+
+ natpft_size = (numpft + 1) - numcft ! note that numpft doesn't include bare ground -- thus we add 1
+ cft_size = numcft
+ else
+ natpft_size = numpft + 1 ! note that numpft doesn't include bare ground -- thus we add 1
+ cft_size = 0
+ end if
+ natpft_lb = 0
+ natpft_ub = natpft_lb + natpft_size - 1
+ cft_lb = natpft_ub + 1
+ cft_ub = max(cft_lb, cft_lb + cft_size - 1) ! NOTE: if cft_size is ZERO, could be issue (but so far so good)
+ surfpft_lb = natpft_lb
+ surfpft_ub = natpft_ub
+ surfpft_size = natpft_size
+ max_patch_per_col= max(numpft+1, numcft, maxpatch_urb)
+
+
+ end if ! end if 'PFT_DEFAULT'
+
+ ! checking of pft flags' conflict
+ if ( .not. use_fates ) then
+ do i = 0, mxpft
+ if (iscft(i)) local_iscft = 1._r8
+ if (.not. iscft(i)) local_iscft = 0._r8
+ if (i == noveg) then
+ if ( (nonvascular(i)+woody(i)+graminoid(i)+max(local_iscft,crop(i)+percrop(i))) >= 1 .or. &
+ (needleleaf(i)+evergreen(i)+stress_decid(i)+season_decid(i)+nfixer(i)) >= 1 ) then
+ print *, 'ERROR: Incorrect not-vegetated PFT flags: ', i, ' ', trim(pftname(i))
+ call endrun(msg=' ERROR: not_vegetated has at least one positive PFT flag '//errMsg(__FILE__, __LINE__))
+ end if
+
+ else if ( (nonvascular(i)+woody(i)+graminoid(i)+max(local_iscft,crop(i)+percrop(i))) >= 1) then
+ if (nonvascular(i) >= 1 .and. (woody(i)+graminoid(i)+max(local_iscft,crop(i)+percrop(i))) >= 1) then
+ print *, 'ERROR: Incorrect nonvasculr PFT flags: ', i, ' ', trim(pftname(i))
+ call endrun(msg=' ERROR: nonvascular PFT cannot be any of woody/graminoid/crop type '//errMsg(__FILE__, __LINE__))
+ else if (woody(i) >= 1 .and. (nonvascular(i)+graminoid(i)+max(local_iscft,crop(i)+percrop(i))) >= 1) then
+ print *, 'ERROR: Incorrect woody PFT flags: ', i, ' ', trim(pftname(i))
+ call endrun(msg=' ERROR: woody PFT cannot be any of nonvascular/graminoid/crop type - '//errMsg(__FILE__, __LINE__))
+ else if (graminoid(i) >= 1 .and. (nonvascular(i)+woody(i)+max(local_iscft,crop(i)+percrop(i))) >=1 ) then
+ print *, 'ERROR: Incorrect graminoid PFT flags: ', i, ' ', trim(pftname(i))
+ call endrun(msg=' ERROR: graminoid PFT cannot be any of nonvascular/woody/crop type - '//errMsg(__FILE__, __LINE__))
+ else if ( (max(local_iscft,crop(i)+percrop(i))) >= 1 .and. (nonvascular(i)+woody(i)+graminoid(i)) >= 1) then
+ print *, 'ERROR: Incorrect crop PFT flags: ', i, ' ', trim(pftname(i))
+ call endrun(msg=' ERROR: crop PFT cannot be any of nonvascular/woody/graminoid type - '//errMsg(__FILE__, __LINE__))
+ end if
+
+ if( (stress_decid(i)*season_decid(i)) >= 1 ) then
+ print *, 'ERROR: Incorrect stress_decid or season_decid flags: ', i, ' ', trim(pftname(i))
+ call endrun(msg=' ERROR: stress_decid AND season_decid cannot be both 1 - '//errMsg(__FILE__, __LINE__))
+ elseif( (evergreen(i)*(stress_decid(i)+season_decid(i)) ) >= 1 ) then
+ print *, 'ERROR: Incorrect evergreen AND season_/stress_decid flags: ', i, ' ', trim(pftname(i))
+ call endrun(msg=' ERROR: evergreen AND (stress_decid OR season_decid) cannot be both 1 - '//errMsg(__FILE__, __LINE__))
+ end if
+
+ else
+
+ call endrun(msg=' ERROR: not_vegetated AND none of vegetation type for PFT - '//errMsg(__FILE__, __LINE__))
+
+ end if
+
+ end do
+ end if
+
+ ! information
+ if (masterproc) then
+ write(iulog,*)
+ write(iulog,*) 'Using PFT physiological parameters from: ', paramfile
+ write(iulog,*) ' -- index -- name -- climate zone -- -- woody -- -- needleleaf -- -- evergreen -- -- stress_decid -- -- season_decid -- -- graminoid-- -- iscft -- -- crop -- -- perennial crop -- -- nfixer --'
+ do i = 0, npft-1
+ write(iulog,*) i, pftname(i), int(climatezone(i)), int(woody(i)), int(needleleaf(i)), &
+ int(evergreen(i)), int(stress_decid(i)), int(season_decid(i)), &
+ int(graminoid(i)), int(temp_iscft(i)), int(crop(i)), int(percrop(i)), int(nfixer(i))
+ end do
+ write(iulog,*)
+ end if
+
+
+ !-------------------------------------------------------------------------------------------
+
call set_is_pft_known_to_model()
- call set_num_cfts_known_to_model()
+ if (cft_size>0) call set_num_cfts_known_to_model()
if( .not. use_fates ) then
if( .not. use_crop) then
- if ( npcropmax /= mxpft_nc )then
+ if ( npcropmax /= mxpft_nc .and. crop_prog)then
call endrun(msg=' ERROR: npcropmax is NOT the last value'//errMsg(__FILE__, __LINE__))
end if
else
@@ -1118,6 +1444,7 @@ subroutine pftconrd
end if
do i = 0, mxpft
if(.not. use_crop .and. i > mxpft_nc) EXIT ! exit the do loop
+ if(.not.PFT_DEFAULT) EXIT ! no checking of indexing PFTs for user-defined
if( .not. use_crop) then
if ( irrigated(i) == 1.0_r8 .and. (i == nc3irrig .or. &
i == ncornirrig .or. &
diff --git a/components/elm/src/main/surfrdMod.F90 b/components/elm/src/main/surfrdMod.F90
index 9cbcd4b2b8e..a8146e5a0f1 100755
--- a/components/elm/src/main/surfrdMod.F90
+++ b/components/elm/src/main/surfrdMod.F90
@@ -1105,6 +1105,8 @@ subroutine surfrd_pftformat( begg, endg, ncid )
end if
fert_p_cft = 0.0_r8
+ wt_nat_patch(begg:endg, :, :) = 0.0_r8
+ wt_cft(begg:endg, :, :) = 0.0_r8
if (.not. create_crop_landunit) then
call ncd_io(ncid=ncid, varname='PCT_NAT_PFT', flag='read', data=wt_nat_patch, &
dim1name=grlnd, readvar=readvar)
@@ -1263,6 +1265,8 @@ subroutine surfrd_veg_all(begg, endg, ncid, ns,ntpu)
do nl = begg,endg
do t = 1, max_topounits
+ ! (TODO) the following assumes that rainfed/irrigated crop are ordered side by side
+ ! indexing is fixed
wt_cft(nl,t,nc3crop) = wt_cft(nl,t,nc3crop) + wt_cft(nl,t,nc3irrig)
wt_cft(nl,t,nc3irrig) = 0._r8
wt_cft(nl,t,ncorn) = wt_cft(nl,t,ncorn) + wt_cft(nl,t,ncornirrig)
@@ -1702,7 +1706,12 @@ subroutine surfrd_get_topo_for_solar_rad(domain,filename)
call ncd_io(ncid=ncid, varname='STDEV_ELEV', flag='read', data=domain%stdev_elev, &
dim1name=grlnd, readvar=readvar)
- if (.not. readvar) call endrun( trim(subname)//' ERROR: STDEV_ELEV NOT on fsurdat file' )
+ if (.not. readvar) then
+ write(iulog,*) trim(subname),' WARNING: STDEV_ELEV NOT on fsurdat file. Try to use STD_ELEV instead.'
+ call ncd_io(ncid=ncid, varname='STD_ELEV', flag='read', data=domain%stdev_elev, &
+ dim1name=grlnd, readvar=readvar)
+ if (.not. readvar) call endrun( trim(subname)//' ERROR: BOTH STD_ELEV and STDEV_ELEV NOT on fsurdat file' )
+ endif
call ncd_io(ncid=ncid, varname='SKY_VIEW', flag='read', data=domain%sky_view, &
dim1name=grlnd, readvar=readvar)
if (.not. readvar) call endrun( trim(subname)//' ERROR: SKY_VIEW NOT on fsurdat file' )
diff --git a/components/elm/src/main/surfrdUtilsMod.F90 b/components/elm/src/main/surfrdUtilsMod.F90
index a32570c15a2..2c1e42559da 100644
--- a/components/elm/src/main/surfrdUtilsMod.F90
+++ b/components/elm/src/main/surfrdUtilsMod.F90
@@ -20,7 +20,7 @@ module surfrdUtilsMod
! !PUBLIC MEMBER FUNCTIONS:
public :: check_sums_equal_1_3d ! Confirm that sum(arr(n,t,:)) == 1 for all n
public :: check_sums_equal_1_2d ! Confirm that sum(arr(n,:)) == 1 for all n
- public :: convert_cft_to_pft ! Conversion of crop CFT to natural veg PFT:w
+ public :: convert_cft_to_pft ! Conversion of crop CFT to natural veg PFT
public :: collapse_crop_types ! Collapse unused crop types into types used in this run
public :: collapse_crop_var ! Collapse crop variables according to cft weights determined in previous "collapse" subroutines
public :: convert_pft_to_cft ! Conversion of crops from natural veg to CFT
@@ -36,7 +36,7 @@ subroutine check_sums_equal_1_3d(arr, lb, name, caller)
! Confirm that sum(arr(n,:)) == 1 for all n. If this isn't true for any n, abort with a message.
!
! Uses
- use topounit_varcon, only : max_topounits, has_topounit
+ use topounit_varcon, only : max_topounits
! !ARGUMENTS:
integer , intent(in) :: lb ! lower bound of the first dimension of arr
@@ -123,21 +123,22 @@ subroutine convert_cft_to_pft( begg, endg, cftsize, wt_cft )
! a crop landunit, and put them on the vegetated landunit.
! !USES:
use elm_varsur , only : wt_lunit, wt_nat_patch
- use elm_varpar , only : cft_size, surfpft_size
- use pftvarcon , only : nc3crop
+ use elm_varpar , only : cft_size
+ use elm_varpar , only : natpft_size
use landunit_varcon , only : istsoil, istcrop
use topounit_varcon , only : max_topounits
! !ARGUMENTS:
implicit none
integer , intent(in) :: begg, endg
- integer , intent(in) :: cftsize ! CFT size
+ integer , intent(in) :: cftsize ! CFT size ! this could be wrong if by input
real(r8) , intent(inout) :: wt_cft(begg:,:,:) ! CFT weights
!
! !LOCAL VARIABLES:
integer :: g, t ! index
!-----------------------------------------------------------------------
- SHR_ASSERT_ALL((ubound(wt_cft ) == (/endg,max_topounits, cftsize /)), errMsg(__FILE__, __LINE__))
- SHR_ASSERT_ALL((ubound(wt_nat_patch) == (/endg,max_topounits, nc3crop+cftsize-1/)), errMsg(__FILE__, __LINE__))
+ ! note (01-29-2024 by fmyuan@ornl.gov, cftsize --> elm_varpar:cft_size)
+ SHR_ASSERT_ALL((ubound(wt_cft ) == (/endg,max_topounits, cft_size /)), errMsg(__FILE__, __LINE__))
+ SHR_ASSERT_ALL((ubound(wt_nat_patch) == (/endg,max_topounits, natpft_size+cft_size/)), errMsg(__FILE__, __LINE__))
do g = begg, endg
do t = 1, max_topounits
@@ -145,12 +146,12 @@ subroutine convert_cft_to_pft( begg, endg, cftsize, wt_cft )
! Move CFT over to PFT and do weighted average of the crop and soil parts
wt_nat_patch(g,t,:) = wt_nat_patch(g,t,:) * wt_lunit(g,t,istsoil)
wt_cft(g,t,:) = wt_cft(g,t,:) * wt_lunit(g,t,istcrop)
- wt_nat_patch(g,t,nc3crop:) = wt_cft(g,t,:) ! Add crop CFT's to end of natural veg PFT's
- wt_lunit(g,t,istsoil) = (wt_lunit(g,t,istsoil) + wt_lunit(g,t,istcrop)) ! Add crop landunit to soil landunit
+ wt_nat_patch(g,t,natpft_size:) = wt_cft(g,t,:) ! Add crop CFT's to end of natural veg PFT's
+ wt_lunit(g,t,istsoil) = (wt_lunit(g,t,istsoil) + wt_lunit(g,t,istcrop)) ! Add crop landunit to soil landunit
wt_nat_patch(g,t,:) = wt_nat_patch(g,t,:) / wt_lunit(g,t,istsoil)
- wt_lunit(g,t,istcrop) = 0.0_r8 ! Zero out crop CFT's
+ wt_lunit(g,t,istcrop) = 0.0_r8 ! Zero out crop CFT's
else
- wt_nat_patch(g,t,nc3crop:) = 0.0_r8 ! Make sure generic crops are zeroed out
+ wt_nat_patch(g,t,natpft_size:) = 0.0_r8 ! Make sure generic crops are zeroed out
end if
end do
end do
@@ -169,9 +170,7 @@ subroutine convert_pft_to_cft( begg, endg )
! the new crop landunit
! !USES:
use elm_varsur , only : wt_lunit, wt_nat_patch, wt_cft
- use elm_varpar , only : cft_size, surfpft_size
use elm_varpar , only : cft_size, cft_lb, cft_ub, surfpft_lb, surfpft_ub
- use pftvarcon , only : nc3crop
use landunit_varcon , only : istsoil, istcrop
use topounit_varcon , only : max_topounits
! !ARGUMENTS:
@@ -261,7 +260,6 @@ subroutine collapse_crop_var(crop_var, begg, endg)
use elm_varpar, only: cft_lb, cft_ub, cft_size
use pftvarcon , only: is_pft_known_to_model
use topounit_varcon , only : max_topounits ! TKT
- use GridcellType, only : grc_pp
!
! !ARGUMENTS:
! Use begg and endg rather than 'bounds', because bounds may not be
@@ -309,10 +307,9 @@ subroutine collapse_crop_types(wt_cft, fert_cft, fert_p_cft, begg, endg, verbose
! !USES:
use elm_varctl , only : irrigate
use elm_varpar , only : cft_lb, cft_ub, cft_size
- use pftvarcon , only : nc3crop, nc3irrig, npcropmax, mergetoelmpft
use pftvarcon , only: is_pft_known_to_model
- use topounit_varcon , only : max_topounits ! TKT
- use GridcellType , only : grc_pp ! TKT
+ use pftvarcon , only : npcropmax, mergetoelmpft
+ use topounit_varcon , only : max_topounits
!
! !ARGUMENTS:
@@ -323,16 +320,15 @@ subroutine collapse_crop_types(wt_cft, fert_cft, fert_p_cft, begg, endg, verbose
! Weight and fertilizer of each CFT in each grid cell; dimensioned [g, cft_lb:cft_ub]
! This array is modified in-place
- real(r8), intent(inout) :: wt_cft(begg:,1:, cft_lb:) !TKT
- real(r8), intent(inout) :: fert_cft(begg:,1:, cft_lb:) !TKT
+ real(r8), intent(inout) :: wt_cft(begg:,1:, cft_lb:)
+ real(r8), intent(inout) :: fert_cft(begg:,1:, cft_lb:)
real(r8), intent(inout) :: fert_p_cft(begg:, 1:, cft_lb:)
logical, intent(in) :: verbose ! If true, print some extra information
!
! !LOCAL VARIABLES:
- integer :: g, t,t2 ! TKT
+ integer :: g, t,t2
integer :: m
- !integer, allocatable :: ntpu(:) ! To store number of topounits per grid TKT
real(r8) :: wt_cft_to
real(r8) :: wt_cft_from
real(r8) :: wt_cft_merge
@@ -340,7 +336,7 @@ subroutine collapse_crop_types(wt_cft, fert_cft, fert_p_cft, begg, endg, verbose
character(len=*), parameter :: subname = 'collapse_crop_types'
!-----------------------------------------------------------------------
- SHR_ASSERT_ALL((ubound(wt_cft) == (/endg,max_topounits, cft_ub/)), errMsg(__FILE__, __LINE__)) ! TKT
+ SHR_ASSERT_ALL((ubound(wt_cft) == (/endg,max_topounits, cft_ub/)), errMsg(__FILE__, __LINE__))
SHR_ASSERT_ALL((ubound(fert_cft) == (/endg,max_topounits, cft_ub/)), errMsg(__FILE__, __LINE__))
SHR_ASSERT_ALL((ubound(fert_p_cft) == (/endg,max_topounits, cft_ub/)), errMsg(__FILE__, __LINE__))
@@ -353,14 +349,12 @@ subroutine collapse_crop_types(wt_cft, fert_cft, fert_p_cft, begg, endg, verbose
! ------------------------------------------------------------------------
! If not using irrigation, merge irrigated CFTs into rainfed CFTs
! ------------------------------------------------------------------------
- !allocate(ntpu(begg:endg))
if (.not. irrigate) then
if (verbose .and. masterproc) then
write(iulog,*) trim(subname)//' crop=.T. and irrigate=.F., so merging irrigated pfts with rainfed'
end if
do g = begg, endg
- !ntpu(g) = grc_pp%ntopounits(g)
! Left Hand Side: merged rainfed+irrigated crop pfts from nc3crop to
! npcropmax-1, stride 2
! Right Hand Side: rainfed crop pfts from nc3crop to npcropmax-1,
@@ -369,14 +363,14 @@ subroutine collapse_crop_types(wt_cft, fert_cft, fert_p_cft, begg, endg, verbose
! stride 2
! where stride 2 means "every other"
- do t = 1,max_topounits
- wt_cft(g,t, nc3crop:npcropmax-1:2) = &
- wt_cft(g,t, nc3crop:npcropmax-1:2) + wt_cft(g,t, nc3irrig:npcropmax:2) ! TKT
- wt_cft(g,t, nc3irrig:npcropmax:2) = 0._r8
- end do ! TKT
+ do t2 = 1, max_topounits
+ wt_cft(g,t2, cft_lb:cft_ub-1:2) = &
+ wt_cft(g,t2, cft_lb:cft_ub-1:2) + wt_cft(g,t2, cft_lb+1:cft_ub:2)
+ wt_cft(g,t2, cft_lb+1:cft_ub:2) = 0._r8
+ end do
end do
- call check_sums_equal_1_3d(wt_cft, begg, 'wt_cft', subname//': irrigation') ! TKT
+ call check_sums_equal_1_3d(wt_cft, begg, 'wt_cft', subname//': irrigation')
end if
! ------------------------------------------------------------------------
@@ -410,8 +404,7 @@ subroutine collapse_crop_types(wt_cft, fert_cft, fert_p_cft, begg, endg, verbose
end do
end do
- call check_sums_equal_1_3d(wt_cft, begg, 'wt_cft', subname//': mergetoelmpft') ! TKT
- !deallocate(ntpu)
+ call check_sums_equal_1_3d(wt_cft, begg, 'wt_cft', subname//': mergetoelmpft')
end subroutine collapse_crop_types
end module surfrdUtilsMod
diff --git a/components/homme/cmake/machineFiles/anvil-bfb.cmake b/components/homme/cmake/machineFiles/anvil-bfb.cmake
index d46774646eb..ab9b1d3edc8 100644
--- a/components/homme/cmake/machineFiles/anvil-bfb.cmake
+++ b/components/homme/cmake/machineFiles/anvil-bfb.cmake
@@ -20,7 +20,14 @@ ENDIF()
# Set kokkos arch, to get correct avx flags
SET (Kokkos_ARCH_BDW ON CACHE BOOL "")
-SET (WITH_PNETCDF FALSE CACHE FILEPATH "")
+EXECUTE_PROCESS(COMMAND pnetcdf-config --prefix
+ RESULT_VARIABLE PNCCONFIG_RESULT
+ OUTPUT_VARIABLE PNCCONFIG_OUTPUT
+ ERROR_VARIABLE PNCCONFIG_ERROR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+SET (PnetCDF_PATH "${PNCCONFIG_OUTPUT}" CACHE STRING "")
+
#
# anvil module system doesn't set environment variables, but will put
# nc-config in our path. anvil seperates C and Fortran libraries,
diff --git a/components/homme/cmake/machineFiles/chrysalis-bfb.cmake b/components/homme/cmake/machineFiles/chrysalis-bfb.cmake
index ddeb7fa7811..b9f0d41a060 100644
--- a/components/homme/cmake/machineFiles/chrysalis-bfb.cmake
+++ b/components/homme/cmake/machineFiles/chrysalis-bfb.cmake
@@ -20,7 +20,13 @@ SET (USE_MPI_OPTIONS "-K --cpu_bind=cores" CACHE STRING "")
# Set kokkos arch, to get correct avx flags
SET (Kokkos_ARCH_ZEN2 ON CACHE BOOL "")
-SET (WITH_PNETCDF FALSE CACHE FILEPATH "")
+EXECUTE_PROCESS(COMMAND pnetcdf-config --prefix
+ RESULT_VARIABLE PNCCONFIG_RESULT
+ OUTPUT_VARIABLE PNCCONFIG_OUTPUT
+ ERROR_VARIABLE PNCCONFIG_ERROR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+SET (PnetCDF_PATH "${PNCCONFIG_OUTPUT}" CACHE STRING "")
EXECUTE_PROCESS(COMMAND nf-config --prefix
RESULT_VARIABLE NFCONFIG_RESULT
diff --git a/components/homme/src/share/compose/cedr_kokkos.hpp b/components/homme/src/share/compose/cedr_kokkos.hpp
index 42e423e2913..758f4148a9a 100644
--- a/components/homme/src/share/compose/cedr_kokkos.hpp
+++ b/components/homme/src/share/compose/cedr_kokkos.hpp
@@ -18,7 +18,7 @@ typedef Kokkos::Experimental::HIPSpace CedrGpuSpace;
# endif
# if defined KOKKOS_ENABLE_SYCL
typedef Kokkos::Experimental::SYCL CedrGpuExeSpace;
-typedef Kokkos::Experimental::SYCL> CedrGpuSpace;
+typedef Kokkos::Experimental::SYCL CedrGpuSpace;
# endif
#endif
diff --git a/components/homme/src/share/compose/compose_slmm_siqk.cpp b/components/homme/src/share/compose/compose_slmm_siqk.cpp
index 628c023090c..56564b0b8ca 100644
--- a/components/homme/src/share/compose/compose_slmm_siqk.cpp
+++ b/components/homme/src/share/compose/compose_slmm_siqk.cpp
@@ -60,8 +60,10 @@ class TestSphereToRefKernel {
// tol is on dx, not (a,b), so adjust slightly.
if ( ! info.success || err > 1e4*tol_) {
jinfo.nfails++;
+#ifndef KOKKOS_ENABLE_SYCL
printf("calc_sphere_to_ref ei %d i %d j %d: nits %d re %1.1e\n",
ei, i, j, info.n_iterations, err);
+#endif
}
jinfo.sum_nits += info.n_iterations;
jinfo.max_nits = max(jinfo.max_nits, info.n_iterations);
diff --git a/components/mosart/src/riverroute/MOSART_physics_mod.F90 b/components/mosart/src/riverroute/MOSART_physics_mod.F90
index cad978577cd..912014904e9 100644
--- a/components/mosart/src/riverroute/MOSART_physics_mod.F90
+++ b/components/mosart/src/riverroute/MOSART_physics_mod.F90
@@ -682,8 +682,8 @@ subroutine Euler
! check for negative channel storage
if (negchan < -1.e-10) then
- write(iulog,*) 'Error: Negative channel storage found! ',negchan
- call shr_sys_abort('mosart: negative channel storage')
+ write(iulog,*) 'Warning: Negative channel storage found! ',negchan
+! call shr_sys_abort('mosart: negative channel storage')
endif
TRunoff%flow = TRunoff%flow / Tctl%DLevelH2R
TRunoff%erowm_regi(:,nt_nmud:nt_nsan) = TRunoff%erowm_regi(:,nt_nmud:nt_nsan) / Tctl%DLevelH2R
diff --git a/components/mpas-albany-landice/bld/namelist_files/albany_input.ais20km.yaml b/components/mpas-albany-landice/bld/namelist_files/albany_input.ais20km.yaml
new file mode 100644
index 00000000000..589e163bba7
--- /dev/null
+++ b/components/mpas-albany-landice/bld/namelist_files/albany_input.ais20km.yaml
@@ -0,0 +1,231 @@
+%YAML 1.1
+---
+ANONYMOUS:
+
+# Discretization Description
+ Discretization:
+ #Exodus Output File Name: albany_output.exo
+
+ Piro:
+# Nonlinear Solver Information
+ NOX:
+ Nonlinear Solver: Line Search Based
+ Line Search:
+ Full Step:
+ Full Step: 1.0e+00
+ Method: Backtrack
+ Solver Options:
+ Status Test Check Type: Minimal
+ Status Tests:
+ Test Type: Combo
+ Combo Type: OR
+ Number of Tests: 2
+ Test 0:
+ Test Type: Combo
+ Combo Type: AND
+ Number of Tests: 2
+ Test 0:
+ Test Type: NormF
+ Norm Type: Two Norm
+ Scale Type: Unscaled
+ Tolerance: 1.0e-03
+ Test 1:
+ Test Type: RelativeNormF
+ Norm Type: Two Norm
+ Tolerance: 0.9999
+ Test 1:
+ Test Type: MaxIters
+ Maximum Iterations: 100
+ Printing:
+ Output Precision: 3
+ Output Processor: 0
+ Output Information:
+ Error: true
+ Warning: true
+ Outer Iteration: true
+ Parameters: false
+ Details: false
+ Linear Solver Details: false
+ Stepper Iteration: true
+ Stepper Details: true
+ Stepper Parameters: true
+
+ Direction:
+ Method: Newton
+ Newton:
+ Forcing Term Method: Type 2
+ Rescue Bad Newton Solve: true
+ Linear Solver:
+ Write Linear System: false
+ Tolerance: 1.0e-8
+
+ Stratimikos Linear Solver:
+ Stratimikos:
+
+# Linear Solver Information
+ Linear Solver Type: Belos
+ Linear Solver Types:
+ Belos:
+ Solver Type: Block GMRES
+ Solver Types:
+ Block GMRES:
+ Output Frequency: 20
+ Output Style: 1
+ Verbosity: 33
+ Maximum Iterations: 200
+ Block Size: 1
+ Num Blocks: 200
+ Flexible Gmres: false
+ VerboseObject:
+ Output File: none
+ Verbosity Level: low
+
+# Preconditioner Information
+ Preconditioner Type: MueLu
+ Preconditioner Types:
+
+ Ifpack2:
+ Overlap: 1
+ Prec Type: ILUT
+
+ MueLu:
+ Matrix:
+ PDE equations: 2
+ Factories:
+ myLineDetectionFact:
+ factory: LineDetectionFactory
+ 'linedetection: orientation': coordinates
+ mySemiCoarsenPFact1:
+ factory: SemiCoarsenPFactory
+ 'semicoarsen: coarsen rate': 14
+ UncoupledAggregationFact2:
+ factory: UncoupledAggregationFactory
+ 'aggregation: ordering': graph
+ 'aggregation: max selected neighbors': 0
+ 'aggregation: min agg size': 3
+ 'aggregation: phase3 avoid singletons': true
+ MyCoarseMap2:
+ factory: CoarseMapFactory
+ Aggregates: UncoupledAggregationFact2
+ myTentativePFact2:
+ 'tentative: calculate qr': true
+ factory: TentativePFactory
+ Aggregates: UncoupledAggregationFact2
+ CoarseMap: MyCoarseMap2
+ mySaPFact2:
+ 'sa: eigenvalue estimate num iterations': 10
+ 'sa: damping factor': 1.33333e+00
+ factory: SaPFactory
+ P: myTentativePFact2
+ myTransferCoordinatesFact:
+ factory: CoordinatesTransferFactory
+ CoarseMap: MyCoarseMap2
+ Aggregates: UncoupledAggregationFact2
+ myTogglePFact:
+ factory: TogglePFactory
+ 'semicoarsen: number of levels': 2
+ TransferFactories:
+ P1: mySemiCoarsenPFact1
+ P2: mySaPFact2
+ Ptent1: mySemiCoarsenPFact1
+ Ptent2: myTentativePFact2
+ Nullspace1: mySemiCoarsenPFact1
+ Nullspace2: myTentativePFact2
+ myRestrictorFact:
+ factory: TransPFactory
+ P: myTogglePFact
+ myToggleTransferCoordinatesFact:
+ factory: ToggleCoordinatesTransferFactory
+ Chosen P: myTogglePFact
+ TransferFactories:
+ Coordinates1: mySemiCoarsenPFact1
+ Coordinates2: myTransferCoordinatesFact
+ myRAPFact:
+ factory: RAPFactory
+ P: myTogglePFact
+ R: myRestrictorFact
+ TransferFactories:
+ For Coordinates: myToggleTransferCoordinatesFact
+ myRepartitionHeuristicFact:
+ factory: RepartitionHeuristicFactory
+ A: myRAPFact
+ 'repartition: min rows per proc': 3000
+ 'repartition: max imbalance': 1.327e+00
+ 'repartition: start level': 1
+ myZoltanInterface:
+ factory: ZoltanInterface
+ A: myRAPFact
+ Coordinates: myToggleTransferCoordinatesFact
+ number of partitions: myRepartitionHeuristicFact
+ myRepartitionFact:
+ factory: RepartitionFactory
+ A: myRAPFact
+ Partition: myZoltanInterface
+ 'repartition: remap parts': true
+ number of partitions: myRepartitionHeuristicFact
+ myRebalanceProlongatorFact:
+ factory: RebalanceTransferFactory
+ type: Interpolation
+ P: myTogglePFact
+ Coordinates: myToggleTransferCoordinatesFact
+ Nullspace: myTogglePFact
+ myRebalanceRestrictionFact:
+ factory: RebalanceTransferFactory
+ type: Restriction
+ R: myRestrictorFact
+ myRebalanceAFact:
+ factory: RebalanceAcFactory
+ A: myRAPFact
+ TransferFactories: { }
+ mySmoother1:
+ factory: TrilinosSmoother
+ type: LINESMOOTHING_BANDEDRELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother3:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother4:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': pre
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 4
+ 'relaxation: damping factor': 1.0
+ Hierarchy:
+ max levels: 7
+ 'coarse: max size': 2000
+ verbosity: None
+ Finest:
+ Smoother: mySmoother1
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+ All:
+ startLevel: 1
+ Smoother: mySmoother4
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+
diff --git a/components/mpas-albany-landice/bld/namelist_files/albany_input.ais_4to20km.yaml b/components/mpas-albany-landice/bld/namelist_files/albany_input.ais_4to20km.yaml
new file mode 100644
index 00000000000..c3bc0cf8bd5
--- /dev/null
+++ b/components/mpas-albany-landice/bld/namelist_files/albany_input.ais_4to20km.yaml
@@ -0,0 +1,246 @@
+%YAML 1.1
+---
+ANONYMOUS:
+ Problem:
+ Basal Cubature Degree: 4
+ LandIce Field Norm:
+ sliding_velocity_basalside:
+ Regularization Type: Given Value
+ Regularization Value: 1.0e-4
+ LandIce BCs:
+ BC 0:
+ Basal Friction Coefficient:
+ Type: Power Law
+ Power Exponent: 0.2
+ Mu Type: Field
+ Effective Pressure Type: Constant
+ Effective Pressure: 1.0
+ # Zero Effective Pressure On Floating Ice At Nodes: true
+ Zero Beta On Floating Ice: true
+# Discretization Description
+ Discretization:
+ #Exodus Output File Name: albany_output.exo
+
+ Piro:
+# Nonlinear Solver Information
+ NOX:
+ Nonlinear Solver: Line Search Based
+ Line Search:
+ Full Step:
+ Full Step: 1.0e+00
+ Method: Backtrack
+ Solver Options:
+ Status Test Check Type: Minimal
+ Status Tests:
+ Test Type: Combo
+ Combo Type: OR
+ Number of Tests: 2
+ Test 0:
+ Test Type: Combo
+ Combo Type: AND
+ Number of Tests: 2
+ Test 0:
+ Test Type: NormF
+ Norm Type: Two Norm
+ Scale Type: Unscaled
+ Tolerance: 1.0e-03
+ Test 1:
+ Test Type: RelativeNormF
+ Norm Type: Two Norm
+ Tolerance: 0.9999
+ Test 1:
+ Test Type: MaxIters
+ Maximum Iterations: 100
+ Printing:
+ Output Precision: 3
+ Output Processor: 0
+ Output Information:
+ Error: true
+ Warning: true
+ Outer Iteration: true
+ Parameters: false
+ Details: false
+ Linear Solver Details: false
+ Stepper Iteration: true
+ Stepper Details: true
+ Stepper Parameters: true
+
+ Direction:
+ Method: Newton
+ Newton:
+ Forcing Term Method: Type 2
+ Rescue Bad Newton Solve: true
+ Linear Solver:
+ Write Linear System: false
+ Tolerance: 1.0e-8
+
+ Stratimikos Linear Solver:
+ Stratimikos:
+
+# Linear Solver Information
+ Linear Solver Type: Belos
+ Linear Solver Types:
+ Belos:
+ Solver Type: Block GMRES
+ Solver Types:
+ Block GMRES:
+ Output Frequency: 20
+ Output Style: 1
+ Verbosity: 33
+ Maximum Iterations: 200
+ Block Size: 1
+ Num Blocks: 200
+ Flexible Gmres: false
+ VerboseObject:
+ Output File: none
+ Verbosity Level: low
+
+# Preconditioner Information
+ Preconditioner Type: MueLu
+ Preconditioner Types:
+
+ Ifpack2:
+ Overlap: 1
+ Prec Type: ILUT
+
+ MueLu:
+ Matrix:
+ PDE equations: 2
+ Factories:
+ myLineDetectionFact:
+ factory: LineDetectionFactory
+ 'linedetection: orientation': coordinates
+ mySemiCoarsenPFact1:
+ factory: SemiCoarsenPFactory
+ 'semicoarsen: coarsen rate': 14
+ UncoupledAggregationFact2:
+ factory: UncoupledAggregationFactory
+ 'aggregation: ordering': graph
+ 'aggregation: max selected neighbors': 0
+ 'aggregation: min agg size': 3
+ 'aggregation: phase3 avoid singletons': true
+ MyCoarseMap2:
+ factory: CoarseMapFactory
+ Aggregates: UncoupledAggregationFact2
+ myTentativePFact2:
+ 'tentative: calculate qr': true
+ factory: TentativePFactory
+ Aggregates: UncoupledAggregationFact2
+ CoarseMap: MyCoarseMap2
+ mySaPFact2:
+ 'sa: eigenvalue estimate num iterations': 10
+ 'sa: damping factor': 1.33333e+00
+ factory: SaPFactory
+ P: myTentativePFact2
+ myTransferCoordinatesFact:
+ factory: CoordinatesTransferFactory
+ CoarseMap: MyCoarseMap2
+ Aggregates: UncoupledAggregationFact2
+ myTogglePFact:
+ factory: TogglePFactory
+ 'semicoarsen: number of levels': 2
+ TransferFactories:
+ P1: mySemiCoarsenPFact1
+ P2: mySaPFact2
+ Ptent1: mySemiCoarsenPFact1
+ Ptent2: myTentativePFact2
+ Nullspace1: mySemiCoarsenPFact1
+ Nullspace2: myTentativePFact2
+ myRestrictorFact:
+ factory: TransPFactory
+ P: myTogglePFact
+ myToggleTransferCoordinatesFact:
+ factory: ToggleCoordinatesTransferFactory
+ Chosen P: myTogglePFact
+ TransferFactories:
+ Coordinates1: mySemiCoarsenPFact1
+ Coordinates2: myTransferCoordinatesFact
+ myRAPFact:
+ factory: RAPFactory
+ P: myTogglePFact
+ R: myRestrictorFact
+ TransferFactories:
+ For Coordinates: myToggleTransferCoordinatesFact
+ myRepartitionHeuristicFact:
+ factory: RepartitionHeuristicFactory
+ A: myRAPFact
+ 'repartition: min rows per proc': 3000
+ 'repartition: max imbalance': 1.327e+00
+ 'repartition: start level': 1
+ myZoltanInterface:
+ factory: ZoltanInterface
+ A: myRAPFact
+ Coordinates: myToggleTransferCoordinatesFact
+ number of partitions: myRepartitionHeuristicFact
+ myRepartitionFact:
+ factory: RepartitionFactory
+ A: myRAPFact
+ Partition: myZoltanInterface
+ 'repartition: remap parts': true
+ number of partitions: myRepartitionHeuristicFact
+ myRebalanceProlongatorFact:
+ factory: RebalanceTransferFactory
+ type: Interpolation
+ P: myTogglePFact
+ Coordinates: myToggleTransferCoordinatesFact
+ Nullspace: myTogglePFact
+ myRebalanceRestrictionFact:
+ factory: RebalanceTransferFactory
+ type: Restriction
+ R: myRestrictorFact
+ myRebalanceAFact:
+ factory: RebalanceAcFactory
+ A: myRAPFact
+ TransferFactories: { }
+ mySmoother1:
+ factory: TrilinosSmoother
+ type: LINESMOOTHING_BANDEDRELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother3:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother4:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': pre
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 4
+ 'relaxation: damping factor': 1.0
+ Hierarchy:
+ max levels: 7
+ 'coarse: max size': 2000
+ verbosity: None
+ Finest:
+ Smoother: mySmoother1
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+ All:
+ startLevel: 1
+ Smoother: mySmoother4
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+
diff --git a/components/mpas-albany-landice/bld/namelist_files/albany_input.ais_8to30km.yaml b/components/mpas-albany-landice/bld/namelist_files/albany_input.ais_8to30km.yaml
new file mode 100644
index 00000000000..c3bc0cf8bd5
--- /dev/null
+++ b/components/mpas-albany-landice/bld/namelist_files/albany_input.ais_8to30km.yaml
@@ -0,0 +1,246 @@
+%YAML 1.1
+---
+ANONYMOUS:
+ Problem:
+ Basal Cubature Degree: 4
+ LandIce Field Norm:
+ sliding_velocity_basalside:
+ Regularization Type: Given Value
+ Regularization Value: 1.0e-4
+ LandIce BCs:
+ BC 0:
+ Basal Friction Coefficient:
+ Type: Power Law
+ Power Exponent: 0.2
+ Mu Type: Field
+ Effective Pressure Type: Constant
+ Effective Pressure: 1.0
+ # Zero Effective Pressure On Floating Ice At Nodes: true
+ Zero Beta On Floating Ice: true
+# Discretization Description
+ Discretization:
+ #Exodus Output File Name: albany_output.exo
+
+ Piro:
+# Nonlinear Solver Information
+ NOX:
+ Nonlinear Solver: Line Search Based
+ Line Search:
+ Full Step:
+ Full Step: 1.0e+00
+ Method: Backtrack
+ Solver Options:
+ Status Test Check Type: Minimal
+ Status Tests:
+ Test Type: Combo
+ Combo Type: OR
+ Number of Tests: 2
+ Test 0:
+ Test Type: Combo
+ Combo Type: AND
+ Number of Tests: 2
+ Test 0:
+ Test Type: NormF
+ Norm Type: Two Norm
+ Scale Type: Unscaled
+ Tolerance: 1.0e-03
+ Test 1:
+ Test Type: RelativeNormF
+ Norm Type: Two Norm
+ Tolerance: 0.9999
+ Test 1:
+ Test Type: MaxIters
+ Maximum Iterations: 100
+ Printing:
+ Output Precision: 3
+ Output Processor: 0
+ Output Information:
+ Error: true
+ Warning: true
+ Outer Iteration: true
+ Parameters: false
+ Details: false
+ Linear Solver Details: false
+ Stepper Iteration: true
+ Stepper Details: true
+ Stepper Parameters: true
+
+ Direction:
+ Method: Newton
+ Newton:
+ Forcing Term Method: Type 2
+ Rescue Bad Newton Solve: true
+ Linear Solver:
+ Write Linear System: false
+ Tolerance: 1.0e-8
+
+ Stratimikos Linear Solver:
+ Stratimikos:
+
+# Linear Solver Information
+ Linear Solver Type: Belos
+ Linear Solver Types:
+ Belos:
+ Solver Type: Block GMRES
+ Solver Types:
+ Block GMRES:
+ Output Frequency: 20
+ Output Style: 1
+ Verbosity: 33
+ Maximum Iterations: 200
+ Block Size: 1
+ Num Blocks: 200
+ Flexible Gmres: false
+ VerboseObject:
+ Output File: none
+ Verbosity Level: low
+
+# Preconditioner Information
+ Preconditioner Type: MueLu
+ Preconditioner Types:
+
+ Ifpack2:
+ Overlap: 1
+ Prec Type: ILUT
+
+ MueLu:
+ Matrix:
+ PDE equations: 2
+ Factories:
+ myLineDetectionFact:
+ factory: LineDetectionFactory
+ 'linedetection: orientation': coordinates
+ mySemiCoarsenPFact1:
+ factory: SemiCoarsenPFactory
+ 'semicoarsen: coarsen rate': 14
+ UncoupledAggregationFact2:
+ factory: UncoupledAggregationFactory
+ 'aggregation: ordering': graph
+ 'aggregation: max selected neighbors': 0
+ 'aggregation: min agg size': 3
+ 'aggregation: phase3 avoid singletons': true
+ MyCoarseMap2:
+ factory: CoarseMapFactory
+ Aggregates: UncoupledAggregationFact2
+ myTentativePFact2:
+ 'tentative: calculate qr': true
+ factory: TentativePFactory
+ Aggregates: UncoupledAggregationFact2
+ CoarseMap: MyCoarseMap2
+ mySaPFact2:
+ 'sa: eigenvalue estimate num iterations': 10
+ 'sa: damping factor': 1.33333e+00
+ factory: SaPFactory
+ P: myTentativePFact2
+ myTransferCoordinatesFact:
+ factory: CoordinatesTransferFactory
+ CoarseMap: MyCoarseMap2
+ Aggregates: UncoupledAggregationFact2
+ myTogglePFact:
+ factory: TogglePFactory
+ 'semicoarsen: number of levels': 2
+ TransferFactories:
+ P1: mySemiCoarsenPFact1
+ P2: mySaPFact2
+ Ptent1: mySemiCoarsenPFact1
+ Ptent2: myTentativePFact2
+ Nullspace1: mySemiCoarsenPFact1
+ Nullspace2: myTentativePFact2
+ myRestrictorFact:
+ factory: TransPFactory
+ P: myTogglePFact
+ myToggleTransferCoordinatesFact:
+ factory: ToggleCoordinatesTransferFactory
+ Chosen P: myTogglePFact
+ TransferFactories:
+ Coordinates1: mySemiCoarsenPFact1
+ Coordinates2: myTransferCoordinatesFact
+ myRAPFact:
+ factory: RAPFactory
+ P: myTogglePFact
+ R: myRestrictorFact
+ TransferFactories:
+ For Coordinates: myToggleTransferCoordinatesFact
+ myRepartitionHeuristicFact:
+ factory: RepartitionHeuristicFactory
+ A: myRAPFact
+ 'repartition: min rows per proc': 3000
+ 'repartition: max imbalance': 1.327e+00
+ 'repartition: start level': 1
+ myZoltanInterface:
+ factory: ZoltanInterface
+ A: myRAPFact
+ Coordinates: myToggleTransferCoordinatesFact
+ number of partitions: myRepartitionHeuristicFact
+ myRepartitionFact:
+ factory: RepartitionFactory
+ A: myRAPFact
+ Partition: myZoltanInterface
+ 'repartition: remap parts': true
+ number of partitions: myRepartitionHeuristicFact
+ myRebalanceProlongatorFact:
+ factory: RebalanceTransferFactory
+ type: Interpolation
+ P: myTogglePFact
+ Coordinates: myToggleTransferCoordinatesFact
+ Nullspace: myTogglePFact
+ myRebalanceRestrictionFact:
+ factory: RebalanceTransferFactory
+ type: Restriction
+ R: myRestrictorFact
+ myRebalanceAFact:
+ factory: RebalanceAcFactory
+ A: myRAPFact
+ TransferFactories: { }
+ mySmoother1:
+ factory: TrilinosSmoother
+ type: LINESMOOTHING_BANDEDRELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother3:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother4:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': pre
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 4
+ 'relaxation: damping factor': 1.0
+ Hierarchy:
+ max levels: 7
+ 'coarse: max size': 2000
+ verbosity: None
+ Finest:
+ Smoother: mySmoother1
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+ All:
+ startLevel: 1
+ Smoother: mySmoother4
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+
diff --git a/components/mpas-albany-landice/bld/namelist_files/albany_input.aisgis20km.yaml b/components/mpas-albany-landice/bld/namelist_files/albany_input.aisgis20km.yaml
new file mode 100644
index 00000000000..589e163bba7
--- /dev/null
+++ b/components/mpas-albany-landice/bld/namelist_files/albany_input.aisgis20km.yaml
@@ -0,0 +1,231 @@
+%YAML 1.1
+---
+ANONYMOUS:
+
+# Discretization Description
+ Discretization:
+ #Exodus Output File Name: albany_output.exo
+
+ Piro:
+# Nonlinear Solver Information
+ NOX:
+ Nonlinear Solver: Line Search Based
+ Line Search:
+ Full Step:
+ Full Step: 1.0e+00
+ Method: Backtrack
+ Solver Options:
+ Status Test Check Type: Minimal
+ Status Tests:
+ Test Type: Combo
+ Combo Type: OR
+ Number of Tests: 2
+ Test 0:
+ Test Type: Combo
+ Combo Type: AND
+ Number of Tests: 2
+ Test 0:
+ Test Type: NormF
+ Norm Type: Two Norm
+ Scale Type: Unscaled
+ Tolerance: 1.0e-03
+ Test 1:
+ Test Type: RelativeNormF
+ Norm Type: Two Norm
+ Tolerance: 0.9999
+ Test 1:
+ Test Type: MaxIters
+ Maximum Iterations: 100
+ Printing:
+ Output Precision: 3
+ Output Processor: 0
+ Output Information:
+ Error: true
+ Warning: true
+ Outer Iteration: true
+ Parameters: false
+ Details: false
+ Linear Solver Details: false
+ Stepper Iteration: true
+ Stepper Details: true
+ Stepper Parameters: true
+
+ Direction:
+ Method: Newton
+ Newton:
+ Forcing Term Method: Type 2
+ Rescue Bad Newton Solve: true
+ Linear Solver:
+ Write Linear System: false
+ Tolerance: 1.0e-8
+
+ Stratimikos Linear Solver:
+ Stratimikos:
+
+# Linear Solver Information
+ Linear Solver Type: Belos
+ Linear Solver Types:
+ Belos:
+ Solver Type: Block GMRES
+ Solver Types:
+ Block GMRES:
+ Output Frequency: 20
+ Output Style: 1
+ Verbosity: 33
+ Maximum Iterations: 200
+ Block Size: 1
+ Num Blocks: 200
+ Flexible Gmres: false
+ VerboseObject:
+ Output File: none
+ Verbosity Level: low
+
+# Preconditioner Information
+ Preconditioner Type: MueLu
+ Preconditioner Types:
+
+ Ifpack2:
+ Overlap: 1
+ Prec Type: ILUT
+
+ MueLu:
+ Matrix:
+ PDE equations: 2
+ Factories:
+ myLineDetectionFact:
+ factory: LineDetectionFactory
+ 'linedetection: orientation': coordinates
+ mySemiCoarsenPFact1:
+ factory: SemiCoarsenPFactory
+ 'semicoarsen: coarsen rate': 14
+ UncoupledAggregationFact2:
+ factory: UncoupledAggregationFactory
+ 'aggregation: ordering': graph
+ 'aggregation: max selected neighbors': 0
+ 'aggregation: min agg size': 3
+ 'aggregation: phase3 avoid singletons': true
+ MyCoarseMap2:
+ factory: CoarseMapFactory
+ Aggregates: UncoupledAggregationFact2
+ myTentativePFact2:
+ 'tentative: calculate qr': true
+ factory: TentativePFactory
+ Aggregates: UncoupledAggregationFact2
+ CoarseMap: MyCoarseMap2
+ mySaPFact2:
+ 'sa: eigenvalue estimate num iterations': 10
+ 'sa: damping factor': 1.33333e+00
+ factory: SaPFactory
+ P: myTentativePFact2
+ myTransferCoordinatesFact:
+ factory: CoordinatesTransferFactory
+ CoarseMap: MyCoarseMap2
+ Aggregates: UncoupledAggregationFact2
+ myTogglePFact:
+ factory: TogglePFactory
+ 'semicoarsen: number of levels': 2
+ TransferFactories:
+ P1: mySemiCoarsenPFact1
+ P2: mySaPFact2
+ Ptent1: mySemiCoarsenPFact1
+ Ptent2: myTentativePFact2
+ Nullspace1: mySemiCoarsenPFact1
+ Nullspace2: myTentativePFact2
+ myRestrictorFact:
+ factory: TransPFactory
+ P: myTogglePFact
+ myToggleTransferCoordinatesFact:
+ factory: ToggleCoordinatesTransferFactory
+ Chosen P: myTogglePFact
+ TransferFactories:
+ Coordinates1: mySemiCoarsenPFact1
+ Coordinates2: myTransferCoordinatesFact
+ myRAPFact:
+ factory: RAPFactory
+ P: myTogglePFact
+ R: myRestrictorFact
+ TransferFactories:
+ For Coordinates: myToggleTransferCoordinatesFact
+ myRepartitionHeuristicFact:
+ factory: RepartitionHeuristicFactory
+ A: myRAPFact
+ 'repartition: min rows per proc': 3000
+ 'repartition: max imbalance': 1.327e+00
+ 'repartition: start level': 1
+ myZoltanInterface:
+ factory: ZoltanInterface
+ A: myRAPFact
+ Coordinates: myToggleTransferCoordinatesFact
+ number of partitions: myRepartitionHeuristicFact
+ myRepartitionFact:
+ factory: RepartitionFactory
+ A: myRAPFact
+ Partition: myZoltanInterface
+ 'repartition: remap parts': true
+ number of partitions: myRepartitionHeuristicFact
+ myRebalanceProlongatorFact:
+ factory: RebalanceTransferFactory
+ type: Interpolation
+ P: myTogglePFact
+ Coordinates: myToggleTransferCoordinatesFact
+ Nullspace: myTogglePFact
+ myRebalanceRestrictionFact:
+ factory: RebalanceTransferFactory
+ type: Restriction
+ R: myRestrictorFact
+ myRebalanceAFact:
+ factory: RebalanceAcFactory
+ A: myRAPFact
+ TransferFactories: { }
+ mySmoother1:
+ factory: TrilinosSmoother
+ type: LINESMOOTHING_BANDEDRELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother3:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother4:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': pre
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 4
+ 'relaxation: damping factor': 1.0
+ Hierarchy:
+ max levels: 7
+ 'coarse: max size': 2000
+ verbosity: None
+ Finest:
+ Smoother: mySmoother1
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+ All:
+ startLevel: 1
+ Smoother: mySmoother4
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+
diff --git a/components/mpas-albany-landice/bld/namelist_files/albany_input.gis_1to10km_r01.yaml b/components/mpas-albany-landice/bld/namelist_files/albany_input.gis_1to10km_r01.yaml
new file mode 100644
index 00000000000..c1b2e310f32
--- /dev/null
+++ b/components/mpas-albany-landice/bld/namelist_files/albany_input.gis_1to10km_r01.yaml
@@ -0,0 +1,234 @@
+%YAML 1.1
+---
+ANONYMOUS:
+
+ Problem:
+ Depth Integrated Model: true
+
+# Discretization Description
+ Discretization:
+ #Exodus Output File Name: albany_output.exo
+
+ Piro:
+# Nonlinear Solver Information
+ NOX:
+ Nonlinear Solver: Line Search Based
+ Line Search:
+ Full Step:
+ Full Step: 1.0e+00
+ Method: Backtrack
+ Solver Options:
+ Status Test Check Type: Minimal
+ Status Tests:
+ Test Type: Combo
+ Combo Type: OR
+ Number of Tests: 2
+ Test 0:
+ Test Type: Combo
+ Combo Type: AND
+ Number of Tests: 2
+ Test 0:
+ Test Type: NormF
+ Norm Type: Two Norm
+ Scale Type: Unscaled
+ Tolerance: 1.0e-03
+ Test 1:
+ Test Type: RelativeNormF
+ Norm Type: Two Norm
+ Tolerance: 0.9999
+ Test 1:
+ Test Type: MaxIters
+ Maximum Iterations: 100
+ Printing:
+ Output Precision: 3
+ Output Processor: 0
+ Output Information:
+ Error: true
+ Warning: true
+ Outer Iteration: true
+ Parameters: false
+ Details: false
+ Linear Solver Details: false
+ Stepper Iteration: true
+ Stepper Details: true
+ Stepper Parameters: true
+
+ Direction:
+ Method: Newton
+ Newton:
+ Forcing Term Method: Type 2
+ Rescue Bad Newton Solve: true
+ Linear Solver:
+ Write Linear System: false
+ Tolerance: 1.0e-8
+
+ Stratimikos Linear Solver:
+ Stratimikos:
+
+# Linear Solver Information
+ Linear Solver Type: Belos
+ Linear Solver Types:
+ Belos:
+ Solver Type: Block GMRES
+ Solver Types:
+ Block GMRES:
+ Output Frequency: 20
+ Output Style: 1
+ Verbosity: 33
+ Maximum Iterations: 200
+ Block Size: 1
+ Num Blocks: 200
+ Flexible Gmres: false
+ VerboseObject:
+ Output File: none
+ Verbosity Level: low
+
+# Preconditioner Information
+ Preconditioner Type: MueLu
+ Preconditioner Types:
+
+ Ifpack2:
+ Overlap: 1
+ Prec Type: ILUT
+
+ MueLu:
+ Matrix:
+ PDE equations: 2
+ Factories:
+ myLineDetectionFact:
+ factory: LineDetectionFactory
+ 'linedetection: orientation': coordinates
+ mySemiCoarsenPFact1:
+ factory: SemiCoarsenPFactory
+ 'semicoarsen: coarsen rate': 14
+ UncoupledAggregationFact2:
+ factory: UncoupledAggregationFactory
+ 'aggregation: ordering': graph
+ 'aggregation: max selected neighbors': 0
+ 'aggregation: min agg size': 3
+ 'aggregation: phase3 avoid singletons': true
+ MyCoarseMap2:
+ factory: CoarseMapFactory
+ Aggregates: UncoupledAggregationFact2
+ myTentativePFact2:
+ 'tentative: calculate qr': true
+ factory: TentativePFactory
+ Aggregates: UncoupledAggregationFact2
+ CoarseMap: MyCoarseMap2
+ mySaPFact2:
+ 'sa: eigenvalue estimate num iterations': 10
+ 'sa: damping factor': 1.33333e+00
+ factory: SaPFactory
+ P: myTentativePFact2
+ myTransferCoordinatesFact:
+ factory: CoordinatesTransferFactory
+ CoarseMap: MyCoarseMap2
+ Aggregates: UncoupledAggregationFact2
+ myTogglePFact:
+ factory: TogglePFactory
+ 'semicoarsen: number of levels': 2
+ TransferFactories:
+ P1: mySemiCoarsenPFact1
+ P2: mySaPFact2
+ Ptent1: mySemiCoarsenPFact1
+ Ptent2: myTentativePFact2
+ Nullspace1: mySemiCoarsenPFact1
+ Nullspace2: myTentativePFact2
+ myRestrictorFact:
+ factory: TransPFactory
+ P: myTogglePFact
+ myToggleTransferCoordinatesFact:
+ factory: ToggleCoordinatesTransferFactory
+ Chosen P: myTogglePFact
+ TransferFactories:
+ Coordinates1: mySemiCoarsenPFact1
+ Coordinates2: myTransferCoordinatesFact
+ myRAPFact:
+ factory: RAPFactory
+ P: myTogglePFact
+ R: myRestrictorFact
+ TransferFactories:
+ For Coordinates: myToggleTransferCoordinatesFact
+ myRepartitionHeuristicFact:
+ factory: RepartitionHeuristicFactory
+ A: myRAPFact
+ 'repartition: min rows per proc': 3000
+ 'repartition: max imbalance': 1.327e+00
+ 'repartition: start level': 1
+ myZoltanInterface:
+ factory: ZoltanInterface
+ A: myRAPFact
+ Coordinates: myToggleTransferCoordinatesFact
+ number of partitions: myRepartitionHeuristicFact
+ myRepartitionFact:
+ factory: RepartitionFactory
+ A: myRAPFact
+ Partition: myZoltanInterface
+ 'repartition: remap parts': true
+ number of partitions: myRepartitionHeuristicFact
+ myRebalanceProlongatorFact:
+ factory: RebalanceTransferFactory
+ type: Interpolation
+ P: myTogglePFact
+ Coordinates: myToggleTransferCoordinatesFact
+ Nullspace: myTogglePFact
+ myRebalanceRestrictionFact:
+ factory: RebalanceTransferFactory
+ type: Restriction
+ R: myRestrictorFact
+ myRebalanceAFact:
+ factory: RebalanceAcFactory
+ A: myRAPFact
+ TransferFactories: { }
+ mySmoother1:
+ factory: TrilinosSmoother
+ type: LINESMOOTHING_BANDEDRELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother3:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother4:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': pre
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 4
+ 'relaxation: damping factor': 1.0
+ Hierarchy:
+ max levels: 7
+ 'coarse: max size': 2000
+ verbosity: None
+ Finest:
+ Smoother: mySmoother1
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+ All:
+ startLevel: 1
+ Smoother: mySmoother4
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+
diff --git a/components/mpas-albany-landice/bld/namelist_files/albany_input.yaml b/components/mpas-albany-landice/bld/namelist_files/albany_input.gis_1to10km_r02.yaml
similarity index 81%
rename from components/mpas-albany-landice/bld/namelist_files/albany_input.yaml
rename to components/mpas-albany-landice/bld/namelist_files/albany_input.gis_1to10km_r02.yaml
index 8b770a290ae..45539411756 100644
--- a/components/mpas-albany-landice/bld/namelist_files/albany_input.yaml
+++ b/components/mpas-albany-landice/bld/namelist_files/albany_input.gis_1to10km_r02.yaml
@@ -1,7 +1,9 @@
%YAML 1.1
---
ANONYMOUS:
+
Problem:
+ Depth Integrated Model: true
Basal Cubature Degree: 4
LandIce Field Norm:
sliding_velocity_basalside:
@@ -12,35 +14,34 @@ ANONYMOUS:
Basal Friction Coefficient:
Type: Power Law
Power Exponent: 1.0
- Mu Type: Field
+ Mu Type: Field
Effective Pressure Type: Hydrostatic Computed At Nodes
Zero Effective Pressure On Floating Ice At Nodes: true
Zero Beta On Floating Ice: false
Use Pressurized Bed Above Sea Level: false
-
# Discretization Description
Discretization:
#Exodus Output File Name: albany_output.exo
-
- Piro:
+
+ Piro:
# Nonlinear Solver Information
- NOX:
+ NOX:
Nonlinear Solver: Line Search Based
- Line Search:
- Full Step:
+ Line Search:
+ Full Step:
Full Step: 1.0e+00
Method: Backtrack
- Solver Options:
+ Solver Options:
Status Test Check Type: Minimal
- Status Tests:
+ Status Tests:
Test Type: Combo
Combo Type: OR
Number of Tests: 2
- Test 0:
+ Test 0:
Test Type: Combo
Combo Type: AND
Number of Tests: 2
- Test 0:
+ Test 0:
Test Type: NormF
Norm Type: Two Norm
Scale Type: Unscaled
@@ -49,13 +50,13 @@ ANONYMOUS:
Test Type: RelativeNormF
Norm Type: Two Norm
Tolerance: 0.9999
- Test 1:
+ Test 1:
Test Type: MaxIters
Maximum Iterations: 100
- Printing:
+ Printing:
Output Precision: 3
Output Processor: 0
- Output Information:
+ Output Information:
Error: true
Warning: true
Outer Iteration: true
@@ -66,21 +67,21 @@ ANONYMOUS:
Stepper Details: true
Stepper Parameters: true
- Direction:
+ Direction:
Method: Newton
- Newton:
- Forcing Term Method: Type 2
+ Newton:
+ Forcing Term Method: Type 2
Rescue Bad Newton Solve: true
Linear Solver:
Write Linear System: false
Tolerance: 1.0e-8
-
- Stratimikos Linear Solver:
+
+ Stratimikos Linear Solver:
Stratimikos:
-
+
# Linear Solver Information
Linear Solver Type: Belos
- Linear Solver Types:
+ Linear Solver Types:
Belos:
Solver Type: Block GMRES
Solver Types:
@@ -95,133 +96,133 @@ ANONYMOUS:
VerboseObject:
Output File: none
Verbosity Level: low
-
+
# Preconditioner Information
Preconditioner Type: MueLu
- Preconditioner Types:
-
- Ifpack2:
+ Preconditioner Types:
+
+ Ifpack2:
Overlap: 1
- Prec Type: ILUT
-
- MueLu:
- Matrix:
+ Prec Type: ILUT
+
+ MueLu:
+ Matrix:
PDE equations: 2
- Factories:
- myLineDetectionFact:
+ Factories:
+ myLineDetectionFact:
factory: LineDetectionFactory
'linedetection: orientation': coordinates
- mySemiCoarsenPFact1:
+ mySemiCoarsenPFact1:
factory: SemiCoarsenPFactory
'semicoarsen: coarsen rate': 14
- UncoupledAggregationFact2:
+ UncoupledAggregationFact2:
factory: UncoupledAggregationFactory
'aggregation: ordering': graph
'aggregation: max selected neighbors': 0
'aggregation: min agg size': 3
'aggregation: phase3 avoid singletons': true
- MyCoarseMap2:
+ MyCoarseMap2:
factory: CoarseMapFactory
Aggregates: UncoupledAggregationFact2
- myTentativePFact2:
+ myTentativePFact2:
'tentative: calculate qr': true
factory: TentativePFactory
Aggregates: UncoupledAggregationFact2
CoarseMap: MyCoarseMap2
- mySaPFact2:
+ mySaPFact2:
'sa: eigenvalue estimate num iterations': 10
'sa: damping factor': 1.33333e+00
factory: SaPFactory
P: myTentativePFact2
- myTransferCoordinatesFact:
+ myTransferCoordinatesFact:
factory: CoordinatesTransferFactory
CoarseMap: MyCoarseMap2
Aggregates: UncoupledAggregationFact2
- myTogglePFact:
+ myTogglePFact:
factory: TogglePFactory
'semicoarsen: number of levels': 2
- TransferFactories:
+ TransferFactories:
P1: mySemiCoarsenPFact1
P2: mySaPFact2
Ptent1: mySemiCoarsenPFact1
Ptent2: myTentativePFact2
Nullspace1: mySemiCoarsenPFact1
Nullspace2: myTentativePFact2
- myRestrictorFact:
+ myRestrictorFact:
factory: TransPFactory
P: myTogglePFact
- myToggleTransferCoordinatesFact:
+ myToggleTransferCoordinatesFact:
factory: ToggleCoordinatesTransferFactory
Chosen P: myTogglePFact
- TransferFactories:
+ TransferFactories:
Coordinates1: mySemiCoarsenPFact1
Coordinates2: myTransferCoordinatesFact
- myRAPFact:
+ myRAPFact:
factory: RAPFactory
P: myTogglePFact
R: myRestrictorFact
- TransferFactories:
+ TransferFactories:
For Coordinates: myToggleTransferCoordinatesFact
- myRepartitionHeuristicFact:
+ myRepartitionHeuristicFact:
factory: RepartitionHeuristicFactory
A: myRAPFact
'repartition: min rows per proc': 3000
'repartition: max imbalance': 1.327e+00
'repartition: start level': 1
- myZoltanInterface:
+ myZoltanInterface:
factory: ZoltanInterface
A: myRAPFact
Coordinates: myToggleTransferCoordinatesFact
number of partitions: myRepartitionHeuristicFact
- myRepartitionFact:
+ myRepartitionFact:
factory: RepartitionFactory
A: myRAPFact
Partition: myZoltanInterface
'repartition: remap parts': true
number of partitions: myRepartitionHeuristicFact
- myRebalanceProlongatorFact:
+ myRebalanceProlongatorFact:
factory: RebalanceTransferFactory
type: Interpolation
P: myTogglePFact
Coordinates: myToggleTransferCoordinatesFact
Nullspace: myTogglePFact
- myRebalanceRestrictionFact:
+ myRebalanceRestrictionFact:
factory: RebalanceTransferFactory
type: Restriction
R: myRestrictorFact
- myRebalanceAFact:
+ myRebalanceAFact:
factory: RebalanceAcFactory
A: myRAPFact
TransferFactories: { }
- mySmoother1:
+ mySmoother1:
factory: TrilinosSmoother
type: LINESMOOTHING_BANDEDRELAXATION
'smoother: pre or post': both
- ParameterList:
+ ParameterList:
'relaxation: type': Gauss-Seidel
'relaxation: sweeps': 1
'relaxation: damping factor': 1.0
- mySmoother3:
+ mySmoother3:
factory: TrilinosSmoother
type: RELAXATION
'smoother: pre or post': both
- ParameterList:
+ ParameterList:
'relaxation: type': Gauss-Seidel
'relaxation: sweeps': 1
'relaxation: damping factor': 1.0
- mySmoother4:
+ mySmoother4:
factory: TrilinosSmoother
type: RELAXATION
'smoother: pre or post': pre
- ParameterList:
+ ParameterList:
'relaxation: type': Gauss-Seidel
'relaxation: sweeps': 4
'relaxation: damping factor': 1.0
- Hierarchy:
+ Hierarchy:
max levels: 7
'coarse: max size': 2000
verbosity: None
- Finest:
+ Finest:
Smoother: mySmoother1
CoarseSolver: mySmoother4
P: myRebalanceProlongatorFact
@@ -232,7 +233,7 @@ ANONYMOUS:
A: myRebalanceAFact
Coordinates: myRebalanceProlongatorFact
Importer: myRepartitionFact
- All:
+ All:
startLevel: 1
Smoother: mySmoother4
CoarseSolver: mySmoother4
@@ -244,4 +245,3 @@ ANONYMOUS:
A: myRebalanceAFact
Coordinates: myRebalanceProlongatorFact
Importer: myRepartitionFact
-
diff --git a/components/mpas-albany-landice/bld/namelist_files/albany_input.gis_20km_r01.yaml b/components/mpas-albany-landice/bld/namelist_files/albany_input.gis_20km_r01.yaml
new file mode 100644
index 00000000000..589e163bba7
--- /dev/null
+++ b/components/mpas-albany-landice/bld/namelist_files/albany_input.gis_20km_r01.yaml
@@ -0,0 +1,231 @@
+%YAML 1.1
+---
+ANONYMOUS:
+
+# Discretization Description
+ Discretization:
+ #Exodus Output File Name: albany_output.exo
+
+ Piro:
+# Nonlinear Solver Information
+ NOX:
+ Nonlinear Solver: Line Search Based
+ Line Search:
+ Full Step:
+ Full Step: 1.0e+00
+ Method: Backtrack
+ Solver Options:
+ Status Test Check Type: Minimal
+ Status Tests:
+ Test Type: Combo
+ Combo Type: OR
+ Number of Tests: 2
+ Test 0:
+ Test Type: Combo
+ Combo Type: AND
+ Number of Tests: 2
+ Test 0:
+ Test Type: NormF
+ Norm Type: Two Norm
+ Scale Type: Unscaled
+ Tolerance: 1.0e-03
+ Test 1:
+ Test Type: RelativeNormF
+ Norm Type: Two Norm
+ Tolerance: 0.9999
+ Test 1:
+ Test Type: MaxIters
+ Maximum Iterations: 100
+ Printing:
+ Output Precision: 3
+ Output Processor: 0
+ Output Information:
+ Error: true
+ Warning: true
+ Outer Iteration: true
+ Parameters: false
+ Details: false
+ Linear Solver Details: false
+ Stepper Iteration: true
+ Stepper Details: true
+ Stepper Parameters: true
+
+ Direction:
+ Method: Newton
+ Newton:
+ Forcing Term Method: Type 2
+ Rescue Bad Newton Solve: true
+ Linear Solver:
+ Write Linear System: false
+ Tolerance: 1.0e-8
+
+ Stratimikos Linear Solver:
+ Stratimikos:
+
+# Linear Solver Information
+ Linear Solver Type: Belos
+ Linear Solver Types:
+ Belos:
+ Solver Type: Block GMRES
+ Solver Types:
+ Block GMRES:
+ Output Frequency: 20
+ Output Style: 1
+ Verbosity: 33
+ Maximum Iterations: 200
+ Block Size: 1
+ Num Blocks: 200
+ Flexible Gmres: false
+ VerboseObject:
+ Output File: none
+ Verbosity Level: low
+
+# Preconditioner Information
+ Preconditioner Type: MueLu
+ Preconditioner Types:
+
+ Ifpack2:
+ Overlap: 1
+ Prec Type: ILUT
+
+ MueLu:
+ Matrix:
+ PDE equations: 2
+ Factories:
+ myLineDetectionFact:
+ factory: LineDetectionFactory
+ 'linedetection: orientation': coordinates
+ mySemiCoarsenPFact1:
+ factory: SemiCoarsenPFactory
+ 'semicoarsen: coarsen rate': 14
+ UncoupledAggregationFact2:
+ factory: UncoupledAggregationFactory
+ 'aggregation: ordering': graph
+ 'aggregation: max selected neighbors': 0
+ 'aggregation: min agg size': 3
+ 'aggregation: phase3 avoid singletons': true
+ MyCoarseMap2:
+ factory: CoarseMapFactory
+ Aggregates: UncoupledAggregationFact2
+ myTentativePFact2:
+ 'tentative: calculate qr': true
+ factory: TentativePFactory
+ Aggregates: UncoupledAggregationFact2
+ CoarseMap: MyCoarseMap2
+ mySaPFact2:
+ 'sa: eigenvalue estimate num iterations': 10
+ 'sa: damping factor': 1.33333e+00
+ factory: SaPFactory
+ P: myTentativePFact2
+ myTransferCoordinatesFact:
+ factory: CoordinatesTransferFactory
+ CoarseMap: MyCoarseMap2
+ Aggregates: UncoupledAggregationFact2
+ myTogglePFact:
+ factory: TogglePFactory
+ 'semicoarsen: number of levels': 2
+ TransferFactories:
+ P1: mySemiCoarsenPFact1
+ P2: mySaPFact2
+ Ptent1: mySemiCoarsenPFact1
+ Ptent2: myTentativePFact2
+ Nullspace1: mySemiCoarsenPFact1
+ Nullspace2: myTentativePFact2
+ myRestrictorFact:
+ factory: TransPFactory
+ P: myTogglePFact
+ myToggleTransferCoordinatesFact:
+ factory: ToggleCoordinatesTransferFactory
+ Chosen P: myTogglePFact
+ TransferFactories:
+ Coordinates1: mySemiCoarsenPFact1
+ Coordinates2: myTransferCoordinatesFact
+ myRAPFact:
+ factory: RAPFactory
+ P: myTogglePFact
+ R: myRestrictorFact
+ TransferFactories:
+ For Coordinates: myToggleTransferCoordinatesFact
+ myRepartitionHeuristicFact:
+ factory: RepartitionHeuristicFactory
+ A: myRAPFact
+ 'repartition: min rows per proc': 3000
+ 'repartition: max imbalance': 1.327e+00
+ 'repartition: start level': 1
+ myZoltanInterface:
+ factory: ZoltanInterface
+ A: myRAPFact
+ Coordinates: myToggleTransferCoordinatesFact
+ number of partitions: myRepartitionHeuristicFact
+ myRepartitionFact:
+ factory: RepartitionFactory
+ A: myRAPFact
+ Partition: myZoltanInterface
+ 'repartition: remap parts': true
+ number of partitions: myRepartitionHeuristicFact
+ myRebalanceProlongatorFact:
+ factory: RebalanceTransferFactory
+ type: Interpolation
+ P: myTogglePFact
+ Coordinates: myToggleTransferCoordinatesFact
+ Nullspace: myTogglePFact
+ myRebalanceRestrictionFact:
+ factory: RebalanceTransferFactory
+ type: Restriction
+ R: myRestrictorFact
+ myRebalanceAFact:
+ factory: RebalanceAcFactory
+ A: myRAPFact
+ TransferFactories: { }
+ mySmoother1:
+ factory: TrilinosSmoother
+ type: LINESMOOTHING_BANDEDRELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother3:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': both
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 1
+ 'relaxation: damping factor': 1.0
+ mySmoother4:
+ factory: TrilinosSmoother
+ type: RELAXATION
+ 'smoother: pre or post': pre
+ ParameterList:
+ 'relaxation: type': Gauss-Seidel
+ 'relaxation: sweeps': 4
+ 'relaxation: damping factor': 1.0
+ Hierarchy:
+ max levels: 7
+ 'coarse: max size': 2000
+ verbosity: None
+ Finest:
+ Smoother: mySmoother1
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+ All:
+ startLevel: 1
+ Smoother: mySmoother4
+ CoarseSolver: mySmoother4
+ P: myRebalanceProlongatorFact
+ Nullspace: myRebalanceProlongatorFact
+ CoarseNumZLayers: myLineDetectionFact
+ LineDetection_Layers: myLineDetectionFact
+ LineDetection_VertLineIds: myLineDetectionFact
+ A: myRebalanceAFact
+ Coordinates: myRebalanceProlongatorFact
+ Importer: myRepartitionFact
+
diff --git a/components/mpas-albany-landice/bld/namelist_files/namelist_defaults_mali.xml b/components/mpas-albany-landice/bld/namelist_files/namelist_defaults_mali.xml
index 535fdbdc4d4..0450eb44f11 100644
--- a/components/mpas-albany-landice/bld/namelist_files/namelist_defaults_mali.xml
+++ b/components/mpas-albany-landice/bld/namelist_files/namelist_defaults_mali.xml
@@ -44,8 +44,8 @@
0.0
.true.
.true.
-.false.
-.false.
+.true.
+.true.
100.0
1.0e6
1.0e6
@@ -67,7 +67,7 @@
.false.
-'none'
+'temperature'
.true.
'file'
0.0
diff --git a/components/mpas-albany-landice/cime_config/buildnml b/components/mpas-albany-landice/cime_config/buildnml
index 4d927c4370f..9489b6dfa8f 100755
--- a/components/mpas-albany-landice/cime_config/buildnml
+++ b/components/mpas-albany-landice/cime_config/buildnml
@@ -229,25 +229,33 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
-# lines.append(' ')
-# lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
- lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
lines.append('')
lines.append('')
lines.append('')
@@ -263,22 +271,16 @@ def buildnml(case, caseroot, compname):
lines.append(' filename_interval="0001-00-00_00:00:00"')
lines.append(' clobber_mode="truncate"')
lines.append(' packages="globalStatsAMPKG"')
- lines.append(' output_interval="0000_01:00:00">')
+ lines.append(' output_interval="0000_00:00:01">')
lines.append('')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
+ lines.append(' ')
lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
lines.append('')
lines.append('')
lines.append('
.false.
@@ -1112,6 +1120,7 @@
.false.
+.true.
'0000-00-00_01:00:00'
'eddyProductVariablesOutput'
.true.
diff --git a/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml b/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml
index 6ebd149d17a..bea1e98d9de 100644
--- a/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml
+++ b/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml
@@ -1188,6 +1188,70 @@ Valid values: Any positive real number.
Default: Defined in namelist_defaults.xml
+
+Selects the mode in which subglacial runoff fluxes are implemented.
+
+Valid values: 'off', 'data'
+Default: Defined in namelist_defaults.xml
+
+
+
+The length scale of exponential decay of subglacial runoff, used when config_sgr_flux_vertical_location is 'top' or 'bottom'. Fluxes are multiplied by $e^{z/\gamma}$, where this coefficient is $\gamma$.
+
+Valid values: Any positive real number.
+Default: Defined in namelist_defaults.xml
+
+
+
+Selects the vertical location where subglacial runoff is fluxed.
+
+Valid values: 'top','uniform', 'bottom'
+Default: Defined in namelist_defaults.xml
+
+
+
+If true, include subglacial runoff (sgr) contribution in kpp calculation.
+
+Valid values: .true. or .false.
+Default: Defined in namelist_defaults.xml
+
+
+
+If true, subglacial runoff temperature is set to config_sgr_temperature_prescribed. If false, the temperature is set to local freezing point.
+
+Valid values: .true. or .false.
+Default: Defined in namelist_defaults.xml
+
+
+
+If true, subglacial runoff salinity is set to config_sgr_salinity_prescribed. If false, the salinity is set to 0 PSU.
+
+Valid values: .true. or .false.
+Default: Defined in namelist_defaults.xml
+
+
+
+Prescribed subglacial runoff temperature value, applied when config_use_sgr_opt_temp_prescribed = .true.
+
+Valid values: Any real number.
+Default: Defined in namelist_defaults.xml
+
+
+
+Prescribed subglacial runoff salinity value, applied when config_use_sgr_opt_salt_prescribed = .true.
+
+Valid values: Any positive real number
+Default: Defined in namelist_defaults.xml
+
+
diff --git a/components/mpas-ocean/cime_config/buildnml b/components/mpas-ocean/cime_config/buildnml
index 4c7ed2c0a31..8f5193c334b 100755
--- a/components/mpas-ocean/cime_config/buildnml
+++ b/components/mpas-ocean/cime_config/buildnml
@@ -35,6 +35,7 @@ def buildnml(case, caseroot, compname):
ocn_forcing = case.get_value("MPASO_FORCING")
ocn_iceberg = case.get_value("MPASO_ICEBERG")
ocn_ismf = case.get_value("MPASO_ISMF")
+ ocn_sgr = case.get_value("MPASO_SGR")
ocn_bgc = case.get_value("MPASO_BGC")
ocn_wave = case.get_value("MPASO_WAVE")
ocn_tidal_mixing = case.get_value("MPASO_TIDAL_MIXING")
@@ -76,6 +77,7 @@ def buildnml(case, caseroot, compname):
analysis_mask_file = ''
eco_forcing_file = ''
u_tidal_rms_file = ''
+ data_sgr_file = ''
if ocn_grid == 'oEC60to30v3':
decomp_date = '230424'
@@ -140,6 +142,8 @@ def buildnml(case, caseroot, compname):
data_ismf_file = 'prescribed_ismf_paolo2023.oQU240wLI.20240404.nc'
if ocn_tidal_mixing == 'true':
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.oQU240wLI.20240221.nc'
+ if ocn_sgr == 'data':
+ data_sgr_file = 'DSGR.massFlux.MALI.out2055.oQU240wLI.20240328.nc'
elif ocn_grid == 'oQU120':
decomp_date = '230424'
@@ -277,6 +281,8 @@ def buildnml(case, caseroot, compname):
data_ismf_file = 'prescribed_ismf_adusumilli2020.SOwISC12to60E2r4.230516.nc'
if ocn_tidal_mixing == 'true':
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.SOwISC12to60E2r4.20210114.nc'
+ if ocn_sgr == 'data':
+ data_sgr_file = 'DSGR.massFlux.MALI.out2055.SOwISC12to60E2r4.20240328.nc'
elif ocn_grid == 'FRISwISC08to60E3r1':
decomp_date = '20230913' # changed to date of partiotions in ../files_for_e3sm/assembled_files/inputdata/ocn/mpas-o/FRISwISC08to60E3r1/partitions
@@ -352,6 +358,8 @@ def buildnml(case, caseroot, compname):
data_ismf_file = 'prescribed_ismf_adusumilli2020.ECwISC30to60E2r1.230429.nc'
if ocn_tidal_mixing == 'true':
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.ECwISC30to60E2r1.20240221.nc'
+ if ocn_sgr == 'data':
+ data_sgr_file = 'DSGR.massFlux.MALI.out2055.ECwISC30to60E2r1.20240328.nc'
elif ocn_grid == 'IcoswISC30E3r5':
decomp_date = '20231120'
@@ -371,6 +379,8 @@ def buildnml(case, caseroot, compname):
data_ismf_file = 'prescribed_ismf_paolo2023.IcoswISC30E3r5.20240227.nc'
if ocn_tidal_mixing == 'true':
u_tidal_rms_file = 'velocityTidalRMS_CATS2008.IcoswISC30E3r5.20231120.nc'
+ if ocn_sgr == 'data':
+ data_sgr_file = 'DSGR.massFlux.MALI.out2055.IcoswISC30E3r5.20240328.nc'
elif ocn_grid == 'IcosXISC30E3r7':
decomp_date = '20240314'
@@ -396,7 +406,6 @@ def buildnml(case, caseroot, compname):
if ocn_ismf == 'data':
data_ismf_file = 'prescribed_ismf_paolo2023.RRSwISC6to18E3r5.20240327.nc'
-
#--------------------------------------------------------------------
# Set OCN_FORCING = datm_forced_restoring if restoring file is available
#--------------------------------------------------------------------
@@ -436,6 +445,9 @@ def buildnml(case, caseroot, compname):
if u_tidal_rms_file != '':
input_list.write("u_tidal_rms = {}/ocn/mpas-o/{}/{}\n".format(din_loc_root, ocn_mask, u_tidal_rms_file))
+ if data_sgr_file != '':
+ input_list.write("subglacial_runoff = {}/ocn/mpas-o/{}/{}\n".format(din_loc_root, ocn_mask, data_sgr_file))
+
#--------------------------------------------------------------------
# Invoke mpas build-namelist - output will go in $CASEBUILD/mpasoconf
#--------------------------------------------------------------------
@@ -495,6 +507,7 @@ def buildnml(case, caseroot, compname):
sysmod += " -ocn_forcing '{}'".format(ocn_forcing)
sysmod += " -ocn_iceberg '{}'".format(ocn_iceberg)
sysmod += " -ocn_ismf '{}'".format(ocn_ismf)
+ sysmod += " -ocn_sgr '{}'".format(ocn_sgr)
sysmod += " -ocn_bgc '{}'".format(ocn_bgc)
sysmod += " -ocn_wave '{}'".format(ocn_wave)
sysmod += " -ocn_tidal_mixing '{}'".format(ocn_tidal_mixing)
@@ -702,6 +715,19 @@ def buildnml(case, caseroot, compname):
lines.append('')
lines.append('')
+ if data_sgr_file != '':
+ lines.append('')
+ lines.append('')
+ lines.append(' ')
+ lines.append('')
+ lines.append('')
+
if analysis_mask_file != '':
lines.append('')
lines.append('')
lines.append('')
+ lines.append('')
lines.append('')
lines.append('')
lines.append('')
lines.append('')
lines.append('')
lines.append('')
+ lines.append('')
lines.append('')
lines.append('')
lines.append('')
@@ -1183,6 +1211,7 @@ def buildnml(case, caseroot, compname):
lines.append('')
lines.append('')
lines.append('')
+ lines.append('')
lines.append('')
lines.append('')
lines.append('')
@@ -1331,6 +1360,7 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
@@ -1533,6 +1563,7 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
@@ -1598,6 +1629,7 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
@@ -1812,6 +1844,7 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
lines.append(' ')
lines.append(' ')
lines.append(' ')
diff --git a/components/mpas-ocean/cime_config/config_component.xml b/components/mpas-ocean/cime_config/config_component.xml
index e95b63682d9..83b4501ee5e 100644
--- a/components/mpas-ocean/cime_config/config_component.xml
+++ b/components/mpas-ocean/cime_config/config_component.xml
@@ -39,6 +39,19 @@
Option to describe the MPASO prescribed tidal mixing
+
+ char
+ none,data
+ none
+
+ none
+ data
+
+ case_comp
+ env_case.xml
+ Option to describe how MPASO will handle subglacial runoff fluxes
+
+
char
false,true
diff --git a/components/mpas-ocean/cime_config/config_compsets.xml b/components/mpas-ocean/cime_config/config_compsets.xml
index 448aa7a82b5..be36f010347 100644
--- a/components/mpas-ocean/cime_config/config_compsets.xml
+++ b/components/mpas-ocean/cime_config/config_compsets.xml
@@ -37,6 +37,11 @@
2000_DATM%NYF_SLND_MPASSI_MPASO%PISMFDATMFORCED_DROF%NYFAIS45_SGLC_SWAV
+
+ GMPAS-NYF-PISMF-DSGR
+ 2000_DATM%NYF_SLND_MPASSI_MPASO%PISMFDATMFORCEDDSGR_DROF%NYFAIS45_SGLC_SWAV
+
+
GMPAS-NYF-DISMF
2000_DATM%NYF_SLND_MPASSI_MPASO%DISMFDATMFORCED_DROF%NYFAIS45_SGLC_SWAV
@@ -87,6 +92,16 @@
2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCED_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV
+
+ GMPAS-JRA1p5-DIB-PISMF-DSGR
+ 2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCEDDSGR_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV
+
+
+
+ GMPAS-JRA1p5-DIB-PISMF-DSGR-TMIX
+ 2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBPISMFDATMFORCEDDSGRTMIX_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV
+
+
GMPAS-JRA1p5-DIB-DISMF
2000_DATM%JRA-1p5_SLND_MPASSI%DIB_MPASO%IBDISMFDATMFORCED_DROF%JRA-1p5-AIS0ROF_SGLC_SWAV
diff --git a/components/mpas-ocean/src/Registry.xml b/components/mpas-ocean/src/Registry.xml
index be50e9ccd9e..2a21e22f40d 100644
--- a/components/mpas-ocean/src/Registry.xml
+++ b/components/mpas-ocean/src/Registry.xml
@@ -702,6 +702,39 @@
description="The length scale of exponential decay of river runoff. Fluxes are multiplied by $e^{z/\gamma}$, where this coefficient is $\gamma$."
possible_values="Any positive real number."
/>
+
+
+
+
+
+
+
+
+
+
@@ -2233,6 +2267,7 @@
+
@@ -3351,6 +3386,10 @@
+
+
+
@@ -3764,6 +3811,10 @@
description="Fresh water flux from river runoff at cell centers from coupler. Positive into the ocean."
packages="thicknessBulkPKG"
/>
+
+
@@ -145,6 +149,10 @@
description="Fresh water flux from river runoff from coupler. Positive into the ocean."
packages="thicknessBulkPKG"
/>
+
@@ -194,6 +202,11 @@
+
+
+
+
@@ -302,6 +317,7 @@
+
@@ -343,12 +359,14 @@
+
+
@@ -358,6 +376,7 @@
+
diff --git a/components/mpas-ocean/src/analysis_members/mpas_ocn_conservation_check.F b/components/mpas-ocean/src/analysis_members/mpas_ocn_conservation_check.F
index bdd07e799b5..beed937d676 100644
--- a/components/mpas-ocean/src/analysis_members/mpas_ocn_conservation_check.F
+++ b/components/mpas-ocean/src/analysis_members/mpas_ocn_conservation_check.F
@@ -28,6 +28,7 @@ module ocn_conservation_check
use ocn_constants
use ocn_config
+ use ocn_mesh
implicit none
private
@@ -427,6 +428,7 @@ subroutine energy_conservation(domain, err)
accumulatedEvapTemperatureFlux, &
accumulatedSeaIceTemperatureFlux, &
accumulatedRiverRunoffTemperatureFlux, &
+ accumulatedSubglacialRunoffTemperatureFlux, &
accumulatedIcebergTemperatureFlux
real(kind=RKIND), dimension(:), allocatable :: &
@@ -463,7 +465,8 @@ subroutine energy_conservation(domain, err)
real(kind=RKIND), dimension(:,:), pointer :: &
- activeTracersSurfaceFluxRunoff
+ activeTracersSurfaceFluxRunoff, &
+ activeTracersSurfaceFluxSubglacialRunoff
type (MPAS_timeInterval_type) :: &
timeStepESMF
@@ -480,7 +483,7 @@ subroutine energy_conservation(domain, err)
ierr
integer, parameter :: &
- nSums = 19
+ nSums = 20
character(len=160) :: &
m
@@ -513,6 +516,7 @@ subroutine energy_conservation(domain, err)
call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedEvapTemperatureFlux", accumulatedEvapTemperatureFlux)
call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedSeaIceTemperatureFlux", accumulatedSeaIceTemperatureFlux)
call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedRiverRunoffTemperatureFlux", accumulatedRiverRunoffTemperatureFlux)
+ call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedSubglacialRunoffTemperatureFlux", accumulatedSubglacialRunoffTemperatureFlux)
call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedIcebergTemperatureFlux", accumulatedIcebergTemperatureFlux)
!-------------------------------------------------------------
@@ -556,6 +560,7 @@ subroutine energy_conservation(domain, err)
call mpas_pool_get_subpool(forcingPool, 'tracersSurfaceFlux',tracersSurfaceFluxPool)
call mpas_pool_get_dimension(tracersSurfaceFluxPool, 'index_temperatureSurfaceFlux', index_temperature_flux)
call mpas_pool_get_array(tracersSurfaceFluxPool, 'activeTracersSurfaceFluxRunoff', activeTracersSurfaceFluxRunoff)
+ call mpas_pool_get_array(tracersSurfaceFluxPool, 'activeTracersSurfaceFluxSubglacialRunoff', activeTracersSurfaceFluxSubglacialRunoff)
call mpas_pool_get_array(statePool, 'accumulatedFrazilIceMass', accumulatedFrazilIceMassNew, 2)
call mpas_pool_get_array(statePool, 'accumulatedFrazilIceMass', accumulatedFrazilIceMassOld, 1)
@@ -581,6 +586,11 @@ subroutine energy_conservation(domain, err)
sumArray(14) = sumArray(14) + areaCell(iCell) * activeTracersSurfaceFluxRunoff(index_temperature_flux,iCell)
sumArray(15) = sumArray(15) + areaCell(iCell) * icebergTemperatureFlux(iCell)
+ ! subglacial river runoff temperature flux
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ sumArray(20) = sumArray(20) + areaCell(iCell) * activeTracersSurfaceFluxSubglacialRunoff(index_temperature_flux,iCell)
+ end if
+
enddo ! iCell
if (config_use_frazil_ice_formation) then
@@ -634,6 +644,9 @@ subroutine energy_conservation(domain, err)
accumulatedLandIceHeatFlux = accumulatedLandIceHeatFlux + sumArrayOut(17)
accumulatedLandIceFrazilHeatFlux = accumulatedLandIceFrazilHeatFlux + sumArrayOut(18)
accumulatedRemovedIceRunoffHeatFlux = accumulatedRemovedIceRunoffHeatFlux + sumArrayOut(19)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ accumulatedSubglacialRunoffTemperatureFlux = accumulatedSubglacialRunoffTemperatureFlux + sumArrayOut(20)
+ end if
! cleanup
deallocate(sumArray)
@@ -663,6 +676,9 @@ subroutine energy_conservation(domain, err)
accumulatedEvapTemperatureFlux = accumulatedEvapTemperatureFlux /accumulatedFluxCounter
accumulatedSeaIceTemperatureFlux = accumulatedSeaIceTemperatureFlux /accumulatedFluxCounter
accumulatedRiverRunoffTemperatureFlux = accumulatedRiverRunoffTemperatureFlux /accumulatedFluxCounter
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ accumulatedSubglacialRunoffTemperatureFlux = accumulatedSubglacialRunoffTemperatureFlux /accumulatedFluxCounter
+ end if
accumulatedIcebergTemperatureFlux = accumulatedIcebergTemperatureFlux /accumulatedFluxCounter
accumulatedLandIceFrazilHeatFlux = accumulatedLandIceFrazilHeatFlux /accumulatedFluxCounter
accumulatedRemovedIceRunoffHeatFlux = accumulatedRemovedIceRunoffHeatFlux /accumulatedFluxCounter
@@ -699,6 +715,9 @@ subroutine energy_conservation(domain, err)
+ accumulatedRiverRunoffTemperatureFlux *rho_sw*cp_sw &
+ accumulatedIcebergTemperatureFlux*rho_sw*cp_sw
! note, accumulatedLandIceFrazilHeatFlux not added because already in accumulatedFrazilHeatFlux
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ netEnergyFlux = netEnergyFlux + accumulatedSubglacialRunoffTemperatureFlux * rho_sw*cp_sw
+ end if
! compute the final energy error
call MPAS_pool_get_array(conservationCheckEnergyAMPool, "absoluteEnergyError", absoluteEnergyError)
@@ -760,6 +779,9 @@ subroutine energy_conservation(domain, err)
v=accumulatedEvapTemperatureFlux *rho_sw*cp_sw; write(m,"('EvapTemperatureFlux ',es16.8,' ',f16.8)") v,v/A; call mpas_log_write(m); s=s+v
v=accumulatedSeaIceTemperatureFlux *rho_sw*cp_sw; write(m,"('SeaIceTemperatureFlux ',es16.8,' ',f16.8)") v,v/A; call mpas_log_write(m); s=s+v
v=accumulatedRiverRunoffTemperatureFlux*rho_sw*cp_sw; write(m,"('RiverRunoffTempFlux ',es16.8,' ',f16.8)") v,v/A; call mpas_log_write(m); s=s+v
+if (trim(config_subglacial_runoff_mode) == 'data') then
+ v=accumulatedSubglacialRunoffTemperatureFlux*rho_sw*cp_sw; write(m,"('SubglacialRunoffTempFlux ',es16.8,' ',f16.8)") v,v/A; call mpas_log_write(m); s=s+v
+end if
v=accumulatedIcebergTemperatureFlux*rho_sw*cp_sw; write(m,"('IcebergTemperatureFlux ',es16.8,' ',f16.8)") v,v/A; call mpas_log_write(m); s=s+v
write(m,"('SUM IMPLICIT HEAT FLUXES ',es16.8,' hh20temp ',f16.8,es16.8)") s, s/A; call mpas_log_write(m)
s = s + explicitHeatFluxSum
@@ -828,6 +850,7 @@ subroutine mass_conservation(domain, err)
accumulatedEvaporationFlux, &
accumulatedSeaIceFlux, &
accumulatedRiverRunoffFlux, &
+ accumulatedSubglacialRunoffFlux, &
accumulatedIceRunoffFlux, &
accumulatedRemovedRiverRunoffFlux, &
accumulatedRemovedIceRunoffFlux, &
@@ -852,6 +875,7 @@ subroutine mass_conservation(domain, err)
evaporationFlux, &
seaIceFreshwaterFlux, &
riverRunoffFlux, &
+ subglacialRunoffFlux, &
iceRunoffFlux, &
removedRiverRunoffFlux, &
removedIceRunoffFlux, &
@@ -877,7 +901,7 @@ subroutine mass_conservation(domain, err)
iCell, ierr, k
integer, parameter :: &
- nSums = 12
+ nSums = 13
integer, dimension(:), pointer :: minLevelCell, maxLevelCell
@@ -900,6 +924,7 @@ subroutine mass_conservation(domain, err)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedEvaporationFlux", accumulatedEvaporationFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedSeaIceFlux", accumulatedSeaIceFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedRiverRunoffFlux", accumulatedRiverRunoffFlux)
+ call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedSubglacialRunoffFlux", accumulatedSubglacialRunoffFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedIceRunoffFlux", accumulatedIceRunoffFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedRemovedRiverRunoffFlux",accumulatedRemovedRiverRunoffFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedRemovedIceRunoffFlux", accumulatedRemovedIceRunoffFlux)
@@ -937,6 +962,7 @@ subroutine mass_conservation(domain, err)
call mpas_pool_get_array(forcingPool, 'evaporationFlux', evaporationFlux)
call mpas_pool_get_array(forcingPool, 'seaIceFreshWaterFlux', seaIceFreshwaterFlux)
call mpas_pool_get_array(forcingPool, 'riverRunoffFlux', riverRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'subglacialRunoffFlux', subglacialRunoffFlux)
call mpas_pool_get_array(forcingPool, 'iceRunoffFlux', iceRunoffFlux)
call mpas_pool_get_array(forcingPool, 'removedRiverRunoffFlux', removedRiverRunoffFlux)
call mpas_pool_get_array(forcingPool, 'removedIceRunoffFlux', removedIceRunoffFlux)
@@ -956,6 +982,9 @@ subroutine mass_conservation(domain, err)
sumArray( 7) = sumArray( 7) + areaCell(iCell) * removedRiverRunoffFlux(iCell)
sumArray( 8) = sumArray( 8) + areaCell(iCell) * removedIceRunoffFlux(iCell)
sumArray( 9) = sumArray( 9) + areaCell(iCell) * icebergFreshwaterFlux(iCell)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ sumArray(13) = sumArray(13) + areaCell(iCell) * subglacialRunoffFlux(iCell)
+ end if
enddo
if (config_use_frazil_ice_formation) then
@@ -1002,6 +1031,9 @@ subroutine mass_conservation(domain, err)
accumulatedFrazilFlux = accumulatedFrazilFlux + sumArrayOut(10)
accumulatedLandIceFlux = accumulatedLandIceFlux + sumArrayOut(11)
accumulatedLandIceFrazilFlux = accumulatedLandIceFrazilFlux + sumArrayOut(12)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ accumulatedSubglacialRunoffFlux = accumulatedSubglacialRunoffFlux + sumArrayOut(13)
+ end if
! cleanup
deallocate(sumArray)
@@ -1021,6 +1053,9 @@ subroutine mass_conservation(domain, err)
accumulatedEvaporationFlux = accumulatedEvaporationFlux /accumulatedFluxCounter
accumulatedSeaIceFlux = accumulatedSeaIceFlux /accumulatedFluxCounter
accumulatedRiverRunoffFlux = accumulatedRiverRunoffFlux /accumulatedFluxCounter
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ accumulatedSubglacialRunoffFlux = accumulatedSubglacialRunoffFlux /accumulatedFluxCounter
+ end if
accumulatedIceRunoffFlux = accumulatedIceRunoffFlux /accumulatedFluxCounter
accumulatedRemovedRiverRunoffFlux = accumulatedRemovedRiverRunoffFlux /accumulatedFluxCounter
accumulatedRemovedIceRunoffFlux = accumulatedRemovedIceRunoffFlux /accumulatedFluxCounter
@@ -1054,6 +1089,9 @@ subroutine mass_conservation(domain, err)
+ accumulatedFrazilFlux &
+ accumulatedLandIceFlux
! note, accumulatedLandIceFrazilFlux not added because already in accumulatedFrazilFlux
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ netMassFlux = netMassFlux + accumulatedSubglacialRunoffFlux
+ end if
! compute the final mass error
call MPAS_pool_get_array(conservationCheckMassAMPool, "absoluteMassError", absoluteMassError)
@@ -1083,6 +1121,10 @@ subroutine mass_conservation(domain, err)
v=accumulatedIcebergFlux ; write(m,"('icebergFreshwaterFlux ',es16.8,' x2o_Fioi_bergw wberg ',f16.8)") v,v*c; call mpas_log_write(m); s=s+v
v=accumulatedEvaporationFlux ; write(m,"('evaporationFlux ',es16.8,' x2o_Foxx_evap wevap ',f16.8)") v,v*c; call mpas_log_write(m); s=s+v
v=accumulatedRiverRunoffFlux ; write(m,"('riverRunoffFlux ',es16.8,' x2o_Foxx_rofl wrunoff ',f16.8)") v,v*c; call mpas_log_write(m); s=s+v
+if (trim(config_subglacial_runoff_mode) == 'data') then
+ v=accumulatedSubglacialRunoffFlux ; write(m,"('subglacialRunoffFlux ',es16.8,' x2o_Foxx_rofl wsgr ',f16.8)") v,v*c; call mpas_log_write(m); s=s+v
+end if
+
if (landIceFreshwaterFluxesOn) then
v=accumulatedRemovedRiverRunoffFlux; write(m,"('removedRiverRunoffFlux ',es16.8,' wrunoff ',f16.8)") v,v*c; call mpas_log_write(m);
v=accumulatedRiverRunoffFlux+accumulatedRemovedRiverRunoffFlux;
@@ -1150,7 +1192,8 @@ subroutine salt_conservation(domain, err)
conservationCheckSaltAMPool, &
meshPool, &
statePool, &
- forcingPool
+ forcingPool, &
+ tracersSurfaceFluxPool
real(kind=RKIND), pointer :: &
initialSalt, &
@@ -1160,9 +1203,13 @@ subroutine salt_conservation(domain, err)
absoluteSaltError, &
relativeSaltError
+ real(kind=RKIND), dimension(:,:), pointer :: &
+ activeTracersSurfaceFluxSubglacialRunoff
+
real(kind=RKIND), pointer :: &
accumulatedSeaIceSalinityFlux, &
- accumulatedFrazilSalinityFlux
+ accumulatedFrazilSalinityFlux, &
+ accumulatedSubglacialRunoffSalinityFlux
! accumulatedLandIceFrazilSalinityFlux is not present because it is always 0
real(kind=RKIND), dimension(:), allocatable :: &
@@ -1184,14 +1231,15 @@ subroutine salt_conservation(domain, err)
dt, dtAvg, v, A, s, c
integer, pointer :: &
- nCellsSolve
+ nCellsSolve, &
+ index_salinity_flux
integer :: &
iCell, &
ierr
integer, parameter :: &
- nSums = 3
+ nSums = 4
logical, pointer :: &
activeTracersBulkRestoringPKG
@@ -1209,6 +1257,7 @@ subroutine salt_conservation(domain, err)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedSeaIceSalinityFlux", accumulatedSeaIceSalinityFlux)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedFrazilSalinityFlux", accumulatedFrazilSalinityFlux)
+ call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedSubglacialRunoffSalinityFlux", accumulatedSubglacialRunoffSalinityFlux)
!-------------------------------------------------------------
! Net salt flux to ice
@@ -1234,12 +1283,23 @@ subroutine salt_conservation(domain, err)
call mpas_pool_get_array(forcingPool, 'seaIceSalinityFlux', seaIceSalinityFlux)
call mpas_pool_get_array(statePool, 'accumulatedFrazilIceSalinity', accumulatedFrazilIceSalinityOld, 1)
call mpas_pool_get_array(statePool, 'accumulatedFrazilIceSalinity', accumulatedFrazilIceSalinityNew, 2)
+ call mpas_pool_get_subpool(forcingPool, 'tracersSurfaceFlux',tracersSurfaceFluxPool)
+ call mpas_pool_get_array(tracersSurfaceFluxPool, 'activeTracersSurfaceFluxSubglacialRunoff', activeTracersSurfaceFluxSubglacialRunoff)
+ call mpas_pool_get_dimension(tracersSurfaceFluxPool, 'index_salinitySurfaceFlux', index_salinity_flux)
+
+
do iCell = 1, nCellsSolve
! salt flux to ocean
sumArray(1) = sumArray(1) + areaCell(iCell) * seaIceSalinityFlux(iCell)
enddo ! iCell
+ ! subglacial runoff
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ do iCell = 1, nCellsSolve
+ sumArray(4) = sumArray(4) + areaCell(iCell) * activeTracersSurfaceFluxSubglacialRunoff(index_salinity_flux,iCell)
+ enddo ! iCell
+ end if
if (config_use_frazil_ice_formation) then
do iCell = 1, nCellsSolve
@@ -1265,6 +1325,9 @@ subroutine salt_conservation(domain, err)
! accumulate fluxes
accumulatedSeaIceSalinityFlux = accumulatedSeaIceSalinityFlux + sumArrayOut(1)
accumulatedFrazilSalinityFlux = accumulatedFrazilSalinityFlux + sumArrayOut(2)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ accumulatedSubglacialRunoffSalinityFlux = accumulatedSubglacialRunoffSalinityFlux + sumArrayOut(4)
+ end if
! cleanup
deallocate(sumArray)
@@ -1281,6 +1344,9 @@ subroutine salt_conservation(domain, err)
! Average the fluxes
accumulatedSeaIceSalinityFlux = accumulatedSeaIceSalinityFlux /accumulatedFluxCounter
accumulatedFrazilSalinityFlux = accumulatedFrazilSalinityFlux /accumulatedFluxCounter
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ accumulatedSubglacialRunoffSalinityFlux = accumulatedSubglacialRunoffSalinityFlux /accumulatedFluxCounter
+ end if
! get initial salt content
call MPAS_pool_get_array(conservationCheckSaltAMPool, "initialSalt", initialSalt)
@@ -1299,6 +1365,10 @@ subroutine salt_conservation(domain, err)
netSaltFlux = accumulatedSeaIceSalinityFlux &
+ accumulatedFrazilSalinityFlux
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ netSaltFlux = netSaltFlux + accumulatedSubglacialRunoffSalinityFlux
+ end if
+
! compute the final salt error
call MPAS_pool_get_array(conservationCheckSaltAMPool, "absoluteSaltError", absoluteSaltError)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "relativeSaltError", relativeSaltError)
@@ -1327,6 +1397,10 @@ subroutine salt_conservation(domain, err)
.and.config_frazil_under_land_ice) then
v=0; write(m,"('LandIceFrazilSalinityFlux',es16.8,' (already in wmelt, do not sum) ',f16.8)") v,v*c; call mpas_log_write(m); !no sum: s=s+v
end if
+if (trim(config_subglacial_runoff_mode) == 'data') then
+ v=accumulatedSubglacialRunoffSalinityFlux ; write(m,"('SubglacialRunoffSalinityFlux ',es16.8,' x2o_Fioi_salt salt ',f16.8)") v,v*c; call mpas_log_write(m); s=s+v
+end if
+
write(m,"('SUM VOLUME FLUXES ',es16.8,' ',f16.8,es16.8)") s, s*c; call mpas_log_write(m)
call mpas_log_write(' ')
@@ -1523,11 +1597,11 @@ subroutine carbon_conservation(domain, err)
block => domain % blocklist
do while (associated(block))
call MPAS_pool_get_dimension(block % dimensions, "nCellsSolve", nCellsSolve)
-
+
call MPAS_pool_get_subpool(block % structs, "mesh", meshPool)
call MPAS_pool_get_subpool(block % structs, "forcing", forcingPool)
call MPAS_pool_get_subpool(block % structs, "state", statePool)
-
+
call MPAS_pool_get_array(meshPool, "areaCell", areaCell)
call mpas_pool_get_array(meshPool, 'maxLevelCell', maxLevelCell)
@@ -1594,7 +1668,7 @@ subroutine carbon_conservation(domain, err)
+ ecosysTracersSurfaceFlux(index_spCFlux, iCell) &
+ ecosysTracersSurfaceFlux(index_diatCFlux, iCell) &
+ ecosysTracersSurfaceFlux(index_diazCFlux, iCell))
-
+
do k = 1, maxLevelCell(iCell)
sumArray(4) = sumArray(4) + areaCell(iCell) * ( &
ecosysTracersTend(index_DICTend, k, iCell) &
@@ -1645,7 +1719,7 @@ subroutine carbon_conservation(domain, err)
!-------------------------------------------------------------
if (MPAS_stream_mgr_ringing_alarms(domain % streamManager, "conservationCheckOutput", ierr=ierr)) then
-
+
! Average the fluxes
accumulatedCarbonSourceSink = accumulatedCarbonSourceSink /accumulatedFluxCounter
accumulatedCarbonSedimentFlux = accumulatedCarbonSedimentFlux /accumulatedFluxCounter
@@ -1657,7 +1731,7 @@ subroutine carbon_conservation(domain, err)
! get initial carbon
call MPAS_pool_get_array(conservationCheckCarbonAMPool, "initialCarbon", initialCarbon)
-
+
! get final carbon
call MPAS_pool_get_array(conservationCheckCarbonAMPool, "finalCarbon", finalCarbon)
call compute_total_carbon(domain, finalCarbon)
@@ -1694,13 +1768,13 @@ subroutine carbon_conservation(domain, err)
relativeCarbonErrorBounds = &
relativeCarbonErrorStepBounds*relativeCarbonErrorBoundsFac*totalTimeSteps
relativeCarbonErrorPerTimeStep = relativeCarbonError/accumulatedFluxCounter
-
+
!-------------------------------------------------------------
! Output to log file
!-------------------------------------------------------------
if (config_AM_conservationCheck_write_to_logfile) then
-
+
call mpas_log_write('')
call mpas_log_write('----------------------------------------------------------')
call mpas_log_write('CARBON CONSERVATION CHECK')
@@ -1731,7 +1805,7 @@ subroutine carbon_conservation(domain, err)
v=accumulatedIceOceanInorganicCarbonFlux*mmol_to_kg_C
write(m,"('Ice-Ocean Inorganic Flux ',es16.8,' ',f16.8)") v,v*c
call mpas_log_write(m)
- write(m,"('SUM FLUXES (surf + sed) ',es16.8,' ',f16.8,es16.8)") s, s*c;
+ write(m,"('SUM FLUXES (surf + sed) ',es16.8,' ',f16.8,es16.8)") s, s*c;
call mpas_log_write(m)
call mpas_log_write(' ')
@@ -1751,24 +1825,24 @@ subroutine carbon_conservation(domain, err)
write(m,"('Carbon change ', 3es16.8)") &
carbonChange*mmol_to_kg_C, &
carbonChange*mmol_to_kg_C/dtAvg, &
- carbonChange*mmol_to_kg_C/dtAvg*c
+ carbonChange*mmol_to_kg_C/dtAvg*c
call mpas_log_write(m)
write(m,"('Net carbon flux ', 3es16.8)") &
netCarbonFlux*mmol_to_kg_C*dtAvg, &
netCarbonFlux*mmol_to_kg_C, &
- netCarbonFlux*mmol_to_kg_C*c
+ netCarbonFlux*mmol_to_kg_C*c
call mpas_log_write(m)
write(m,"('Absolute carbon error ', 3es16.8)") &
absoluteCarbonError*mmol_to_kg_C, &
absoluteCarbonError*mmol_to_kg_C/dtAvg, &
- absoluteCarbonError*mmol_to_kg_C/dtAvg*c
+ absoluteCarbonError*mmol_to_kg_C/dtAvg*c
call mpas_log_write(m)
call mpas_log_write(' ')
write(m,"('RELATIVE CARBON ERROR =', es16.8)") &
relativeCarbonError
call mpas_log_write(m)
call mpas_log_write(' ')
-
+
write(m,"('Relative carbon error per timestep = ', es16.8)") &
relativeCarbonErrorPerTimeStep
call mpas_log_write(m)
@@ -1814,7 +1888,7 @@ subroutine carbon_conservation(domain, err)
endif
end subroutine carbon_conservation
-
+
!***********************************************************************
!
! routine compute_total_energy
@@ -2190,7 +2264,7 @@ subroutine compute_total_carbon(domain, totalCarbon)
call MPAS_dmpar_sum_real(domain % dminfo, carbon, totalCarbon)
end subroutine compute_total_carbon
-
+
!***********************************************************************
!
! routine reset_accumulated_variables
@@ -2232,6 +2306,7 @@ subroutine reset_accumulated_variables(domain)
accumulatedEvapTemperatureFlux, &
accumulatedSeaIceTemperatureFlux, &
accumulatedRiverRunoffTemperatureFlux, &
+ accumulatedSubglacialRunoffTemperatureFlux, &
accumulatedIcebergTemperatureFlux
real(kind=RKIND), pointer :: &
@@ -2240,6 +2315,7 @@ subroutine reset_accumulated_variables(domain)
accumulatedEvaporationFlux, &
accumulatedSeaIceFlux, &
accumulatedRiverRunoffFlux, &
+ accumulatedSubglacialRunoffFlux, &
accumulatedIceRunoffFlux, &
accumulatedRemovedRiverRunoffFlux, &
accumulatedRemovedIceRunoffFlux, &
@@ -2250,7 +2326,8 @@ subroutine reset_accumulated_variables(domain)
real(kind=RKIND), pointer :: &
accumulatedSeaIceSalinityFlux, &
- accumulatedFrazilSalinityFlux
+ accumulatedFrazilSalinityFlux, &
+ accumulatedSubglacialRunoffSalinityFlux
real(kind=RKIND), pointer :: &
accumulatedCarbonSourceSink, &
@@ -2280,6 +2357,7 @@ subroutine reset_accumulated_variables(domain)
call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedEvapTemperatureFlux", accumulatedEvapTemperatureFlux)
call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedSeaIceTemperatureFlux", accumulatedSeaIceTemperatureFlux)
call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedRiverRunoffTemperatureFlux", accumulatedRiverRunoffTemperatureFlux)
+ call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedSubglacialRunoffTemperatureFlux", accumulatedSubglacialRunoffTemperatureFlux)
call MPAS_pool_get_array(conservationCheckEnergyAMPool, "accumulatedIcebergTemperatureFlux", accumulatedIcebergTemperatureFlux)
accumulatedFluxCounter = 0
@@ -2298,6 +2376,9 @@ subroutine reset_accumulated_variables(domain)
accumulatedEvapTemperatureFlux = 0.0_RKIND
accumulatedSeaIceTemperatureFlux = 0.0_RKIND
accumulatedRiverRunoffTemperatureFlux = 0.0_RKIND
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ accumulatedSubglacialRunoffTemperatureFlux = 0.0_RKIND
+ end if
accumulatedIcebergTemperatureFlux = 0.0_RKIND
accumulatedLandIceFrazilHeatFlux = 0.0_RKIND
accumulatedRemovedIceRunoffHeatFlux = 0.0_RKIND
@@ -2310,6 +2391,7 @@ subroutine reset_accumulated_variables(domain)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedEvaporationFlux", accumulatedEvaporationFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedSeaIceFlux", accumulatedSeaIceFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedRiverRunoffFlux", accumulatedRiverRunoffFlux)
+ call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedSubglacialRunoffFlux", accumulatedSubglacialRunoffFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedIceRunoffFlux", accumulatedIceRunoffFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedRemovedRiverRunoffFlux",accumulatedRemovedRiverRunoffFlux)
call MPAS_pool_get_array(conservationCheckMassAMPool, "accumulatedRemovedIceRunoffFlux", accumulatedRemovedIceRunoffFlux)
@@ -2323,6 +2405,9 @@ subroutine reset_accumulated_variables(domain)
accumulatedEvaporationFlux = 0.0_RKIND
accumulatedSeaIceFlux = 0.0_RKIND
accumulatedRiverRunoffFlux = 0.0_RKIND
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ accumulatedSubglacialRunoffFlux = 0.0_RKIND
+ end if
accumulatedIceRunoffFlux = 0.0_RKIND
accumulatedRemovedRiverRunoffFlux = 0.0_RKIND
accumulatedRemovedIceRunoffFlux = 0.0_RKIND
@@ -2336,9 +2421,13 @@ subroutine reset_accumulated_variables(domain)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedSeaIceSalinityFlux", accumulatedSeaIceSalinityFlux)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedFrazilSalinityFlux", accumulatedFrazilSalinityFlux)
+ call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedSubglacialRunoffSalinityFlux", accumulatedSubglacialRunoffSalinityFlux)
accumulatedSeaIceSalinityFlux = 0.0_RKIND
accumulatedFrazilSalinityFlux = 0.0_RKIND
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ accumulatedSubglacialRunoffSalinityFlux = 0.0_RKIND
+ end if
call MPAS_pool_get_subpool(domain % blocklist % structs, "conservationCheckCarbonAM", conservationCheckCarbonAMPool)
diff --git a/components/mpas-ocean/src/driver/mpas_ocn_core_interface.F b/components/mpas-ocean/src/driver/mpas_ocn_core_interface.F
index 7d9eb083f90..6d542fb0c3f 100644
--- a/components/mpas-ocean/src/driver/mpas_ocn_core_interface.F
+++ b/components/mpas-ocean/src/driver/mpas_ocn_core_interface.F
@@ -123,6 +123,7 @@ function ocn_setup_packages(configPool, packagePool, iocontext) result(ierr)!{{{
logical, pointer :: dataLandIceFluxesPKGActive
logical, pointer :: landIceFluxesPKGActive
logical, pointer :: landIceCouplingPKGActive
+ logical, pointer :: dataSubglacialRunoffFluxPKGActive
logical, pointer :: thicknessBulkPKGActive
logical, pointer :: frazilIceActive
logical, pointer :: tidalForcingActive
@@ -186,6 +187,7 @@ function ocn_setup_packages(configPool, packagePool, iocontext) result(ierr)!{{{
logical, pointer :: config_use_bulk_thickness_flux
logical, pointer :: config_compute_active_tracer_budgets
character (len=StrKIND), pointer :: config_land_ice_flux_mode
+ character (len=StrKIND), pointer :: config_subglacial_runoff_mode
type (mpas_pool_iterator_type) :: groupItr
character (len=StrKIND) :: tracerGroupName, configName, packageName
@@ -319,6 +321,15 @@ function ocn_setup_packages(configPool, packagePool, iocontext) result(ierr)!{{{
landIceCouplingPKGActive = .true.
end if
+ !
+ ! test for use of subglacial runoff flux, dataSubglacialRunoffFluxPKGActive
+ !
+ call mpas_pool_get_package(packagePool, 'dataSubglacialRunoffFluxPKGActive', dataSubglacialRunoffFluxPKGActive)
+ call mpas_pool_get_config(configPool, 'config_subglacial_runoff_mode', config_subglacial_runoff_mode)
+ if ( trim(config_subglacial_runoff_mode) == 'data' ) then
+ dataSubglacialRunoffFluxPKGActive = .true.
+ end if
+
!
! test for use of frazil ice formation, frazilIceActive
!
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
index 52ef08267fc..a2d6586a7d6 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F
@@ -218,6 +218,7 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMe
!! tracersSurfaceValue calc :: minLevelCell (mesh array)
!! normalVelocitySurfaceLayer calc :: minLevelEdgeBot (mesh array)
!! surfaceFluxAttenuationCoefficientRunoff :: layerThickEdgeFlux (diagnostics array)
+ !! surfaceFluxAttenuationCoefficientSubglacialRunoff :: layerThickEdgeFlux (diagnostics array)
!! ocn_diagnostic_solve_ssh :: ssh, (not on device)
!! landIceDraft (not on device)
@@ -457,6 +458,11 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMe
indexSurfaceLayerDepth, normalVelocitySurfaceLayer, &
sfcFlxAttCoeff, surfaceFluxAttenuationCoefficientRunoff)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ ! outputs: surfaceFluxAttenuationCoefficientSubglacialRunoff
+ call ocn_diagnostic_solve_surfaceLayer_subglacialRunoff(surfaceFluxAttenuationCoefficientSubglacialRunoff)
+ end if
+
end if ! full_compute
!
@@ -522,6 +528,11 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMe
!! normalVelocitySurfaceLayer, (diagnostics array)
!! surfaceFluxAttenuationCoefficient, ????
!! surfaceFluxAttenuationCoefficientRunoff (diagnostics array)
+ !! surfaceFluxAttenuationCoefficientSubglacialRunoff :: tracersSurfaceLayerValue, (diagnostics array)
+ !! indexSurfaceLayerDepth, (diagnostics array)
+ !! normalVelocitySurfaceLayer, (diagnostics array)
+ !! surfaceFluxAttenuationCoefficient, ????
+ !! surfaceFluxAttenuationCoefficientSubglacialRunoff (diagnostics array)
!! ocn_diagnostic_solve_ssh :: pressureAdjustedSSH, (diagnostics array)
!! gradSSH (diagnostics array)
@@ -558,6 +569,10 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, verticalMe
! !$acc normalVelocitySurfaceLayer, &
! !$acc sfcFlxAttCoeff, &
! !$acc surfaceFluxAttenuationCoefficientRunoff)
+! if (trim(config_subglacial_runoff_mode) == 'data') then
+! !$acc update host(surfaceFluxAttenuationCoefficientSubglacialRunoff)
+! end if
+
! end if ! full_compute
! !$acc exit data delete (atmosphericPressure, seaIcePressure)
@@ -1902,6 +1917,69 @@ subroutine ocn_diagnostic_solve_surfaceLayer(layerThickness, &
end subroutine ocn_diagnostic_solve_surfaceLayer !}}}
+!***********************************************************************
+!
+! routine ocn_diagnostic_solve_surfaceLayer_subglacialRunoff
+!
+!> \brief Computes diagnostic subglacialRunoff variables for surface layer
+!> \author Irena Vankova
+!> \date July 2024
+!> \details
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_diagnostic_solve_surfaceLayer_subglacialRunoff(surfaceFluxAttenuationCoefficientSubglacialRunoff)!{{{
+
+ !-----------------------------------------------------------------
+ ! input variables
+ !-----------------------------------------------------------------
+
+ !-----------------------------------------------------------------
+ ! output variables
+ !-----------------------------------------------------------------
+
+ real (kind=RKIND), dimension(:), intent(out) :: &
+ surfaceFluxAttenuationCoefficientSubglacialRunoff !< [out] sfc flx attenuation
+
+ !-----------------------------------------------------------------
+ ! local variables
+ !-----------------------------------------------------------------
+
+ integer :: &
+ nCells, &! num of cells
+ iCell ! loop indices for cell
+
+ ! End preamble
+ !-----------------------------------------------------------------
+ ! Begin code
+
+ ! compute the attenuation coefficient for subglacial runoff surface fluxes
+
+ nCells = nCellsHalo( 1 )
+
+#ifdef MPAS_OPENACC
+ !$acc parallel loop &
+ !$acc present(surfaceFluxAttenuationCoefficientSubglacialRunoff)
+#else
+ !$omp parallel
+ !$omp do schedule(runtime)
+#endif
+ do iCell = 1, nCells
+ surfaceFluxAttenuationCoefficientSubglacialRunoff(iCell) = &
+ config_flux_attenuation_coefficient_subglacial_runoff
+ end do
+#ifndef MPAS_OPENACC
+ !$omp end do
+ !$omp end parallel
+#endif
+
+ !--------------------------------------------------------------------
+
+ end subroutine ocn_diagnostic_solve_surfaceLayer_subglacialRunoff !}}}
+
+!***********************************************************************
+
+
!***********************************************************************
!
! routine ocn_diagnostic_solve_GMvel
@@ -3275,15 +3353,18 @@ subroutine ocn_compute_KPP_input_fields(statePool, forcingPool, &
!-----------------------------------------------------------------
integer :: &
- iCell, iEdge, i, &! loop indices for cell, edge, neighbors
- kmin, &! topmost active cell index
- nCells, &! number of cells
- err, &! local error code
- timeLevel ! time level for state variables (default 1)
+ iCell, iEdge, i, k, &! loop indices for cell, edge, neighbors
+ kmin, &! topmost active cell index
+ nCells, &! number of cells
+ err, &! local error code
+ timeLevel ! time level for state variables (default 1)
real (kind=RKIND) :: &
fracAbsorbed, &! fraction of sfc flux absorbed
fracAbsorbedRunoff, &! same for runoff
+ fracAbsorbedSubglacialRunoff, &! same for subglacial runoff
+ zTop,zBot, &! temporary variables
+ transmissionCoeffTop,transmissionCoeffBot, &! temporary variables
sumSurfaceStressSquared ! sum of sfc stress squared
! pointers for variable/pool retrievals
@@ -3299,6 +3380,7 @@ subroutine ocn_compute_KPP_input_fields(statePool, forcingPool, &
penetrativeTemperatureFlux, &! various sfc flux components
surfaceThicknessFlux, &
surfaceThicknessFluxRunoff, &
+ surfaceThicknessFluxSubglacialRunoff, &
rainTemperatureFlux, &
evapTemperatureFlux, &
icebergTemperatureFlux, &
@@ -3311,6 +3393,7 @@ subroutine ocn_compute_KPP_input_fields(statePool, forcingPool, &
normalVelocity, &! normal velocity
activeTracersSurfaceFlux, &! sfc flux of active tracers (T,S)
activeTracersSurfaceFluxRunoff, &! flx of tracers in runoff
+ activeTracersSurfaceFluxSubglacialRunoff, &! flx of tracers in subglacial runoff
nonLocalSurfaceTracerFlux ! non-local flux of tracers
real (kind=RKIND), dimension(:,:,:), pointer :: &
@@ -3374,11 +3457,16 @@ subroutine ocn_compute_KPP_input_fields(statePool, forcingPool, &
call mpas_pool_get_array(tracersSurfaceFluxPool, &
'activeTracersSurfaceFluxRunoff', &
activeTracersSurfaceFluxRunoff)
+ call mpas_pool_get_array(tracersSurfaceFluxPool, &
+ 'activeTracersSurfaceFluxSubglacialRunoff', &
+ activeTracersSurfaceFluxSubglacialRunoff)
call mpas_pool_get_array(forcingPool, 'surfaceThicknessFlux', &
surfaceThicknessFlux)
call mpas_pool_get_array(forcingPool, 'surfaceThicknessFluxRunoff', &
surfaceThicknessFluxRunoff)
+ call mpas_pool_get_array(forcingPool, 'surfaceThicknessFluxSubglacialRunoff', &
+ surfaceThicknessFluxSubglacialRunoff)
call mpas_pool_get_array(forcingPool, 'penetrativeTemperatureFlux', &
penetrativeTemperatureFlux)
call mpas_pool_get_array(forcingPool, 'surfaceStress', &
@@ -3451,7 +3539,7 @@ subroutine ocn_compute_KPP_input_fields(statePool, forcingPool, &
!$omp parallel
!$omp do schedule(runtime) &
- !$omp private(kmin, fracAbsorbed, fracAbsorbedRunoff, &
+ !$omp private(kmin, fracAbsorbed, fracAbsorbedRunoff, fracAbsorbedSubglacialRunoff, &
!$omp sumSurfaceStressSquared, i, iEdge)
do iCell = 1, nCells
@@ -3465,6 +3553,37 @@ subroutine ocn_compute_KPP_input_fields(statePool, forcingPool, &
- exp( max(-100.0_RKIND, &
-layerThickness(kmin, iCell)/ &
config_flux_attenuation_coefficient_runoff))
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ if (config_use_sgr_opt_kpp) then
+ if ( trim(config_sgr_flux_vertical_location) == 'top' ) then
+ fracAbsorbedSubglacialRunoff = 1.0_RKIND &
+ - exp( max(-100.0_RKIND, &
+ -layerThickness(kmin, iCell)/ &
+ config_flux_attenuation_coefficient_subglacial_runoff))
+ else if ( trim(config_sgr_flux_vertical_location) == 'uniform' ) then
+ ! calculate total thickness into variable zTop
+ zTop = 0.0_RKIND
+ do k = minLevelCell(iCell), maxLevelCell(iCell)
+ zTop = zTop + layerThickness(k,iCell)
+ end do
+ ! distribute flux evenly throughout water column
+ fracAbsorbedSubglacialRunoff = layerThickness(kmin, iCell) / zTop
+ else if ( trim(config_sgr_flux_vertical_location) == 'bottom' ) then
+ zTop = 0.0_RKIND
+ do k = maxLevelCell(iCell), minLevelCell(iCell), -1
+ zBot = zTop - layerThickness(k,iCell)
+ if (k == minLevelCell(iCell)) then
+ transmissionCoeffTop = exp( max(zTop / config_flux_attenuation_coefficient_runoff, -100.0_RKIND) )
+ transmissionCoeffBot = exp( max(zBot / config_flux_attenuation_coefficient_runoff, -100.0_RKIND) )
+ fracAbsorbedSubglacialRunoff = transmissionCoeffTop - transmissionCoeffBot
+ end if
+ zTop = zBot
+ end do
+ end if
+ else
+ fracAbsorbedSubglacialRunoff = 0.0_RKIND
+ end if
+ end if
! Store the total tracer flux below in
! nonLocalSurfaceTemperatureFlux for use in the CVMix nonlocal
@@ -3480,6 +3599,11 @@ subroutine ocn_compute_KPP_input_fields(statePool, forcingPool, &
icebergTemperatureFlux(iCell)) &
- fracAbsorbedRunoff* &
activeTracersSurfaceFluxRunoff(indexTempFlux,iCell)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ nonLocalSurfaceTracerFlux(indexTempFlux, iCell) = nonLocalSurfaceTracerFlux(indexTempFlux, iCell) &
+ - fracAbsorbedSubglacialRunoff* &
+ activeTracersSurfaceFluxSubglacialRunoff(indexTempFlux,iCell)
+ end if
nonLocalSurfaceTracerFlux(indexSaltFlux,iCell) = &
activeTracersSurfaceFlux(indexSaltFlux,iCell) &
@@ -3487,6 +3611,11 @@ subroutine ocn_compute_KPP_input_fields(statePool, forcingPool, &
activeTracers(indexSaltFlux,kmin,iCell) &
- fracAbsorbedRunoff*surfaceThicknessFluxRunoff(iCell)* &
activeTracers(indexSaltFlux,kmin,iCell)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ nonLocalSurfaceTracerFlux(indexSaltFlux,iCell) = nonLocalSurfaceTracerFlux(indexSaltFlux,iCell) &
+ - fracAbsorbedSubglacialRunoff*surfaceThicknessFluxSubglacialRunoff(iCell)* &
+ activeTracers(indexSaltFlux,kmin,iCell)
+ end if
surfaceBuoyancyForcing(iCell) = &
thermalExpansionCoeff(kmin,iCell)* &
@@ -4428,6 +4557,21 @@ subroutine ocn_validate_state(domain, timeLevel)!{{{
call ocn_write_field_statistics(debugUnit, fieldName, minValue, maxValue)
end if
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ ! Test subglacialRunoffFlux
+ fieldName = 'subglacialRunoffFlux'
+ minValue = HUGE(minValue)
+ maxValue = -HUGE(maxValue)
+ call mpas_pool_get_array(forcingPool, fieldName, real1DArr)
+ if ( associated(real1DArr) ) then
+ do iCell = 1, nCellsSolve
+ minValue = min( minValue, real1DArr(iCell) )
+ maxValue = max( maxValue, real1DArr(iCell) )
+ end do
+ call ocn_write_field_statistics(debugUnit, fieldName, minValue, maxValue)
+ end if
+ end if
+
! Test seaIceSalinityFlux
fieldName = 'seaIceSalinityFlux'
minValue = HUGE(minValue)
@@ -4598,6 +4742,12 @@ subroutine ocn_diagnostics_init(domain, err)!{{{
call ocn_diagnostics_variables_init(domain, jenkinsOn, &
hollandJenkinsOn, err)
+ if ( trim(config_sgr_flux_vertical_location) /= 'top' .and. &
+ trim(config_sgr_flux_vertical_location) /= 'uniform' .and. &
+ trim(config_sgr_flux_vertical_location) /= 'bottom' ) then
+ call mpas_log_write("config_sgr_flux_vertical_location not one of 'bottom', 'uniform', 'top'.", MPAS_LOG_CRIT)
+ end if
+
end subroutine ocn_diagnostics_init!}}}
!***********************************************************************
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F
index 30a62f68c8b..38f32f88e17 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_diagnostics_variables.F
@@ -85,6 +85,7 @@ module ocn_diagnostics_variables
real (kind=RKIND), dimension(:), pointer :: sfcFlxAttCoeff
real (kind=RKIND), dimension(:), pointer :: surfaceFluxAttenuationCoefficientRunoff
+ real (kind=RKIND), dimension(:), pointer :: surfaceFluxAttenuationCoefficientSubglacialRunoff
real (kind=RKIND), dimension(:), pointer :: landIceFrictionVelocity
real (kind=RKIND), dimension(:), pointer :: velocityTidalRMS
@@ -680,6 +681,9 @@ subroutine ocn_diagnostics_variables_init(domain, jenkinsOn, hollandJenkinsOn, e
call mpas_pool_get_array(diagnosticsPool, &
'surfaceFluxAttenuationCoefficientRunoff', &
surfaceFluxAttenuationCoefficientRunoff)
+ call mpas_pool_get_array(diagnosticsPool, &
+ 'surfaceFluxAttenuationCoefficientSubglacialRunoff', &
+ surfaceFluxAttenuationCoefficientSubglacialRunoff)
call mpas_pool_get_array(diagnosticsPool, &
'boundaryLayerDepth', &
boundaryLayerDepth)
@@ -964,7 +968,8 @@ subroutine ocn_diagnostics_variables_init(domain, jenkinsOn, hollandJenkinsOn, e
!$acc Time_bnds, &
!$acc simulationStartTime, &
!$acc boundaryLayerDepthSmooth, &
- !$acc surfaceFluxAttenuationCoefficientRunoff &
+ !$acc surfaceFluxAttenuationCoefficientRunoff, &
+ !$acc surfaceFluxAttenuationCoefficientSubglacialRunoff &
!$acc )
end subroutine ocn_diagnostics_variables_init!}}}
@@ -1223,7 +1228,8 @@ subroutine ocn_diagnostics_variables_destroy(err) !{{{
!$acc Time_bnds, &
!$acc simulationStartTime, &
!$acc boundaryLayerDepthSmooth, &
- !$acc surfaceFluxAttenuationCoefficientRunoff &
+ !$acc surfaceFluxAttenuationCoefficientRunoff, &
+ !$acc surfaceFluxAttenuationCoefficientSubglacialRunoff &
!$acc )
! Nullify pointers
@@ -1425,7 +1431,8 @@ subroutine ocn_diagnostics_variables_destroy(err) !{{{
Time_bnds, &
simulationStartTime, &
boundaryLayerDepthSmooth, &
- surfaceFluxAttenuationCoefficientRunoff)
+ surfaceFluxAttenuationCoefficientRunoff, &
+ surfaceFluxAttenuationCoefficientSubglacialRunoff)
end subroutine ocn_diagnostics_variables_destroy!}}}
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_forcing.F b/components/mpas-ocean/src/shared/mpas_ocn_forcing.F
index 99a674cd45f..5cfce4c4e69 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_forcing.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_forcing.F
@@ -27,6 +27,7 @@ module ocn_forcing
use mpas_dmpar
use ocn_constants
use ocn_diagnostics_variables
+ use ocn_config
implicit none
private
@@ -122,7 +123,7 @@ subroutine ocn_forcing_build_fraction_absorbed_array(meshPool, statePool, forcin
real (kind=RKIND) :: zTop, zBot, transmissionCoeffTop, transmissionCoeffBot
- real (kind=RKIND), dimension(:,:), pointer :: layerThickness, fractionAbsorbed, fractionAbsorbedRunoff
+ real (kind=RKIND), dimension(:,:), pointer :: layerThickness, fractionAbsorbed, fractionAbsorbedRunoff, fractionAbsorbedSubglacialRunoff
integer :: iCell, k, timeLevel, nCells
@@ -147,6 +148,7 @@ subroutine ocn_forcing_build_fraction_absorbed_array(meshPool, statePool, forcin
call mpas_pool_get_array(forcingPool, 'fractionAbsorbed', fractionAbsorbed)
call mpas_pool_get_array(forcingPool, 'fractionAbsorbedRunoff', fractionAbsorbedRunoff)
+ call mpas_pool_get_array(forcingPool, 'fractionAbsorbedSubglacialRunoff', fractionAbsorbedSubglacialRunoff)
nCells = nCellsArray( 2 )
@@ -180,6 +182,48 @@ subroutine ocn_forcing_build_fraction_absorbed_array(meshPool, statePool, forcin
end do
end do
+! now do subglacial runoff separately
+ if ( trim(config_subglacial_runoff_mode) == 'data' ) then
+ if ( trim(config_sgr_flux_vertical_location) == 'top' ) then
+ do iCell = 1, nCells
+ zTop = 0.0_RKIND
+ transmissionCoeffTop = ocn_forcing_transmission(zTop, surfaceFluxAttenuationCoefficientSubglacialRunoff(iCell))
+ do k = minLevelCell(iCell), maxLevelCell(iCell)
+ zBot = zTop - layerThickness(k,iCell)
+ transmissionCoeffBot = ocn_forcing_transmission(zBot, surfaceFluxAttenuationCoefficientSubglacialRunoff(iCell))
+ fractionAbsorbedSubglacialRunoff(k, iCell) = transmissionCoeffTop - transmissionCoeffBot
+ zTop = zBot
+ transmissionCoeffTop = transmissionCoeffBot
+ end do
+ end do
+ else if ( trim(config_sgr_flux_vertical_location) == 'uniform' ) then
+ do iCell = 1, nCells
+ ! calculate total thickness
+ zTop = 0.0_RKIND
+ do k = minLevelCell(iCell), maxLevelCell(iCell)
+ zTop = zTop + layerThickness(k,iCell)
+ end do
+ ! distribute flux evenly throughout water column
+ zBot = 0.0_RKIND
+ do k = minLevelCell(iCell), maxLevelCell(iCell)
+ fractionAbsorbedSubglacialRunoff(k, iCell) = layerThickness(k,iCell) / zTop
+ end do
+ end do
+ else if ( trim(config_sgr_flux_vertical_location) == 'bottom' ) then
+ do iCell = 1, nCells
+ zTop = 0.0_RKIND
+ transmissionCoeffTop = ocn_forcing_transmission(zTop, surfaceFluxAttenuationCoefficientSubglacialRunoff(iCell))
+ do k = maxLevelCell(iCell), minLevelCell(iCell), -1
+ zBot = zTop - layerThickness(k,iCell)
+ transmissionCoeffBot = ocn_forcing_transmission(zBot, surfaceFluxAttenuationCoefficientSubglacialRunoff(iCell))
+ fractionAbsorbedSubglacialRunoff(k, iCell) = transmissionCoeffTop - transmissionCoeffBot
+ zTop = zBot
+ transmissionCoeffTop = transmissionCoeffBot
+ end do
+ end do
+ end if
+ end if
+
end subroutine ocn_forcing_build_fraction_absorbed_array!}}}
!***********************************************************************
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_surface_bulk_forcing.F b/components/mpas-ocean/src/shared/mpas_ocn_surface_bulk_forcing.F
index e28c8f1e581..11d70ae9c40 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_surface_bulk_forcing.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_surface_bulk_forcing.F
@@ -49,7 +49,10 @@ module ocn_surface_bulk_forcing
public :: ocn_surface_bulk_forcing_tracers, &
ocn_surface_bulk_forcing_vel, &
ocn_surface_bulk_forcing_thick, &
- ocn_surface_bulk_forcing_init
+ ocn_surface_bulk_forcing_init, &
+ ocn_surface_bulk_forcing_tracers_subglacial_runoff, &
+ ocn_surface_bulk_forcing_thick_subglacial_runoff
+
!--------------------------------------------------------------------
!
@@ -128,6 +131,63 @@ subroutine ocn_surface_bulk_forcing_tracers(meshPool, groupName, forcingPool, tr
end subroutine ocn_surface_bulk_forcing_tracers!}}}
+!***********************************************************************
+!
+! routine ocn_surface_bulk_forcing_tracers_subglacial_runoff
+!
+!> \brief Determines the tracers forcing array used for the bulk forcing.
+!> \author Irena Vankova
+!> \date July 2024
+!> \details
+!> This routine computes the tracers forcing arrays used later in MPAS.
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_surface_bulk_forcing_tracers_subglacial_runoff(meshPool, groupName, forcingPool, &
+ tracersSurfaceFluxSubglacialRunoff, err)!{{{
+
+ !-----------------------------------------------------------------
+ !
+ ! input variables
+ !
+ !-----------------------------------------------------------------
+ type (mpas_pool_type), intent(in) :: meshPool !< Input: mesh information
+ character (len=*) :: groupName !< Input: Name of tracer group
+
+ !-----------------------------------------------------------------
+ !
+ ! input/output variables
+ !
+ !-----------------------------------------------------------------
+ type (mpas_pool_type), intent(inout) :: forcingPool !< Input: Forcing information
+ real (kind=RKIND), dimension(:,:), intent(inout) :: &
+ tracersSurfaceFluxSubglacialRunoff !< Input/Output: Surface flux for tracer group due to subglacial runoff
+
+ !-----------------------------------------------------------------
+ !
+ ! output variables
+ !
+ !-----------------------------------------------------------------
+
+ integer, intent(out) :: err !< Output: Error flag
+
+ !-----------------------------------------------------------------
+ !
+ ! local variables
+ !
+ !-----------------------------------------------------------------
+
+ err = 0
+
+ call mpas_timer_start("bulk_" // trim(groupName))
+ if ( trim(groupName) == 'activeTracers' ) then
+ call ocn_surface_bulk_forcing_active_tracers_subglacial_runoff(meshPool, forcingPool, &
+ tracersSurfaceFluxSubglacialRunoff, err)
+ end if
+ call mpas_timer_stop("bulk_" // trim(groupName))
+
+ end subroutine ocn_surface_bulk_forcing_tracers_subglacial_runoff!}}}
+
!***********************************************************************
!
! routine ocn_surface_bulk_forcing_vel
@@ -333,8 +393,10 @@ subroutine ocn_surface_bulk_forcing_thick(forcingPool, surfaceThicknessFlux, sur
!$acc riverRunoffFlux, iceRunoffFlux, rainFlux)
!$acc parallel loop &
- !$acc present(surfaceThicknessFlux, surfaceThicknessFluxRunoff, evaporationFlux, snowFlux, &
- !$acc seaIceFreshWaterFlux, icebergFreshWaterFlux, riverRunoffFlux, iceRunoffFlux, rainFlux)
+ !$acc present(surfaceThicknessFlux, surfaceThicknessFluxRunoff, &
+ !$acc evaporationFlux, snowFlux, &
+ !$acc seaIceFreshWaterFlux, icebergFreshWaterFlux, riverRunoffFlux, &
+ !$acc iceRunoffFlux, rainFlux)
#else
!$omp parallel
!$omp do schedule(runtime)
@@ -358,6 +420,85 @@ subroutine ocn_surface_bulk_forcing_thick(forcingPool, surfaceThicknessFlux, sur
end subroutine ocn_surface_bulk_forcing_thick!}}}
+!***********************************************************************
+!
+! routine ocn_surface_bulk_forcing_thick_subglacial_runoff
+!
+!> \brief Determines the thickness forcing array used for the bulk forcing.
+!> \author Irena Vankova
+!> \date July 2024
+!> \details
+!> This routine computes the thickness forcing arrays used later in MPAS.
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_surface_bulk_forcing_thick_subglacial_runoff(forcingPool, surfaceThicknessFluxSubglacialRunoff, err)!{{{
+
+ !-----------------------------------------------------------------
+ !
+ ! input/output variables
+ !
+ !-----------------------------------------------------------------
+ type (mpas_pool_type), intent(inout) :: forcingPool !< Input: Forcing information
+ real (kind=RKIND), dimension(:), intent(inout) :: &
+ surfaceThicknessFluxSubglacialRunoff !< Input/Output: Array for surface thickness flux due to subglacial runoff
+
+ !-----------------------------------------------------------------
+ !
+ ! output variables
+ !
+ !-----------------------------------------------------------------
+
+ integer, intent(out) :: err !< Output: Error flag
+
+ !-----------------------------------------------------------------
+ !
+ ! local variables
+ !
+ !-----------------------------------------------------------------
+
+ integer :: iCell, nCells
+
+ real (kind=RKIND), dimension(:), pointer :: subglacialRunoffFlux
+
+ err = 0
+
+ if (bulkThicknessFluxOff) return
+
+ call mpas_timer_start("bulk_thick", .false.)
+
+ call mpas_pool_get_array(forcingPool, 'subglacialRunoffFlux', subglacialRunoffFlux)
+
+ nCells = nCellsHalo( 2 )
+
+ ! Build surface fluxes at cell centers
+
+#ifdef MPAS_OPENACC
+ !$acc enter data copyin(subglacialRunoffFlux)
+
+ !$acc parallel loop &
+ !$acc present(surfaceThicknessFluxSubglacialRunoff, subglacialRunoffFlux)
+#else
+ !$omp parallel
+ !$omp do schedule(runtime)
+#endif
+ do iCell = 1, nCells
+ surfaceThicknessFluxSubglacialRunoff(iCell) = subglacialRunoffFlux(iCell) / rho_sw
+ end do
+#ifndef MPAS_OPENACC
+ !$omp end do
+ !$omp end parallel
+#endif
+
+#ifdef MPAS_OPENACC
+ !$acc exit data delete(subglacialRunoffFlux)
+#endif
+
+ call mpas_timer_stop("bulk_thick")
+
+ end subroutine ocn_surface_bulk_forcing_thick_subglacial_runoff!}}}
+
+
!***********************************************************************
!
! routine ocn_surface_bulk_forcing_init
@@ -470,6 +611,7 @@ subroutine ocn_surface_bulk_forcing_active_tracers(meshPool, forcingPool, tracer
real (kind=RKIND), dimension(:), pointer :: rainTemperatureFlux, evapTemperatureFlux, &
seaIceTemperatureFlux, icebergTemperatureFlux, &
totalFreshWaterTemperatureFlux
+ real (kind=RKIND), dimension(:), pointer :: landIcePressure
real (kind=RKIND) :: requiredSalt, allowedSalt, surfaceTemperatureFluxWithoutRunoff
err = 0
@@ -505,6 +647,8 @@ subroutine ocn_surface_bulk_forcing_active_tracers(meshPool, forcingPool, tracer
call mpas_pool_get_array(forcingPool, 'riverRunoffFlux', riverRunoffFlux)
call mpas_pool_get_array(forcingPool, 'penetrativeTemperatureFlux', penetrativeTemperatureFlux)
+ call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
+
call mpas_pool_get_array(forcingPool, 'rainTemperatureFlux', rainTemperatureFlux)
call mpas_pool_get_array(forcingPool, 'evapTemperatureFlux', evapTemperatureFlux)
call mpas_pool_get_array(forcingPool, 'seaIceTemperatureFlux', seaIceTemperatureFlux)
@@ -565,7 +709,7 @@ subroutine ocn_surface_bulk_forcing_active_tracers(meshPool, forcingPool, tracer
* max(tracerGroup(index_temperature_flux,minLevelCell(iCell),iCell), 0.0_RKIND) / rho_sw
! Accumulate fluxes that use the freezing point
-! mrp performance note: should call ocn_freezing_temperature just once here
+! mrp performance note: should call ocn_freezing_temperature just once here
seaIceTemperatureFlux(iCell) = seaIceFreshWaterFlux(iCell) * &
ocn_freezing_temperature( tracerGroup(index_salinity_flux, minLevelCell(iCell), iCell), pressure=0.0_RKIND, &
inLandIceCavity=.false.) / rho_sw
@@ -579,7 +723,7 @@ subroutine ocn_surface_bulk_forcing_active_tracers(meshPool, forcingPool, tracer
tracersSurfaceFlux(index_temperature_flux, iCell) = tracersSurfaceFlux(index_temperature_flux, iCell) &
+ surfaceTemperatureFluxWithoutRunoff
- ! add runoff contribution for sending through coupler
+ ! add river runoff contribution for sending through coupler
totalFreshWaterTemperatureFlux(iCell) = surfaceTemperatureFluxWithoutRunoff &
+ tracersSurfaceFluxRunoff(index_temperature_flux,iCell)
@@ -603,6 +747,125 @@ subroutine ocn_surface_bulk_forcing_active_tracers(meshPool, forcingPool, tracer
end subroutine ocn_surface_bulk_forcing_active_tracers!}}}
+!***********************************************************************
+!
+! routine ocn_surface_bulk_forcing_active_tracers_subglacial_runoff
+!
+!> \brief Determines the active tracers forcing array used for the bulk forcing.
+!> \author Irena Vankova
+!> \date July 2024
+!> \details
+!> This routine computes the active tracers forcing arrays used later in MPAS.
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_surface_bulk_forcing_active_tracers_subglacial_runoff(meshPool, forcingPool, &
+ tracersSurfaceFluxSubglacialRunoff, err)!{{{
+
+ !-----------------------------------------------------------------
+ !
+ ! input variables
+ !
+ !-----------------------------------------------------------------
+ type (mpas_pool_type), intent(in) :: meshPool !< Input: mesh information
+
+ !-----------------------------------------------------------------
+ !
+ ! input/output variables
+ !
+ !-----------------------------------------------------------------
+ type (mpas_pool_type), intent(inout) :: forcingPool !< Input: Forcing information
+ real (kind=RKIND), dimension(:,:), intent(inout) :: tracersSurfaceFluxSubglacialRunoff
+
+ !-----------------------------------------------------------------
+ !
+ ! output variables
+ !
+ !-----------------------------------------------------------------
+
+ integer, intent(out) :: err !< Output: Error flag
+
+ !-----------------------------------------------------------------
+ !
+ ! local variables
+ !
+ !-----------------------------------------------------------------
+
+ integer :: iCell, nCells
+ integer, pointer :: index_temperature_fluxPtr, index_salinity_fluxPtr
+ integer :: index_temperature_flux, index_salinity_flux
+ integer, dimension(:), pointer :: nCellsArray
+
+ type(mpas_pool_type),pointer :: tracersSurfaceFluxPool
+
+ real (kind=RKIND), dimension(:), pointer :: subglacialRunoffFlux
+ real (kind=RKIND), dimension(:), pointer :: totalFreshWaterTemperatureFlux
+ real (kind=RKIND), dimension(:), pointer :: landIcePressure
+
+ err = 0
+
+ call mpas_pool_get_dimension(meshPool, 'nCellsArray', nCellsArray)
+
+ call mpas_pool_get_subpool(forcingPool, 'tracersSurfaceFlux',tracersSurfaceFluxPool)
+
+ call mpas_pool_get_dimension(tracersSurfaceFluxPool, &
+ 'index_temperatureSurfaceFlux', &
+ index_temperature_fluxPtr)
+ call mpas_pool_get_dimension(tracersSurfaceFluxPool, &
+ 'index_salinitySurfaceFlux', &
+ index_salinity_fluxPtr)
+ index_temperature_flux = index_temperature_fluxPtr
+ index_salinity_flux = index_salinity_fluxPtr
+
+ call mpas_pool_get_array(forcingPool, 'subglacialRunoffFlux', subglacialRunoffFlux)
+
+ call mpas_pool_get_array(forcingPool, 'landIcePressure', landIcePressure)
+
+ call mpas_pool_get_array(forcingPool, 'totalFreshWaterTemperatureFlux', totalFreshWaterTemperatureFlux)
+
+ nCells = nCellsArray( 3 )
+
+ ! Surface fluxes of water have an associated heat content, but the coupled system does not account for this
+ ! Assume surface fluxes of water have a temperature dependent on the incoming mass flux.
+ ! Assume surface fluxes of water have zero salinity. So the RHS forcing is zero for salinity.
+ ! Only include this heat forcing when bulk thickness is turned on
+ ! indices on tracerGroup are (iTracer, iLevel, iCell)
+ if (.not. bulkThicknessFluxOff) then
+ !$omp parallel
+ !$omp do schedule(runtime)
+ do iCell = 1, nCells
+
+ if ( config_use_sgr_opt_temp_prescribed ) then
+ !sgr with fixed prescribed temperature
+ tracersSurfaceFluxSubglacialRunoff(index_temperature_flux,iCell) = subglacialRunoffFlux(iCell) * &
+ config_sgr_temperature_prescribed / rho_sw
+ else
+ !sgr with temperature equal to the local freezing point of freshwater
+ tracersSurfaceFluxSubglacialRunoff(index_temperature_flux,iCell) = subglacialRunoffFlux(iCell) * &
+ ocn_freezing_temperature(salinity=0.0_RKIND, pressure=landIcePressure(iCell), &
+ inLandIceCavity=.true.) / rho_sw
+ end if
+
+ if ( config_use_sgr_opt_salt_prescribed ) then
+ !sgr with fixed prescribed temperature
+ tracersSurfaceFluxSubglacialRunoff(index_salinity_flux,iCell) = subglacialRunoffFlux(iCell) * &
+ config_sgr_salinity_prescribed / rho_sw
+ else
+ !sgr with temperature equal to the local freezing point of freshwater
+ tracersSurfaceFluxSubglacialRunoff(index_salinity_flux,iCell) = 0.0_RKIND
+ end if
+
+ ! add subglacial runoff contribution for sending through coupler
+ totalFreshWaterTemperatureFlux(iCell) = totalFreshWaterTemperatureFlux(iCell) &
+ + tracersSurfaceFluxSubglacialRunoff(index_temperature_flux,iCell)
+
+ end do
+ !$omp end do
+ !$omp end parallel
+ endif ! bulkThicknessFluxOn
+
+ end subroutine ocn_surface_bulk_forcing_active_tracers_subglacial_runoff!}}}
+
end module ocn_surface_bulk_forcing
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_tendency.F b/components/mpas-ocean/src/shared/mpas_ocn_tendency.F
index 99a3bf49844..f85427913b0 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_tendency.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_tendency.F
@@ -128,12 +128,14 @@ subroutine ocn_tend_thick(tendPool, forcingPool)!{{{
! pointers for the actual output variables within the pools above
real (kind=RKIND), dimension(:), pointer, contiguous :: &
surfaceThicknessFlux, &! surface thickness flux
- surfaceThicknessFluxRunoff ! surface thickness flux from runoff
+ surfaceThicknessFluxRunoff, &! surface thickness flux from runoff
+ surfaceThicknessFluxSubglacialRunoff ! surface thickness flux from runoff
real (kind=RKIND), dimension(:,:), pointer, contiguous :: &
tendThick, &! accumulated layer thickness tendency
fractionAbsorbed, &! fraction of sfc flux absorbed
- fractionAbsorbedRunoff ! fraction of runoff flux absorbed
+ fractionAbsorbedRunoff, &! fraction of sfc flux absorbed
+ fractionAbsorbedSubglacialRunoff ! fraction of subglacial runoff flux absorbed
!-----------------------------------------------------------------
! local variables
@@ -154,10 +156,16 @@ subroutine ocn_tend_thick(tendPool, forcingPool)!{{{
surfaceThicknessFlux)
call mpas_pool_get_array(forcingPool, 'surfaceThicknessFluxRunoff', &
surfaceThicknessFluxRunoff)
+ call mpas_pool_get_array(forcingPool, 'surfaceThicknessFluxSubglacialRunoff', &
+ surfaceThicknessFluxSubglacialRunoff)
call mpas_pool_get_array(forcingPool, 'fractionAbsorbed', &
fractionAbsorbed)
call mpas_pool_get_array(forcingPool, 'fractionAbsorbedRunoff', &
fractionAbsorbedRunoff)
+ call mpas_pool_get_array(forcingPool, 'fractionAbsorbedSubglacialRunoff', &
+ fractionAbsorbedSubglacialRunoff)
+
+
!
! layer thickness tendency:
@@ -185,6 +193,25 @@ subroutine ocn_tend_thick(tendPool, forcingPool)!{{{
!$omp end parallel
#endif
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+#ifdef MPAS_OPENACC
+ !$acc enter data create(surfaceThicknessFluxSubglacialRunoff)
+
+ !$acc parallel loop &
+ !$acc present(surfaceThicknessFluxSubglacialRunoff)
+#else
+ !$omp parallel
+ !$omp do schedule(runtime)
+#endif
+ do iCell = 1, nCellsAll
+ surfaceThicknessFluxSubglacialRunoff(iCell) = 0.0_RKIND
+ end do
+#ifndef MPAS_OPENACC
+ !$omp end do
+ !$omp end parallel
+#endif
+ end if
+
! If turned off, return with zero fluxes, tendencies
! Otherwise, start time and call routines to accumulate
if (config_disable_thick_all_tend) return
@@ -195,6 +222,11 @@ subroutine ocn_tend_thick(tendPool, forcingPool)!{{{
surfaceThicknessFlux, &
surfaceThicknessFluxRunoff, err)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ call ocn_surface_bulk_forcing_thick_subglacial_runoff(forcingPool, &
+ surfaceThicknessFluxSubglacialRunoff, err)
+ end if
+
! Compute surface thickness flux from land ice
call ocn_surface_land_ice_fluxes_thick(forcingPool, &
surfaceThicknessFlux, err)
@@ -217,6 +249,11 @@ subroutine ocn_tend_thick(tendPool, forcingPool)!{{{
surfaceThicknessFlux, &
surfaceThicknessFluxRunoff, &
tendThick, err)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ call ocn_thick_surface_flux_tend_subglacial_runoff(fractionAbsorbedSubglacialRunoff, &
+ surfaceThicknessFluxSubglacialRunoff, &
+ tendThick, err)
+ end if
! Compute contribution from frazil ice formation
call ocn_frazil_forcing_layer_thickness(forcingPool, &
@@ -230,7 +267,8 @@ subroutine ocn_tend_thick(tendPool, forcingPool)!{{{
call ocn_manufactured_solution_tend_thick(tendThick, err)
#ifdef MPAS_OPENACC
- !$acc exit data copyout(tendThick, surfaceThicknessFlux, surfaceThicknessFluxRunoff)
+ !$acc exit data copyout(tendThick, surfaceThicknessFlux, surfaceThicknessFluxRunoff, &
+ !$acc surfaceThicknessFluxSubglacialRunoff)
#endif
call mpas_timer_stop("ocn_tend_thick")
@@ -600,9 +638,11 @@ subroutine ocn_tend_tracer(tendPool, statePool, forcingPool, &
real (kind=RKIND), dimension(:,:), pointer, contiguous :: &
layerThickness, &! layer thickness
tracerGroupSurfaceFlux, &! tracer flux at surface
- fractionAbsorbed, &! frac sfc flux aborbed
- fractionAbsorbedRunoff, &! frac runoff flux aborbed
+ fractionAbsorbed, &! frac sfc flux absorbed
+ fractionAbsorbedRunoff, &! frac runoff flux absorbed
+ fractionAbsorbedSubglacialRunoff, &! frac subglacial runoff flux absorbed
tracerGroupSurfaceFluxRunoff, &! runoff flux
+ tracerGroupSurfaceFluxSubglacialRunoff, &! subglacial runoff flux
tracerGroupSurfaceFluxRemoved,&! total sfc flux absorbed
nonLocalSurfaceTracerFlux ! non-local fluxes (eg KPP)
@@ -664,6 +704,8 @@ subroutine ocn_tend_tracer(tendPool, statePool, forcingPool, &
fractionAbsorbed)
call mpas_pool_get_array(forcingPool, 'fractionAbsorbedRunoff', &
fractionAbsorbedRunoff)
+ call mpas_pool_get_array(forcingPool, 'fractionAbsorbedSubglacialRunoff', &
+ fractionAbsorbedSubglacialRunoff)
! allocate and transfer data not specific to tracer groups
allocate(normalThicknessFlux(nVertLevels, nEdgesAll+1))
@@ -788,6 +830,16 @@ subroutine ocn_tend_tracer(tendPool, statePool, forcingPool, &
modifiedGroupName, &
tracerGroupSurfaceFluxRunoff)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ ! Get surface flux due to subglacial runoff array
+ ! only active tracers have subglacial runoff flux for now,
+ ! but we still need to associate for ALL tracers
+ modifiedGroupName = groupName // "SurfaceFluxSubglacialRunoff"
+ call mpas_pool_get_array(tracersSurfaceFluxPool, &
+ modifiedGroupName, &
+ tracerGroupSurfaceFluxSubglacialRunoff)
+ end if
+
! Get surface flux removed array to keep track of how much
! flux is ignored
modifiedGroupName = groupName // "SurfaceFluxRemoved"
@@ -820,6 +872,18 @@ subroutine ocn_tend_tracer(tendPool, statePool, forcingPool, &
!$omp end do
!$omp end parallel
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ !$omp parallel
+ !$omp do schedule(runtime) private(n)
+ do iCell = 1, nCellsAll
+ do n=1,nTracersGroup
+ tracerGroupSurfaceFluxSubglacialRunoff (n,iCell) = 0.0_RKIND
+ end do
+ end do
+ !$omp end do
+ !$omp end parallel
+ end if
+
!
! compute surface tracer flux from bulk forcing
!
@@ -831,6 +895,11 @@ subroutine ocn_tend_tracer(tendPool, statePool, forcingPool, &
tracerGroupSurfaceFluxRunoff, &
tracerGroupSurfaceFluxRemoved, &
dt, layerThickness, err)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ call ocn_surface_bulk_forcing_tracers_subglacial_runoff(meshPool, groupName, &
+ forcingPool, &
+ tracerGroupSurfaceFluxSubglacialRunoff, err)
+ end if
end if ! sfc bulk forcing
@@ -1188,10 +1257,15 @@ subroutine ocn_tend_tracer(tendPool, statePool, forcingPool, &
endif ! compute budgets
call ocn_tracer_surface_flux_tend(meshPool, fractionAbsorbed, &
- fractionAbsorbedRunoff, layerThickness, &
- tracerGroupSurfaceFlux, &
+ fractionAbsorbedRunoff, &
+ layerThickness, tracerGroupSurfaceFlux, &
tracerGroupSurfaceFluxRunoff, &
tracerGroupTend, err)
+ if (trim(config_subglacial_runoff_mode) == 'data') then
+ call ocn_tracer_surface_flux_tend_subglacial_runoff(meshPool, fractionAbsorbedSubglacialRunoff, &
+ layerThickness, tracerGroupSurfaceFluxSubglacialRunoff, &
+ tracerGroupTend, err)
+ end if
!
! Compute shortwave absorption
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_thick_surface_flux.F b/components/mpas-ocean/src/shared/mpas_ocn_thick_surface_flux.F
index 438aabafee1..1c535532cea 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_thick_surface_flux.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_thick_surface_flux.F
@@ -46,7 +46,8 @@ module ocn_thick_surface_flux
!--------------------------------------------------------------------
public :: ocn_thick_surface_flux_tend, &
- ocn_thick_surface_flux_init
+ ocn_thick_surface_flux_init, &
+ ocn_thick_surface_flux_tend_subglacial_runoff
!--------------------------------------------------------------------
!
@@ -69,7 +70,7 @@ module ocn_thick_surface_flux
!> \date 15 September 2011
!> \details
!> This routine computes the horizontal advection tendency for
-!> thicknes based on current state and user choices of forcings.
+!> thickness based on current state and user choices of forcings.
!
!-----------------------------------------------------------------------
@@ -86,8 +87,8 @@ subroutine ocn_thick_surface_flux_tend(transmissionCoefficients, transmissionCoe
transmissionCoefficientsRunoff !< Input: Coefficients for the transmission of surface fluxes due to river runoff
real (kind=RKIND), dimension(:), intent(in) :: &
- surfaceThicknessFlux, &!< Input: surface flux of thickness
- surfaceThicknessFluxRunoff !< Input: surface flux of thickness due to river runoff
+ surfaceThicknessFlux, &!< Input: surface flux of thickness
+ surfaceThicknessFluxRunoff !< Input: surface flux of thickness due to river runoff
!-----------------------------------------------------------------
@@ -140,7 +141,6 @@ subroutine ocn_thick_surface_flux_tend(transmissionCoefficients, transmissionCoe
do k = minLevelCell(iCell), maxLevelCell(iCell)
remainingFlux = remainingFlux - transmissionCoefficients(k, iCell)
remainingFluxRunoff = remainingFluxRunoff - transmissionCoefficientsRunoff(k, iCell)
-
tend(k, iCell) = tend(k, iCell) + surfaceThicknessFlux(iCell) * transmissionCoefficients(k, iCell) &
+ surfaceThicknessFluxRunoff(iCell) * transmissionCoefficientsRunoff(k, iCell)
end do
@@ -153,6 +153,7 @@ subroutine ocn_thick_surface_flux_tend(transmissionCoefficients, transmissionCoe
tend(maxLevelCell(iCell), iCell) = tend(maxLevelCell(iCell), iCell) &
+ remainingFluxRunoff * surfaceThicknessFluxRunoff(iCell)
end if
+
end do
#ifndef MPAS_OPENACC
!$omp end do
@@ -169,6 +170,107 @@ subroutine ocn_thick_surface_flux_tend(transmissionCoefficients, transmissionCoe
end subroutine ocn_thick_surface_flux_tend!}}}
+!***********************************************************************
+!
+! routine ocn_thick_surface_flux_tend_subglacial_runoff
+!
+!> \brief Computes tendency term from horizontal advection of thickness
+!> \author Irena Vankova
+!> \date July 2024
+!> \details
+!> This routine computes the horizontal advection tendency for
+!> thickness based on current state and user choices of forcings.
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_thick_surface_flux_tend_subglacial_runoff(transmissionCoefficientsSubglacialRunoff, &
+ surfaceThicknessFluxSubglacialRunoff, tend, err)!{{{
+ !-----------------------------------------------------------------
+ !
+ ! input variables
+ !
+ !-----------------------------------------------------------------
+
+ real (kind=RKIND), dimension(:,:), intent(in) :: &
+ transmissionCoefficientsSubglacialRunoff !< Input: Coefficients for the transmission of surface fluxes due to subglacial runoff
+
+ real (kind=RKIND), dimension(:), intent(in) :: &
+ surfaceThicknessFluxSubglacialRunoff !< Input: surface flux of thickness due to subglacial runoff
+
+
+ !-----------------------------------------------------------------
+ !
+ ! input/output variables
+ !
+ !-----------------------------------------------------------------
+
+ real (kind=RKIND), dimension(:,:), intent(inout) :: &
+ tend !< Input/Output: thickness tendency
+
+ !-----------------------------------------------------------------
+ !
+ ! output variables
+ !
+ !-----------------------------------------------------------------
+
+ integer, intent(out) :: err !< Output: error flag
+
+ !-----------------------------------------------------------------
+ !
+ ! local variables
+ !
+ !-----------------------------------------------------------------
+
+ integer :: iCell, k
+
+ real (kind=RKIND) :: remainingFlux, remainingFluxRunoff, remainingFluxSubglacialRunoff
+
+ err = 0
+
+ if (.not. surfaceThicknessFluxOn) return
+
+ call mpas_timer_start("thick surface flux")
+
+#ifdef MPAS_OPENACC
+ !$acc enter data copyin(transmissionCoefficientsSubglacialRunoff)
+
+ !$acc parallel loop &
+ !$acc present(tend, &
+ !$acc surfaceThicknessFluxSubglacialRunoff, transmissionCoefficientsSubglacialRunoff, &
+ !$acc minLevelCell, maxLevelCell) &
+ !$acc private(k, remainingFluxSubglacialRunoff)
+#else
+ !$omp parallel
+ !$omp do schedule(runtime) private(remainingFluxSubglacialRunoff, k)
+#endif
+ do iCell = 1, nCellsOwned
+ remainingFluxSubglacialRunoff = 1.0_RKIND
+ do k = minLevelCell(iCell), maxLevelCell(iCell)
+ remainingFluxSubglacialRunoff = remainingFluxSubglacialRunoff - transmissionCoefficientsSubglacialRunoff(k, iCell)
+ tend(k, iCell) = tend(k, iCell) + surfaceThicknessFluxSubglacialRunoff(iCell) * transmissionCoefficientsSubglacialRunoff(k, iCell)
+ end do
+
+ if(maxLevelCell(iCell) > 0 .and. remainingFluxSubglacialRunoff > 0.0_RKIND) then
+ tend(maxLevelCell(iCell), iCell) = tend(maxLevelCell(iCell), iCell) &
+ + remainingFluxSubglacialRunoff * surfaceThicknessFluxSubglacialRunoff(iCell)
+ end if
+
+ end do
+#ifndef MPAS_OPENACC
+ !$omp end do
+ !$omp end parallel
+#endif
+
+#ifdef MPAS_OPENACC
+ !$acc exit data delete(transmissionCoefficientsSubglacialRunoff)
+#endif
+
+ call mpas_timer_stop("thick surface flux")
+
+ !--------------------------------------------------------------------
+
+ end subroutine ocn_thick_surface_flux_tend_subglacial_runoff!}}}
+
!***********************************************************************
!
! routine ocn_thick_surface_flux_init
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_tracer_surface_flux_to_tend.F b/components/mpas-ocean/src/shared/mpas_ocn_tracer_surface_flux_to_tend.F
index 57e2949bac9..ba97203c4ec 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_tracer_surface_flux_to_tend.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_tracer_surface_flux_to_tend.F
@@ -45,7 +45,8 @@ module ocn_tracer_surface_flux_to_tend
!--------------------------------------------------------------------
public :: ocn_tracer_surface_flux_tend, &
- ocn_tracer_surface_flux_init
+ ocn_tracer_surface_flux_init, &
+ ocn_tracer_surface_flux_tend_subglacial_runoff
!--------------------------------------------------------------------
!
@@ -71,8 +72,8 @@ module ocn_tracer_surface_flux_to_tend
!
!-----------------------------------------------------------------------
- subroutine ocn_tracer_surface_flux_tend(meshPool, fractionAbsorbed, fractionAbsorbedRunoff, layerThickness, &
- surfaceTracerFlux, surfaceTracerFluxRunoff, tend, err)!{{{
+ subroutine ocn_tracer_surface_flux_tend(meshPool, fractionAbsorbed, fractionAbsorbedRunoff, &
+ layerThickness, surfaceTracerFlux, surfaceTracerFluxRunoff, tend, err)!{{{
!-----------------------------------------------------------------
!
! input variables
@@ -197,11 +198,120 @@ subroutine ocn_tracer_surface_flux_tend(meshPool, fractionAbsorbed, fractionAbso
call mpas_timer_stop("surface_tracer_runoff_flux")
end if
-
!--------------------------------------------------------------------
end subroutine ocn_tracer_surface_flux_tend!}}}
+
+!***********************************************************************
+!
+! routine ocn_tracer_surface_flux_tend_subglacial_runoff
+!
+!> \brief Computes tendency term for surface fluxes
+!> \author Irena Vankova
+!> \date July 2024
+!> \details
+!> This routine computes the tendency for tracers based on surface fluxes.
+!
+!-----------------------------------------------------------------------
+
+ subroutine ocn_tracer_surface_flux_tend_subglacial_runoff(meshPool, fractionAbsorbedSubglacialRunoff, &
+ layerThickness, surfaceTracerFluxSubglacialRunoff, tend, err)!{{{
+ !-----------------------------------------------------------------
+ !
+ ! input variables
+ !
+ !-----------------------------------------------------------------
+
+ type (mpas_pool_type), intent(in) :: &
+ meshPool !< Input: mesh information
+
+ real (kind=RKIND), dimension(:,:), intent(in) :: &
+ layerThickness !< Input: Layer thickness
+
+ real (kind=RKIND), dimension(:,:), intent(in), pointer :: &
+ surfaceTracerFluxSubglacialRunoff !< Input: surface tracer fluxes from subglacial runoff
+
+ real (kind=RKIND), dimension(:,:), intent(in) :: &
+ fractionAbsorbedSubglacialRunoff !< Input: Coefficients for the application of surface fluxes due to subglacial runoff
+
+
+ !-----------------------------------------------------------------
+ !
+ ! input/output variables
+ !
+ !-----------------------------------------------------------------
+
+ real (kind=RKIND), dimension(:,:,:), intent(inout) :: &
+ tend !< Input/Output: velocity tendency
+
+ !-----------------------------------------------------------------
+ !
+ ! output variables
+ !
+ !-----------------------------------------------------------------
+
+ integer, intent(out) :: err !< Output: error flag
+
+ !-----------------------------------------------------------------
+ !
+ ! local variables
+ !
+ !-----------------------------------------------------------------
+
+ integer :: iCell, k, iTracer, nTracers, nCells
+ integer, pointer :: nVertLevels
+ integer, dimension(:), pointer :: nCellsArray
+ integer, dimension(:), pointer :: minLevelCell, maxLevelCell
+
+ real (kind=RKIND) :: remainingFlux
+
+ err = 0
+
+ if (.not. surfaceTracerFluxOn) return
+
+ call mpas_pool_get_dimension(meshPool, 'nCellsArray', nCellsArray)
+ call mpas_pool_get_dimension(meshPool, 'nVertLevels', nVertLevels)
+ nTracers = size(tend, dim=1)
+
+ call mpas_pool_get_array(meshPool, 'minLevelCell', minLevelCell)
+ call mpas_pool_get_array(meshPool, 'maxLevelCell', maxLevelCell)
+
+ nCells = nCellsArray( 1 )
+
+ ! now do subglacial runoff component
+
+ call mpas_timer_start("surface_tracer_subglacial_runoff_flux")
+
+ !$omp parallel
+ !$omp do schedule(runtime) private(remainingFlux, k, iTracer)
+ do iCell = 1, nCells
+ remainingFlux = 1.0_RKIND
+ do k = minLevelCell(iCell), maxLevelCell(iCell)
+ remainingFlux = remainingFlux - fractionAbsorbedSubglacialRunoff(k, iCell)
+
+ do iTracer = 1, nTracers
+ tend(iTracer, k, iCell) = tend(iTracer, k, iCell) + &
+ surfaceTracerFluxSubglacialRunoff(iTracer, iCell) * fractionAbsorbedSubglacialRunoff(k, iCell)
+ end do
+ end do
+
+ if(maxLevelCell(iCell) > 0 .and. remainingFlux > 0.0_RKIND) then
+ do iTracer = 1, nTracers
+ tend(iTracer, maxLevelCell(iCell), iCell) = tend(iTracer, maxLevelCell(iCell), iCell) &
+ + surfaceTracerFluxSubglacialRunoff(iTracer, iCell) * remainingFlux
+ end do
+ end if
+ end do
+ !$omp end do
+ !$omp end parallel
+
+ call mpas_timer_stop("surface_tracer_subglacial_runoff_flux")
+
+ !--------------------------------------------------------------------
+
+ end subroutine ocn_tracer_surface_flux_tend_subglacial_runoff!}}}
+
!***********************************************************************
!
! routine ocn_tracer_surface_flux_init
diff --git a/components/mpas-ocean/src/tracer_groups/Registry_CFC.xml b/components/mpas-ocean/src/tracer_groups/Registry_CFC.xml
index d77859dcef8..b0adb7d595f 100644
--- a/components/mpas-ocean/src/tracer_groups/Registry_CFC.xml
+++ b/components/mpas-ocean/src/tracer_groups/Registry_CFC.xml
@@ -95,6 +95,15 @@
description="CFC12 Surface Flux Due to Runoff"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/mpas-ocean/src/tracer_groups/Registry_idealAge.xml b/components/mpas-ocean/src/tracer_groups/Registry_idealAge.xml
index c6adca3ea63..3a45bc10b79 100644
--- a/components/mpas-ocean/src/tracer_groups/Registry_idealAge.xml
+++ b/components/mpas-ocean/src/tracer_groups/Registry_idealAge.xml
@@ -69,6 +69,11 @@
description="Flux of iAge through the ocean surface due to river runoff. Positive into ocean."
/>
+
+
+
0.063
0.063
0.063
-0.0
-0.7
-0.7
+0.19
+0.19
+0.19
0.007
0.007
0.007
diff --git a/components/mpas-seaice/src/shared/mpas_seaice_icepack.F b/components/mpas-seaice/src/shared/mpas_seaice_icepack.F
index c6386f2c1aa..36899b4b10d 100644
--- a/components/mpas-seaice/src/shared/mpas_seaice_icepack.F
+++ b/components/mpas-seaice/src/shared/mpas_seaice_icepack.F
@@ -10656,15 +10656,6 @@ subroutine init_icepack_package_configs(domain)
call seaice_icepack_write_warnings(icepack_warnings_aborted())
-!note that icepack_recompute_constants, called from icepck_init_parameters above, recomputes Lfresh
-! - make Lfresh optional for E3SM?
-
-! tcraig, this will write out icepack parameters to fort.101, need to uncomment 3 lines
- if (mpas_log_info % taskID == 0) then
- call icepack_write_parameters(101)
- endif
-! call seaice_icepack_write_warnings(icepack_warnings_aborted())
-
call mpas_log_write(" ----- compare values after icepack init -----")
! Lfresh is derived in Icepack, not sent in from driver
diff --git a/docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/add-grid-config.md b/docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/add-grid-config.md
index b872658db45..f46a84afa76 100644
--- a/docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/add-grid-config.md
+++ b/docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/add-grid-config.md
@@ -1,3 +1,3 @@
# Add New Grid Configuration to E3SM
-[Back to Adding Support for New Grids](../adding-grid-support-step-by-step-guide.md)
+Back to step-by-step guide for [Adding Support for New Grids](../adding-grid-support-step-by-step-guide.md)
diff --git a/docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-dry-deposition.md b/docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-dry-deposition.md
index f9dc7ff9eda..79e6fd017a4 100644
--- a/docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-dry-deposition.md
+++ b/docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-dry-deposition.md
@@ -1,6 +1,40 @@
# Generate a Dry Deposition File
-!!!WARNING
- This page is still under construction
+Atmospheric dry deposition of aerosols at the surface depends on certain surface properties, such as soil type. In some cases these calculations can be handled in the land model and passed to the atmosphere through the coupler. However, with modal areosols this method is not adequate and we must recalculate these fields in the atmosphere (see subroutine `interp_map` in `components/eam/src/chemistry/mozart/mo_drydep.F90`).
+
+For unstructured grids it was determined to create this offline interpolation tool rather than generalize the subroutine interp_map.
+
+Be sure to activate the [E3SM unified environment](https://e3sm.org/resources/tools/other-tools/e3sm-unified-environment/) when performing the steps below.
+
+## Map File Generation
+
+The destination atmosphere grid file should be on the "pg2" grid. These grid files are easily generated with three TempestRemap commands as follows:
+
+```shell
+NE=30
+GenerateCSMesh --alt --res ${NE} --file ${GRID_ROOT}/ne${NE}.g
+GenerateVolumetricMesh --in ${GRID_ROOT}/ne${NE}.g --out ${GRID_ROOT}/ne${NE}pg2.g --np 2 --uniform
+ConvertMeshToSCRIP --in ${GRID_ROOT}/ne${NE}pg2.g --out ${GRID_ROOT}/ne${NE}pg2_scrip.nc
+```
+
+The map file used to generate atmsrf files can be created a few different ways. For a typical E3SM configuration we recommend using a conservative, monotone map. Here is an example command that can be used to generate one (as of NCO version 5.2.2)
+
+```shell
+SRC_GRID=${DIN_LOC_ROOT}/../mapping/grids/1x1d.nc
+DST_GRID=${GRID_ROOT}/ne${NE}pg2_scrip.nc
+MAP_FILE=${MAP_ROOT}/map_1x1_to_ne${NE}pg2_traave.nc
+ncremap -5 -a traave --src_grd=${SRC_GRID} --dst_grd=${DST_GRID} --map_file=${MAP_FILE}
+```
+
+For RRM grids the last two commands would be used on the exodus file produced by [SQuadGen](https://github.com/ClimateGlobalChange/squadgen) (See the [Adding Support for New Grids](https://docs.e3sm.org/user-guides/adding-grid-support-overview.md) tutorial for more information.).
+
+## Generating a New Dry Desposition File (atmsrf)
+
+```shell
+VEGE_FILE=${DIN_LOC_ROOT}/atm/cam/chem/trop_mozart/dvel/regrid_vegetation.nc
+SOIL_FILE=${DIN_LOC_ROOT}/atm/cam/chem/trop_mozart/dvel/clim_soilw.nc
+
+python ~/E3SM/mkatmsrffile.py --map_file=${MAP_FILE} --vegetation_file=${VEGE_FILE} --soil_water_file=${SOIL_FILE} --output_root=${atmsrf_root} --dst_grid=ne${NE}pg2 --date-stamp=20240613
+```
Back to step-by-step guide for [Adding Support for New Grids](../adding-grid-support-step-by-step-guide.md)
diff --git a/docs/user-guide/index.md b/docs/user-guide/index.md
index c2daf519a42..53fa28d64e2 100644
--- a/docs/user-guide/index.md
+++ b/docs/user-guide/index.md
@@ -24,7 +24,7 @@ is available.
A *fully coupled* compset is one which has active components for at least the atmosphere, ocean, land surface, ocean and
sea-ice all interacting. Each compset is associated with a specific forcing condition.
-Coupled compsets in E3SM are developed for three science-driven simulation campaigns: `water cycle change and impacts`, `human-earth system feedbacks`, and `polar processes, sea-level rise and coastal impacts`. The standard coupled configurations -- which consist of prognostic atmosphere, land, river, ocean and sea-ice components -- form the base physical coupled system and are mainly designed for `water cycle change and impacts` simulation campaign.
+Coupled compsets in E3SM are developed for three science-driven simulation campaigns: **water cycle change and impacts**, **human-earth system feedbacks**, and **polar processes, sea-level rise and coastal impacts**. The standard coupled configurations -- which consist of prognostic atmosphere, land, river, ocean and sea-ice components -- form the base physical coupled system and are mainly designed for `water cycle change and impacts` simulation campaign.
Below list the standard configuration compsets supported in the current version of E3SM:
|Compset alias | Description |
@@ -37,6 +37,35 @@ Below list the standard configuration compsets supported in the current version
|`WCYCLSSP245` | Standard configuration with prescribed SSP-245 forcings |
|`WCYCLSSP370` | Standard configuration with prescribed SSP-370 forcings |
|`WCYCLSSP585` | Standard configuration with prescribed SSP-585 forcings |
+| | **Compsets for single-forcings simulations of the historical period (1850-2014)** |
+|`WCYCL20TR-GHG` | Greenhouse gases only configuration (`GHGs`)|
+|`WCYCL20TR-aer` | Anthropogenic aerosols and precursors only configuration (`aer`)|
+|`WCYCL20TR-xGHG-xaer` | All forcings except GHGs and aer (`solar irradiance, stratospheric ozone and volcanic emissions, land use land cover`) |
+|`WCYCL20TR-xaer` | All forcings except aer (`GHGs, solar irradiance, stratospheric ozone and volcanic emissions, land use land cover`) |
+|`WCYCL20TR-nat` | Natural-only configuration (`solar irradiance, stratospheric volcanic emissions, land use land cover`) |
+|`WCYCL20TR-ozone` | Stratospheric ozone only configuration |
+|`WCYCL20TR-lulc` | Land use land cover only configuration |
+|`WCYCL20TR-volc` | Stratospheric volcanic emissions only configuration |
+
+The table below specifies which forcing category is fixed at 1850 conditions and which are allowed to vary over the historical period
+for each of the historical ("20TR") compsets including the single-forcing compsets.
+
+|Compset alias | GHGs | Aerosol & precursors | Oxidants | Ozone (CI & Linoz) | Volcano | Solar | Land Use & ndep/popdensa |
+|:------------ |:-----: | :---: | :---: | :---: | :---: | :---: | :---: |
+|`WCYCL20TR` | varying | varying | varying | varying | varying | varying | varying |
+|`WCYCL20TR-GHG`| varying | 1850 | 1850 | 1850 | 1850 | 1850 | 1850 |
+|`WCYCL20TR-aer`| 1850 | varying | varying | 1850 | 1850 | 1850 | 1850 |
+|`WCYCL20TR-xGHG-xaer`| 1850 | 1850 | 1850 | varying | varying | varying | varying |
+|`WCYCL20TR-xaer`| varying | 1850 | 1850 | varying | varying | varying | varying |
+|`WCYCL20TR-nat`| 1850 | 1850 | 1850 | 1850 | varying | varying | 1850 |
+|`WCYCL20TR-ozone`| 1850 | 1850 | 1850 | varying | 1850 | 1850 | 1850 |
+|`WCYCL20TR-lulc`| 1850 | 1850 | 1850 | 1850 | 1850 | 1850 | varying |
+|`WCYCL20TR-volc`| 1850 | 1850 | 1850 | 1850 | varying | 1850 | 1850 |
+
+
+- *Volcano* refers to stratospheric volcanic SO2 emissions; *1850* for *Volcano* refers to background (average) stratospheric volcanic emissions used in pre-industrial control experiments
+
+- *Oxidants* always follow *Aerosol & precursors* for fixed or varying.
The compsets for the other two science simulation campaigns are being finalized, with additional components and/or features.
The compset naming follows the same convention, e.g., `CRYO1850` and `CRYO1850-4xCO2` are with prognostic ice-shelf melt fluxes for the `polar processes` simulation campaign.
diff --git a/driver-mct/cime_config/config_component_e3sm.xml b/driver-mct/cime_config/config_component_e3sm.xml
index 08758f93531..8fc93b607d4 100755
--- a/driver-mct/cime_config/config_component_e3sm.xml
+++ b/driver-mct/cime_config/config_component_e3sm.xml
@@ -753,8 +753,13 @@
312.821
388.717
388.717
- 0.000001
- 0.000001
+ 284.317
+ 284.317
+ 284.317
+ 284.317
+ 284.317
+ 284.317
+ 0.000001
284.317
284.317
284.317
@@ -857,6 +862,7 @@
1
2
+ 2
shr_dust_nl
env_run.xml
diff --git a/run_e3sm.template.sh b/run_e3sm.template.sh
index 623867c0190..49869f5c6f6 100755
--- a/run_e3sm.template.sh
+++ b/run_e3sm.template.sh
@@ -3,10 +3,7 @@
# E3SM Coupled Model Group run_e3sm script template.
#
# Bash coding style inspired by:
-# http://kfirlavi.herokuapp.com/blog/2012/11/14/defensive-bash-programming
-
-# TO DO:
-# - custom pelayout
+# https://web.archive.org/web/20200620202413/http://kfirlavi.herokuapp.com/blog/2012/11/14/defensive-bash-programming
main() {
@@ -17,8 +14,9 @@ main() {
# Machine and project
readonly MACHINE=pm-cpu
-# BEFORE RUNNING: CHANGE this to your project
-readonly PROJECT="e3sm"
+# NOTE: The command below will return your default project on SLURM-based systems.
+# If you are not using SLURM or need a different project, remove the command and set it directly
+readonly PROJECT="$(sacctmgr show user $USER format=DefaultAccount | tail -n1 | tr -d ' ')"
# Simulation
readonly COMPSET="WCYCL1850"
@@ -46,8 +44,8 @@ readonly GET_REFCASE=TRUE
#readonly RUN_REFDATE="" # same as MODEL_START_DATE for 'branch', can be different for 'hybrid'
# Set paths
+readonly CASE_ROOT="${PSCRATCH}/E3SMv3/${CASE_NAME}"
readonly CODE_ROOT="${HOME}/E3SMv3/code/${CHECKOUT}"
-readonly CASE_ROOT="/pscratch/sd/r/${USER}/e3sm-scratch/${CASE_NAME}"
# Sub-directories
readonly CASE_BUILD_DIR=${CASE_ROOT}/build
@@ -56,6 +54,7 @@ readonly CASE_ARCHIVE_DIR=${CASE_ROOT}/archive
# Define type of run
# short tests: 'XS_2x5_ndays', 'XS_1x10_ndays', 'S_1x10_ndays',
# 'M_1x10_ndays', 'M2_1x10_ndays', 'M80_1x10_ndays', 'L_1x10_ndays'
+# * can replace XS, M, etc. with custom-XY with XY being the node count
# or 'production' for full simulation
readonly run='XS_2x5_ndays'
if [ "${run}" != "production" ]; then
@@ -118,6 +117,9 @@ fetch_code
# Create case
create_newcase
+# Custom PE layout
+custom_pelayout
+
# Setup
case_setup
@@ -322,6 +324,14 @@ create_newcase() {
echo $'\n----- Starting create_newcase -----\n'
+
+ if [[ ${PELAYOUT} == custom-* ]];
+ then
+ layout="M" # temporary placeholder for create_newcase
+ else
+ layout=${PELAYOUT}
+ fi
+
if [[ -z "$CASE_GROUP" ]]; then
${CODE_ROOT}/cime/scripts/create_newcase \
--case ${CASE_NAME} \
@@ -333,7 +343,7 @@ create_newcase() {
--machine ${MACHINE} \
--project ${PROJECT} \
--walltime ${WALLTIME} \
- --pecount ${PELAYOUT}
+ --pecount ${layout}
else
${CODE_ROOT}/cime/scripts/create_newcase \
--case ${CASE_NAME} \
@@ -346,7 +356,7 @@ create_newcase() {
--machine ${MACHINE} \
--project ${PROJECT} \
--walltime ${WALLTIME} \
- --pecount ${PELAYOUT}
+ --pecount ${layout}
fi
@@ -398,6 +408,43 @@ case_setup() {
popd
}
+#-----------------------------------------------------
+custom_pelayout() {
+
+if [[ ${PELAYOUT} == custom-* ]];
+then
+ echo $'\n CUSTOMIZE PROCESSOR CONFIGURATION:'
+
+ # Number of cores per node (machine specific)
+ if [ "${MACHINE}" == "pm-cpu" ]; then
+ ncore=128
+ elif [ "${MACHINE}" == "chrysalis" ]; then
+ ncore=64
+ elif [ "${MACHINE}" == "compy" ]; then
+ ncore=40
+ elif [ "${MACHINE}" == "anvil" ]; then
+ ncore=36
+ else
+ echo 'ERROR: MACHINE = '${MACHINE}' is not supported for custom PE layout.'
+ exit 400
+ fi
+
+ # Extract number of nodes
+ tmp=($(echo ${PELAYOUT} | tr "-" " "))
+ nnodes=${tmp[1]}
+
+ # Customize
+ pushd ${CASE_SCRIPTS_DIR}
+ ./xmlchange NTASKS=$(( $nnodes * $ncore ))
+ ./xmlchange NTHRDS=1
+ ./xmlchange MAX_MPITASKS_PER_NODE=$ncore
+ ./xmlchange MAX_TASKS_PER_NODE=$ncore
+ popd
+
+fi
+
+}
+
#-----------------------------------------------------
case_build() {
@@ -534,9 +581,10 @@ copy_script() {
local script_provenance_dir=${CASE_SCRIPTS_DIR}/run_script_provenance
mkdir -p ${script_provenance_dir}
- local this_script_name=`basename $0`
+ local this_script_name=$( basename -- "$0"; )
+ local this_script_dir=$( dirname -- "$0"; )
local script_provenance_name=${this_script_name}.`date +%Y%m%d-%H%M%S`
- cp -vp ${this_script_name} ${script_provenance_dir}/${script_provenance_name}
+ cp -vp "${this_script_dir}/${this_script_name}" ${script_provenance_dir}/${script_provenance_name}
}
diff --git a/share/util/shr_pio_mod.F90 b/share/util/shr_pio_mod.F90
index 0935bce351a..d500cbc680a 100644
--- a/share/util/shr_pio_mod.F90
+++ b/share/util/shr_pio_mod.F90
@@ -173,17 +173,24 @@ subroutine shr_pio_init2(comp_id, comp_name, comp_iamin, comp_comm, comp_comm_ia
logical, intent(in) :: comp_iamin(:)
character(len=*), intent(in) :: comp_name(:)
integer, intent(in) :: comp_comm(:), comp_comm_iam(:)
+ integer(kind=pio_offset_kind) :: cur_buffer_size_limit=-1
integer :: i
character(len=shr_kind_cl) :: nlfilename, cname
integer :: ret
character(*), parameter :: subName = '(shr_pio_init2) '
! 0 is a valid value of pio_buffer_size_limit
- if(pio_buffer_size_limit>=0) then
+ ! -1 is the value used by CIME to let the library choose the buffer limit
+ if(pio_buffer_size_limit>=-1) then
+ call pio_set_buffer_size_limit(pio_buffer_size_limit, prev_limit=cur_buffer_size_limit)
if(comp_comm_iam(1)==0) then
- write(shr_log_unit,*) 'Setting pio_buffer_size_limit : ',pio_buffer_size_limit
+ if(pio_buffer_size_limit >= 0) then
+ write(shr_log_unit,*) 'Set pio_buffer_size_limit to : ', pio_buffer_size_limit, ' (bytes)'
+ else
+ ! Default pio_buffer_size_limit
+ write(shr_log_unit,*) 'Using pio_buffer_size_limit (default): ', cur_buffer_size_limit, ' (bytes)'
+ end if
end if
- call pio_set_buffer_size_limit(pio_buffer_size_limit)
endif
if(pio_blocksize>0) then
if(comp_comm_iam(1)==0) then