From b0267f39ca5dbfb19efd16cd7991143fdddce62f Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 13 Apr 2022 19:31:31 +0000 Subject: [PATCH 01/75] update submodules --- .gitmodules | 4 ++-- FV3 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 5ece87098e..23a25d71d1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "FV3"] path = FV3 - url = https://github.com/NOAA-EMC/fv3atm + url = https://github.com/lisa-bengtsson/fv3atm branch = develop [submodule "WW3"] path = WW3 @@ -8,7 +8,7 @@ branch = dev/ufs-weather-model [submodule "stochastic_physics"] path = stochastic_physics - url = https://github.com/noaa-psd/stochastic_physics + url = https://github.com/lisa-bengtsson/stochastic_physics branch = master [submodule "CMakeModules"] path = CMakeModules diff --git a/FV3 b/FV3 index bffbeeb523..5339d29d65 160000 --- a/FV3 +++ b/FV3 @@ -1 +1 @@ -Subproject commit bffbeeb523bba6119dd17abfc73ab9125a4f5e07 +Subproject commit 5339d29d65efc4cb645338698696ab3eaebdd31f From 11b5d4af05b34c62728012660262aa809dd2d259 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Mon, 18 Apr 2022 15:10:11 +0000 Subject: [PATCH 02/75] updating submodules --- FV3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FV3 b/FV3 index 5339d29d65..ca133dd404 160000 --- a/FV3 +++ b/FV3 @@ -1 +1 @@ -Subproject commit 5339d29d65efc4cb645338698696ab3eaebdd31f +Subproject commit ca133dd404276e852a1665b6676ba308b45ce497 From 2581c29482fd9c4c4bad8d1b8fba133123868365 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Tue, 19 Apr 2022 19:25:17 +0000 Subject: [PATCH 03/75] update submodules --- FV3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FV3 b/FV3 index ca133dd404..37bf66d711 160000 --- a/FV3 +++ b/FV3 @@ -1 +1 @@ -Subproject commit ca133dd404276e852a1665b6676ba308b45ce497 +Subproject commit 37bf66d71108a4ff414950d117c621b05fbce549 From a623ff9b8c7753d5b686c371ef19e21c09ae499c Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 20 Apr 2022 01:31:48 +0000 Subject: [PATCH 04/75] update submodules --- FV3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FV3 b/FV3 index 37bf66d711..f9ab9cd019 160000 --- a/FV3 +++ b/FV3 @@ -1 +1 @@ -Subproject commit 37bf66d71108a4ff414950d117c621b05fbce549 +Subproject commit f9ab9cd01918a7fd3f712daa76e8b666651a29ea From 2aca23fbacb67a672cea576d9b20356283353169 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 20 Apr 2022 02:27:22 +0000 Subject: [PATCH 05/75] revert some changes in rt scripts for testing --- tests/RegressionTests_hera.intel.log | 1168 ++++++++--------- tests/default_vars.sh | 2 +- tests/fail_test_001 | 1 + tests/fv3_conf/compile_slurm.IN | 19 + tests/fv3_conf/fv3_slurm.IN | 39 + ...table_thompson_noaero_tke_GOCART_progsigma | 197 +++ .../field_table_thompson_noaero_tke_progsigma | 71 + tests/rt.conf | 2 +- tests/rt.conf_orig | 213 +++ tests/rt.sh | 4 +- tests/rt_384.conf | 7 + tests/rt_lisa.sh | 898 +++++++++++++ tests/rt_orig.sh | 898 +++++++++++++ tests/tests/control_p8_progsigma | 167 +++ 14 files changed, 3091 insertions(+), 595 deletions(-) create mode 100644 tests/fail_test_001 create mode 100644 tests/fv3_conf/compile_slurm.IN create mode 100644 tests/fv3_conf/fv3_slurm.IN create mode 100644 tests/parm/field_table/field_table_thompson_noaero_tke_GOCART_progsigma create mode 100644 tests/parm/field_table/field_table_thompson_noaero_tke_progsigma create mode 100644 tests/rt.conf_orig create mode 100644 tests/rt_384.conf create mode 100755 tests/rt_lisa.sh create mode 100755 tests/rt_orig.sh create mode 100644 tests/tests/control_p8_progsigma diff --git a/tests/RegressionTests_hera.intel.log b/tests/RegressionTests_hera.intel.log index 9ec5f0b8b7..90ed8f6ae8 100644 --- a/tests/RegressionTests_hera.intel.log +++ b/tests/RegressionTests_hera.intel.log @@ -1,25 +1,25 @@ -Mon Apr 11 23:19:23 UTC 2022 +Fri Apr 15 17:33:39 UTC 2022 Start Regression test -Compile 001 elapsed time 584 seconds. -DAPP=S2SWA -DCCPP_SUITES=FV3_GFS_v16_coupled_nsstNoahmpUGWPv1,FV3_GFS_v17_coupled_p8 -DMPI=ON -DCMAKE_BUILD_TYPE=Release -DMOM6SOLO=ON -Compile 002 elapsed time 197 seconds. -DAPP=S2SA -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8 -DMPI=ON -DCMAKE_BUILD_TYPE=Debug -DMOM6SOLO=ON -Compile 003 elapsed time 311 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v15_thompson_mynn,FV3_GFS_v15_thompson_mynn_RRTMGP,FV3_GFS_v17_p8,FV3_GFS_v15_thompson_mynn_lam3km -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release -Compile 004 elapsed time 329 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_RAP_RRTMGP,FV3_RAP_sfcdiff,FV3_HRRR,FV3_RRFS_v1beta,FV3_RRFS_v1nssl -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release -Compile 005 elapsed time 330 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_RRTMGP,FV3_GFS_v16_csawmg,FV3_GFS_v16_flake,FV3_GFS_v16_ugwpv1,FV3_GFS_v16_ras,FV3_GFS_v16_thompson,FV3_GFS_v16_noahmp -DMPI=ON -DCMAKE_BUILD_TYPE=Release -Compile 006 elapsed time 296 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_fv3wam -D32BIT=ON -DMULTI_GASES=ON -DREPRO=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Bitforbit -Compile 007 elapsed time 175 seconds. -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v16_RRTMGP,FV3_GFS_v16_csawmg,FV3_GFS_v16_flake,FV3_GFS_v16_ugwpv1,FV3_GFS_v16_ras,FV3_GFS_v16_noahmp,FV3_GFS_v16_thompson,FV3_GFS_v15_thompson_mynn,FV3_GFS_v17_p8 -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug -Compile 008 elapsed time 158 seconds. -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_RAP,FV3_RAP_cires_ugwp,FV3_RAP_unified_ugwp,FV3_RAP_flake -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug -Compile 009 elapsed time 158 seconds. -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_RAP_noah,FV3_RAP_RRTMGP,FV3_RAP_sfcdiff,FV3_RAP_noah_sfcdiff_cires_ugwp,FV3_RRFS_v1beta -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug -Compile 010 elapsed time 151 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_fv3wam -D32BIT=ON -DMULTI_GASES=ON -DDEBUG=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug -Compile 011 elapsed time 350 seconds. -DAPP=HAFSW -DMOVING_NEST=ON -DCCPP_SUITES=FV3_HAFS_v0_gfdlmp_tedmf,FV3_HAFS_v0_gfdlmp_tedmf_nonsst,FV3_HAFS_v0_thompson_tedmf_gfdlsf -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release -Compile 012 elapsed time 361 seconds. -DAPP=HAFS-ALL -DCCPP_SUITES=FV3_HAFS_v0_gfdlmp_tedmf,FV3_HAFS_v0_gfdlmp_tedmf_nonsst -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release -Compile 013 elapsed time 199 seconds. -DAPP=NG-GODAS -DMPI=ON -DCMAKE_BUILD_TYPE=Release -DMOM6SOLO=ON -Compile 014 elapsed time 96 seconds. -DAPP=NG-GODAS -DDEBUG=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug -DMOM6SOLO=ON -Compile 015 elapsed time 329 seconds. -DAPP=ATMW -DCCPP_SUITES=FV3_GFS_v16 -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release -Compile 016 elapsed time 324 seconds. -DAPP=ATMAERO -DCCPP_SUITES=FV3_GFS_v16 -DMPI=ON -DCMAKE_BUILD_TYPE=Release - -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_control_p8 +Compile 001 elapsed time 445 seconds. -DAPP=S2SWA -DCCPP_SUITES=FV3_GFS_v16_coupled_nsstNoahmpUGWPv1,FV3_GFS_v17_coupled_p8 -DMPI=ON -DCMAKE_BUILD_TYPE=Release -DMOM6SOLO=ON +Compile 002 elapsed time 232 seconds. -DAPP=S2SA -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8 -DMPI=ON -DCMAKE_BUILD_TYPE=Debug -DMOM6SOLO=ON +Compile 003 elapsed time 315 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v15_thompson_mynn,FV3_GFS_v15_thompson_mynn_RRTMGP,FV3_GFS_v17_p8,FV3_GFS_v15_thompson_mynn_lam3km -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release +Compile 004 elapsed time 325 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_RAP_RRTMGP,FV3_RAP_sfcdiff,FV3_HRRR,FV3_RRFS_v1beta,FV3_RRFS_v1nssl -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release +Compile 005 elapsed time 335 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_RRTMGP,FV3_GFS_v16_csawmg,FV3_GFS_v16_flake,FV3_GFS_v16_ugwpv1,FV3_GFS_v16_ras,FV3_GFS_v16_thompson,FV3_GFS_v16_noahmp -DMPI=ON -DCMAKE_BUILD_TYPE=Release +Compile 006 elapsed time 350 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_fv3wam -D32BIT=ON -DMULTI_GASES=ON -DREPRO=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Bitforbit +Compile 007 elapsed time 176 seconds. -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v16_RRTMGP,FV3_GFS_v16_csawmg,FV3_GFS_v16_flake,FV3_GFS_v16_ugwpv1,FV3_GFS_v16_ras,FV3_GFS_v16_noahmp,FV3_GFS_v16_thompson,FV3_GFS_v15_thompson_mynn,FV3_GFS_v17_p8 -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug +Compile 008 elapsed time 163 seconds. -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_RAP,FV3_RAP_cires_ugwp,FV3_RAP_unified_ugwp,FV3_RAP_flake -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug +Compile 009 elapsed time 163 seconds. -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_RAP_noah,FV3_RAP_RRTMGP,FV3_RAP_sfcdiff,FV3_RAP_noah_sfcdiff_cires_ugwp,FV3_RRFS_v1beta -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug +Compile 010 elapsed time 179 seconds. -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_fv3wam -D32BIT=ON -DMULTI_GASES=ON -DDEBUG=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug +Compile 011 elapsed time 363 seconds. -DAPP=HAFSW -DMOVING_NEST=ON -DCCPP_SUITES=FV3_HAFS_v0_gfdlmp_tedmf,FV3_HAFS_v0_gfdlmp_tedmf_nonsst,FV3_HAFS_v0_thompson_tedmf_gfdlsf -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release +Compile 012 elapsed time 363 seconds. -DAPP=HAFS-ALL -DCCPP_SUITES=FV3_HAFS_v0_gfdlmp_tedmf,FV3_HAFS_v0_gfdlmp_tedmf_nonsst -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release +Compile 013 elapsed time 191 seconds. -DAPP=NG-GODAS -DMPI=ON -DCMAKE_BUILD_TYPE=Release -DMOM6SOLO=ON +Compile 014 elapsed time 92 seconds. -DAPP=NG-GODAS -DDEBUG=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Debug -DMOM6SOLO=ON +Compile 015 elapsed time 325 seconds. -DAPP=ATMW -DCCPP_SUITES=FV3_GFS_v16 -D32BIT=ON -DMPI=ON -DCMAKE_BUILD_TYPE=Release +Compile 016 elapsed time 348 seconds. -DAPP=ATMAERO -DCCPP_SUITES=FV3_GFS_v16 -DMPI=ON -DCMAKE_BUILD_TYPE=Release + +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_control_p8 Checking test 001 cpld_control_p8 results .... Comparing sfcf021.tile1.nc .........OK Comparing sfcf021.tile2.nc .........OK @@ -85,14 +85,14 @@ Checking test 001 cpld_control_p8 results .... Comparing 20210323.060000.out_pnt.points .........OK Comparing 20210323.060000.restart.glo_1deg .........OK - 0: The total amount of wall time = 362.000777 - 0: The maximum resident set size (KB) = 1246740 + 0: The total amount of wall time = 359.276174 + 0: The maximum resident set size (KB) = 1243240 Test 001 cpld_control_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_2threads_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_2threads_p8 Checking test 002 cpld_2threads_p8 results .... Comparing sfcf024.tile1.nc .........OK Comparing sfcf024.tile2.nc .........OK @@ -146,14 +146,14 @@ Checking test 002 cpld_2threads_p8 results .... Comparing 20210323.060000.out_pnt.points .........OK Comparing 20210323.060000.restart.glo_1deg .........OK - 0: The total amount of wall time = 457.506287 - 0: The maximum resident set size (KB) = 1892432 + 0: The total amount of wall time = 449.330329 + 0: The maximum resident set size (KB) = 1894708 Test 002 cpld_2threads_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_decomp_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_decomp_p8 Checking test 003 cpld_decomp_p8 results .... Comparing sfcf024.tile1.nc .........OK Comparing sfcf024.tile2.nc .........OK @@ -207,14 +207,14 @@ Checking test 003 cpld_decomp_p8 results .... Comparing 20210323.060000.out_pnt.points .........OK Comparing 20210323.060000.restart.glo_1deg .........OK - 0: The total amount of wall time = 364.307335 - 0: The maximum resident set size (KB) = 1238592 + 0: The total amount of wall time = 357.007082 + 0: The maximum resident set size (KB) = 1236856 Test 003 cpld_decomp_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_mpi_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_mpi_p8 Checking test 004 cpld_mpi_p8 results .... Comparing sfcf024.tile1.nc .........OK Comparing sfcf024.tile2.nc .........OK @@ -268,14 +268,14 @@ Checking test 004 cpld_mpi_p8 results .... Comparing 20210323.060000.out_pnt.points .........OK Comparing 20210323.060000.restart.glo_1deg .........OK - 0: The total amount of wall time = 299.547971 - 0: The maximum resident set size (KB) = 1157348 + 0: The total amount of wall time = 297.187236 + 0: The maximum resident set size (KB) = 1161104 Test 004 cpld_mpi_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_bmark_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_bmark_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_bmark_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_bmark_p8 Checking test 005 cpld_bmark_p8 results .... Comparing sfcf006.nc .........OK Comparing atmf006.nc .........OK @@ -321,14 +321,14 @@ Checking test 005 cpld_bmark_p8 results .... Comparing RESTART/iced.2013-04-01-21600.nc .........OK Comparing RESTART/ufs.cpld.cpl.r.2013-04-01-21600.nc .........OK - 0: The total amount of wall time = 1042.227857 - 0: The maximum resident set size (KB) = 3024588 + 0: The total amount of wall time = 1056.098388 + 0: The maximum resident set size (KB) = 3024380 Test 005 cpld_bmark_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_c96_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_control_c96_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_c96_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_control_c96_p8 Checking test 006 cpld_control_c96_p8 results .... Comparing sfcf021.tile1.nc .........OK Comparing sfcf021.tile2.nc .........OK @@ -391,14 +391,14 @@ Checking test 006 cpld_control_c96_p8 results .... Comparing RESTART/iced.2021-03-23-21600.nc .........OK Comparing RESTART/ufs.cpld.cpl.r.2021-03-23-21600.nc .........OK - 0: The total amount of wall time = 358.124771 - 0: The maximum resident set size (KB) = 1257380 + 0: The total amount of wall time = 355.062979 + 0: The maximum resident set size (KB) = 1257804 Test 006 cpld_control_c96_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_c96_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_restart_c96_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_c96_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_restart_c96_p8 Checking test 007 cpld_restart_c96_p8 results .... Comparing sfcf024.tile1.nc .........OK Comparing sfcf024.tile2.nc .........OK @@ -449,14 +449,14 @@ Checking test 007 cpld_restart_c96_p8 results .... Comparing RESTART/iced.2021-03-23-21600.nc .........OK Comparing RESTART/ufs.cpld.cpl.r.2021-03-23-21600.nc .........OK - 0: The total amount of wall time = 194.466721 - 0: The maximum resident set size (KB) = 1246556 + 0: The total amount of wall time = 197.539647 + 0: The maximum resident set size (KB) = 1247636 Test 007 cpld_restart_c96_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_c192_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_control_c192_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_c192_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_control_c192_p8 Checking test 008 cpld_control_c192_p8 results .... Comparing sfcf036.tile1.nc .........OK Comparing sfcf036.tile2.nc .........OK @@ -507,14 +507,14 @@ Checking test 008 cpld_control_c192_p8 results .... Comparing RESTART/iced.2021-03-23-64800.nc .........OK Comparing RESTART/ufs.cpld.cpl.r.2021-03-23-64800.nc .........OK - 0: The total amount of wall time = 1544.579676 - 0: The maximum resident set size (KB) = 1738924 + 0: The total amount of wall time = 1523.780652 + 0: The maximum resident set size (KB) = 1720064 Test 008 cpld_control_c192_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_c192_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_restart_c192_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_c192_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_restart_c192_p8 Checking test 009 cpld_restart_c192_p8 results .... Comparing sfcf036.tile1.nc .........OK Comparing sfcf036.tile2.nc .........OK @@ -565,14 +565,14 @@ Checking test 009 cpld_restart_c192_p8 results .... Comparing RESTART/iced.2021-03-23-64800.nc .........OK Comparing RESTART/ufs.cpld.cpl.r.2021-03-23-64800.nc .........OK - 0: The total amount of wall time = 1028.420897 - 0: The maximum resident set size (KB) = 1932308 + 0: The total amount of wall time = 1003.896939 + 0: The maximum resident set size (KB) = 1933532 Test 009 cpld_restart_c192_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_c384_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_control_c384_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_c384_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_control_c384_p8 Checking test 010 cpld_control_c384_p8 results .... Comparing sfcf006.nc .........OK Comparing atmf006.nc .........OK @@ -616,14 +616,14 @@ Checking test 010 cpld_control_c384_p8 results .... Comparing RESTART/iced.2021-03-22-43200.nc .........OK Comparing RESTART/ufs.cpld.cpl.r.2021-03-22-43200.nc .........OK - 0: The total amount of wall time = 1176.651673 - 0: The maximum resident set size (KB) = 3028300 + 0: The total amount of wall time = 1169.040719 + 0: The maximum resident set size (KB) = 3018428 Test 010 cpld_control_c384_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_control_c384_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_restart_c384_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_control_c384_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_restart_c384_p8 Checking test 011 cpld_restart_c384_p8 results .... Comparing sfcf006.nc .........OK Comparing atmf006.nc .........OK @@ -667,14 +667,14 @@ Checking test 011 cpld_restart_c384_p8 results .... Comparing RESTART/iced.2021-03-22-43200.nc .........OK Comparing RESTART/ufs.cpld.cpl.r.2021-03-22-43200.nc .........OK - 0: The total amount of wall time = 670.952735 - 0: The maximum resident set size (KB) = 3035676 + 0: The total amount of wall time = 652.507136 + 0: The maximum resident set size (KB) = 3035312 Test 011 cpld_restart_c384_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/cpld_debug_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/cpld_debug_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/cpld_debug_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/cpld_debug_p8 Checking test 012 cpld_debug_p8 results .... Comparing sfcf006.tile1.nc .........OK Comparing sfcf006.tile2.nc .........OK @@ -725,14 +725,14 @@ Checking test 012 cpld_debug_p8 results .... Comparing RESTART/iced.2021-03-22-43200.nc .........OK Comparing RESTART/ufs.cpld.cpl.r.2021-03-22-43200.nc .........OK - 0: The total amount of wall time = 1115.196720 - 0: The maximum resident set size (KB) = 1380984 + 0: The total amount of wall time = 1130.755564 + 0: The maximum resident set size (KB) = 1385292 Test 012 cpld_debug_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control Checking test 013 control results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -779,14 +779,14 @@ Checking test 013 control results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 126.230402 - 0: The maximum resident set size (KB) = 466272 + 0: The total amount of wall time = 122.310409 + 0: The maximum resident set size (KB) = 465312 Test 013 control PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_decomp +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_decomp Checking test 014 control_decomp results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -829,28 +829,28 @@ Checking test 014 control_decomp results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 128.262483 - 0: The maximum resident set size (KB) = 471424 + 0: The total amount of wall time = 130.197367 + 0: The maximum resident set size (KB) = 468600 Test 014 control_decomp PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_2dwrtdecomp +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_2dwrtdecomp Checking test 015 control_2dwrtdecomp results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK Comparing atmf000.nc .........OK Comparing atmf024.nc .........OK - 0: The total amount of wall time = 121.077538 - 0: The maximum resident set size (KB) = 465716 + 0: The total amount of wall time = 119.665424 + 0: The maximum resident set size (KB) = 466564 Test 015 control_2dwrtdecomp PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_2threads +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_2threads Checking test 016 control_2threads results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -893,14 +893,14 @@ Checking test 016 control_2threads results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 150.834266 - 0: The maximum resident set size (KB) = 519040 + 0: The total amount of wall time = 150.618018 + 0: The maximum resident set size (KB) = 518756 Test 016 control_2threads PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_restart +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_restart Checking test 017 control_restart results .... Comparing sfcf024.nc .........OK Comparing atmf024.nc .........OK @@ -939,14 +939,14 @@ Checking test 017 control_restart results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 67.111612 - 0: The maximum resident set size (KB) = 212980 + 0: The total amount of wall time = 65.527123 + 0: The maximum resident set size (KB) = 209880 Test 017 control_restart PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_fhzero +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_fhzero Checking test 018 control_fhzero results .... Comparing sfcf000.nc ............ALT CHECK......OK Comparing sfcf021.nc ............ALT CHECK......OK @@ -989,14 +989,14 @@ Checking test 018 control_fhzero results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 119.784164 - 0: The maximum resident set size (KB) = 470648 + 0: The total amount of wall time = 114.838692 + 0: The maximum resident set size (KB) = 474328 Test 018 control_fhzero PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_CubedSphereGrid -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_CubedSphereGrid +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_CubedSphereGrid +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_CubedSphereGrid Checking test 019 control_CubedSphereGrid results .... Comparing sfcf000.tile1.nc .........OK Comparing sfcf000.tile2.nc .........OK @@ -1023,14 +1023,14 @@ Checking test 019 control_CubedSphereGrid results .... Comparing atmf024.tile5.nc .........OK Comparing atmf024.tile6.nc .........OK - 0: The total amount of wall time = 119.633422 - 0: The maximum resident set size (KB) = 470080 + 0: The total amount of wall time = 116.956786 + 0: The maximum resident set size (KB) = 470884 Test 019 control_CubedSphereGrid PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_latlon -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_latlon +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_latlon +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_latlon Checking test 020 control_latlon results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -1041,14 +1041,14 @@ Checking test 020 control_latlon results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 118.610737 - 0: The maximum resident set size (KB) = 469576 + 0: The total amount of wall time = 126.961874 + 0: The maximum resident set size (KB) = 469372 Test 020 control_latlon PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_wrtGauss_netcdf_parallel -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_wrtGauss_netcdf_parallel +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_wrtGauss_netcdf_parallel +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_wrtGauss_netcdf_parallel Checking test 021 control_wrtGauss_netcdf_parallel results .... Comparing sfcf000.nc ............ALT CHECK......OK Comparing sfcf024.nc .........OK @@ -1059,14 +1059,14 @@ Checking test 021 control_wrtGauss_netcdf_parallel results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 127.834214 - 0: The maximum resident set size (KB) = 467156 + 0: The total amount of wall time = 124.186070 + 0: The maximum resident set size (KB) = 468476 Test 021 control_wrtGauss_netcdf_parallel PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_c48 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_c48 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_c48 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_c48 Checking test 022 control_c48 results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -1105,14 +1105,14 @@ Checking test 022 control_c48 results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK -0: The total amount of wall time = 309.334231 -0: The maximum resident set size (KB) = 657032 +0: The total amount of wall time = 309.305286 +0: The maximum resident set size (KB) = 657832 Test 022 control_c48 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_c192 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_c192 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_c192 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_c192 Checking test 023 control_c192 results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -1123,14 +1123,14 @@ Checking test 023 control_c192 results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 466.580974 - 0: The maximum resident set size (KB) = 565540 + 0: The total amount of wall time = 466.723372 + 0: The maximum resident set size (KB) = 565236 Test 023 control_c192 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_c384 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_c384 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_c384 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_c384 Checking test 024 control_c384 results .... Comparing sfcf000.nc .........OK Comparing sfcf012.nc .........OK @@ -1141,14 +1141,14 @@ Checking test 024 control_c384 results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF12 .........OK - 0: The total amount of wall time = 748.831884 - 0: The maximum resident set size (KB) = 820436 + 0: The total amount of wall time = 754.838638 + 0: The maximum resident set size (KB) = 821256 Test 024 control_c384 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_c384gdas -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_c384gdas +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_c384gdas +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_c384gdas Checking test 025 control_c384gdas results .... Comparing sfcf000.nc .........OK Comparing sfcf006.nc .........OK @@ -1191,14 +1191,14 @@ Checking test 025 control_c384gdas results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 667.797281 - 0: The maximum resident set size (KB) = 971252 + 0: The total amount of wall time = 670.002878 + 0: The maximum resident set size (KB) = 975768 Test 025 control_c384gdas PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_stochy -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_stochy +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_stochy +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_stochy Checking test 026 control_stochy results .... Comparing sfcf000.nc .........OK Comparing sfcf012.nc .........OK @@ -1209,28 +1209,28 @@ Checking test 026 control_stochy results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF12 .........OK - 0: The total amount of wall time = 81.758967 - 0: The maximum resident set size (KB) = 473592 + 0: The total amount of wall time = 83.796948 + 0: The maximum resident set size (KB) = 469788 Test 026 control_stochy PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_stochy -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_stochy_restart +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_stochy +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_stochy_restart Checking test 027 control_stochy_restart results .... Comparing sfcf012.nc .........OK Comparing atmf012.nc .........OK Comparing GFSFLX.GrbF12 .........OK Comparing GFSPRS.GrbF12 .........OK - 0: The total amount of wall time = 42.434524 - 0: The maximum resident set size (KB) = 252280 + 0: The total amount of wall time = 44.437791 + 0: The maximum resident set size (KB) = 251440 Test 027 control_stochy_restart PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_lndp -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_lndp +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_lndp +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_lndp Checking test 028 control_lndp results .... Comparing sfcf000.nc .........OK Comparing sfcf012.nc .........OK @@ -1241,14 +1241,14 @@ Checking test 028 control_lndp results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF12 .........OK - 0: The total amount of wall time = 73.874900 - 0: The maximum resident set size (KB) = 474824 + 0: The total amount of wall time = 72.867999 + 0: The maximum resident set size (KB) = 472256 Test 028 control_lndp PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_iovr4 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_iovr4 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_iovr4 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_iovr4 Checking test 029 control_iovr4 results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -1263,14 +1263,14 @@ Checking test 029 control_iovr4 results .... Comparing GFSPRS.GrbF21 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 126.336315 - 0: The maximum resident set size (KB) = 465384 + 0: The total amount of wall time = 121.628505 + 0: The maximum resident set size (KB) = 467064 Test 029 control_iovr4 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_iovr5 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_iovr5 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_iovr5 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_iovr5 Checking test 030 control_iovr5 results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -1285,14 +1285,14 @@ Checking test 030 control_iovr5 results .... Comparing GFSPRS.GrbF21 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 123.425483 - 0: The maximum resident set size (KB) = 469336 + 0: The total amount of wall time = 125.859504 + 0: The maximum resident set size (KB) = 467832 Test 030 control_iovr5 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_p8 Checking test 031 control_p8 results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -1339,14 +1339,14 @@ Checking test 031 control_p8 results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 185.926936 - 0: The maximum resident set size (KB) = 969504 + 0: The total amount of wall time = 177.767181 + 0: The maximum resident set size (KB) = 971160 Test 031 control_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_restart_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_restart_p8 Checking test 032 control_restart_p8 results .... Comparing sfcf024.nc .........OK Comparing atmf024.nc .........OK @@ -1385,14 +1385,14 @@ Checking test 032 control_restart_p8 results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 93.745411 - 0: The maximum resident set size (KB) = 760064 + 0: The total amount of wall time = 92.386514 + 0: The maximum resident set size (KB) = 763164 Test 032 control_restart_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_decomp_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_decomp_p8 Checking test 033 control_decomp_p8 results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -1435,14 +1435,14 @@ Checking test 033 control_decomp_p8 results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 180.323494 - 0: The maximum resident set size (KB) = 969360 + 0: The total amount of wall time = 185.353877 + 0: The maximum resident set size (KB) = 970348 Test 033 control_decomp_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_2threads_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_2threads_p8 Checking test 034 control_2threads_p8 results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -1485,14 +1485,14 @@ Checking test 034 control_2threads_p8 results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 221.521495 - 0: The maximum resident set size (KB) = 1110988 + 0: The total amount of wall time = 221.550243 + 0: The maximum resident set size (KB) = 1116640 Test 034 control_2threads_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/fv3_regional_control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_control +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/fv3_regional_control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_control Checking test 035 regional_control results .... Comparing dynf000.nc .........OK Comparing dynf024.nc .........OK @@ -1503,42 +1503,42 @@ Checking test 035 regional_control results .... Comparing NATLEV.GrbF00 .........OK Comparing NATLEV.GrbF24 .........OK - 0: The total amount of wall time = 299.550320 - 0: The maximum resident set size (KB) = 585820 + 0: The total amount of wall time = 302.428472 + 0: The maximum resident set size (KB) = 583640 Test 035 regional_control PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/fv3_regional_control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_restart +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/fv3_regional_control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_restart Checking test 036 regional_restart results .... Comparing dynf024.nc .........OK Comparing phyf024.nc .........OK Comparing PRSLEV.GrbF24 .........OK Comparing NATLEV.GrbF24 .........OK - 0: The total amount of wall time = 164.678403 - 0: The maximum resident set size (KB) = 587452 + 0: The total amount of wall time = 163.734725 + 0: The maximum resident set size (KB) = 586576 Test 036 regional_restart PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/fv3_regional_control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_control_2dwrtdecomp +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/fv3_regional_control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_control_2dwrtdecomp Checking test 037 regional_control_2dwrtdecomp results .... Comparing dynf000.nc .........OK Comparing dynf024.nc .........OK Comparing phyf000.nc .........OK Comparing phyf024.nc .........OK - 0: The total amount of wall time = 298.680235 - 0: The maximum resident set size (KB) = 582984 + 0: The total amount of wall time = 302.032483 + 0: The maximum resident set size (KB) = 580456 Test 037 regional_control_2dwrtdecomp PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/fv3_regional_noquilt -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_noquilt +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/fv3_regional_noquilt +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_noquilt Checking test 038 regional_noquilt results .... Comparing atmos_4xdaily.nc .........OK Comparing fv3_history2d.nc .........OK @@ -1546,14 +1546,14 @@ Checking test 038 regional_noquilt results .... Comparing RESTART/fv_core.res.tile1_new.nc .........OK Comparing RESTART/fv_tracer.res.tile1_new.nc .........OK - 0: The total amount of wall time = 313.001645 - 0: The maximum resident set size (KB) = 596848 + 0: The total amount of wall time = 311.590664 + 0: The maximum resident set size (KB) = 598016 Test 038 regional_noquilt PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/fv3_regional_control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_2threads +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/fv3_regional_control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_2threads Checking test 039 regional_2threads results .... Comparing dynf000.nc .........OK Comparing dynf024.nc .........OK @@ -1564,28 +1564,28 @@ Checking test 039 regional_2threads results .... Comparing NATLEV.GrbF00 .........OK Comparing NATLEV.GrbF24 .........OK - 0: The total amount of wall time = 223.377226 - 0: The maximum resident set size (KB) = 582448 + 0: The total amount of wall time = 228.673854 + 0: The maximum resident set size (KB) = 585192 Test 039 regional_2threads PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/fv3_regional_netcdf_parallel -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_netcdf_parallel +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/fv3_regional_netcdf_parallel +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_netcdf_parallel Checking test 040 regional_netcdf_parallel results .... Comparing dynf000.nc .........OK - Comparing dynf024.nc .........OK + Comparing dynf024.nc ............ALT CHECK......OK Comparing phyf000.nc .........OK Comparing phyf024.nc .........OK - 0: The total amount of wall time = 296.900679 - 0: The maximum resident set size (KB) = 583264 + 0: The total amount of wall time = 294.601717 + 0: The maximum resident set size (KB) = 580852 Test 040 regional_netcdf_parallel PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/fv3_regional_RRTMGP -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_RRTMGP +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/fv3_regional_RRTMGP +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_RRTMGP Checking test 041 regional_RRTMGP results .... Comparing dynf000.nc .........OK Comparing dynf024.nc .........OK @@ -1596,14 +1596,14 @@ Checking test 041 regional_RRTMGP results .... Comparing NATLEV.GrbF00 .........OK Comparing NATLEV.GrbF24 .........OK - 0: The total amount of wall time = 376.590237 - 0: The maximum resident set size (KB) = 701112 + 0: The total amount of wall time = 378.733713 + 0: The maximum resident set size (KB) = 700728 Test 041 regional_RRTMGP PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/fv3_regional_3km -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_3km +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/fv3_regional_3km +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_3km Checking test 042 regional_3km results .... Comparing dynf000.nc .........OK Comparing dynf006.nc .........OK @@ -1614,14 +1614,14 @@ Checking test 042 regional_3km results .... Comparing NATLEV.GrbF00 .........OK Comparing NATLEV.GrbF06 .........OK - 0: The total amount of wall time = 238.090288 - 0: The maximum resident set size (KB) = 621400 + 0: The total amount of wall time = 233.697046 + 0: The maximum resident set size (KB) = 624456 Test 042 regional_3km PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_control +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_control Checking test 043 rap_control results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -1668,14 +1668,14 @@ Checking test 043 rap_control results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 348.257060 - 0: The maximum resident set size (KB) = 837180 + 0: The total amount of wall time = 360.054151 + 0: The maximum resident set size (KB) = 837700 Test 043 rap_control PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_rrtmgp -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_rrtmgp +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_rrtmgp +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_rrtmgp Checking test 044 rap_rrtmgp results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -1722,14 +1722,14 @@ Checking test 044 rap_rrtmgp results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 379.914342 - 0: The maximum resident set size (KB) = 958128 + 0: The total amount of wall time = 393.081913 + 0: The maximum resident set size (KB) = 956860 Test 044 rap_rrtmgp PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/regional_spp_sppt_shum_skeb -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_spp_sppt_shum_skeb +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/regional_spp_sppt_shum_skeb +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_spp_sppt_shum_skeb Checking test 045 regional_spp_sppt_shum_skeb results .... Comparing dynf000.nc .........OK Comparing dynf001.nc .........OK @@ -1740,14 +1740,14 @@ Checking test 045 regional_spp_sppt_shum_skeb results .... Comparing NATLEV.GrbF00 .........OK Comparing NATLEV.GrbF01 .........OK - 0: The total amount of wall time = 286.992705 - 0: The maximum resident set size (KB) = 928900 + 0: The total amount of wall time = 287.359143 + 0: The maximum resident set size (KB) = 927084 Test 045 regional_spp_sppt_shum_skeb PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_2threads +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_2threads Checking test 046 rap_2threads results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -1794,14 +1794,14 @@ Checking test 046 rap_2threads results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 433.973229 - 0: The maximum resident set size (KB) = 902848 + 0: The total amount of wall time = 438.020810 + 0: The maximum resident set size (KB) = 905156 Test 046 rap_2threads PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_restart +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_restart Checking test 047 rap_restart results .... Comparing sfcf024.nc .........OK Comparing atmf024.nc .........OK @@ -1840,14 +1840,14 @@ Checking test 047 rap_restart results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 175.930021 - 0: The maximum resident set size (KB) = 594084 + 0: The total amount of wall time = 182.350962 + 0: The maximum resident set size (KB) = 589032 Test 047 rap_restart PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_sfcdiff -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_sfcdiff +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_sfcdiff +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_sfcdiff Checking test 048 rap_sfcdiff results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -1894,14 +1894,14 @@ Checking test 048 rap_sfcdiff results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 354.348352 - 0: The maximum resident set size (KB) = 832432 + 0: The total amount of wall time = 349.229193 + 0: The maximum resident set size (KB) = 837408 Test 048 rap_sfcdiff PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_sfcdiff -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_sfcdiff_restart +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_sfcdiff +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_sfcdiff_restart Checking test 049 rap_sfcdiff_restart results .... Comparing sfcf024.nc .........OK Comparing atmf024.nc .........OK @@ -1940,14 +1940,14 @@ Checking test 049 rap_sfcdiff_restart results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 181.430874 - 0: The maximum resident set size (KB) = 591860 + 0: The total amount of wall time = 183.244393 + 0: The maximum resident set size (KB) = 594712 Test 049 rap_sfcdiff_restart PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hrrr_control -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hrrr_control +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hrrr_control +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hrrr_control Checking test 050 hrrr_control results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -1994,14 +1994,14 @@ Checking test 050 hrrr_control results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 342.737084 - 0: The maximum resident set size (KB) = 842992 + 0: The total amount of wall time = 351.570682 + 0: The maximum resident set size (KB) = 836460 Test 050 hrrr_control PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rrfs_v1beta -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rrfs_v1beta +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rrfs_v1beta +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rrfs_v1beta Checking test 051 rrfs_v1beta results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -2048,14 +2048,14 @@ Checking test 051 rrfs_v1beta results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 345.488576 - 0: The maximum resident set size (KB) = 834316 + 0: The total amount of wall time = 339.766399 + 0: The maximum resident set size (KB) = 832260 Test 051 rrfs_v1beta PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rrfs_v1nssl -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rrfs_v1nssl +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rrfs_v1nssl +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rrfs_v1nssl Checking test 052 rrfs_v1nssl results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -2070,14 +2070,14 @@ Checking test 052 rrfs_v1nssl results .... Comparing GFSPRS.GrbF21 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 432.537644 - 0: The maximum resident set size (KB) = 527952 + 0: The total amount of wall time = 429.395051 + 0: The maximum resident set size (KB) = 531756 Test 052 rrfs_v1nssl PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rrfs_v1nssl_nohailnoccn -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rrfs_v1nssl_nohailnoccn +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rrfs_v1nssl_nohailnoccn +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rrfs_v1nssl_nohailnoccn Checking test 053 rrfs_v1nssl_nohailnoccn results .... Comparing sfcf000.nc .........OK Comparing sfcf021.nc .........OK @@ -2092,14 +2092,14 @@ Checking test 053 rrfs_v1nssl_nohailnoccn results .... Comparing GFSPRS.GrbF21 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 419.668356 - 0: The maximum resident set size (KB) = 520952 + 0: The total amount of wall time = 410.876164 + 0: The maximum resident set size (KB) = 514752 Test 053 rrfs_v1nssl_nohailnoccn PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rrfs_conus13km_hrrr_warm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rrfs_conus13km_hrrr_warm +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rrfs_conus13km_hrrr_warm +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rrfs_conus13km_hrrr_warm Checking test 054 rrfs_conus13km_hrrr_warm results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK @@ -2108,14 +2108,14 @@ Checking test 054 rrfs_conus13km_hrrr_warm results .... Comparing atmf001.nc .........OK Comparing atmf002.nc .........OK - 0: The total amount of wall time = 159.162999 - 0: The maximum resident set size (KB) = 669432 + 0: The total amount of wall time = 159.765726 + 0: The maximum resident set size (KB) = 670612 Test 054 rrfs_conus13km_hrrr_warm PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rrfs_conus13km_radar_tten_warm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rrfs_conus13km_radar_tten_warm +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rrfs_conus13km_radar_tten_warm +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rrfs_conus13km_radar_tten_warm Checking test 055 rrfs_conus13km_radar_tten_warm results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK @@ -2124,14 +2124,14 @@ Checking test 055 rrfs_conus13km_radar_tten_warm results .... Comparing atmf001.nc .........OK Comparing atmf002.nc .........OK - 0: The total amount of wall time = 162.844473 - 0: The maximum resident set size (KB) = 672788 + 0: The total amount of wall time = 162.374246 + 0: The maximum resident set size (KB) = 671300 Test 055 rrfs_conus13km_radar_tten_warm PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_rrtmgp -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_rrtmgp +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_rrtmgp +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_rrtmgp Checking test 056 control_rrtmgp results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -2142,14 +2142,14 @@ Checking test 056 control_rrtmgp results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 186.271838 - 0: The maximum resident set size (KB) = 610912 + 0: The total amount of wall time = 188.679849 + 0: The maximum resident set size (KB) = 609928 Test 056 control_rrtmgp PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_rrtmgp_c192 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_rrtmgp_c192 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_rrtmgp_c192 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_rrtmgp_c192 Checking test 057 control_rrtmgp_c192 results .... Comparing sfcf000.nc .........OK Comparing sfcf012.nc .........OK @@ -2160,14 +2160,14 @@ Checking test 057 control_rrtmgp_c192 results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF12 .........OK - 0: The total amount of wall time = 497.198766 - 0: The maximum resident set size (KB) = 809792 + 0: The total amount of wall time = 495.472738 + 0: The maximum resident set size (KB) = 811032 Test 057 control_rrtmgp_c192 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_csawmg -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_csawmg +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_csawmg +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_csawmg Checking test 058 control_csawmg results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -2178,14 +2178,14 @@ Checking test 058 control_csawmg results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 315.808453 - 0: The maximum resident set size (KB) = 534912 + 0: The total amount of wall time = 318.517314 + 0: The maximum resident set size (KB) = 534988 Test 058 control_csawmg PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_csawmgt -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_csawmgt +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_csawmgt +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_csawmgt Checking test 059 control_csawmgt results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -2196,14 +2196,14 @@ Checking test 059 control_csawmgt results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 302.649204 - 0: The maximum resident set size (KB) = 536652 + 0: The total amount of wall time = 310.400244 + 0: The maximum resident set size (KB) = 533908 Test 059 control_csawmgt PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_flake -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_flake +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_flake +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_flake Checking test 060 control_flake results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -2214,14 +2214,14 @@ Checking test 060 control_flake results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 228.930597 - 0: The maximum resident set size (KB) = 540592 + 0: The total amount of wall time = 230.706525 + 0: The maximum resident set size (KB) = 542092 Test 060 control_flake PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_ras -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_ras +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_ras +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_ras Checking test 061 control_ras results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -2232,14 +2232,14 @@ Checking test 061 control_ras results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 166.660957 - 0: The maximum resident set size (KB) = 494740 + 0: The total amount of wall time = 168.493369 + 0: The maximum resident set size (KB) = 498524 Test 061 control_ras PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_thompson -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_thompson +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_thompson +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_thompson Checking test 062 control_thompson results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -2250,14 +2250,14 @@ Checking test 062 control_thompson results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 212.695740 - 0: The maximum resident set size (KB) = 855288 + 0: The total amount of wall time = 208.893802 + 0: The maximum resident set size (KB) = 851904 Test 062 control_thompson PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_thompson_no_aero -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_thompson_no_aero +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_thompson_no_aero +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_thompson_no_aero Checking test 063 control_thompson_no_aero results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK @@ -2268,54 +2268,54 @@ Checking test 063 control_thompson_no_aero results .... Comparing GFSPRS.GrbF00 .........OK Comparing GFSPRS.GrbF24 .........OK - 0: The total amount of wall time = 201.116889 - 0: The maximum resident set size (KB) = 841828 + 0: The total amount of wall time = 203.592951 + 0: The maximum resident set size (KB) = 842516 Test 063 control_thompson_no_aero PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_wam_repro -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_wam_repro +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_wam_repro +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_wam_repro Checking test 064 control_wam results .... Comparing sfcf024.nc .........OK Comparing atmf024.nc .........OK - 0: The total amount of wall time = 114.855151 - 0: The maximum resident set size (KB) = 234460 + 0: The total amount of wall time = 117.465713 + 0: The maximum resident set size (KB) = 232896 Test 064 control_wam PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_debug Checking test 065 control_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 146.468410 - 0: The maximum resident set size (KB) = 629192 + 0: The total amount of wall time = 143.698702 + 0: The maximum resident set size (KB) = 630716 Test 065 control_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_2threads_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_2threads_debug Checking test 066 control_2threads_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 212.659726 - 0: The maximum resident set size (KB) = 681888 + 0: The total amount of wall time = 214.095859 + 0: The maximum resident set size (KB) = 683208 Test 066 control_2threads_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_CubedSphereGrid_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_CubedSphereGrid_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_CubedSphereGrid_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_CubedSphereGrid_debug Checking test 067 control_CubedSphereGrid_debug results .... Comparing sfcf000.tile1.nc .........OK Comparing sfcf000.tile2.nc .........OK @@ -2342,429 +2342,429 @@ Checking test 067 control_CubedSphereGrid_debug results .... Comparing atmf001.tile5.nc .........OK Comparing atmf001.tile6.nc .........OK - 0: The total amount of wall time = 156.832823 - 0: The maximum resident set size (KB) = 629612 + 0: The total amount of wall time = 153.862438 + 0: The maximum resident set size (KB) = 631468 Test 067 control_CubedSphereGrid_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_wrtGauss_netcdf_parallel_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_wrtGauss_netcdf_parallel_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_wrtGauss_netcdf_parallel_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_wrtGauss_netcdf_parallel_debug Checking test 068 control_wrtGauss_netcdf_parallel_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc ............ALT CHECK......OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 144.552493 - 0: The maximum resident set size (KB) = 631360 + 0: The total amount of wall time = 144.982169 + 0: The maximum resident set size (KB) = 633708 Test 068 control_wrtGauss_netcdf_parallel_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_stochy_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_stochy_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_stochy_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_stochy_debug Checking test 069 control_stochy_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 161.040554 - 0: The maximum resident set size (KB) = 635312 + 0: The total amount of wall time = 164.318445 + 0: The maximum resident set size (KB) = 637196 Test 069 control_stochy_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_lndp_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_lndp_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_lndp_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_lndp_debug Checking test 070 control_lndp_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 145.926932 - 0: The maximum resident set size (KB) = 640716 + 0: The total amount of wall time = 146.439193 + 0: The maximum resident set size (KB) = 633236 Test 070 control_lndp_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_rrtmgp_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_rrtmgp_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_rrtmgp_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_rrtmgp_debug Checking test 071 control_rrtmgp_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 156.331287 - 0: The maximum resident set size (KB) = 752196 + 0: The total amount of wall time = 158.379185 + 0: The maximum resident set size (KB) = 748616 Test 071 control_rrtmgp_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_csawmg_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_csawmg_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_csawmg_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_csawmg_debug Checking test 072 control_csawmg_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 221.509659 - 0: The maximum resident set size (KB) = 671380 + 0: The total amount of wall time = 225.893677 + 0: The maximum resident set size (KB) = 671348 Test 072 control_csawmg_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_csawmgt_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_csawmgt_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_csawmgt_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_csawmgt_debug Checking test 073 control_csawmgt_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 222.672514 - 0: The maximum resident set size (KB) = 673672 + 0: The total amount of wall time = 222.539053 + 0: The maximum resident set size (KB) = 674984 Test 073 control_csawmgt_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_ras_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_ras_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_ras_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_ras_debug Checking test 074 control_ras_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 147.840186 - 0: The maximum resident set size (KB) = 644488 + 0: The total amount of wall time = 147.269244 + 0: The maximum resident set size (KB) = 644024 Test 074 control_ras_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_diag_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_diag_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_diag_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_diag_debug Checking test 075 control_diag_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 152.289616 - 0: The maximum resident set size (KB) = 690396 + 0: The total amount of wall time = 155.447247 + 0: The maximum resident set size (KB) = 687480 Test 075 control_diag_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_debug_p8 -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_debug_p8 +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_debug_p8 +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_debug_p8 Checking test 076 control_debug_p8 results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 175.536922 - 0: The maximum resident set size (KB) = 1134732 + 0: The total amount of wall time = 170.303968 + 0: The maximum resident set size (KB) = 1134284 Test 076 control_debug_p8 PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_thompson_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_thompson_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_thompson_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_thompson_debug Checking test 077 control_thompson_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 164.833123 - 0: The maximum resident set size (KB) = 993388 + 0: The total amount of wall time = 166.637071 + 0: The maximum resident set size (KB) = 993696 Test 077 control_thompson_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_thompson_no_aero_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_thompson_no_aero_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_thompson_no_aero_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_thompson_no_aero_debug Checking test 078 control_thompson_no_aero_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 160.002690 - 0: The maximum resident set size (KB) = 984912 + 0: The total amount of wall time = 162.738104 + 0: The maximum resident set size (KB) = 989584 Test 078 control_thompson_no_aero_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_thompson_debug_extdiag -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_thompson_extdiag_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_thompson_debug_extdiag +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_thompson_extdiag_debug Checking test 079 control_thompson_extdiag_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 179.350874 - 0: The maximum resident set size (KB) = 1020724 + 0: The total amount of wall time = 179.541651 + 0: The maximum resident set size (KB) = 1023816 Test 079 control_thompson_extdiag_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_thompson_progcld_thompson_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_thompson_progcld_thompson_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_thompson_progcld_thompson_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_thompson_progcld_thompson_debug Checking test 080 control_thompson_progcld_thompson_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 167.813815 - 0: The maximum resident set size (KB) = 995252 + 0: The total amount of wall time = 167.892925 + 0: The maximum resident set size (KB) = 994528 Test 080 control_thompson_progcld_thompson_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/fv3_regional_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/regional_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/fv3_regional_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/regional_debug Checking test 081 regional_debug results .... Comparing dynf000.nc .........OK Comparing dynf001.nc .........OK Comparing phyf000.nc .........OK Comparing phyf001.nc .........OK - 0: The total amount of wall time = 239.203403 - 0: The maximum resident set size (KB) = 606836 + 0: The total amount of wall time = 234.743471 + 0: The maximum resident set size (KB) = 608468 Test 081 regional_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_control_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_control_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_control_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_control_debug Checking test 082 rap_control_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 261.964676 - 0: The maximum resident set size (KB) = 998696 + 0: The total amount of wall time = 261.014912 + 0: The maximum resident set size (KB) = 997396 Test 082 rap_control_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_control_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_unified_drag_suite_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_control_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_unified_drag_suite_debug Checking test 083 rap_unified_drag_suite_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 262.580989 - 0: The maximum resident set size (KB) = 1001120 + 0: The total amount of wall time = 265.485417 + 0: The maximum resident set size (KB) = 998884 Test 083 rap_unified_drag_suite_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_diag_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_diag_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_diag_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_diag_debug Checking test 084 rap_diag_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 277.604307 - 0: The maximum resident set size (KB) = 1081416 + 0: The total amount of wall time = 277.167155 + 0: The maximum resident set size (KB) = 1084440 Test 084 rap_diag_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_cires_ugwp_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_cires_ugwp_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_cires_ugwp_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_cires_ugwp_debug Checking test 085 rap_cires_ugwp_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 268.250691 - 0: The maximum resident set size (KB) = 1001756 + 0: The total amount of wall time = 266.851498 + 0: The maximum resident set size (KB) = 1000820 Test 085 rap_cires_ugwp_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_cires_ugwp_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_unified_ugwp_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_cires_ugwp_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_unified_ugwp_debug Checking test 086 rap_unified_ugwp_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 267.995905 - 0: The maximum resident set size (KB) = 998980 + 0: The total amount of wall time = 263.993765 + 0: The maximum resident set size (KB) = 995596 Test 086 rap_unified_ugwp_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_lndp_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_lndp_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_lndp_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_lndp_debug Checking test 087 rap_lndp_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 259.022954 - 0: The maximum resident set size (KB) = 998156 + 0: The total amount of wall time = 260.654458 + 0: The maximum resident set size (KB) = 1001148 Test 087 rap_lndp_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_flake_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_flake_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_flake_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_flake_debug Checking test 088 rap_flake_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 258.456897 - 0: The maximum resident set size (KB) = 1000536 + 0: The total amount of wall time = 262.652753 + 0: The maximum resident set size (KB) = 998244 Test 088 rap_flake_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_progcld_thompson_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_progcld_thompson_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_progcld_thompson_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_progcld_thompson_debug Checking test 089 rap_progcld_thompson_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 264.780332 - 0: The maximum resident set size (KB) = 1004200 + 0: The total amount of wall time = 263.290655 + 0: The maximum resident set size (KB) = 994220 Test 089 rap_progcld_thompson_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_noah_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_noah_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_noah_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_noah_debug Checking test 090 rap_noah_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 262.354151 - 0: The maximum resident set size (KB) = 1001428 + 0: The total amount of wall time = 255.417199 + 0: The maximum resident set size (KB) = 1001120 Test 090 rap_noah_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_rrtmgp_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_rrtmgp_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_rrtmgp_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_rrtmgp_debug Checking test 091 rap_rrtmgp_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 450.547998 - 0: The maximum resident set size (KB) = 1127040 + 0: The total amount of wall time = 444.714265 + 0: The maximum resident set size (KB) = 1122832 Test 091 rap_rrtmgp_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_sfcdiff_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_sfcdiff_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_sfcdiff_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_sfcdiff_debug Checking test 092 rap_sfcdiff_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 258.750647 - 0: The maximum resident set size (KB) = 1000900 + 0: The total amount of wall time = 261.390237 + 0: The maximum resident set size (KB) = 999336 Test 092 rap_sfcdiff_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rap_noah_sfcdiff_cires_ugwp_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rap_noah_sfcdiff_cires_ugwp_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rap_noah_sfcdiff_cires_ugwp_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rap_noah_sfcdiff_cires_ugwp_debug Checking test 093 rap_noah_sfcdiff_cires_ugwp_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 436.395475 - 0: The maximum resident set size (KB) = 999416 + 0: The total amount of wall time = 428.643792 + 0: The maximum resident set size (KB) = 1000548 Test 093 rap_noah_sfcdiff_cires_ugwp_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/rrfs_v1beta_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/rrfs_v1beta_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/rrfs_v1beta_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/rrfs_v1beta_debug Checking test 094 rrfs_v1beta_debug results .... Comparing sfcf000.nc .........OK Comparing sfcf001.nc .........OK Comparing atmf000.nc .........OK Comparing atmf001.nc .........OK - 0: The total amount of wall time = 259.408745 - 0: The maximum resident set size (KB) = 999064 + 0: The total amount of wall time = 261.976586 + 0: The maximum resident set size (KB) = 1000840 Test 094 rrfs_v1beta_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_wam_debug -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_wam_debug +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_wam_debug +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_wam_debug Checking test 095 control_wam_debug results .... Comparing sfcf019.nc .........OK Comparing atmf019.nc .........OK - 0: The total amount of wall time = 281.018920 - 0: The maximum resident set size (KB) = 255996 + 0: The total amount of wall time = 272.020065 + 0: The maximum resident set size (KB) = 257252 Test 095 control_wam_debug PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_atm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_atm +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_atm +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_atm Checking test 096 hafs_regional_atm results .... Comparing atmf006.nc ............ALT CHECK......OK Comparing sfcf006.nc .........OK Comparing HURPRS.GrbF06 .........OK - 0: The total amount of wall time = 289.227337 - 0: The maximum resident set size (KB) = 713120 + 0: The total amount of wall time = 282.533521 + 0: The maximum resident set size (KB) = 710076 Test 096 hafs_regional_atm PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_atm_thompson_gfdlsf -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_atm_thompson_gfdlsf +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_atm_thompson_gfdlsf +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_atm_thompson_gfdlsf Checking test 097 hafs_regional_atm_thompson_gfdlsf results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK - 0: The total amount of wall time = 349.369222 - 0: The maximum resident set size (KB) = 1068780 + 0: The total amount of wall time = 351.636570 + 0: The maximum resident set size (KB) = 1064320 Test 097 hafs_regional_atm_thompson_gfdlsf PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_atm_ocn -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_atm_ocn +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_atm_ocn +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_atm_ocn Checking test 098 hafs_regional_atm_ocn results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK @@ -2773,28 +2773,28 @@ Checking test 098 hafs_regional_atm_ocn results .... Comparing ufs.hafs.cpl.hi.2019-08-29-21600.nc .........OK Comparing ufs.hafs.cpl.r.2019-08-29-21600.nc .........OK - 0: The total amount of wall time = 363.135454 - 0: The maximum resident set size (KB) = 725584 + 0: The total amount of wall time = 363.559331 + 0: The maximum resident set size (KB) = 726888 Test 098 hafs_regional_atm_ocn PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_atm_wav -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_atm_wav +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_atm_wav +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_atm_wav Checking test 099 hafs_regional_atm_wav results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing out_grd.ww3 .........OK Comparing out_pnt.ww3 .........OK - 0: The total amount of wall time = 836.776373 - 0: The maximum resident set size (KB) = 726472 + 0: The total amount of wall time = 829.858140 + 0: The maximum resident set size (KB) = 728656 Test 099 hafs_regional_atm_wav PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_atm_ocn_wav -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_atm_ocn_wav +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_atm_ocn_wav +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_atm_ocn_wav Checking test 100 hafs_regional_atm_ocn_wav results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK @@ -2803,60 +2803,60 @@ Checking test 100 hafs_regional_atm_ocn_wav results .... Comparing out_grd.ww3 .........OK Comparing out_pnt.ww3 .........OK - 0: The total amount of wall time = 916.966262 - 0: The maximum resident set size (KB) = 726532 + 0: The total amount of wall time = 925.991364 + 0: The maximum resident set size (KB) = 725656 Test 100 hafs_regional_atm_ocn_wav PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_1nest_atm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_1nest_atm +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_1nest_atm +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_1nest_atm Checking test 101 hafs_regional_1nest_atm results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing atm.nest02.f006.nc .........OK Comparing sfc.nest02.f006.nc .........OK - 0: The total amount of wall time = 436.288703 - 0: The maximum resident set size (KB) = 323932 + 0: The total amount of wall time = 439.230147 + 0: The maximum resident set size (KB) = 322888 Test 101 hafs_regional_1nest_atm PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_telescopic_2nests_atm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_telescopic_2nests_atm +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_telescopic_2nests_atm +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_telescopic_2nests_atm Checking test 102 hafs_regional_telescopic_2nests_atm results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK - Comparing atm.nest02.f006.nc ............ALT CHECK......OK + Comparing atm.nest02.f006.nc .........OK Comparing sfc.nest02.f006.nc .........OK Comparing atm.nest03.f006.nc .........OK Comparing sfc.nest03.f006.nc .........OK - 0: The total amount of wall time = 452.432117 - 0: The maximum resident set size (KB) = 332784 + 0: The total amount of wall time = 451.390772 + 0: The maximum resident set size (KB) = 327680 Test 102 hafs_regional_telescopic_2nests_atm PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_global_1nest_atm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_global_1nest_atm +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_global_1nest_atm +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_global_1nest_atm Checking test 103 hafs_global_1nest_atm results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing atm.nest02.f006.nc .........OK Comparing sfc.nest02.f006.nc .........OK - 0: The total amount of wall time = 204.788449 - 0: The maximum resident set size (KB) = 210412 + 0: The total amount of wall time = 204.191958 + 0: The maximum resident set size (KB) = 209060 Test 103 hafs_global_1nest_atm PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_global_multiple_4nests_atm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_global_multiple_4nests_atm +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_global_multiple_4nests_atm +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_global_multiple_4nests_atm Checking test 104 hafs_global_multiple_4nests_atm results .... - Comparing atmf006.nc ............ALT CHECK......OK + Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing atm.nest02.f006.nc .........OK Comparing sfc.nest02.f006.nc .........OK @@ -2867,43 +2867,29 @@ Checking test 104 hafs_global_multiple_4nests_atm results .... Comparing atm.nest05.f006.nc .........OK Comparing sfc.nest05.f006.nc ............ALT CHECK......OK - 0: The total amount of wall time = 552.447911 - 0: The maximum resident set size (KB) = 280980 + 0: The total amount of wall time = 551.962601 + 0: The maximum resident set size (KB) = 279404 Test 104 hafs_global_multiple_4nests_atm PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_specified_moving_1nest_atm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_specified_moving_1nest_atm +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_specified_moving_1nest_atm +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_specified_moving_1nest_atm Checking test 105 hafs_regional_specified_moving_1nest_atm results .... - Comparing atmf006.nc .........OK - Comparing sfcf006.nc .........OK - Comparing atm.nest02.f006.nc .........OK - Comparing sfc.nest02.f006.nc .........OK - - 0: The total amount of wall time = 260.489602 - 0: The maximum resident set size (KB) = 325728 - -Test 105 hafs_regional_specified_moving_1nest_atm PASS - - -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_storm_following_1nest_atm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_storm_following_1nest_atm -Checking test 106 hafs_regional_storm_following_1nest_atm results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing atm.nest02.f006.nc .........OK Comparing sfc.nest02.f006.nc ............ALT CHECK......OK - 0: The total amount of wall time = 254.056453 - 0: The maximum resident set size (KB) = 328156 + 0: The total amount of wall time = 257.793481 + 0: The maximum resident set size (KB) = 326412 -Test 106 hafs_regional_storm_following_1nest_atm PASS +Test 105 hafs_regional_specified_moving_1nest_atm PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_storm_following_1nest_atm_ocn -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_storm_following_1nest_atm_ocn -Checking test 107 hafs_regional_storm_following_1nest_atm_ocn results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_storm_following_1nest_atm_ocn +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_storm_following_1nest_atm_ocn +Checking test 106 hafs_regional_storm_following_1nest_atm_ocn results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing atm.nest02.f006.nc .........OK @@ -2911,181 +2897,181 @@ Checking test 107 hafs_regional_storm_following_1nest_atm_ocn results .... Comparing archv.2020_238_18.a .........OK Comparing archs.2020_238_18.a .........OK - 0: The total amount of wall time = 256.522534 - 0: The maximum resident set size (KB) = 330476 + 0: The total amount of wall time = 256.095943 + 0: The maximum resident set size (KB) = 329912 -Test 107 hafs_regional_storm_following_1nest_atm_ocn PASS +Test 106 hafs_regional_storm_following_1nest_atm_ocn PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_storm_following_1nest_atm_ocn_wav -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_storm_following_1nest_atm_ocn_wav -Checking test 108 hafs_regional_storm_following_1nest_atm_ocn_wav results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_storm_following_1nest_atm_ocn_wav +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_storm_following_1nest_atm_ocn_wav +Checking test 107 hafs_regional_storm_following_1nest_atm_ocn_wav results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing atm.nest02.f006.nc ............ALT CHECK......OK - Comparing sfc.nest02.f006.nc ............ALT CHECK......OK + Comparing sfc.nest02.f006.nc .........OK Comparing archv.2020_238_18.a .........OK Comparing archs.2020_238_18.a .........OK Comparing out_grd.ww3 .........OK Comparing out_pnt.ww3 .........OK - 0: The total amount of wall time = 778.736288 - 0: The maximum resident set size (KB) = 330652 + 0: The total amount of wall time = 777.940755 + 0: The maximum resident set size (KB) = 330528 -Test 108 hafs_regional_storm_following_1nest_atm_ocn_wav PASS +Test 107 hafs_regional_storm_following_1nest_atm_ocn_wav PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_global_storm_following_1nest_atm -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_global_storm_following_1nest_atm -Checking test 109 hafs_global_storm_following_1nest_atm results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_global_storm_following_1nest_atm +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_global_storm_following_1nest_atm +Checking test 108 hafs_global_storm_following_1nest_atm results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing atm.nest02.f006.nc .........OK Comparing sfc.nest02.f006.nc .........OK - 0: The total amount of wall time = 79.201471 - 0: The maximum resident set size (KB) = 222672 + 0: The total amount of wall time = 78.617704 + 0: The maximum resident set size (KB) = 236776 -Test 109 hafs_global_storm_following_1nest_atm PASS +Test 108 hafs_global_storm_following_1nest_atm PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_docn -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_docn -Checking test 110 hafs_regional_docn results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_docn +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_docn +Checking test 109 hafs_regional_docn results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing ufs.hafs.cpl.hi.2019-08-29-21600.nc .........OK Comparing ufs.hafs.cpl.r.2019-08-29-21600.nc .........OK Comparing ufs.hafs.docn.r.2019-08-29-21600.nc .........OK - 0: The total amount of wall time = 357.522879 - 0: The maximum resident set size (KB) = 722328 + 0: The total amount of wall time = 356.116676 + 0: The maximum resident set size (KB) = 721492 -Test 110 hafs_regional_docn PASS +Test 109 hafs_regional_docn PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_docn_oisst -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_docn_oisst -Checking test 111 hafs_regional_docn_oisst results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_docn_oisst +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_docn_oisst +Checking test 110 hafs_regional_docn_oisst results .... Comparing atmf006.nc .........OK Comparing sfcf006.nc .........OK Comparing ufs.hafs.cpl.hi.2019-08-29-21600.nc .........OK Comparing ufs.hafs.cpl.r.2019-08-29-21600.nc .........OK Comparing ufs.hafs.docn.r.2019-08-29-21600.nc .........OK - 0: The total amount of wall time = 351.921374 - 0: The maximum resident set size (KB) = 718672 + 0: The total amount of wall time = 353.831144 + 0: The maximum resident set size (KB) = 721164 -Test 111 hafs_regional_docn_oisst PASS +Test 110 hafs_regional_docn_oisst PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/hafs_regional_datm_cdeps -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/hafs_regional_datm_cdeps -Checking test 112 hafs_regional_datm_cdeps results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/hafs_regional_datm_cdeps +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/hafs_regional_datm_cdeps +Checking test 111 hafs_regional_datm_cdeps results .... Comparing ufs.hafs.cpl.hi.2019-08-30-00000.nc .........OK Comparing ufs.hafs.cpl.r.2019-08-30-00000.nc .........OK Comparing ufs.hafs.datm.r.2019-08-30-00000.nc .........OK - 0: The total amount of wall time = 941.781032 - 0: The maximum resident set size (KB) = 853708 + 0: The total amount of wall time = 939.940708 + 0: The maximum resident set size (KB) = 853264 -Test 112 hafs_regional_datm_cdeps PASS +Test 111 hafs_regional_datm_cdeps PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_control_cfsr -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_control_cfsr -Checking test 113 datm_cdeps_control_cfsr results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_control_cfsr +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_control_cfsr +Checking test 112 datm_cdeps_control_cfsr results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2011-10-02-00000.nc .........OK Comparing RESTART/DATM_CFSR.cpl.r.2011-10-02-00000.nc .........OK - 0: The total amount of wall time = 140.792661 - 0: The maximum resident set size (KB) = 719548 + 0: The total amount of wall time = 141.752673 + 0: The maximum resident set size (KB) = 719028 -Test 113 datm_cdeps_control_cfsr PASS +Test 112 datm_cdeps_control_cfsr PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_control_cfsr -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_restart_cfsr -Checking test 114 datm_cdeps_restart_cfsr results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_control_cfsr +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_restart_cfsr +Checking test 113 datm_cdeps_restart_cfsr results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2011-10-02-00000.nc .........OK Comparing RESTART/DATM_CFSR.cpl.r.2011-10-02-00000.nc .........OK - 0: The total amount of wall time = 83.300516 - 0: The maximum resident set size (KB) = 717128 + 0: The total amount of wall time = 85.578709 + 0: The maximum resident set size (KB) = 718124 -Test 114 datm_cdeps_restart_cfsr PASS +Test 113 datm_cdeps_restart_cfsr PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_control_gefs -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_control_gefs -Checking test 115 datm_cdeps_control_gefs results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_control_gefs +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_control_gefs +Checking test 114 datm_cdeps_control_gefs results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2011-10-02-00000.nc .........OK Comparing RESTART/DATM_GEFS.cpl.r.2011-10-02-00000.nc .........OK - 0: The total amount of wall time = 138.053078 - 0: The maximum resident set size (KB) = 619884 + 0: The total amount of wall time = 141.156867 + 0: The maximum resident set size (KB) = 616916 -Test 115 datm_cdeps_control_gefs PASS +Test 114 datm_cdeps_control_gefs PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_iau_gefs -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_iau_gefs -Checking test 116 datm_cdeps_iau_gefs results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_iau_gefs +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_iau_gefs +Checking test 115 datm_cdeps_iau_gefs results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2011-10-02-00000.nc .........OK Comparing RESTART/DATM_GEFS.cpl.r.2011-10-02-00000.nc .........OK - 0: The total amount of wall time = 140.209395 - 0: The maximum resident set size (KB) = 616744 + 0: The total amount of wall time = 141.764636 + 0: The maximum resident set size (KB) = 618328 -Test 116 datm_cdeps_iau_gefs PASS +Test 115 datm_cdeps_iau_gefs PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_stochy_gefs -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_stochy_gefs -Checking test 117 datm_cdeps_stochy_gefs results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_stochy_gefs +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_stochy_gefs +Checking test 116 datm_cdeps_stochy_gefs results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2011-10-02-00000.nc .........OK Comparing RESTART/DATM_GEFS.cpl.r.2011-10-02-00000.nc .........OK - 0: The total amount of wall time = 140.851165 - 0: The maximum resident set size (KB) = 617960 + 0: The total amount of wall time = 139.492519 + 0: The maximum resident set size (KB) = 620624 -Test 117 datm_cdeps_stochy_gefs PASS +Test 116 datm_cdeps_stochy_gefs PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_bulk_cfsr -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_bulk_cfsr -Checking test 118 datm_cdeps_bulk_cfsr results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_bulk_cfsr +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_bulk_cfsr +Checking test 117 datm_cdeps_bulk_cfsr results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2011-10-02-00000.nc .........OK Comparing RESTART/DATM_CFSR.cpl.r.2011-10-02-00000.nc .........OK - 0: The total amount of wall time = 139.864962 - 0: The maximum resident set size (KB) = 716924 + 0: The total amount of wall time = 141.677367 + 0: The maximum resident set size (KB) = 736804 -Test 118 datm_cdeps_bulk_cfsr PASS +Test 117 datm_cdeps_bulk_cfsr PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_bulk_gefs -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_bulk_gefs -Checking test 119 datm_cdeps_bulk_gefs results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_bulk_gefs +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_bulk_gefs +Checking test 118 datm_cdeps_bulk_gefs results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2011-10-02-00000.nc .........OK Comparing RESTART/DATM_GEFS.cpl.r.2011-10-02-00000.nc .........OK - 0: The total amount of wall time = 136.122692 - 0: The maximum resident set size (KB) = 618532 + 0: The total amount of wall time = 137.516067 + 0: The maximum resident set size (KB) = 619048 -Test 119 datm_cdeps_bulk_gefs PASS +Test 118 datm_cdeps_bulk_gefs PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_mx025_cfsr -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_mx025_cfsr -Checking test 120 datm_cdeps_mx025_cfsr results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_mx025_cfsr +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_mx025_cfsr +Checking test 119 datm_cdeps_mx025_cfsr results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/MOM.res_1.nc .........OK Comparing RESTART/MOM.res_2.nc .........OK @@ -3093,15 +3079,15 @@ Checking test 120 datm_cdeps_mx025_cfsr results .... Comparing RESTART/iced.2011-10-01-43200.nc .........OK Comparing RESTART/DATM_CFSR.cpl.r.2011-10-01-43200.nc .........OK - 0: The total amount of wall time = 304.773675 - 0: The maximum resident set size (KB) = 566176 + 0: The total amount of wall time = 307.172782 + 0: The maximum resident set size (KB) = 566948 -Test 120 datm_cdeps_mx025_cfsr PASS +Test 119 datm_cdeps_mx025_cfsr PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_mx025_gefs -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_mx025_gefs -Checking test 121 datm_cdeps_mx025_gefs results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_mx025_gefs +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_mx025_gefs +Checking test 120 datm_cdeps_mx025_gefs results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/MOM.res_1.nc .........OK Comparing RESTART/MOM.res_2.nc .........OK @@ -3109,65 +3095,65 @@ Checking test 121 datm_cdeps_mx025_gefs results .... Comparing RESTART/iced.2011-10-01-43200.nc .........OK Comparing RESTART/DATM_GEFS.cpl.r.2011-10-01-43200.nc .........OK - 0: The total amount of wall time = 300.826766 - 0: The maximum resident set size (KB) = 528236 + 0: The total amount of wall time = 300.947799 + 0: The maximum resident set size (KB) = 533500 -Test 121 datm_cdeps_mx025_gefs PASS +Test 120 datm_cdeps_mx025_gefs PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_control_cfsr -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_multiple_files_cfsr -Checking test 122 datm_cdeps_multiple_files_cfsr results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_control_cfsr +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_multiple_files_cfsr +Checking test 121 datm_cdeps_multiple_files_cfsr results .... Comparing RESTART/DATM_CFSR.cpl.r.2011-10-02-00000.nc .........OK - 0: The total amount of wall time = 139.822923 - 0: The maximum resident set size (KB) = 716016 + 0: The total amount of wall time = 143.505564 + 0: The maximum resident set size (KB) = 716364 -Test 122 datm_cdeps_multiple_files_cfsr PASS +Test 121 datm_cdeps_multiple_files_cfsr PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_3072x1536_cfsr -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_3072x1536_cfsr -Checking test 123 datm_cdeps_3072x1536_cfsr results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_3072x1536_cfsr +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_3072x1536_cfsr +Checking test 122 datm_cdeps_3072x1536_cfsr results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2011-10-02-00000.nc .........OK Comparing RESTART/DATM_CFSR3072x1536.cpl.r.2011-10-02-00000.nc .........OK - 0: The total amount of wall time = 189.688262 - 0: The maximum resident set size (KB) = 1827936 + 0: The total amount of wall time = 190.683240 + 0: The maximum resident set size (KB) = 1832216 -Test 123 datm_cdeps_3072x1536_cfsr PASS +Test 122 datm_cdeps_3072x1536_cfsr PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_gfs -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_gfs -Checking test 124 datm_cdeps_gfs results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_gfs +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_gfs +Checking test 123 datm_cdeps_gfs results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2021-03-23-21600.nc .........OK Comparing RESTART/DATM_GFS.cpl.r.2021-03-23-21600.nc .........OK - 0: The total amount of wall time = 191.180477 - 0: The maximum resident set size (KB) = 1832424 + 0: The total amount of wall time = 193.203823 + 0: The maximum resident set size (KB) = 1831108 -Test 124 datm_cdeps_gfs PASS +Test 123 datm_cdeps_gfs PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/datm_cdeps_debug_cfsr -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/datm_cdeps_debug_cfsr -Checking test 125 datm_cdeps_debug_cfsr results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/datm_cdeps_debug_cfsr +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/datm_cdeps_debug_cfsr +Checking test 124 datm_cdeps_debug_cfsr results .... Comparing RESTART/MOM.res.nc .........OK Comparing RESTART/iced.2011-10-01-21600.nc .........OK Comparing RESTART/DATM_CFSR.cpl.r.2011-10-01-21600.nc .........OK - 0: The total amount of wall time = 440.122290 - 0: The maximum resident set size (KB) = 724924 + 0: The total amount of wall time = 436.651650 + 0: The maximum resident set size (KB) = 725116 -Test 125 datm_cdeps_debug_cfsr PASS +Test 124 datm_cdeps_debug_cfsr PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_atmwav -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_atmwav -Checking test 126 control_atmwav results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_atmwav +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_atmwav +Checking test 125 control_atmwav results .... Comparing sfcf000.nc .........OK Comparing sfcf012.nc .........OK Comparing atmf000.nc .........OK @@ -3210,15 +3196,15 @@ Checking test 126 control_atmwav results .... Comparing RESTART/sfc_data.tile6.nc .........OK Comparing 20210322.180000.restart.glo_1deg .........OK - 0: The total amount of wall time = 78.966936 - 0: The maximum resident set size (KB) = 492112 + 0: The total amount of wall time = 79.368260 + 0: The maximum resident set size (KB) = 496616 -Test 126 control_atmwav PASS +Test 125 control_atmwav PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_c384gdas_wav -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_c384gdas_wav -Checking test 127 control_c384gdas_wav results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_c384gdas_wav +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_c384gdas_wav +Checking test 126 control_c384gdas_wav results .... Comparing sfcf000.nc .........OK Comparing sfcf003.nc .........OK Comparing atmf000.nc .........OK @@ -3263,15 +3249,15 @@ Checking test 127 control_c384gdas_wav results .... Comparing 20210322.030000.restart.gnh_10m .........OK Comparing 20210322.030000.restart.gsh_15m .........OK - 0: The total amount of wall time = 670.760705 - 0: The maximum resident set size (KB) = 1048148 + 0: The total amount of wall time = 669.708199 + 0: The maximum resident set size (KB) = 1047152 -Test 127 control_c384gdas_wav PASS +Test 126 control_c384gdas_wav PASS -baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220408/INTEL/control_atm_aerosols -working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_574/control_atm_aerosols -Checking test 128 control_atm_aerosols results .... +baseline dir = /scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20220414/INTEL/control_atm_aerosols +working dir = /scratch1/NCEPDEV/stmp2/emc.nemspara/FV3_RT/rt_25185/control_atm_aerosols +Checking test 127 control_atm_aerosols results .... Comparing sfcf000.nc .........OK Comparing sfcf024.nc .........OK Comparing atmf000.nc .........OK @@ -3317,12 +3303,12 @@ Checking test 128 control_atm_aerosols results .... Comparing RESTART/sfc_data.tile5.nc .........OK Comparing RESTART/sfc_data.tile6.nc .........OK - 0: The total amount of wall time = 274.077076 - 0: The maximum resident set size (KB) = 909432 + 0: The total amount of wall time = 279.567177 + 0: The maximum resident set size (KB) = 909436 -Test 128 control_atm_aerosols PASS +Test 127 control_atm_aerosols PASS REGRESSION TEST WAS SUCCESSFUL -Tue Apr 12 00:27:01 UTC 2022 -Elapsed time: 01h:07m:38s. Have a nice day! +Fri Apr 15 18:35:57 UTC 2022 +Elapsed time: 01h:02m:18s. Have a nice day! diff --git a/tests/default_vars.sh b/tests/default_vars.sh index 55e8bccbd8..655fd95a6c 100755 --- a/tests/default_vars.sh +++ b/tests/default_vars.sh @@ -1064,7 +1064,7 @@ export HAFS=false export DATM_CDEPS=false export DOCN_CDEPS=false -export FV3BMIC='gfs_p8a' +export FV3BMIC='gfs_p8c' export SYEAR=2021 export SMONTH=03 diff --git a/tests/fail_test_001 b/tests/fail_test_001 new file mode 100644 index 0000000000..2a3f610d97 --- /dev/null +++ b/tests/fail_test_001 @@ -0,0 +1 @@ +control_p8 001 failed in check_result diff --git a/tests/fv3_conf/compile_slurm.IN b/tests/fv3_conf/compile_slurm.IN new file mode 100644 index 0000000000..6ce910e665 --- /dev/null +++ b/tests/fv3_conf/compile_slurm.IN @@ -0,0 +1,19 @@ +#!/bin/sh +#SBATCH -e err +#SBATCH -o out +#SBATCH --account=@[ACCNR] +#SBATCH --qos=@[QUEUE] +#SBATCH --nodes=1 +#SBATCH --ntasks-per-node=8 +#SBATCH --time=30 +#SBATCH --job-name="@[JBNME]" + +set -eux + +echo -n " $( date +%s )," > job_timestamp.txt +echo "Compile started: " `date` + +@[PATHRT]/compile.sh @[MACHINE_ID] "@[MAKE_OPT]" @[COMPILE_NR] + +echo "Compile ended: " `date` +echo -n " $( date +%s )," >> job_timestamp.txt diff --git a/tests/fv3_conf/fv3_slurm.IN b/tests/fv3_conf/fv3_slurm.IN new file mode 100644 index 0000000000..effafccb4e --- /dev/null +++ b/tests/fv3_conf/fv3_slurm.IN @@ -0,0 +1,39 @@ +#!/bin/sh +#SBATCH -e err +#SBATCH -o out +#SBATCH --account=@[ACCNR] +#SBATCH --qos=@[QUEUE] +### #SBATCH --ntasks=@[TASKS] +#SBATCH --nodes=@[NODES] +#SBATCH --ntasks-per-node=@[TPN] +#SBATCH --time=@[WLCLK] +#SBATCH --job-name="@[JBNME]" +### #SBATCH --exclusive + +set -eux +echo -n " $( date +%s )," > job_timestamp.txt + +set +x +MACHINE_ID=hera +source ./module-setup.sh +module use $( pwd -P ) +module load modules.fv3 +module list +set -x + +echo "Model started: " `date` + +export MPI_TYPE_DEPTH=20 +export OMP_STACKSIZE=512M +export OMP_NUM_THREADS=@[THRD] +export ESMF_RUNTIME_COMPLIANCECHECK=OFF:depth=4 +export PSM_RANKS_PER_CONTEXT=4 +export PSM_SHAREDCONTEXTS=1 + +# Avoid job errors because of filesystem synchronization delays +sync && sleep 1 + +srun --label -n @[TASKS] ./fv3.exe + +echo "Model ended: " `date` +echo -n " $( date +%s )," >> job_timestamp.txt diff --git a/tests/parm/field_table/field_table_thompson_noaero_tke_GOCART_progsigma b/tests/parm/field_table/field_table_thompson_noaero_tke_GOCART_progsigma new file mode 100644 index 0000000000..66b7f62489 --- /dev/null +++ b/tests/parm/field_table/field_table_thompson_noaero_tke_GOCART_progsigma @@ -0,0 +1,197 @@ +# added by FRE: sphum must be present in atmos +# specific humidity for moist runs + "TRACER", "atmos_mod", "sphum" + "longname", "specific humidity" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=3.e-6" / +# prognostic cloud water mixing ratio + "TRACER", "atmos_mod", "liq_wat" + "longname", "cloud water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic ice water mixing ratio + "TRACER", "atmos_mod", "ice_wat" + "longname", "cloud ice mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic rain water mixing ratio + "TRACER", "atmos_mod", "rainwat" + "longname", "rain water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic snow water mixing ratio + "TRACER", "atmos_mod", "snowwat" + "longname", "snow water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic Grau water mixing ratio + "TRACER", "atmos_mod", "graupel" + "longname", "graupel mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic cloud water number concentration - not for non-aerosol runs +# "TRACER", "atmos_mod", "water_nc" +# "longname", "cloud liquid water number concentration" +# "units", "/kg" +# "profile_type", "fixed", "surface_value=0.0" / +# prognostic cloud ice number concentration + "TRACER", "atmos_mod", "ice_nc" + "longname", "cloud ice water number concentration" + "units", "/kg" + "profile_type", "fixed", "surface_value=0.0" / +# prognostic rain number concentration + "TRACER", "atmos_mod", "rain_nc" + "longname", "rain number concentration" + "units", "/kg" + "profile_type", "fixed", "surface_value=0.0" / +# prognostic ozone mixing ratio tracer + "TRACER", "atmos_mod", "o3mr" + "longname", "ozone mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# water- and ice-friendly aerosols (Thompson) - not for non-aerosol runs +# "TRACER", "atmos_mod", "liq_aero" +# "longname", "water-friendly aerosol number concentration" +# "units", "/kg" +# "profile_type", "fixed", "surface_value=0.0" / +# "TRACER", "atmos_mod", "ice_aero" +# "longname", "ice-friendly aerosol number concentration" +# "units", "/kg" +# "profile_type", "fixed", "surface_value=0.0" / +# prognostic subgrid scale turbulent kinetic energy + "TRACER", "atmos_mod", "sgs_tke" + "longname", "subgrid scale turbulent kinetic energy" + "units", "m2/s2" + "profile_type", "fixed", "surface_value=0.0" / +# prognotsitc sigmab tracer + "TRACER", "atmos_mod", "sigmab" + "longname", "sigma fraction" + "units", "fraction" + "profile_type", "fixed", "surface_value=0.0" / +# prognostic aerosols + "TRACER", "atmos_mod", "so2" + "longname", "so2 mixing ratio" + "units", "ppm" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "so4" + "longname", "sulfate mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "dms" + "longname", "DMS mixing ratio" + "units", "ppm" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "msa" + "longname", "msa mixing ratio" + "units", "ppm" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "bc1" + "longname", "hydrophobic black carbon mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "bc2" + "longname", "hydrophillic black carbon mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "oc1" + "longname", "hydrophobic organic carbon mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "oc2" + "longname", "hydrophillic organic carbon mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "dust1" + "longname", "fine dust1 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "dust2" + "longname", "fine dust2 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "dust3" + "longname", "coarse dust3 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "dust4" + "longname", "coarse dust4 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "dust5" + "longname", "coarse dust5 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "seas1" + "longname", "seasalt1 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "seas2" + "longname", "seasalt2 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "seas3" + "longname", "seasalt3 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "seas4" + "longname", "seasalt4 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "seas5" + "longname", "seasalt5 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "nh3" + "longname", "primary NH3 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "nh4a" + "longname", "primary NH4a mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "no3an1" + "longname", "primary NO3an1 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "no3an2" + "longname", "primary NO3an2 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "no3an3" + "longname", "primary NO3an3 mixing ratio" + "units", "ug/kg" + "tracer_usage", "chemistry" + "profile_type", "fixed", "surface_value=0.0" / +# diagnostic PM tracers + "TRACER", "atmos_mod", "pm25" + "longname", "primary PM25 mixing ratio" + "units", "ug/m3" + "tracer_usage", "chemistry", "type=diagnostic" + "profile_type", "fixed", "surface_value=0.0" / + "TRACER", "atmos_mod", "pm10" + "longname", "primary PM10 mixing ratio" + "units", "ug/m3" + "tracer_usage", "chemistry", "type=diagnostic" + "profile_type", "fixed", "surface_value=0.0" / diff --git a/tests/parm/field_table/field_table_thompson_noaero_tke_progsigma b/tests/parm/field_table/field_table_thompson_noaero_tke_progsigma new file mode 100644 index 0000000000..91b040294b --- /dev/null +++ b/tests/parm/field_table/field_table_thompson_noaero_tke_progsigma @@ -0,0 +1,71 @@ +# added by FRE: sphum must be present in atmos +# specific humidity for moist runs + "TRACER", "atmos_mod", "sphum" + "longname", "specific humidity" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=3.e-6" / +# prognostic cloud water mixing ratio + "TRACER", "atmos_mod", "liq_wat" + "longname", "cloud water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic ice water mixing ratio + "TRACER", "atmos_mod", "ice_wat" + "longname", "cloud ice mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic rain water mixing ratio + "TRACER", "atmos_mod", "rainwat" + "longname", "rain water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic snow water mixing ratio + "TRACER", "atmos_mod", "snowwat" + "longname", "snow water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic Grau water mixing ratio + "TRACER", "atmos_mod", "graupel" + "longname", "graupel mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic cloud water number concentration - not for non-aerosol runs +# "TRACER", "atmos_mod", "water_nc" +# "longname", "cloud liquid water number concentration" +# "units", "/kg" +# "profile_type", "fixed", "surface_value=0.0" / +# prognostic cloud ice number concentration + "TRACER", "atmos_mod", "ice_nc" + "longname", "cloud ice water number concentration" + "units", "/kg" + "profile_type", "fixed", "surface_value=0.0" / +# prognostic rain number concentration + "TRACER", "atmos_mod", "rain_nc" + "longname", "rain number concentration" + "units", "/kg" + "profile_type", "fixed", "surface_value=0.0" / +# prognotsitc sigmab tracer + "TRACER", "atmos_mod", "sigmab" + "longname", "sigma fraction" + "units", "fraction" + "profile_type", "fixed", "surface_value=0.0" / +# prognostic ozone mixing ratio tracer + "TRACER", "atmos_mod", "o3mr" + "longname", "ozone mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# water- and ice-friendly aerosols (Thompson) - not for non-aerosol runs +# "TRACER", "atmos_mod", "liq_aero" +# "longname", "water-friendly aerosol number concentration" +# "units", "/kg" +# "profile_type", "fixed", "surface_value=0.0" / +# "TRACER", "atmos_mod", "ice_aero" +# "longname", "ice-friendly aerosol number concentration" +# "units", "/kg" +# "profile_type", "fixed", "surface_value=0.0" / +# prognostic subgrid scale turbulent kinetic energy + "TRACER", "atmos_mod", "sgs_tke" + "longname", "subgrid scale turbulent kinetic energy" + "units", "m2/s2" + "profile_type", "fixed", "surface_value=0.0" / + diff --git a/tests/rt.conf b/tests/rt.conf index 4a1785d246..7adf34ac83 100644 --- a/tests/rt.conf +++ b/tests/rt.conf @@ -163,7 +163,7 @@ RUN | hafs_regional_telescopic_2nests_atm RUN | hafs_global_1nest_atm | - jet.intel wcoss2 | fv3 | RUN | hafs_global_multiple_4nests_atm | - jet.intel wcoss_cray wcoss2 | fv3 | RUN | hafs_regional_specified_moving_1nest_atm | - jet.intel wcoss2 | fv3 | -RUN | hafs_regional_storm_following_1nest_atm | - jet.intel wcoss2 | fv3 | +RUN | hafs_regional_storm_following_1nest_atm | - jet.intel wcoss2 hera.intel | fv3 | RUN | hafs_regional_storm_following_1nest_atm_ocn | - jet.intel wcoss2 | fv3 | RUN | hafs_regional_storm_following_1nest_atm_ocn_wav | - jet.intel wcoss2 | fv3 | RUN | hafs_global_storm_following_1nest_atm | - jet.intel wcoss2 | fv3 | diff --git a/tests/rt.conf_orig b/tests/rt.conf_orig new file mode 100644 index 0000000000..4a1785d246 --- /dev/null +++ b/tests/rt.conf_orig @@ -0,0 +1,213 @@ +################################################################################################################################################################################### +# S2S tests # +################################################################################################################################################################################### + +COMPILE | -DAPP=S2SWA -DCCPP_SUITES=FV3_GFS_v16_coupled_nsstNoahmpUGWPv1,FV3_GFS_v17_coupled_p8 | - wcoss_cray | fv3 | +RUN | cpld_control_p8 | - wcoss_cray | fv3 | +RUN | cpld_2threads_p8 | - wcoss_cray | | +RUN | cpld_decomp_p8 | - wcoss_cray jet.intel | | +RUN | cpld_mpi_p8 | - wcoss_cray | | + +RUN | cpld_bmark_p8 | - wcoss_cray jet.intel | fv3 | + +# Waves off for restart and debug tests +RUN | cpld_control_c96_p8 | - wcoss_cray | fv3 | +RUN | cpld_restart_c96_p8 | - wcoss_cray | | cpld_control_c96_p8 + + +RUN | cpld_control_c192_p8 | - wcoss_cray jet.intel | fv3 | +RUN | cpld_restart_c192_p8 | - wcoss_cray jet.intel | | cpld_control_c192_p8 + +RUN | cpld_control_c384_p8 | - wcoss_cray jet.intel | fv3 | +RUN | cpld_restart_c384_p8 | - wcoss_cray jet.intel | | cpld_control_c384_p8 + +COMPILE | -DAPP=S2SA -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8 | - wcoss_cray | fv3 | +RUN | cpld_debug_p8 | - wcoss_cray | fv3 | + +################################################################################################################################################################################### +# PROD tests # +################################################################################################################################################################################### + +COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v15_thompson_mynn,FV3_GFS_v15_thompson_mynn_RRTMGP,FV3_GFS_v17_p8,FV3_GFS_v15_thompson_mynn_lam3km -D32BIT=ON | | fv3 | +RUN | control | | fv3 | +RUN | control_decomp | | | +RUN | control_2dwrtdecomp | | | +RUN | control_2threads | - wcoss_cray | | +RUN | control_restart | | | control +RUN | control_fhzero | - wcoss2 | | +RUN | control_CubedSphereGrid | | fv3 | +RUN | control_latlon | | fv3 | +RUN | control_wrtGauss_netcdf_parallel | - wcoss2 | fv3 | +RUN | control_c48 | | fv3 | +RUN | control_c192 | | fv3 | +RUN | control_c384 | - wcoss_cray | fv3 | +#RUN | control_c768 | - wcoss_cray | fv3 | +RUN | control_c384gdas | - wcoss_cray | fv3 | +RUN | control_stochy | | fv3 | +RUN | control_stochy_restart | | | control_stochy +RUN | control_lndp | | fv3 | +RUN | control_iovr4 | | fv3 | +RUN | control_iovr5 | | fv3 | + +RUN | control_p8 | | fv3 | +RUN | control_restart_p8 | | | control_p8 +RUN | control_decomp_p8 | | | +RUN | control_2threads_p8 | - wcoss_cray | | + +RUN | regional_control | | fv3 | +RUN | regional_restart | | | regional_control +RUN | regional_control_2dwrtdecomp | | | +RUN | regional_noquilt | | fv3 | +RUN | regional_2threads | - wcoss_cray jet.intel | | +RUN | regional_netcdf_parallel | - wcoss2 | fv3 | +RUN | regional_RRTMGP | | fv3 | +RUN | regional_3km | | fv3 | + +COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_RAP_RRTMGP,FV3_RAP_sfcdiff,FV3_HRRR,FV3_RRFS_v1beta,FV3_RRFS_v1nssl -D32BIT=ON | | fv3 | + +RUN | rap_control | | fv3 | +RUN | rap_rrtmgp | | fv3 | +RUN | regional_spp_sppt_shum_skeb | | fv3 | +# This test is not giving the same results (also not in REPRO mode) - needs to be fixed +#RUN | rap_decomp | | | +RUN | rap_2threads | - wcoss_cray jet.intel | | +RUN | rap_restart | | | rap_control +RUN | rap_sfcdiff | | fv3 | +# This test is not giving the same results (also not in REPRO mode) - needs to be fixed +#RUN | rap_sfcdiff_decomp | | | +RUN | rap_sfcdiff_restart | | | rap_sfcdiff +RUN | hrrr_control | | fv3 | +RUN | rrfs_v1beta | | fv3 | +RUN | rrfs_v1nssl | | fv3 | +RUN | rrfs_v1nssl_nohailnoccn | | fv3 | + +RUN | rrfs_conus13km_hrrr_warm | | fv3 | +RUN | rrfs_conus13km_radar_tten_warm | | fv3 | + +COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_RRTMGP,FV3_GFS_v16_csawmg,FV3_GFS_v16_flake,FV3_GFS_v16_ugwpv1,FV3_GFS_v16_ras,FV3_GFS_v16_thompson,FV3_GFS_v16_noahmp | | fv3 | +# fv3_gfs_v15p2 and fv3_gfs_v15p2_RRTMGP fail w/ sat.vap pressure error when cdmbgwd=0.14,1.8,1.0,1.0 +RUN | control_rrtmgp | | fv3 | +#RUN | control_rrtmgp_2threads | | | +RUN | control_rrtmgp_c192 | | fv3 | +RUN | control_csawmg | - gaea.intel | fv3 | +RUN | control_csawmgt | | fv3 | +RUN | control_flake | | fv3 | +RUN | control_ras | | fv3 | +# post results do not reproduce on cray +RUN | control_thompson | - wcoss_cray | fv3 | +RUN | control_thompson_no_aero | - wcoss_cray | fv3 | + +# Run WAM test in REPRO mode to avoid numerical instability in the deep atmosphere +COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_fv3wam -D32BIT=ON -DMULTI_GASES=ON -DREPRO=ON | | fv3 | +RUN | control_wam | | fv3 | + +################################################################################################################################################################################### +# DEBUG tests # +################################################################################################################################################################################### + +COMPILE | -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v16_RRTMGP,FV3_GFS_v16_csawmg,FV3_GFS_v16_flake,FV3_GFS_v16_ugwpv1,FV3_GFS_v16_ras,FV3_GFS_v16_noahmp,FV3_GFS_v16_thompson,FV3_GFS_v15_thompson_mynn,FV3_GFS_v17_p8 -D32BIT=ON | | fv3 | + +RUN | control_debug | | fv3 | +RUN | control_2threads_debug | - wcoss_cray | | +RUN | control_CubedSphereGrid_debug | | fv3 | +RUN | control_wrtGauss_netcdf_parallel_debug | | fv3 | +RUN | control_stochy_debug | | fv3 | +RUN | control_lndp_debug | | fv3 | +RUN | control_rrtmgp_debug | | fv3 | +RUN | control_csawmg_debug | | fv3 | +RUN | control_csawmgt_debug | | fv3 | +RUN | control_ras_debug | | fv3 | +RUN | control_diag_debug | | fv3 | +RUN | control_debug_p8 | | fv3 | + +RUN | control_thompson_debug | | fv3 | +RUN | control_thompson_no_aero_debug | | fv3 | +RUN | control_thompson_extdiag_debug | | fv3 | +RUN | control_thompson_progcld_thompson_debug | | fv3 | + +RUN | regional_debug | | fv3 | + +COMPILE | -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_RAP,FV3_RAP_cires_ugwp,FV3_RAP_unified_ugwp,FV3_RAP_flake -D32BIT=ON | | fv3 | + +RUN | rap_control_debug | | fv3 | +RUN | rap_unified_drag_suite_debug | | | +RUN | rap_diag_debug | | fv3 | +RUN | rap_cires_ugwp_debug | | fv3 | +RUN | rap_unified_ugwp_debug | | | +RUN | rap_lndp_debug | | fv3 | +RUN | rap_flake_debug | | fv3 | +RUN | rap_progcld_thompson_debug | | fv3 | + +COMPILE | -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_RAP_noah,FV3_RAP_RRTMGP,FV3_RAP_sfcdiff,FV3_RAP_noah_sfcdiff_cires_ugwp,FV3_RRFS_v1beta -D32BIT=ON | | fv3 | +RUN | rap_noah_debug | | fv3 | +RUN | rap_rrtmgp_debug | | fv3 | +RUN | rap_sfcdiff_debug | | fv3 | +RUN | rap_noah_sfcdiff_cires_ugwp_debug | | fv3 | +RUN | rrfs_v1beta_debug | | fv3 | + +COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_fv3wam -D32BIT=ON -DMULTI_GASES=ON -DDEBUG=ON | | fv3 | +RUN | control_wam_debug | | fv3 | + +################################################################################################################################################################################### +# HAFS tests # +################################################################################################################################################################################### +# +COMPILE | -DAPP=HAFSW -DMOVING_NEST=ON -DCCPP_SUITES=FV3_HAFS_v0_gfdlmp_tedmf,FV3_HAFS_v0_gfdlmp_tedmf_nonsst,FV3_HAFS_v0_thompson_tedmf_gfdlsf -D32BIT=ON | - wcoss2 | fv3 | +RUN | hafs_regional_atm | - wcoss2 | fv3 | +RUN | hafs_regional_atm_thompson_gfdlsf | - wcoss2 | fv3 | +RUN | hafs_regional_atm_ocn | - wcoss2 | fv3 | +RUN | hafs_regional_atm_wav | - wcoss2 | fv3 | +RUN | hafs_regional_atm_ocn_wav | - wcoss2 | fv3 | +RUN | hafs_regional_1nest_atm | - jet.intel wcoss2 | fv3 | +RUN | hafs_regional_telescopic_2nests_atm | - jet.intel wcoss2 | fv3 | +RUN | hafs_global_1nest_atm | - jet.intel wcoss2 | fv3 | +RUN | hafs_global_multiple_4nests_atm | - jet.intel wcoss_cray wcoss2 | fv3 | +RUN | hafs_regional_specified_moving_1nest_atm | - jet.intel wcoss2 | fv3 | +RUN | hafs_regional_storm_following_1nest_atm | - jet.intel wcoss2 | fv3 | +RUN | hafs_regional_storm_following_1nest_atm_ocn | - jet.intel wcoss2 | fv3 | +RUN | hafs_regional_storm_following_1nest_atm_ocn_wav | - jet.intel wcoss2 | fv3 | +RUN | hafs_global_storm_following_1nest_atm | - jet.intel wcoss2 | fv3 | + +COMPILE | -DAPP=HAFS-ALL -DCCPP_SUITES=FV3_HAFS_v0_gfdlmp_tedmf,FV3_HAFS_v0_gfdlmp_tedmf_nonsst -D32BIT=ON | - wcoss_cray wcoss2 | fv3 | +RUN | hafs_regional_docn | - wcoss_cray wcoss2 | fv3 | +RUN | hafs_regional_docn_oisst | - wcoss_cray wcoss2 | fv3 | +RUN | hafs_regional_datm_cdeps | - wcoss_cray wcoss2 | fv3 | + +################################################################################################################################################################################### +# CDEPS Data Atmosphere tests # +################################################################################################################################################################################### + +COMPILE | -DAPP=NG-GODAS | - wcoss_cray | fv3 | +RUN | datm_cdeps_control_cfsr | - wcoss_cray | fv3 | +RUN | datm_cdeps_restart_cfsr | - wcoss_cray | | datm_cdeps_control_cfsr +RUN | datm_cdeps_control_gefs | - wcoss_cray | fv3 | +RUN | datm_cdeps_iau_gefs | - wcoss_cray | fv3 | +RUN | datm_cdeps_stochy_gefs | - wcoss_cray | fv3 | + +RUN | datm_cdeps_bulk_cfsr | - wcoss_cray | fv3 | +RUN | datm_cdeps_bulk_gefs | - wcoss_cray | fv3 | + +RUN | datm_cdeps_mx025_cfsr | - wcoss_cray | fv3 | +RUN | datm_cdeps_mx025_gefs | - wcoss_cray | fv3 | + +RUN | datm_cdeps_multiple_files_cfsr | - wcoss_cray | | +RUN | datm_cdeps_3072x1536_cfsr | - wcoss_cray | fv3 | +RUN | datm_cdeps_gfs | - wcoss_cray | fv3 | + +COMPILE | -DAPP=NG-GODAS -DDEBUG=ON | - wcoss_cray | fv3 | +RUN | datm_cdeps_debug_cfsr | - wcoss_cray | fv3 | + +################################################################################################################################################################################### +# ATM-WAV tests # +################################################################################################################################################################################### + +COMPILE | -DAPP=ATMW -DCCPP_SUITES=FV3_GFS_v16 -D32BIT=ON | - wcoss_cray wcoss2 | fv3 | +RUN | control_atmwav | - wcoss_cray wcoss2 | fv3 | +RUN | control_c384gdas_wav | - wcoss_cray jet.intel cheyenne.intel wcoss2 | fv3 | + +################################################################################################################################################################################### +# ATM-GOCART tests # +################################################################################################################################################################################### + +COMPILE | -DAPP=ATMAERO -DCCPP_SUITES=FV3_GFS_v16 | + hera.intel | fv3 | +RUN | control_atm_aerosols | + hera.intel | fv3 | diff --git a/tests/rt.sh b/tests/rt.sh index 22922303bd..bb829dc8eb 100755 --- a/tests/rt.sh +++ b/tests/rt.sh @@ -485,14 +485,14 @@ if [[ $TESTS_FILE =~ '35d' ]] || [[ $TESTS_FILE =~ 'weekly' ]]; then TEST_35D=true fi -BL_DATE=20220408 +BL_DATE=20220414 if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]] || [[ $MACHINE_ID = s4.* ]]; then RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}/${RT_COMPILER^^}} else RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}} fi -INPUTDATA_ROOT=${INPUTDATA_ROOT:-$DISKNM/NEMSfv3gfs/input-data-20211210} +INPUTDATA_ROOT=${INPUTDATA_ROOT:-$DISKNM/NEMSfv3gfs/input-data-20220414} INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT}/WW3_input_data_20211113 INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC:-$DISKNM/NEMSfv3gfs/BM_IC-20220207} diff --git a/tests/rt_384.conf b/tests/rt_384.conf new file mode 100644 index 0000000000..5f0f963516 --- /dev/null +++ b/tests/rt_384.conf @@ -0,0 +1,7 @@ +################################################################################################################################################################################### +# S2S tests # +################################################################################################################################################################################### + +COMPILE | -DAPP=S2SWA -DCCPP_SUITES=FV3_GFS_v16_coupled_nsstNoahmpUGWPv1,FV3_GFS_v17_coupled_p8 | | fv3 | +RUN | cpld_control_c384_p8 | | fv3 | + diff --git a/tests/rt_lisa.sh b/tests/rt_lisa.sh new file mode 100755 index 0000000000..57cf645229 --- /dev/null +++ b/tests/rt_lisa.sh @@ -0,0 +1,898 @@ +#!/bin/bash +set -eux + +SECONDS=0 + +hostname + +die() { echo "$@" >&2; exit 1; } +usage() { + set +x + echo + echo "Usage: $0 -c | -e | -h | -k | -w | -d | -l | -m | -n | -r " + echo + echo " -c create new baseline results" + echo " -e use ecFlow workflow manager" + echo " -h display this help" + echo " -k keep run directory after rt.sh is completed" + echo " -l runs test specified in " + echo " -m compare against new baseline results" + echo " -n run single test " + echo " -r use Rocoto workflow manager" + echo " -w for weekly_test, skip comparing baseline results" + echo " -d delete run direcotries that are not used by other tests" + echo + set -x + exit 1 +} + +[[ $# -eq 0 ]] && usage + +rt_single() { + local compile_line='' + local run_line='' + while read -r line || [ "$line" ]; do + line="${line#"${line%%[![:space:]]*}"}" + [[ ${#line} == 0 ]] && continue + [[ $line == \#* ]] && continue + + if [[ $line == COMPILE* ]] ; then + MACHINES=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') + if [[ ${MACHINES} == '' ]]; then + compile_line=$line + elif [[ ${MACHINES} == -* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] || compile_line=$line + elif [[ ${MACHINES} == +* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] && compile_line=$line + fi + fi + + if [[ $line =~ RUN ]]; then + tmp_test=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') + if [[ $SINGLE_NAME == $tmp_test && $compile_line != '' ]]; then + echo $compile_line >$TESTS_FILE + dep_test=$(echo $line | grep -w $tmp_test | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//') + if [[ $dep_test != '' ]]; then + dep_line=$(cat rt.conf | grep -w "$dep_test" | grep -v "$tmp_test") + dep_line="${dep_line#"${dep_line%%[![:space:]]*}"}" + echo $dep_line >>$TESTS_FILE + fi + echo $line >>$TESTS_FILE + break + fi + fi + done <'rt.conf' + + if [[ ! -f $TESTS_FILE ]]; then + echo "$SINGLE_NAME does not exist or cannot be run on $MACHINE_ID" + exit 1 + fi +} + +rt_35d() { +if [[ $TEST_NAME =~ '35d' ]] ; then + local sy=$(echo ${DATE_35D} | cut -c 1-4) + local sm=$(echo ${DATE_35D} | cut -c 5-6) + local new_test_name="tests/${TEST_NAME}_${DATE_35D}" + rm -f $new_test_name + cp tests/$TEST_NAME $new_test_name + + sed -i -e "s/\(export SYEAR\)/\1=\"$sy\"/" $new_test_name + sed -i -e "s/\(export SMONTH\)/\1=\"$sm\"/" $new_test_name + + TEST_NAME=${new_test_name#tests/} +fi +} + +rt_trap() { + [[ ${ROCOTO:-false} == true ]] && rocoto_kill + [[ ${ECFLOW:-false} == true ]] && ecflow_kill + cleanup +} + +cleanup() { + rm -rf ${LOCKDIR} + [[ ${ECFLOW:-false} == true ]] && ecflow_stop + trap 0 + exit +} + +trap '{ echo "rt.sh interrupted"; rt_trap ; }' INT +trap '{ echo "rt.sh quit"; rt_trap ; }' QUIT +trap '{ echo "rt.sh terminated"; rt_trap ; }' TERM +trap '{ echo "rt.sh error on line $LINENO"; cleanup ; }' ERR +trap '{ echo "rt.sh finished"; cleanup ; }' EXIT + +# PATHRT - Path to regression tests directory +readonly PATHRT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P )" +cd ${PATHRT} + +# PATHTR - Path to nmmb trunk directory +readonly PATHTR=$( cd ${PATHRT}/.. && pwd ) + +# make sure only one instance of rt.sh is running +readonly LOCKDIR="${PATHRT}"/lock +if mkdir "${LOCKDIR}" ; then + echo $(hostname) $$ > "${LOCKDIR}/PID" +else + echo "Only one instance of rt.sh can be running at a time" + exit 1 +fi + +# Default compiler "intel" +export RT_COMPILER=${RT_COMPILER:-intel} + +source detect_machine.sh # Note: this does not set ACCNR. The "if" block below does. +source rt_utils.sh + +source module-setup.sh + +if [[ $MACHINE_ID = wcoss_cray ]]; then + + module load xt-lsfhpc + + module use /usrx/local/emc_rocoto/modulefiles + module load rocoto/1.3.0rc2 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=lsfcray + + module use /gpfs/hps/nco/ops/nwtest/modulefiles + module load ecflow/intel/4.17.0.1 + ECFLOW_START=${ECF_ROOT}/bin/ecflow_start.sh + ECF_PORT=$(grep $USER /usrx/local/sys/ecflow/assigned_ports.txt | awk '{print $2}') + module load python/3.6.3 + + DISKNM=/gpfs/hps3/emc/nems/noscrub/emc.nemspara/RT + QUEUE=debug + COMPILE_QUEUE=dev + PARTITION= + ACCNR="${ACCNR:-GFS-DEV}" + if [[ -d /gpfs/hps3/ptmp ]] ; then + STMP=/gpfs/hps3/stmp + PTMP=/gpfs/hps3/stmp + else + STMP=/gpfs/hps3/stmp + PTMP=/gpfs/hps3/ptmp + fi + SCHEDULER=lsf + cp fv3_conf/fv3_bsub.IN_wcoss_cray fv3_conf/fv3_bsub.IN + cp fv3_conf/compile_bsub.IN_wcoss_cray fv3_conf/compile_bsub.IN + +elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then + + module load lsf/10.1 + module load python/3.6.3 + + module use /usrx/local/dev/emc_rocoto/modulefiles + module load ruby/2.5.1 rocoto/1.3.0rc2 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=lsf + + module load ips/18.0.1.163 + module load ecflow/4.17.0 + ECFLOW_START=${ECF_ROOT}/bin/ecflow_start.sh + ECF_PORT=$(grep $USER /usrx/local/sys/ecflow/assigned_ports.txt | awk '{print $2}') + + DISKNM=/gpfs/dell2/emc/modeling/noscrub/emc.nemspara/RT + QUEUE=debug + COMPILE_QUEUE=dev_transfer + PARTITION= + ACCNR="${ACCNR:-GFS-DEV}" + STMP=/gpfs/dell2/stmp + PTMP=/gpfs/dell2/ptmp + SCHEDULER=lsf + cp fv3_conf/fv3_bsub.IN_wcoss_dell_p3 fv3_conf/fv3_bsub.IN + cp fv3_conf/compile_bsub.IN_wcoss_dell_p3 fv3_conf/compile_bsub.IN + +elif [[ $MACHINE_ID = wcoss2 ]]; then + + #module use /usrx/local/dev/emc_rocoto/modulefiles + #module load ruby/2.5.1 rocoto/1.3.0rc2 + #ROCOTORUN=$(which rocotorun) + #ROCOTOSTAT=$(which rocotostat) + #ROCOTOCOMPLETE=$(which rocotocomplete) + #ROCOTO_SCHEDULER=lsf + + module load ecflow/5.6.0.6 + module load gcc/10.3.0 python/3.8.6 + ECFLOW_START=${ECF_ROOT}/scripts/server_check.sh + export ECF_OUTPUTDIR=${PATHRT}/ecf_outputdir + export ECF_COMDIR=${PATHRT}/ecf_comdir + rm -rf ${ECF_OUTPUTDIR} ${ECF_COMDIR} + mkdir -p ${ECF_OUTPUTDIR} + mkdir -p ${ECF_COMDIR} + export colonifnco=":output" # hack + + DISKNM=/lfs/h1/emc/eib/noscrub/Dusan.Jovic + QUEUE=dev + COMPILE_QUEUE=dev + PARTITION= + ACCNR="${ACCNR:-GFS-DEV}" + STMP=/lfs/h1/emc/ptmp + PTMP=/lfs/h1/emc/ptmp + SCHEDULER=pbs + cp fv3_conf/fv3_qsub.IN_wcoss2 fv3_conf/fv3_qsub.IN + cp fv3_conf/compile_qsub.IN_wcoss2 fv3_conf/compile_qsub.IN + +elif [[ $MACHINE_ID = gaea.* ]]; then + + export PATH=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/bin:$PATH + export PYTHONPATH=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/lib/python3.8/site-packages + ECFLOW_START=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/bin/ecflow_start.sh + ECF_PORT=$(( $(id -u) + 1500 )) + + DISKNM=/lustre/f2/pdata/ncep_shared/emc.nemspara/RT + QUEUE=normal + COMPILE_QUEUE=normal +# ACCNR="${ACCNR:-cmp}" + PARTITION=c4 + STMP=/lustre/f2/scratch + PTMP=/lustre/f2/scratch + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_gaea fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_gaea fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = hera.* ]]; then + + module load rocoto + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=slurm + + PYTHONHOME=/scratch1/NCEPDEV/nems/emc.nemspara/soft/miniconda3_new_20210629 + export PATH=$PYTHONHOME/bin:$PATH + export PYTHONPATH=$PYTHONHOME/lib/python3.7/site-packages + + module load ecflow + ECFLOW_START=ecflow_start.sh + + QUEUE=batch + COMPILE_QUEUE=batch + + ACCNR=ome + PARTITION= + dprefix=/scratch1/NCEPDEV + DISKNM=$dprefix/nems/emc.nemspara/RT + STMP=/scratch2/BMC/rem/Lisa.Bengtsson/stmp4 + PTMP=/scratch2/BMC/rem/Lisa.Bengtsson/stmp2 + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_hera fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_hera fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = orion.* ]]; then + + module load gcc/8.3.0 + + module load contrib rocoto/1.3.1 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + export PATH=/work/noaa/nems/emc.nemspara/soft/miniconda3/bin:$PATH + export PYTHONPATH=/work/noaa/nems/emc.nemspara/soft/miniconda3/lib/python3.8/site-packages + ECFLOW_START=/work/noaa/nems/emc.nemspara/soft/miniconda3/bin/ecflow_start.sh + ECF_PORT=$(( $(id -u) + 1500 )) + + QUEUE=batch + COMPILE_QUEUE=batch + PARTITION=orion + dprefix=/work/noaa/stmp/${USER} + DISKNM=/work/noaa/nems/emc.nemspara/RT + STMP=$dprefix/stmp + PTMP=$dprefix/stmp + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_orion fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_orion fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = jet.* ]]; then + + module load rocoto/1.3.2 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=slurm + + export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH + export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages + module load ecflow + ECFLOW_START=/apps/ecflow/5.5.3/bin/ecflow_start.sh + + QUEUE=batch + COMPILE_QUEUE=batch + ACCNR="${ACCNR:-h-nems}" + PARTITION=xjet + DISKNM=/lfs4/HFIP/h-nems/emc.nemspara/RT + dprefix=${dprefix:-/lfs4/HFIP/$ACCNR/$USER} + STMP=${STMP:-$dprefix/RT_BASELINE} + PTMP=${PTMP:-$dprefix/RT_RUNDIRS} + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_jet fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_jet fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = s4.* ]]; then + + module load rocoto/1.3.2 + module load ecflow/5.6.0 + module load miniconda/3.8-s4 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=slurm + + ECFLOW_START=/opt/ecflow/5.6.0/bin/ecflow_start.sh + ECF_PORT=$(( $(id -u) + 1500 )) + + QUEUE=s4 + COMPILE_QUEUE=s4 + + ACCNR="${ACCNR:-star}" + PARTITION=s4 + dprefix=/data/users/dhuber/save + DISKNM=$dprefix/nems/emc.nemspara/RT + STMP=/scratch/short/users + PTMP=/scratch/users + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_s4 fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_s4 fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = cheyenne.* ]]; then + + export PATH=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/bin:/glade/p/ral/jntp/tools/miniconda3/4.8.3/bin:$PATH + export PYTHONPATH=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/glade/p/ral/jntp/tools/miniconda3/4.8.3/lib/python3.8/site-packages + ECFLOW_START=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/bin/ecflow_start.sh + ECF_PORT=$(( $(id -u) + 1500 )) + + QUEUE=regular + COMPILE_QUEUE=regular + PARTITION= + dprefix=/glade/scratch + DISKNM=/glade/scratch/epicufsrt/GMTB/ufs-weather-model/RT + STMP=$dprefix + PTMP=$dprefix + SCHEDULER=pbs + cp fv3_conf/fv3_qsub.IN_cheyenne fv3_conf/fv3_qsub.IN + cp fv3_conf/compile_qsub.IN_cheyenne fv3_conf/compile_qsub.IN + +elif [[ $MACHINE_ID = stampede.* ]]; then + + export PYTHONPATH= + ECFLOW_START= + QUEUE=skx-normal + COMPILE_QUEUE=skx-dev + PARTITION= + ACCNR="${ACCNR:-TG-EES200015}" + dprefix=$SCRATCH/ufs-weather-model/run + DISKNM=/work2/07736/minsukji/stampede2/ufs-weather-model/RT + STMP=$dprefix + PTMP=$dprefix + SCHEDULER=slurm + MPIEXEC=ibrun + MPIEXECOPTS= + cp fv3_conf/fv3_slurm.IN_stampede fv3_conf/fv3_slurm.IN + +elif [[ $MACHINE_ID = expanse.* ]]; then + + export PYTHONPATH= + ECFLOW_START= + QUEUE=compute + COMPILE_QUEUE=shared + PARTITION= + ACCNR="${ACCNR:-TG-EES200015}" + dprefix=/expanse/lustre/scratch/$USER/temp_project/run + DISKNM=/expanse/lustre/scratch/domh/temp_project/RT + STMP=$dprefix + PTMP=$dprefix + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_expanse fv3_conf/fv3_slurm.IN + +else + die "Unknown machine ID, please edit detect_machine.sh file" +fi + +# If account is unspecified, assume the machine has a "nems" +# accounting code. +export ACCNR="${ACCNR:-nems}" + +# Display the machine and account using the format detect_machine.sh used: +echo "Machine: " $MACHINE_ID " Account: " $ACCNR + +mkdir -p ${STMP}/${USER} + +# Different own baseline directories for different compilers on Theia/Cheyenne +NEW_BASELINE=${STMP}/${USER}/FV3_RT/REGRESSION_TEST +if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]] || [[ $MACHINE_ID = s4.* ]] ; then + NEW_BASELINE=${NEW_BASELINE}_${RT_COMPILER^^} +fi + +# Overwrite default RUNDIR_ROOT if environment variable RUNDIR_ROOT is set +RUNDIR_ROOT=${RUNDIR_ROOT:-${PTMP}/${USER}/FV3_RT}/rt_$$ +mkdir -p ${RUNDIR_ROOT} + +CREATE_BASELINE=false +ROCOTO=false +ECFLOW=false +KEEP_RUNDIR=false +SINGLE_NAME='' +TEST_35D=false +export skip_check_results=false +export delete_rundir=false + +TESTS_FILE='rt.conf' + +while getopts ":cl:mn:dwkreh" opt; do + case $opt in + c) + CREATE_BASELINE=true + ;; + l) + TESTS_FILE=$OPTARG + ;; + m) + # redefine RTPWD to point to newly created baseline outputs + RTPWD=${NEW_BASELINE} + ;; + n) + SINGLE_NAME=$OPTARG + TESTS_FILE='rt.conf.single' + rm -f $TESTS_FILE + ;; + d) + export delete_rundir=true + awk -F "|" '{print $5}' rt.conf | grep "\S" > keep_tests.tmp + ;; + w) + export skip_check_results=true + ;; + k) + KEEP_RUNDIR=true + ;; + r) + ROCOTO=true + ECFLOW=false + ;; + e) + ECFLOW=true + ROCOTO=false + ;; + h) + usage + ;; + \?) + usage + die "Invalid option: -$OPTARG" + ;; + :) + usage + die "Option -$OPTARG requires an argument." + ;; + esac +done + +if [[ $SINGLE_NAME != '' ]]; then + rt_single +fi + +if [[ $TESTS_FILE =~ '35d' ]] || [[ $TESTS_FILE =~ 'weekly' ]]; then + TEST_35D=true +fi + +BL_DATE=20220408 +if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]] || [[ $MACHINE_ID = s4.* ]]; then + RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}/${RT_COMPILER^^}} +else + RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}} +fi + +INPUTDATA_ROOT=${INPUTDATA_ROOT:-$DISKNM/NEMSfv3gfs/input-data-20211210} +INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT}/WW3_input_data_20211113 +INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC:-$DISKNM/NEMSfv3gfs/BM_IC-20220207} + +shift $((OPTIND-1)) +[[ $# -gt 1 ]] && usage + +if [[ $CREATE_BASELINE == true ]]; then + # + # prepare new regression test directory + # + rm -rf "${NEW_BASELINE}" + mkdir -p "${NEW_BASELINE}" +fi + +if [[ $skip_check_results == true ]]; then + REGRESSIONTEST_LOG=${PATHRT}/RegressionTests_weekly_$MACHINE_ID.log +else + REGRESSIONTEST_LOG=${PATHRT}/RegressionTests_$MACHINE_ID.log +fi + +date > ${REGRESSIONTEST_LOG} +echo "Start Regression test" >> ${REGRESSIONTEST_LOG} +echo >> ${REGRESSIONTEST_LOG} + +source default_vars.sh + +JOB_NR=0 +TEST_NR=0 +COMPILE_NR=0 +rm -f fail_test* fail_compile* + +export LOG_DIR=${PATHRT}/log_$MACHINE_ID +rm -rf ${LOG_DIR} +mkdir ${LOG_DIR} + +if [[ $ROCOTO == true ]]; then + + ROCOTO_XML=${PATHRT}/rocoto_workflow.xml + ROCOTO_DB=${PATHRT}/rocoto_workflow.db + + rm -f $ROCOTO_XML $ROCOTO_DB *_lock.db + + if [[ $MACHINE_ID = wcoss ]]; then + QUEUE=dev + COMPILE_QUEUE=dev + ROCOTO_SCHEDULER=lsf + elif [[ $MACHINE_ID = wcoss_cray ]]; then + QUEUE=dev + COMPILE_QUEUE=dev + ROCOTO_SCHEDULER=lsfcray + elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then + QUEUE=dev + COMPILE_QUEUE=dev_transfer + ROCOTO_SCHEDULER=lsf + elif [[ $MACHINE_ID = wcoss2 ]]; then + QUEUE=dev + COMPILE_QUEUE=dev + ROCOTO_SCHEDULER=pbs + elif [[ $MACHINE_ID = hera.* ]]; then + QUEUE=batch + COMPILE_QUEUE=batch + ROCOTO_SCHEDULER=slurm + elif [[ $MACHINE_ID = orion.* ]]; then + QUEUE=batch + COMPILE_QUEUE=batch + ROCOTO_SCHEDULER=slurm + elif [[ $MACHINE_ID = s4.* ]]; then + QUEUE=s4 + COMPILE_QUEUE=s4 + ROCOTO_SCHEDULER=slurm + elif [[ $MACHINE_ID = jet.* ]]; then + QUEUE=batch + COMPILE_QUEUE=batch + ROCOTO_SCHEDULER=slurm + else + die "Rocoto is not supported on this machine $MACHINE_ID" + fi + + cat << EOF > $ROCOTO_XML + + + + + + + + + + +]> + + 197001010000 197001010000 01:00:00 + &LOG;/workflow.log +EOF + +fi + +if [[ $ECFLOW == true ]]; then + + # Default maximum number of compile and run jobs + MAX_BUILDS=10 + MAX_JOBS=30 + + # Default number of tries to run jobs - on wcoss, no error tolerance + ECF_TRIES=2 + if [[ $MACHINE_ID = wcoss* ]]; then + ECF_TRIES=1 + fi + + # Reduce maximum number of compile jobs on jet.intel and s4.intel because of licensing issues + if [[ $MACHINE_ID = jet.intel ]]; then + MAX_BUILDS=5 + elif [[ $MACHINE_ID = s4.intel ]]; then + MAX_BUILDS=1 + fi + + if [[ $MACHINE_ID = hera.* ]] && [[ ! $HOSTNAME = hecflow* ]]; then + echo "ERROR: To use ECFlow on Hera we must be logged into 'hecflow01' login node." + exit 1 + fi + + ECFLOW_RUN=${PATHRT}/ecflow_run + ECFLOW_SUITE=regtest_$$ + rm -rf ${ECFLOW_RUN} + mkdir -p ${ECFLOW_RUN}/${ECFLOW_SUITE} + cp head.h tail.h ${ECFLOW_RUN} + cat << EOF > ${ECFLOW_RUN}/${ECFLOW_SUITE}.def +suite ${ECFLOW_SUITE} + edit ECF_HOME '${ECFLOW_RUN}' + edit ECF_INCLUDE '${ECFLOW_RUN}' + edit ECF_KILL_CMD kill -15 %ECF_RID% > %ECF_JOB%.kill 2>&1 + edit ECF_TRIES ${ECF_TRIES} + label src_dir '${PATHTR}' + label run_dir '${RUNDIR_ROOT}' + limit max_builds ${MAX_BUILDS} + limit max_jobs ${MAX_JOBS} +EOF + + if [[ $MACHINE_ID = wcoss ]]; then + QUEUE=dev + elif [[ $MACHINE_ID = wcoss_cray ]]; then + QUEUE=dev + elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then + QUEUE=dev + elif [[ $MACHINE_ID = wcoss2 ]]; then + QUEUE=dev + elif [[ $MACHINE_ID = hera.* ]]; then + QUEUE=batch + elif [[ $MACHINE_ID = orion.* ]]; then + QUEUE=batch + elif [[ $MACHINE_ID = jet.* ]]; then + QUEUE=batch + elif [[ $MACHINE_ID = s4.* ]]; then + QUEUE=s4 + elif [[ $MACHINE_ID = gaea.* ]]; then + QUEUE=normal + elif [[ $MACHINE_ID = cheyenne.* ]]; then + QUEUE=regular + else + die "ecFlow is not supported on this machine $MACHINE_ID" + fi + +else + + if [[ $MACHINE_ID = hera.* ]] && [[ $HOSTNAME = hecflow* ]]; then + echo "ERROR: To run without using ECFlow on Hera, please do not use ecflow node." + exit 1 + fi + +fi + +## +## read rt.conf and then either execute the test script directly or create +## workflow description file +## + +new_compile=false +in_metatask=false + +[[ -f $TESTS_FILE ]] || die "$TESTS_FILE does not exist" + +while read -r line || [ "$line" ]; do + + line="${line#"${line%%[![:space:]]*}"}" + [[ ${#line} == 0 ]] && continue + [[ $line == \#* ]] && continue + + JOB_NR=$( printf '%03d' $(( 10#$JOB_NR + 1 )) ) + + if [[ $line == COMPILE* ]] ; then + + MAKE_OPT=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') + MACHINES=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') + CB=$( echo $line | cut -d'|' -f4) + + [[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue + + if [[ ${MACHINES} != '' ]]; then + if [[ ${MACHINES} == -* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue + elif [[ ${MACHINES} == +* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue + else + echo "MACHINES=|${MACHINES}|" + die "MACHINES spec must be either an empty string or start with either '+' or '-'" + fi + fi + + export COMPILE_NR=$( printf '%03d' $(( 10#$COMPILE_NR + 1 )) ) + + cat << EOF > ${RUNDIR_ROOT}/compile_${COMPILE_NR}.env + export JOB_NR=${JOB_NR} + export COMPILE_NR=${COMPILE_NR} + export MACHINE_ID=${MACHINE_ID} + export RT_COMPILER=${RT_COMPILER} + export PATHRT=${PATHRT} + export PATHTR=${PATHTR} + export SCHEDULER=${SCHEDULER} + export ACCNR=${ACCNR} + export QUEUE=${COMPILE_QUEUE} + export PARTITION=${PARTITION} + export ROCOTO=${ROCOTO} + export ECFLOW=${ECFLOW} + export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG} + export LOG_DIR=${LOG_DIR} +EOF + + if [[ $ROCOTO == true ]]; then + rocoto_create_compile_task + elif [[ $ECFLOW == true ]]; then + ecflow_create_compile_task + else + ./run_compile.sh ${PATHRT} ${RUNDIR_ROOT} "${MAKE_OPT}" ${COMPILE_NR} > ${LOG_DIR}/compile_${COMPILE_NR}.log 2>&1 + fi + + # Set RT_SUFFIX (regression test run directories and log files) and BL_SUFFIX + # (regression test baseline directories) for REPRO or PROD runs + if [[ ${MAKE_OPT^^} =~ "-DREPRO=ON" ]]; then + RT_SUFFIX="_repro" + BL_SUFFIX="_repro" + else + RT_SUFFIX="" + BL_SUFFIX="" + fi + + continue + + elif [[ $line == RUN* ]] ; then + + TEST_NAME=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') + MACHINES=$( echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') + CB=$( echo $line | cut -d'|' -f4) + DEP_RUN=$( echo $line | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//') + DATE_35D=$( echo $line | cut -d'|' -f6 | sed -e 's/^ *//' -e 's/ *$//') + + [[ -e "tests/$TEST_NAME" ]] || die "run test file tests/$TEST_NAME does not exist" + [[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue + + if [[ ${MACHINES} != '' ]]; then + if [[ ${MACHINES} == -* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue + elif [[ ${MACHINES} == +* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue + else + echo "MACHINES=|${MACHINES}|" + die "MACHINES spec must be either an empty string or start with either '+' or '-'" + fi + fi + + # 35 day tests + [[ $TEST_35D == true ]] && rt_35d + + # Avoid uninitialized RT_SUFFIX/BL_SUFFIX (see definition above) + RT_SUFFIX=${RT_SUFFIX:-""} + BL_SUFFIX=${BL_SUFFIX:-""} + + if [[ $ROCOTO == true && $new_compile == true ]]; then + new_compile=false + in_metatask=true + cat << EOF >> $ROCOTO_XML + 0 +EOF + fi + + TEST_NR=$( printf '%03d' $(( 10#$TEST_NR + 1 )) ) + + ( + source ${PATHRT}/tests/$TEST_NAME + + NODES=$(( TASKS / TPN )) + if (( NODES * TPN < TASKS )); then + NODES=$(( NODES + 1 )) + fi + + cat << EOF > ${RUNDIR_ROOT}/run_test_${TEST_NR}.env + export JOB_NR=${JOB_NR} + export MACHINE_ID=${MACHINE_ID} + export RT_COMPILER=${RT_COMPILER} + export RTPWD=${RTPWD} + export INPUTDATA_ROOT=${INPUTDATA_ROOT} + export INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT_WW3} + export INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC} + export PATHRT=${PATHRT} + export PATHTR=${PATHTR} + export NEW_BASELINE=${NEW_BASELINE} + export CREATE_BASELINE=${CREATE_BASELINE} + export RT_SUFFIX=${RT_SUFFIX} + export BL_SUFFIX=${BL_SUFFIX} + export SCHEDULER=${SCHEDULER} + export ACCNR=${ACCNR} + export QUEUE=${QUEUE} + export PARTITION=${PARTITION} + export ROCOTO=${ROCOTO} + export ECFLOW=${ECFLOW} + export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG} + export LOG_DIR=${LOG_DIR} + export DEP_RUN=${DEP_RUN} + export skip_check_results=${skip_check_results} + export delete_rundir=${delete_rundir} +EOF + if [[ $MACHINE_ID = jet.* ]]; then + cat << EOF >> ${RUNDIR_ROOT}/run_test_${TEST_NR}.env + export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH + export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages +EOF + fi + + if [[ $ROCOTO == true ]]; then + rocoto_create_run_task + elif [[ $ECFLOW == true ]]; then + ecflow_create_run_task + else + ./run_test.sh ${PATHRT} ${RUNDIR_ROOT} ${TEST_NAME} ${TEST_NR} ${COMPILE_NR} > ${LOG_DIR}/run_${TEST_NAME}${RT_SUFFIX}.log 2>&1 + fi + ) + + continue + else + die "Unknown command $line" + fi +done < $TESTS_FILE + +## +## run regression test workflow (currently Rocoto or ecFlow are supported) +## + +if [[ $ROCOTO == true ]]; then + if [[ $in_metatask == true ]]; then + echo " " >> $ROCOTO_XML + fi + echo "" >> $ROCOTO_XML + # run rocoto workflow until done + rocoto_run +fi + +if [[ $ECFLOW == true ]]; then + echo "endsuite" >> ${ECFLOW_RUN}/${ECFLOW_SUITE}.def + # run ecflow workflow until done + ecflow_run +fi + +## +## regression test is either failed or successful +## +set +e +cat ${LOG_DIR}/compile_*_time.log >> ${REGRESSIONTEST_LOG} +cat ${LOG_DIR}/rt_*.log >> ${REGRESSIONTEST_LOG} + +FILES="fail_test_* fail_compile_*" +for f in $FILES; do + if [[ -f "$f" ]]; then + cat "$f" >> fail_test + fi +done + +if [[ -e fail_test ]]; then + echo "FAILED TESTS: " + echo "FAILED TESTS: " >> ${REGRESSIONTEST_LOG} + while read -r failed_test_name + do + echo "Test ${failed_test_name} failed " + echo "Test ${failed_test_name} failed " >> ${REGRESSIONTEST_LOG} + done < fail_test + echo ; echo REGRESSION TEST FAILED + (echo ; echo REGRESSION TEST FAILED) >> ${REGRESSIONTEST_LOG} +else + echo ; echo REGRESSION TEST WAS SUCCESSFUL + (echo ; echo REGRESSION TEST WAS SUCCESSFUL) >> ${REGRESSIONTEST_LOG} + + rm -f fv3_*.x fv3_*.exe modules.fv3_* keep_tests.tmp + [[ ${KEEP_RUNDIR} == false ]] && rm -rf ${RUNDIR_ROOT} + [[ ${ROCOTO} == true ]] && rm -f ${ROCOTO_XML} ${ROCOTO_DB} *_lock.db + [[ ${TEST_35D} == true ]] && rm -f tests/cpld_bmark*_20* + [[ ${SINGLE_NAME} != '' ]] && rm -f rt.conf.single +fi + +date >> ${REGRESSIONTEST_LOG} + +elapsed_time=$( printf '%02dh:%02dm:%02ds\n' $((SECONDS%86400/3600)) $((SECONDS%3600/60)) $((SECONDS%60)) ) +echo "Elapsed time: ${elapsed_time}. Have a nice day!" >> ${REGRESSIONTEST_LOG} +echo "Elapsed time: ${elapsed_time}. Have a nice day!" diff --git a/tests/rt_orig.sh b/tests/rt_orig.sh new file mode 100755 index 0000000000..22922303bd --- /dev/null +++ b/tests/rt_orig.sh @@ -0,0 +1,898 @@ +#!/bin/bash +set -eux + +SECONDS=0 + +hostname + +die() { echo "$@" >&2; exit 1; } +usage() { + set +x + echo + echo "Usage: $0 -c | -e | -h | -k | -w | -d | -l | -m | -n | -r " + echo + echo " -c create new baseline results" + echo " -e use ecFlow workflow manager" + echo " -h display this help" + echo " -k keep run directory after rt.sh is completed" + echo " -l runs test specified in " + echo " -m compare against new baseline results" + echo " -n run single test " + echo " -r use Rocoto workflow manager" + echo " -w for weekly_test, skip comparing baseline results" + echo " -d delete run direcotries that are not used by other tests" + echo + set -x + exit 1 +} + +[[ $# -eq 0 ]] && usage + +rt_single() { + local compile_line='' + local run_line='' + while read -r line || [ "$line" ]; do + line="${line#"${line%%[![:space:]]*}"}" + [[ ${#line} == 0 ]] && continue + [[ $line == \#* ]] && continue + + if [[ $line == COMPILE* ]] ; then + MACHINES=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') + if [[ ${MACHINES} == '' ]]; then + compile_line=$line + elif [[ ${MACHINES} == -* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] || compile_line=$line + elif [[ ${MACHINES} == +* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] && compile_line=$line + fi + fi + + if [[ $line =~ RUN ]]; then + tmp_test=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') + if [[ $SINGLE_NAME == $tmp_test && $compile_line != '' ]]; then + echo $compile_line >$TESTS_FILE + dep_test=$(echo $line | grep -w $tmp_test | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//') + if [[ $dep_test != '' ]]; then + dep_line=$(cat rt.conf | grep -w "$dep_test" | grep -v "$tmp_test") + dep_line="${dep_line#"${dep_line%%[![:space:]]*}"}" + echo $dep_line >>$TESTS_FILE + fi + echo $line >>$TESTS_FILE + break + fi + fi + done <'rt.conf' + + if [[ ! -f $TESTS_FILE ]]; then + echo "$SINGLE_NAME does not exist or cannot be run on $MACHINE_ID" + exit 1 + fi +} + +rt_35d() { +if [[ $TEST_NAME =~ '35d' ]] ; then + local sy=$(echo ${DATE_35D} | cut -c 1-4) + local sm=$(echo ${DATE_35D} | cut -c 5-6) + local new_test_name="tests/${TEST_NAME}_${DATE_35D}" + rm -f $new_test_name + cp tests/$TEST_NAME $new_test_name + + sed -i -e "s/\(export SYEAR\)/\1=\"$sy\"/" $new_test_name + sed -i -e "s/\(export SMONTH\)/\1=\"$sm\"/" $new_test_name + + TEST_NAME=${new_test_name#tests/} +fi +} + +rt_trap() { + [[ ${ROCOTO:-false} == true ]] && rocoto_kill + [[ ${ECFLOW:-false} == true ]] && ecflow_kill + cleanup +} + +cleanup() { + rm -rf ${LOCKDIR} + [[ ${ECFLOW:-false} == true ]] && ecflow_stop + trap 0 + exit +} + +trap '{ echo "rt.sh interrupted"; rt_trap ; }' INT +trap '{ echo "rt.sh quit"; rt_trap ; }' QUIT +trap '{ echo "rt.sh terminated"; rt_trap ; }' TERM +trap '{ echo "rt.sh error on line $LINENO"; cleanup ; }' ERR +trap '{ echo "rt.sh finished"; cleanup ; }' EXIT + +# PATHRT - Path to regression tests directory +readonly PATHRT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P )" +cd ${PATHRT} + +# PATHTR - Path to nmmb trunk directory +readonly PATHTR=$( cd ${PATHRT}/.. && pwd ) + +# make sure only one instance of rt.sh is running +readonly LOCKDIR="${PATHRT}"/lock +if mkdir "${LOCKDIR}" ; then + echo $(hostname) $$ > "${LOCKDIR}/PID" +else + echo "Only one instance of rt.sh can be running at a time" + exit 1 +fi + +# Default compiler "intel" +export RT_COMPILER=${RT_COMPILER:-intel} + +source detect_machine.sh # Note: this does not set ACCNR. The "if" block below does. +source rt_utils.sh + +source module-setup.sh + +if [[ $MACHINE_ID = wcoss_cray ]]; then + + module load xt-lsfhpc + + module use /usrx/local/emc_rocoto/modulefiles + module load rocoto/1.3.0rc2 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=lsfcray + + module use /gpfs/hps/nco/ops/nwtest/modulefiles + module load ecflow/intel/4.17.0.1 + ECFLOW_START=${ECF_ROOT}/bin/ecflow_start.sh + ECF_PORT=$(grep $USER /usrx/local/sys/ecflow/assigned_ports.txt | awk '{print $2}') + module load python/3.6.3 + + DISKNM=/gpfs/hps3/emc/nems/noscrub/emc.nemspara/RT + QUEUE=debug + COMPILE_QUEUE=dev + PARTITION= + ACCNR="${ACCNR:-GFS-DEV}" + if [[ -d /gpfs/hps3/ptmp ]] ; then + STMP=/gpfs/hps3/stmp + PTMP=/gpfs/hps3/stmp + else + STMP=/gpfs/hps3/stmp + PTMP=/gpfs/hps3/ptmp + fi + SCHEDULER=lsf + cp fv3_conf/fv3_bsub.IN_wcoss_cray fv3_conf/fv3_bsub.IN + cp fv3_conf/compile_bsub.IN_wcoss_cray fv3_conf/compile_bsub.IN + +elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then + + module load lsf/10.1 + module load python/3.6.3 + + module use /usrx/local/dev/emc_rocoto/modulefiles + module load ruby/2.5.1 rocoto/1.3.0rc2 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=lsf + + module load ips/18.0.1.163 + module load ecflow/4.17.0 + ECFLOW_START=${ECF_ROOT}/bin/ecflow_start.sh + ECF_PORT=$(grep $USER /usrx/local/sys/ecflow/assigned_ports.txt | awk '{print $2}') + + DISKNM=/gpfs/dell2/emc/modeling/noscrub/emc.nemspara/RT + QUEUE=debug + COMPILE_QUEUE=dev_transfer + PARTITION= + ACCNR="${ACCNR:-GFS-DEV}" + STMP=/gpfs/dell2/stmp + PTMP=/gpfs/dell2/ptmp + SCHEDULER=lsf + cp fv3_conf/fv3_bsub.IN_wcoss_dell_p3 fv3_conf/fv3_bsub.IN + cp fv3_conf/compile_bsub.IN_wcoss_dell_p3 fv3_conf/compile_bsub.IN + +elif [[ $MACHINE_ID = wcoss2 ]]; then + + #module use /usrx/local/dev/emc_rocoto/modulefiles + #module load ruby/2.5.1 rocoto/1.3.0rc2 + #ROCOTORUN=$(which rocotorun) + #ROCOTOSTAT=$(which rocotostat) + #ROCOTOCOMPLETE=$(which rocotocomplete) + #ROCOTO_SCHEDULER=lsf + + module load ecflow/5.6.0.6 + module load gcc/10.3.0 python/3.8.6 + ECFLOW_START=${ECF_ROOT}/scripts/server_check.sh + export ECF_OUTPUTDIR=${PATHRT}/ecf_outputdir + export ECF_COMDIR=${PATHRT}/ecf_comdir + rm -rf ${ECF_OUTPUTDIR} ${ECF_COMDIR} + mkdir -p ${ECF_OUTPUTDIR} + mkdir -p ${ECF_COMDIR} + export colonifnco=":output" # hack + + DISKNM=/lfs/h1/emc/eib/noscrub/Dusan.Jovic + QUEUE=dev + COMPILE_QUEUE=dev + PARTITION= + ACCNR="${ACCNR:-GFS-DEV}" + STMP=/lfs/h1/emc/ptmp + PTMP=/lfs/h1/emc/ptmp + SCHEDULER=pbs + cp fv3_conf/fv3_qsub.IN_wcoss2 fv3_conf/fv3_qsub.IN + cp fv3_conf/compile_qsub.IN_wcoss2 fv3_conf/compile_qsub.IN + +elif [[ $MACHINE_ID = gaea.* ]]; then + + export PATH=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/bin:$PATH + export PYTHONPATH=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/lib/python3.8/site-packages + ECFLOW_START=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/bin/ecflow_start.sh + ECF_PORT=$(( $(id -u) + 1500 )) + + DISKNM=/lustre/f2/pdata/ncep_shared/emc.nemspara/RT + QUEUE=normal + COMPILE_QUEUE=normal +# ACCNR="${ACCNR:-cmp}" + PARTITION=c4 + STMP=/lustre/f2/scratch + PTMP=/lustre/f2/scratch + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_gaea fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_gaea fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = hera.* ]]; then + + module load rocoto + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=slurm + + PYTHONHOME=/scratch1/NCEPDEV/nems/emc.nemspara/soft/miniconda3_new_20210629 + export PATH=$PYTHONHOME/bin:$PATH + export PYTHONPATH=$PYTHONHOME/lib/python3.7/site-packages + + module load ecflow + ECFLOW_START=ecflow_start.sh + + QUEUE=batch + COMPILE_QUEUE=batch + + #ACCNR="${ACCNR:-fv3-cpu} + PARTITION= + dprefix=/scratch1/NCEPDEV + DISKNM=$dprefix/nems/emc.nemspara/RT + STMP=$dprefix/stmp4 + PTMP=$dprefix/stmp2 + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_hera fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_hera fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = orion.* ]]; then + + module load gcc/8.3.0 + + module load contrib rocoto/1.3.1 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + export PATH=/work/noaa/nems/emc.nemspara/soft/miniconda3/bin:$PATH + export PYTHONPATH=/work/noaa/nems/emc.nemspara/soft/miniconda3/lib/python3.8/site-packages + ECFLOW_START=/work/noaa/nems/emc.nemspara/soft/miniconda3/bin/ecflow_start.sh + ECF_PORT=$(( $(id -u) + 1500 )) + + QUEUE=batch + COMPILE_QUEUE=batch + PARTITION=orion + dprefix=/work/noaa/stmp/${USER} + DISKNM=/work/noaa/nems/emc.nemspara/RT + STMP=$dprefix/stmp + PTMP=$dprefix/stmp + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_orion fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_orion fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = jet.* ]]; then + + module load rocoto/1.3.2 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=slurm + + export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH + export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages + module load ecflow + ECFLOW_START=/apps/ecflow/5.5.3/bin/ecflow_start.sh + + QUEUE=batch + COMPILE_QUEUE=batch + ACCNR="${ACCNR:-h-nems}" + PARTITION=xjet + DISKNM=/lfs4/HFIP/h-nems/emc.nemspara/RT + dprefix=${dprefix:-/lfs4/HFIP/$ACCNR/$USER} + STMP=${STMP:-$dprefix/RT_BASELINE} + PTMP=${PTMP:-$dprefix/RT_RUNDIRS} + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_jet fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_jet fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = s4.* ]]; then + + module load rocoto/1.3.2 + module load ecflow/5.6.0 + module load miniconda/3.8-s4 + ROCOTORUN=$(which rocotorun) + ROCOTOSTAT=$(which rocotostat) + ROCOTOCOMPLETE=$(which rocotocomplete) + ROCOTO_SCHEDULER=slurm + + ECFLOW_START=/opt/ecflow/5.6.0/bin/ecflow_start.sh + ECF_PORT=$(( $(id -u) + 1500 )) + + QUEUE=s4 + COMPILE_QUEUE=s4 + + ACCNR="${ACCNR:-star}" + PARTITION=s4 + dprefix=/data/users/dhuber/save + DISKNM=$dprefix/nems/emc.nemspara/RT + STMP=/scratch/short/users + PTMP=/scratch/users + + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_s4 fv3_conf/fv3_slurm.IN + cp fv3_conf/compile_slurm.IN_s4 fv3_conf/compile_slurm.IN + +elif [[ $MACHINE_ID = cheyenne.* ]]; then + + export PATH=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/bin:/glade/p/ral/jntp/tools/miniconda3/4.8.3/bin:$PATH + export PYTHONPATH=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/glade/p/ral/jntp/tools/miniconda3/4.8.3/lib/python3.8/site-packages + ECFLOW_START=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/bin/ecflow_start.sh + ECF_PORT=$(( $(id -u) + 1500 )) + + QUEUE=regular + COMPILE_QUEUE=regular + PARTITION= + dprefix=/glade/scratch + DISKNM=/glade/scratch/epicufsrt/GMTB/ufs-weather-model/RT + STMP=$dprefix + PTMP=$dprefix + SCHEDULER=pbs + cp fv3_conf/fv3_qsub.IN_cheyenne fv3_conf/fv3_qsub.IN + cp fv3_conf/compile_qsub.IN_cheyenne fv3_conf/compile_qsub.IN + +elif [[ $MACHINE_ID = stampede.* ]]; then + + export PYTHONPATH= + ECFLOW_START= + QUEUE=skx-normal + COMPILE_QUEUE=skx-dev + PARTITION= + ACCNR="${ACCNR:-TG-EES200015}" + dprefix=$SCRATCH/ufs-weather-model/run + DISKNM=/work2/07736/minsukji/stampede2/ufs-weather-model/RT + STMP=$dprefix + PTMP=$dprefix + SCHEDULER=slurm + MPIEXEC=ibrun + MPIEXECOPTS= + cp fv3_conf/fv3_slurm.IN_stampede fv3_conf/fv3_slurm.IN + +elif [[ $MACHINE_ID = expanse.* ]]; then + + export PYTHONPATH= + ECFLOW_START= + QUEUE=compute + COMPILE_QUEUE=shared + PARTITION= + ACCNR="${ACCNR:-TG-EES200015}" + dprefix=/expanse/lustre/scratch/$USER/temp_project/run + DISKNM=/expanse/lustre/scratch/domh/temp_project/RT + STMP=$dprefix + PTMP=$dprefix + SCHEDULER=slurm + cp fv3_conf/fv3_slurm.IN_expanse fv3_conf/fv3_slurm.IN + +else + die "Unknown machine ID, please edit detect_machine.sh file" +fi + +# If account is unspecified, assume the machine has a "nems" +# accounting code. +export ACCNR="${ACCNR:-nems}" + +# Display the machine and account using the format detect_machine.sh used: +echo "Machine: " $MACHINE_ID " Account: " $ACCNR + +mkdir -p ${STMP}/${USER} + +# Different own baseline directories for different compilers on Theia/Cheyenne +NEW_BASELINE=${STMP}/${USER}/FV3_RT/REGRESSION_TEST +if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]] || [[ $MACHINE_ID = s4.* ]] ; then + NEW_BASELINE=${NEW_BASELINE}_${RT_COMPILER^^} +fi + +# Overwrite default RUNDIR_ROOT if environment variable RUNDIR_ROOT is set +RUNDIR_ROOT=${RUNDIR_ROOT:-${PTMP}/${USER}/FV3_RT}/rt_$$ +mkdir -p ${RUNDIR_ROOT} + +CREATE_BASELINE=false +ROCOTO=false +ECFLOW=false +KEEP_RUNDIR=false +SINGLE_NAME='' +TEST_35D=false +export skip_check_results=false +export delete_rundir=false + +TESTS_FILE='rt.conf' + +while getopts ":cl:mn:dwkreh" opt; do + case $opt in + c) + CREATE_BASELINE=true + ;; + l) + TESTS_FILE=$OPTARG + ;; + m) + # redefine RTPWD to point to newly created baseline outputs + RTPWD=${NEW_BASELINE} + ;; + n) + SINGLE_NAME=$OPTARG + TESTS_FILE='rt.conf.single' + rm -f $TESTS_FILE + ;; + d) + export delete_rundir=true + awk -F "|" '{print $5}' rt.conf | grep "\S" > keep_tests.tmp + ;; + w) + export skip_check_results=true + ;; + k) + KEEP_RUNDIR=true + ;; + r) + ROCOTO=true + ECFLOW=false + ;; + e) + ECFLOW=true + ROCOTO=false + ;; + h) + usage + ;; + \?) + usage + die "Invalid option: -$OPTARG" + ;; + :) + usage + die "Option -$OPTARG requires an argument." + ;; + esac +done + +if [[ $SINGLE_NAME != '' ]]; then + rt_single +fi + +if [[ $TESTS_FILE =~ '35d' ]] || [[ $TESTS_FILE =~ 'weekly' ]]; then + TEST_35D=true +fi + +BL_DATE=20220408 +if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]] || [[ $MACHINE_ID = s4.* ]]; then + RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}/${RT_COMPILER^^}} +else + RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}} +fi + +INPUTDATA_ROOT=${INPUTDATA_ROOT:-$DISKNM/NEMSfv3gfs/input-data-20211210} +INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT}/WW3_input_data_20211113 +INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC:-$DISKNM/NEMSfv3gfs/BM_IC-20220207} + +shift $((OPTIND-1)) +[[ $# -gt 1 ]] && usage + +if [[ $CREATE_BASELINE == true ]]; then + # + # prepare new regression test directory + # + rm -rf "${NEW_BASELINE}" + mkdir -p "${NEW_BASELINE}" +fi + +if [[ $skip_check_results == true ]]; then + REGRESSIONTEST_LOG=${PATHRT}/RegressionTests_weekly_$MACHINE_ID.log +else + REGRESSIONTEST_LOG=${PATHRT}/RegressionTests_$MACHINE_ID.log +fi + +date > ${REGRESSIONTEST_LOG} +echo "Start Regression test" >> ${REGRESSIONTEST_LOG} +echo >> ${REGRESSIONTEST_LOG} + +source default_vars.sh + +JOB_NR=0 +TEST_NR=0 +COMPILE_NR=0 +rm -f fail_test* fail_compile* + +export LOG_DIR=${PATHRT}/log_$MACHINE_ID +rm -rf ${LOG_DIR} +mkdir ${LOG_DIR} + +if [[ $ROCOTO == true ]]; then + + ROCOTO_XML=${PATHRT}/rocoto_workflow.xml + ROCOTO_DB=${PATHRT}/rocoto_workflow.db + + rm -f $ROCOTO_XML $ROCOTO_DB *_lock.db + + if [[ $MACHINE_ID = wcoss ]]; then + QUEUE=dev + COMPILE_QUEUE=dev + ROCOTO_SCHEDULER=lsf + elif [[ $MACHINE_ID = wcoss_cray ]]; then + QUEUE=dev + COMPILE_QUEUE=dev + ROCOTO_SCHEDULER=lsfcray + elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then + QUEUE=dev + COMPILE_QUEUE=dev_transfer + ROCOTO_SCHEDULER=lsf + elif [[ $MACHINE_ID = wcoss2 ]]; then + QUEUE=dev + COMPILE_QUEUE=dev + ROCOTO_SCHEDULER=pbs + elif [[ $MACHINE_ID = hera.* ]]; then + QUEUE=batch + COMPILE_QUEUE=batch + ROCOTO_SCHEDULER=slurm + elif [[ $MACHINE_ID = orion.* ]]; then + QUEUE=batch + COMPILE_QUEUE=batch + ROCOTO_SCHEDULER=slurm + elif [[ $MACHINE_ID = s4.* ]]; then + QUEUE=s4 + COMPILE_QUEUE=s4 + ROCOTO_SCHEDULER=slurm + elif [[ $MACHINE_ID = jet.* ]]; then + QUEUE=batch + COMPILE_QUEUE=batch + ROCOTO_SCHEDULER=slurm + else + die "Rocoto is not supported on this machine $MACHINE_ID" + fi + + cat << EOF > $ROCOTO_XML + + + + + + + + + + +]> + + 197001010000 197001010000 01:00:00 + &LOG;/workflow.log +EOF + +fi + +if [[ $ECFLOW == true ]]; then + + # Default maximum number of compile and run jobs + MAX_BUILDS=10 + MAX_JOBS=30 + + # Default number of tries to run jobs - on wcoss, no error tolerance + ECF_TRIES=2 + if [[ $MACHINE_ID = wcoss* ]]; then + ECF_TRIES=1 + fi + + # Reduce maximum number of compile jobs on jet.intel and s4.intel because of licensing issues + if [[ $MACHINE_ID = jet.intel ]]; then + MAX_BUILDS=5 + elif [[ $MACHINE_ID = s4.intel ]]; then + MAX_BUILDS=1 + fi + + if [[ $MACHINE_ID = hera.* ]] && [[ ! $HOSTNAME = hecflow* ]]; then + echo "ERROR: To use ECFlow on Hera we must be logged into 'hecflow01' login node." + exit 1 + fi + + ECFLOW_RUN=${PATHRT}/ecflow_run + ECFLOW_SUITE=regtest_$$ + rm -rf ${ECFLOW_RUN} + mkdir -p ${ECFLOW_RUN}/${ECFLOW_SUITE} + cp head.h tail.h ${ECFLOW_RUN} + cat << EOF > ${ECFLOW_RUN}/${ECFLOW_SUITE}.def +suite ${ECFLOW_SUITE} + edit ECF_HOME '${ECFLOW_RUN}' + edit ECF_INCLUDE '${ECFLOW_RUN}' + edit ECF_KILL_CMD kill -15 %ECF_RID% > %ECF_JOB%.kill 2>&1 + edit ECF_TRIES ${ECF_TRIES} + label src_dir '${PATHTR}' + label run_dir '${RUNDIR_ROOT}' + limit max_builds ${MAX_BUILDS} + limit max_jobs ${MAX_JOBS} +EOF + + if [[ $MACHINE_ID = wcoss ]]; then + QUEUE=dev + elif [[ $MACHINE_ID = wcoss_cray ]]; then + QUEUE=dev + elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then + QUEUE=dev + elif [[ $MACHINE_ID = wcoss2 ]]; then + QUEUE=dev + elif [[ $MACHINE_ID = hera.* ]]; then + QUEUE=batch + elif [[ $MACHINE_ID = orion.* ]]; then + QUEUE=batch + elif [[ $MACHINE_ID = jet.* ]]; then + QUEUE=batch + elif [[ $MACHINE_ID = s4.* ]]; then + QUEUE=s4 + elif [[ $MACHINE_ID = gaea.* ]]; then + QUEUE=normal + elif [[ $MACHINE_ID = cheyenne.* ]]; then + QUEUE=regular + else + die "ecFlow is not supported on this machine $MACHINE_ID" + fi + +else + + if [[ $MACHINE_ID = hera.* ]] && [[ $HOSTNAME = hecflow* ]]; then + echo "ERROR: To run without using ECFlow on Hera, please do not use ecflow node." + exit 1 + fi + +fi + +## +## read rt.conf and then either execute the test script directly or create +## workflow description file +## + +new_compile=false +in_metatask=false + +[[ -f $TESTS_FILE ]] || die "$TESTS_FILE does not exist" + +while read -r line || [ "$line" ]; do + + line="${line#"${line%%[![:space:]]*}"}" + [[ ${#line} == 0 ]] && continue + [[ $line == \#* ]] && continue + + JOB_NR=$( printf '%03d' $(( 10#$JOB_NR + 1 )) ) + + if [[ $line == COMPILE* ]] ; then + + MAKE_OPT=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') + MACHINES=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') + CB=$( echo $line | cut -d'|' -f4) + + [[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue + + if [[ ${MACHINES} != '' ]]; then + if [[ ${MACHINES} == -* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue + elif [[ ${MACHINES} == +* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue + else + echo "MACHINES=|${MACHINES}|" + die "MACHINES spec must be either an empty string or start with either '+' or '-'" + fi + fi + + export COMPILE_NR=$( printf '%03d' $(( 10#$COMPILE_NR + 1 )) ) + + cat << EOF > ${RUNDIR_ROOT}/compile_${COMPILE_NR}.env + export JOB_NR=${JOB_NR} + export COMPILE_NR=${COMPILE_NR} + export MACHINE_ID=${MACHINE_ID} + export RT_COMPILER=${RT_COMPILER} + export PATHRT=${PATHRT} + export PATHTR=${PATHTR} + export SCHEDULER=${SCHEDULER} + export ACCNR=${ACCNR} + export QUEUE=${COMPILE_QUEUE} + export PARTITION=${PARTITION} + export ROCOTO=${ROCOTO} + export ECFLOW=${ECFLOW} + export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG} + export LOG_DIR=${LOG_DIR} +EOF + + if [[ $ROCOTO == true ]]; then + rocoto_create_compile_task + elif [[ $ECFLOW == true ]]; then + ecflow_create_compile_task + else + ./run_compile.sh ${PATHRT} ${RUNDIR_ROOT} "${MAKE_OPT}" ${COMPILE_NR} > ${LOG_DIR}/compile_${COMPILE_NR}.log 2>&1 + fi + + # Set RT_SUFFIX (regression test run directories and log files) and BL_SUFFIX + # (regression test baseline directories) for REPRO or PROD runs + if [[ ${MAKE_OPT^^} =~ "-DREPRO=ON" ]]; then + RT_SUFFIX="_repro" + BL_SUFFIX="_repro" + else + RT_SUFFIX="" + BL_SUFFIX="" + fi + + continue + + elif [[ $line == RUN* ]] ; then + + TEST_NAME=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') + MACHINES=$( echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') + CB=$( echo $line | cut -d'|' -f4) + DEP_RUN=$( echo $line | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//') + DATE_35D=$( echo $line | cut -d'|' -f6 | sed -e 's/^ *//' -e 's/ *$//') + + [[ -e "tests/$TEST_NAME" ]] || die "run test file tests/$TEST_NAME does not exist" + [[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue + + if [[ ${MACHINES} != '' ]]; then + if [[ ${MACHINES} == -* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue + elif [[ ${MACHINES} == +* ]]; then + [[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue + else + echo "MACHINES=|${MACHINES}|" + die "MACHINES spec must be either an empty string or start with either '+' or '-'" + fi + fi + + # 35 day tests + [[ $TEST_35D == true ]] && rt_35d + + # Avoid uninitialized RT_SUFFIX/BL_SUFFIX (see definition above) + RT_SUFFIX=${RT_SUFFIX:-""} + BL_SUFFIX=${BL_SUFFIX:-""} + + if [[ $ROCOTO == true && $new_compile == true ]]; then + new_compile=false + in_metatask=true + cat << EOF >> $ROCOTO_XML + 0 +EOF + fi + + TEST_NR=$( printf '%03d' $(( 10#$TEST_NR + 1 )) ) + + ( + source ${PATHRT}/tests/$TEST_NAME + + NODES=$(( TASKS / TPN )) + if (( NODES * TPN < TASKS )); then + NODES=$(( NODES + 1 )) + fi + + cat << EOF > ${RUNDIR_ROOT}/run_test_${TEST_NR}.env + export JOB_NR=${JOB_NR} + export MACHINE_ID=${MACHINE_ID} + export RT_COMPILER=${RT_COMPILER} + export RTPWD=${RTPWD} + export INPUTDATA_ROOT=${INPUTDATA_ROOT} + export INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT_WW3} + export INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC} + export PATHRT=${PATHRT} + export PATHTR=${PATHTR} + export NEW_BASELINE=${NEW_BASELINE} + export CREATE_BASELINE=${CREATE_BASELINE} + export RT_SUFFIX=${RT_SUFFIX} + export BL_SUFFIX=${BL_SUFFIX} + export SCHEDULER=${SCHEDULER} + export ACCNR=${ACCNR} + export QUEUE=${QUEUE} + export PARTITION=${PARTITION} + export ROCOTO=${ROCOTO} + export ECFLOW=${ECFLOW} + export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG} + export LOG_DIR=${LOG_DIR} + export DEP_RUN=${DEP_RUN} + export skip_check_results=${skip_check_results} + export delete_rundir=${delete_rundir} +EOF + if [[ $MACHINE_ID = jet.* ]]; then + cat << EOF >> ${RUNDIR_ROOT}/run_test_${TEST_NR}.env + export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH + export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages +EOF + fi + + if [[ $ROCOTO == true ]]; then + rocoto_create_run_task + elif [[ $ECFLOW == true ]]; then + ecflow_create_run_task + else + ./run_test.sh ${PATHRT} ${RUNDIR_ROOT} ${TEST_NAME} ${TEST_NR} ${COMPILE_NR} > ${LOG_DIR}/run_${TEST_NAME}${RT_SUFFIX}.log 2>&1 + fi + ) + + continue + else + die "Unknown command $line" + fi +done < $TESTS_FILE + +## +## run regression test workflow (currently Rocoto or ecFlow are supported) +## + +if [[ $ROCOTO == true ]]; then + if [[ $in_metatask == true ]]; then + echo " " >> $ROCOTO_XML + fi + echo "" >> $ROCOTO_XML + # run rocoto workflow until done + rocoto_run +fi + +if [[ $ECFLOW == true ]]; then + echo "endsuite" >> ${ECFLOW_RUN}/${ECFLOW_SUITE}.def + # run ecflow workflow until done + ecflow_run +fi + +## +## regression test is either failed or successful +## +set +e +cat ${LOG_DIR}/compile_*_time.log >> ${REGRESSIONTEST_LOG} +cat ${LOG_DIR}/rt_*.log >> ${REGRESSIONTEST_LOG} + +FILES="fail_test_* fail_compile_*" +for f in $FILES; do + if [[ -f "$f" ]]; then + cat "$f" >> fail_test + fi +done + +if [[ -e fail_test ]]; then + echo "FAILED TESTS: " + echo "FAILED TESTS: " >> ${REGRESSIONTEST_LOG} + while read -r failed_test_name + do + echo "Test ${failed_test_name} failed " + echo "Test ${failed_test_name} failed " >> ${REGRESSIONTEST_LOG} + done < fail_test + echo ; echo REGRESSION TEST FAILED + (echo ; echo REGRESSION TEST FAILED) >> ${REGRESSIONTEST_LOG} +else + echo ; echo REGRESSION TEST WAS SUCCESSFUL + (echo ; echo REGRESSION TEST WAS SUCCESSFUL) >> ${REGRESSIONTEST_LOG} + + rm -f fv3_*.x fv3_*.exe modules.fv3_* keep_tests.tmp + [[ ${KEEP_RUNDIR} == false ]] && rm -rf ${RUNDIR_ROOT} + [[ ${ROCOTO} == true ]] && rm -f ${ROCOTO_XML} ${ROCOTO_DB} *_lock.db + [[ ${TEST_35D} == true ]] && rm -f tests/cpld_bmark*_20* + [[ ${SINGLE_NAME} != '' ]] && rm -f rt.conf.single +fi + +date >> ${REGRESSIONTEST_LOG} + +elapsed_time=$( printf '%02dh:%02dm:%02ds\n' $((SECONDS%86400/3600)) $((SECONDS%3600/60)) $((SECONDS%60)) ) +echo "Elapsed time: ${elapsed_time}. Have a nice day!" >> ${REGRESSIONTEST_LOG} +echo "Elapsed time: ${elapsed_time}. Have a nice day!" diff --git a/tests/tests/control_p8_progsigma b/tests/tests/control_p8_progsigma new file mode 100644 index 0000000000..78880f94c1 --- /dev/null +++ b/tests/tests/control_p8_progsigma @@ -0,0 +1,167 @@ +############################################################################### +# +# Global control test GFSv16 atmosphere only at C96L127, P8 configuration +# +############################################################################### + +export TEST_DESCR="Compare global control results with previous trunk version" + +export CNTL_DIR=control_p8 + +export LIST_FILES="sfcf000.nc \ + sfcf021.nc \ + sfcf024.nc \ + atmf000.nc \ + atmf021.nc \ + atmf024.nc \ + GFSFLX.GrbF00 \ + GFSFLX.GrbF21 \ + GFSFLX.GrbF24 \ + GFSPRS.GrbF00 \ + GFSPRS.GrbF21 \ + GFSPRS.GrbF24 \ + RESTART/coupler.res \ + RESTART/fv_core.res.nc \ + RESTART/fv_core.res.tile1.nc \ + RESTART/fv_core.res.tile2.nc \ + RESTART/fv_core.res.tile3.nc \ + RESTART/fv_core.res.tile4.nc \ + RESTART/fv_core.res.tile5.nc \ + RESTART/fv_core.res.tile6.nc \ + RESTART/fv_srf_wnd.res.tile1.nc \ + RESTART/fv_srf_wnd.res.tile2.nc \ + RESTART/fv_srf_wnd.res.tile3.nc \ + RESTART/fv_srf_wnd.res.tile4.nc \ + RESTART/fv_srf_wnd.res.tile5.nc \ + RESTART/fv_srf_wnd.res.tile6.nc \ + RESTART/fv_tracer.res.tile1.nc \ + RESTART/fv_tracer.res.tile2.nc \ + RESTART/fv_tracer.res.tile3.nc \ + RESTART/fv_tracer.res.tile4.nc \ + RESTART/fv_tracer.res.tile5.nc \ + RESTART/fv_tracer.res.tile6.nc \ + RESTART/phy_data.tile1.nc \ + RESTART/phy_data.tile2.nc \ + RESTART/phy_data.tile3.nc \ + RESTART/phy_data.tile4.nc \ + RESTART/phy_data.tile5.nc \ + RESTART/phy_data.tile6.nc \ + RESTART/sfc_data.tile1.nc \ + RESTART/sfc_data.tile2.nc \ + RESTART/sfc_data.tile3.nc \ + RESTART/sfc_data.tile4.nc \ + RESTART/sfc_data.tile5.nc \ + RESTART/sfc_data.tile6.nc" + +export_fv3 +export NPZ=127 +export NPZP=128 +export DT_ATMOS=720 +export SYEAR=2021 +export SMONTH=03 +export SDAY=22 +export SHOUR=06 +export RESTART_INTERVAL="12 -1" +export OUTPUT_GRID='gaussian_grid' +export WRITE_DOPOST=.true. +export OUTPUT_FH='0 21 24' + +# P7 default +export IALB=2 +export IEMS=2 +export LSM=2 +export IOPT_DVEG=4 +export IOPT_CRS=2 +export IOPT_RAD=3 +export IOPT_ALB=1 +export IOPT_STC=3 +# P8 +export IOPT_SFC=3 + +# FV3 P7 settings +export D2_BG_K1=0.20 +export D2_BG_K2=0.04 +export PSM_BC=1 +# P8 +export DDDMP=0.1 + +# P7 Merra2 Aerosols & NSST +export USE_MERRA2=.true. +export IAER=1011 +export NSTF_NAME=2,1,0,0,0 + +export LHEATSTRG=.true. +export LSEASPRAY=.true. + +# P7 UGWP1 +export GWD_OPT=2 +export DO_UGWP_V1=.false. +export KNOB_UGWP_VERSION=0 +export KNOB_UGWP_NSLOPE=1 +export DO_UGWP_V0=.true. +export DO_GSL_DRAG_LS_BL=.false. +export DO_GSL_DRAG_SS=.true. +export DO_GSL_DRAG_TOFD=.true. +export DO_UGWP_V1_OROG_ONLY=.false. +export DO_UGWP_V0_NST_ONLY=.false. +export LDIAG_UGWP=.false. + +# P7 CA +export DO_CA=.true. +export CA_SGS=.true. +export CA_GLOBAL=.false. +export NCA=1 +export NCELLS=5 +export NLIVES=12 +export NTHRESH=18 +export NSEED=1 +export NFRACSEED=0.5 +export CA_TRIGGER=.true. +export NSPINUP=1 +export ISEED_CA=12345 + +# P7 settings +export TILEDFIX=.true. +export FNALBC="'C96.snowfree_albedo.tileX.nc'" +export FNALBC2="'C96.facsf.tileX.nc'" +export FNTG3C="'C96.substrate_temperature.tileX.nc'" +export FNVEGC="'C96.vegetation_greenness.tileX.nc'" +export FNVETC="'C96.vegetation_type.tileX.nc'" +export FNSOTC="'C96.soil_type.tileX.nc'" +export FNSMCC=${FNSMCC_control} +export FNMSKH=${FNMSKH_control} +export FNVMNC="'C96.vegetation_greenness.tileX.nc'" +export FNVMXC="'C96.vegetation_greenness.tileX.nc'" +export FNSLPC="'C96.slope_type.tileX.nc'" +export FNABSC="'C96.maximum_snow_albedo.tileX.nc'" +export LANDICE=".false." +export FSICL=0 +export FSICS=0 + +export IMP_PHYSICS=8 +export LGFDLMPRAD=.false. +export DO_SAT_ADJ=.false. +export DNATS=2 +export DZ_MIN=6 + +#required for NML.IN sharing +export MIN_SEAICE=0.15 +export FRAC_GRID=.true. +export MOM6_RESTART_SETTING=n +# P8 (not used for standalone) +export USE_CICE_ALB=.false. + +export WRITE_NSFLIP=.true. + +export FV3_RUN=control_run.IN +export CCPP_SUITE=FV3_GFS_v17_p8 +export FIELD_TABLE=field_table_thompson_noaero_tke_progsigma +export DIAG_TABLE=diag_table_gfsv16_merra2 +# use same namelist for standalone,coupled P7 +export INPUT_NML=cpld_control.nml.IN + +# RRTMGP +export DO_RRTMGP=.true. +export DOGP_CLDOPTICS_LUT=.true. +export DOGP_LWSCAT=.true. +export DOGP_SGS_CNV=.true. From 883403661be2e4647045d2aff1e11d26017f85c7 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 20 Apr 2022 02:29:52 +0000 Subject: [PATCH 06/75] delete some untracked files --- tests/fail_test_001 | 1 - tests/fv3_conf/compile_slurm.IN | 19 - tests/fv3_conf/fv3_slurm.IN | 39 - ...table_thompson_noaero_tke_GOCART_progsigma | 197 ---- .../field_table_thompson_noaero_tke_progsigma | 71 -- tests/rt.conf_orig | 213 ----- tests/rt_384.conf | 7 - tests/rt_lisa.sh | 898 ------------------ tests/rt_orig.sh | 898 ------------------ tests/tests/control_p8_progsigma | 167 ---- 10 files changed, 2510 deletions(-) delete mode 100644 tests/fail_test_001 delete mode 100644 tests/fv3_conf/compile_slurm.IN delete mode 100644 tests/fv3_conf/fv3_slurm.IN delete mode 100644 tests/parm/field_table/field_table_thompson_noaero_tke_GOCART_progsigma delete mode 100644 tests/parm/field_table/field_table_thompson_noaero_tke_progsigma delete mode 100644 tests/rt.conf_orig delete mode 100644 tests/rt_384.conf delete mode 100755 tests/rt_lisa.sh delete mode 100755 tests/rt_orig.sh delete mode 100644 tests/tests/control_p8_progsigma diff --git a/tests/fail_test_001 b/tests/fail_test_001 deleted file mode 100644 index 2a3f610d97..0000000000 --- a/tests/fail_test_001 +++ /dev/null @@ -1 +0,0 @@ -control_p8 001 failed in check_result diff --git a/tests/fv3_conf/compile_slurm.IN b/tests/fv3_conf/compile_slurm.IN deleted file mode 100644 index 6ce910e665..0000000000 --- a/tests/fv3_conf/compile_slurm.IN +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -#SBATCH -e err -#SBATCH -o out -#SBATCH --account=@[ACCNR] -#SBATCH --qos=@[QUEUE] -#SBATCH --nodes=1 -#SBATCH --ntasks-per-node=8 -#SBATCH --time=30 -#SBATCH --job-name="@[JBNME]" - -set -eux - -echo -n " $( date +%s )," > job_timestamp.txt -echo "Compile started: " `date` - -@[PATHRT]/compile.sh @[MACHINE_ID] "@[MAKE_OPT]" @[COMPILE_NR] - -echo "Compile ended: " `date` -echo -n " $( date +%s )," >> job_timestamp.txt diff --git a/tests/fv3_conf/fv3_slurm.IN b/tests/fv3_conf/fv3_slurm.IN deleted file mode 100644 index effafccb4e..0000000000 --- a/tests/fv3_conf/fv3_slurm.IN +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -#SBATCH -e err -#SBATCH -o out -#SBATCH --account=@[ACCNR] -#SBATCH --qos=@[QUEUE] -### #SBATCH --ntasks=@[TASKS] -#SBATCH --nodes=@[NODES] -#SBATCH --ntasks-per-node=@[TPN] -#SBATCH --time=@[WLCLK] -#SBATCH --job-name="@[JBNME]" -### #SBATCH --exclusive - -set -eux -echo -n " $( date +%s )," > job_timestamp.txt - -set +x -MACHINE_ID=hera -source ./module-setup.sh -module use $( pwd -P ) -module load modules.fv3 -module list -set -x - -echo "Model started: " `date` - -export MPI_TYPE_DEPTH=20 -export OMP_STACKSIZE=512M -export OMP_NUM_THREADS=@[THRD] -export ESMF_RUNTIME_COMPLIANCECHECK=OFF:depth=4 -export PSM_RANKS_PER_CONTEXT=4 -export PSM_SHAREDCONTEXTS=1 - -# Avoid job errors because of filesystem synchronization delays -sync && sleep 1 - -srun --label -n @[TASKS] ./fv3.exe - -echo "Model ended: " `date` -echo -n " $( date +%s )," >> job_timestamp.txt diff --git a/tests/parm/field_table/field_table_thompson_noaero_tke_GOCART_progsigma b/tests/parm/field_table/field_table_thompson_noaero_tke_GOCART_progsigma deleted file mode 100644 index 66b7f62489..0000000000 --- a/tests/parm/field_table/field_table_thompson_noaero_tke_GOCART_progsigma +++ /dev/null @@ -1,197 +0,0 @@ -# added by FRE: sphum must be present in atmos -# specific humidity for moist runs - "TRACER", "atmos_mod", "sphum" - "longname", "specific humidity" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=3.e-6" / -# prognostic cloud water mixing ratio - "TRACER", "atmos_mod", "liq_wat" - "longname", "cloud water mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic ice water mixing ratio - "TRACER", "atmos_mod", "ice_wat" - "longname", "cloud ice mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic rain water mixing ratio - "TRACER", "atmos_mod", "rainwat" - "longname", "rain water mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic snow water mixing ratio - "TRACER", "atmos_mod", "snowwat" - "longname", "snow water mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic Grau water mixing ratio - "TRACER", "atmos_mod", "graupel" - "longname", "graupel mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic cloud water number concentration - not for non-aerosol runs -# "TRACER", "atmos_mod", "water_nc" -# "longname", "cloud liquid water number concentration" -# "units", "/kg" -# "profile_type", "fixed", "surface_value=0.0" / -# prognostic cloud ice number concentration - "TRACER", "atmos_mod", "ice_nc" - "longname", "cloud ice water number concentration" - "units", "/kg" - "profile_type", "fixed", "surface_value=0.0" / -# prognostic rain number concentration - "TRACER", "atmos_mod", "rain_nc" - "longname", "rain number concentration" - "units", "/kg" - "profile_type", "fixed", "surface_value=0.0" / -# prognostic ozone mixing ratio tracer - "TRACER", "atmos_mod", "o3mr" - "longname", "ozone mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# water- and ice-friendly aerosols (Thompson) - not for non-aerosol runs -# "TRACER", "atmos_mod", "liq_aero" -# "longname", "water-friendly aerosol number concentration" -# "units", "/kg" -# "profile_type", "fixed", "surface_value=0.0" / -# "TRACER", "atmos_mod", "ice_aero" -# "longname", "ice-friendly aerosol number concentration" -# "units", "/kg" -# "profile_type", "fixed", "surface_value=0.0" / -# prognostic subgrid scale turbulent kinetic energy - "TRACER", "atmos_mod", "sgs_tke" - "longname", "subgrid scale turbulent kinetic energy" - "units", "m2/s2" - "profile_type", "fixed", "surface_value=0.0" / -# prognotsitc sigmab tracer - "TRACER", "atmos_mod", "sigmab" - "longname", "sigma fraction" - "units", "fraction" - "profile_type", "fixed", "surface_value=0.0" / -# prognostic aerosols - "TRACER", "atmos_mod", "so2" - "longname", "so2 mixing ratio" - "units", "ppm" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "so4" - "longname", "sulfate mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "dms" - "longname", "DMS mixing ratio" - "units", "ppm" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "msa" - "longname", "msa mixing ratio" - "units", "ppm" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "bc1" - "longname", "hydrophobic black carbon mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "bc2" - "longname", "hydrophillic black carbon mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "oc1" - "longname", "hydrophobic organic carbon mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "oc2" - "longname", "hydrophillic organic carbon mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "dust1" - "longname", "fine dust1 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "dust2" - "longname", "fine dust2 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "dust3" - "longname", "coarse dust3 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "dust4" - "longname", "coarse dust4 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "dust5" - "longname", "coarse dust5 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "seas1" - "longname", "seasalt1 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "seas2" - "longname", "seasalt2 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "seas3" - "longname", "seasalt3 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "seas4" - "longname", "seasalt4 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "seas5" - "longname", "seasalt5 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "nh3" - "longname", "primary NH3 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "nh4a" - "longname", "primary NH4a mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "no3an1" - "longname", "primary NO3an1 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "no3an2" - "longname", "primary NO3an2 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "no3an3" - "longname", "primary NO3an3 mixing ratio" - "units", "ug/kg" - "tracer_usage", "chemistry" - "profile_type", "fixed", "surface_value=0.0" / -# diagnostic PM tracers - "TRACER", "atmos_mod", "pm25" - "longname", "primary PM25 mixing ratio" - "units", "ug/m3" - "tracer_usage", "chemistry", "type=diagnostic" - "profile_type", "fixed", "surface_value=0.0" / - "TRACER", "atmos_mod", "pm10" - "longname", "primary PM10 mixing ratio" - "units", "ug/m3" - "tracer_usage", "chemistry", "type=diagnostic" - "profile_type", "fixed", "surface_value=0.0" / diff --git a/tests/parm/field_table/field_table_thompson_noaero_tke_progsigma b/tests/parm/field_table/field_table_thompson_noaero_tke_progsigma deleted file mode 100644 index 91b040294b..0000000000 --- a/tests/parm/field_table/field_table_thompson_noaero_tke_progsigma +++ /dev/null @@ -1,71 +0,0 @@ -# added by FRE: sphum must be present in atmos -# specific humidity for moist runs - "TRACER", "atmos_mod", "sphum" - "longname", "specific humidity" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=3.e-6" / -# prognostic cloud water mixing ratio - "TRACER", "atmos_mod", "liq_wat" - "longname", "cloud water mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic ice water mixing ratio - "TRACER", "atmos_mod", "ice_wat" - "longname", "cloud ice mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic rain water mixing ratio - "TRACER", "atmos_mod", "rainwat" - "longname", "rain water mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic snow water mixing ratio - "TRACER", "atmos_mod", "snowwat" - "longname", "snow water mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic Grau water mixing ratio - "TRACER", "atmos_mod", "graupel" - "longname", "graupel mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# prognostic cloud water number concentration - not for non-aerosol runs -# "TRACER", "atmos_mod", "water_nc" -# "longname", "cloud liquid water number concentration" -# "units", "/kg" -# "profile_type", "fixed", "surface_value=0.0" / -# prognostic cloud ice number concentration - "TRACER", "atmos_mod", "ice_nc" - "longname", "cloud ice water number concentration" - "units", "/kg" - "profile_type", "fixed", "surface_value=0.0" / -# prognostic rain number concentration - "TRACER", "atmos_mod", "rain_nc" - "longname", "rain number concentration" - "units", "/kg" - "profile_type", "fixed", "surface_value=0.0" / -# prognotsitc sigmab tracer - "TRACER", "atmos_mod", "sigmab" - "longname", "sigma fraction" - "units", "fraction" - "profile_type", "fixed", "surface_value=0.0" / -# prognostic ozone mixing ratio tracer - "TRACER", "atmos_mod", "o3mr" - "longname", "ozone mixing ratio" - "units", "kg/kg" - "profile_type", "fixed", "surface_value=1.e30" / -# water- and ice-friendly aerosols (Thompson) - not for non-aerosol runs -# "TRACER", "atmos_mod", "liq_aero" -# "longname", "water-friendly aerosol number concentration" -# "units", "/kg" -# "profile_type", "fixed", "surface_value=0.0" / -# "TRACER", "atmos_mod", "ice_aero" -# "longname", "ice-friendly aerosol number concentration" -# "units", "/kg" -# "profile_type", "fixed", "surface_value=0.0" / -# prognostic subgrid scale turbulent kinetic energy - "TRACER", "atmos_mod", "sgs_tke" - "longname", "subgrid scale turbulent kinetic energy" - "units", "m2/s2" - "profile_type", "fixed", "surface_value=0.0" / - diff --git a/tests/rt.conf_orig b/tests/rt.conf_orig deleted file mode 100644 index 4a1785d246..0000000000 --- a/tests/rt.conf_orig +++ /dev/null @@ -1,213 +0,0 @@ -################################################################################################################################################################################### -# S2S tests # -################################################################################################################################################################################### - -COMPILE | -DAPP=S2SWA -DCCPP_SUITES=FV3_GFS_v16_coupled_nsstNoahmpUGWPv1,FV3_GFS_v17_coupled_p8 | - wcoss_cray | fv3 | -RUN | cpld_control_p8 | - wcoss_cray | fv3 | -RUN | cpld_2threads_p8 | - wcoss_cray | | -RUN | cpld_decomp_p8 | - wcoss_cray jet.intel | | -RUN | cpld_mpi_p8 | - wcoss_cray | | - -RUN | cpld_bmark_p8 | - wcoss_cray jet.intel | fv3 | - -# Waves off for restart and debug tests -RUN | cpld_control_c96_p8 | - wcoss_cray | fv3 | -RUN | cpld_restart_c96_p8 | - wcoss_cray | | cpld_control_c96_p8 - - -RUN | cpld_control_c192_p8 | - wcoss_cray jet.intel | fv3 | -RUN | cpld_restart_c192_p8 | - wcoss_cray jet.intel | | cpld_control_c192_p8 - -RUN | cpld_control_c384_p8 | - wcoss_cray jet.intel | fv3 | -RUN | cpld_restart_c384_p8 | - wcoss_cray jet.intel | | cpld_control_c384_p8 - -COMPILE | -DAPP=S2SA -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8 | - wcoss_cray | fv3 | -RUN | cpld_debug_p8 | - wcoss_cray | fv3 | - -################################################################################################################################################################################### -# PROD tests # -################################################################################################################################################################################### - -COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v15_thompson_mynn,FV3_GFS_v15_thompson_mynn_RRTMGP,FV3_GFS_v17_p8,FV3_GFS_v15_thompson_mynn_lam3km -D32BIT=ON | | fv3 | -RUN | control | | fv3 | -RUN | control_decomp | | | -RUN | control_2dwrtdecomp | | | -RUN | control_2threads | - wcoss_cray | | -RUN | control_restart | | | control -RUN | control_fhzero | - wcoss2 | | -RUN | control_CubedSphereGrid | | fv3 | -RUN | control_latlon | | fv3 | -RUN | control_wrtGauss_netcdf_parallel | - wcoss2 | fv3 | -RUN | control_c48 | | fv3 | -RUN | control_c192 | | fv3 | -RUN | control_c384 | - wcoss_cray | fv3 | -#RUN | control_c768 | - wcoss_cray | fv3 | -RUN | control_c384gdas | - wcoss_cray | fv3 | -RUN | control_stochy | | fv3 | -RUN | control_stochy_restart | | | control_stochy -RUN | control_lndp | | fv3 | -RUN | control_iovr4 | | fv3 | -RUN | control_iovr5 | | fv3 | - -RUN | control_p8 | | fv3 | -RUN | control_restart_p8 | | | control_p8 -RUN | control_decomp_p8 | | | -RUN | control_2threads_p8 | - wcoss_cray | | - -RUN | regional_control | | fv3 | -RUN | regional_restart | | | regional_control -RUN | regional_control_2dwrtdecomp | | | -RUN | regional_noquilt | | fv3 | -RUN | regional_2threads | - wcoss_cray jet.intel | | -RUN | regional_netcdf_parallel | - wcoss2 | fv3 | -RUN | regional_RRTMGP | | fv3 | -RUN | regional_3km | | fv3 | - -COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_RAP_RRTMGP,FV3_RAP_sfcdiff,FV3_HRRR,FV3_RRFS_v1beta,FV3_RRFS_v1nssl -D32BIT=ON | | fv3 | - -RUN | rap_control | | fv3 | -RUN | rap_rrtmgp | | fv3 | -RUN | regional_spp_sppt_shum_skeb | | fv3 | -# This test is not giving the same results (also not in REPRO mode) - needs to be fixed -#RUN | rap_decomp | | | -RUN | rap_2threads | - wcoss_cray jet.intel | | -RUN | rap_restart | | | rap_control -RUN | rap_sfcdiff | | fv3 | -# This test is not giving the same results (also not in REPRO mode) - needs to be fixed -#RUN | rap_sfcdiff_decomp | | | -RUN | rap_sfcdiff_restart | | | rap_sfcdiff -RUN | hrrr_control | | fv3 | -RUN | rrfs_v1beta | | fv3 | -RUN | rrfs_v1nssl | | fv3 | -RUN | rrfs_v1nssl_nohailnoccn | | fv3 | - -RUN | rrfs_conus13km_hrrr_warm | | fv3 | -RUN | rrfs_conus13km_radar_tten_warm | | fv3 | - -COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_RRTMGP,FV3_GFS_v16_csawmg,FV3_GFS_v16_flake,FV3_GFS_v16_ugwpv1,FV3_GFS_v16_ras,FV3_GFS_v16_thompson,FV3_GFS_v16_noahmp | | fv3 | -# fv3_gfs_v15p2 and fv3_gfs_v15p2_RRTMGP fail w/ sat.vap pressure error when cdmbgwd=0.14,1.8,1.0,1.0 -RUN | control_rrtmgp | | fv3 | -#RUN | control_rrtmgp_2threads | | | -RUN | control_rrtmgp_c192 | | fv3 | -RUN | control_csawmg | - gaea.intel | fv3 | -RUN | control_csawmgt | | fv3 | -RUN | control_flake | | fv3 | -RUN | control_ras | | fv3 | -# post results do not reproduce on cray -RUN | control_thompson | - wcoss_cray | fv3 | -RUN | control_thompson_no_aero | - wcoss_cray | fv3 | - -# Run WAM test in REPRO mode to avoid numerical instability in the deep atmosphere -COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_fv3wam -D32BIT=ON -DMULTI_GASES=ON -DREPRO=ON | | fv3 | -RUN | control_wam | | fv3 | - -################################################################################################################################################################################### -# DEBUG tests # -################################################################################################################################################################################### - -COMPILE | -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v16_RRTMGP,FV3_GFS_v16_csawmg,FV3_GFS_v16_flake,FV3_GFS_v16_ugwpv1,FV3_GFS_v16_ras,FV3_GFS_v16_noahmp,FV3_GFS_v16_thompson,FV3_GFS_v15_thompson_mynn,FV3_GFS_v17_p8 -D32BIT=ON | | fv3 | - -RUN | control_debug | | fv3 | -RUN | control_2threads_debug | - wcoss_cray | | -RUN | control_CubedSphereGrid_debug | | fv3 | -RUN | control_wrtGauss_netcdf_parallel_debug | | fv3 | -RUN | control_stochy_debug | | fv3 | -RUN | control_lndp_debug | | fv3 | -RUN | control_rrtmgp_debug | | fv3 | -RUN | control_csawmg_debug | | fv3 | -RUN | control_csawmgt_debug | | fv3 | -RUN | control_ras_debug | | fv3 | -RUN | control_diag_debug | | fv3 | -RUN | control_debug_p8 | | fv3 | - -RUN | control_thompson_debug | | fv3 | -RUN | control_thompson_no_aero_debug | | fv3 | -RUN | control_thompson_extdiag_debug | | fv3 | -RUN | control_thompson_progcld_thompson_debug | | fv3 | - -RUN | regional_debug | | fv3 | - -COMPILE | -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_RAP,FV3_RAP_cires_ugwp,FV3_RAP_unified_ugwp,FV3_RAP_flake -D32BIT=ON | | fv3 | - -RUN | rap_control_debug | | fv3 | -RUN | rap_unified_drag_suite_debug | | | -RUN | rap_diag_debug | | fv3 | -RUN | rap_cires_ugwp_debug | | fv3 | -RUN | rap_unified_ugwp_debug | | | -RUN | rap_lndp_debug | | fv3 | -RUN | rap_flake_debug | | fv3 | -RUN | rap_progcld_thompson_debug | | fv3 | - -COMPILE | -DAPP=ATM -DDEBUG=ON -DCCPP_SUITES=FV3_RAP_noah,FV3_RAP_RRTMGP,FV3_RAP_sfcdiff,FV3_RAP_noah_sfcdiff_cires_ugwp,FV3_RRFS_v1beta -D32BIT=ON | | fv3 | -RUN | rap_noah_debug | | fv3 | -RUN | rap_rrtmgp_debug | | fv3 | -RUN | rap_sfcdiff_debug | | fv3 | -RUN | rap_noah_sfcdiff_cires_ugwp_debug | | fv3 | -RUN | rrfs_v1beta_debug | | fv3 | - -COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_fv3wam -D32BIT=ON -DMULTI_GASES=ON -DDEBUG=ON | | fv3 | -RUN | control_wam_debug | | fv3 | - -################################################################################################################################################################################### -# HAFS tests # -################################################################################################################################################################################### -# -COMPILE | -DAPP=HAFSW -DMOVING_NEST=ON -DCCPP_SUITES=FV3_HAFS_v0_gfdlmp_tedmf,FV3_HAFS_v0_gfdlmp_tedmf_nonsst,FV3_HAFS_v0_thompson_tedmf_gfdlsf -D32BIT=ON | - wcoss2 | fv3 | -RUN | hafs_regional_atm | - wcoss2 | fv3 | -RUN | hafs_regional_atm_thompson_gfdlsf | - wcoss2 | fv3 | -RUN | hafs_regional_atm_ocn | - wcoss2 | fv3 | -RUN | hafs_regional_atm_wav | - wcoss2 | fv3 | -RUN | hafs_regional_atm_ocn_wav | - wcoss2 | fv3 | -RUN | hafs_regional_1nest_atm | - jet.intel wcoss2 | fv3 | -RUN | hafs_regional_telescopic_2nests_atm | - jet.intel wcoss2 | fv3 | -RUN | hafs_global_1nest_atm | - jet.intel wcoss2 | fv3 | -RUN | hafs_global_multiple_4nests_atm | - jet.intel wcoss_cray wcoss2 | fv3 | -RUN | hafs_regional_specified_moving_1nest_atm | - jet.intel wcoss2 | fv3 | -RUN | hafs_regional_storm_following_1nest_atm | - jet.intel wcoss2 | fv3 | -RUN | hafs_regional_storm_following_1nest_atm_ocn | - jet.intel wcoss2 | fv3 | -RUN | hafs_regional_storm_following_1nest_atm_ocn_wav | - jet.intel wcoss2 | fv3 | -RUN | hafs_global_storm_following_1nest_atm | - jet.intel wcoss2 | fv3 | - -COMPILE | -DAPP=HAFS-ALL -DCCPP_SUITES=FV3_HAFS_v0_gfdlmp_tedmf,FV3_HAFS_v0_gfdlmp_tedmf_nonsst -D32BIT=ON | - wcoss_cray wcoss2 | fv3 | -RUN | hafs_regional_docn | - wcoss_cray wcoss2 | fv3 | -RUN | hafs_regional_docn_oisst | - wcoss_cray wcoss2 | fv3 | -RUN | hafs_regional_datm_cdeps | - wcoss_cray wcoss2 | fv3 | - -################################################################################################################################################################################### -# CDEPS Data Atmosphere tests # -################################################################################################################################################################################### - -COMPILE | -DAPP=NG-GODAS | - wcoss_cray | fv3 | -RUN | datm_cdeps_control_cfsr | - wcoss_cray | fv3 | -RUN | datm_cdeps_restart_cfsr | - wcoss_cray | | datm_cdeps_control_cfsr -RUN | datm_cdeps_control_gefs | - wcoss_cray | fv3 | -RUN | datm_cdeps_iau_gefs | - wcoss_cray | fv3 | -RUN | datm_cdeps_stochy_gefs | - wcoss_cray | fv3 | - -RUN | datm_cdeps_bulk_cfsr | - wcoss_cray | fv3 | -RUN | datm_cdeps_bulk_gefs | - wcoss_cray | fv3 | - -RUN | datm_cdeps_mx025_cfsr | - wcoss_cray | fv3 | -RUN | datm_cdeps_mx025_gefs | - wcoss_cray | fv3 | - -RUN | datm_cdeps_multiple_files_cfsr | - wcoss_cray | | -RUN | datm_cdeps_3072x1536_cfsr | - wcoss_cray | fv3 | -RUN | datm_cdeps_gfs | - wcoss_cray | fv3 | - -COMPILE | -DAPP=NG-GODAS -DDEBUG=ON | - wcoss_cray | fv3 | -RUN | datm_cdeps_debug_cfsr | - wcoss_cray | fv3 | - -################################################################################################################################################################################### -# ATM-WAV tests # -################################################################################################################################################################################### - -COMPILE | -DAPP=ATMW -DCCPP_SUITES=FV3_GFS_v16 -D32BIT=ON | - wcoss_cray wcoss2 | fv3 | -RUN | control_atmwav | - wcoss_cray wcoss2 | fv3 | -RUN | control_c384gdas_wav | - wcoss_cray jet.intel cheyenne.intel wcoss2 | fv3 | - -################################################################################################################################################################################### -# ATM-GOCART tests # -################################################################################################################################################################################### - -COMPILE | -DAPP=ATMAERO -DCCPP_SUITES=FV3_GFS_v16 | + hera.intel | fv3 | -RUN | control_atm_aerosols | + hera.intel | fv3 | diff --git a/tests/rt_384.conf b/tests/rt_384.conf deleted file mode 100644 index 5f0f963516..0000000000 --- a/tests/rt_384.conf +++ /dev/null @@ -1,7 +0,0 @@ -################################################################################################################################################################################### -# S2S tests # -################################################################################################################################################################################### - -COMPILE | -DAPP=S2SWA -DCCPP_SUITES=FV3_GFS_v16_coupled_nsstNoahmpUGWPv1,FV3_GFS_v17_coupled_p8 | | fv3 | -RUN | cpld_control_c384_p8 | | fv3 | - diff --git a/tests/rt_lisa.sh b/tests/rt_lisa.sh deleted file mode 100755 index 57cf645229..0000000000 --- a/tests/rt_lisa.sh +++ /dev/null @@ -1,898 +0,0 @@ -#!/bin/bash -set -eux - -SECONDS=0 - -hostname - -die() { echo "$@" >&2; exit 1; } -usage() { - set +x - echo - echo "Usage: $0 -c | -e | -h | -k | -w | -d | -l | -m | -n | -r " - echo - echo " -c create new baseline results" - echo " -e use ecFlow workflow manager" - echo " -h display this help" - echo " -k keep run directory after rt.sh is completed" - echo " -l runs test specified in " - echo " -m compare against new baseline results" - echo " -n run single test " - echo " -r use Rocoto workflow manager" - echo " -w for weekly_test, skip comparing baseline results" - echo " -d delete run direcotries that are not used by other tests" - echo - set -x - exit 1 -} - -[[ $# -eq 0 ]] && usage - -rt_single() { - local compile_line='' - local run_line='' - while read -r line || [ "$line" ]; do - line="${line#"${line%%[![:space:]]*}"}" - [[ ${#line} == 0 ]] && continue - [[ $line == \#* ]] && continue - - if [[ $line == COMPILE* ]] ; then - MACHINES=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') - if [[ ${MACHINES} == '' ]]; then - compile_line=$line - elif [[ ${MACHINES} == -* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] || compile_line=$line - elif [[ ${MACHINES} == +* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] && compile_line=$line - fi - fi - - if [[ $line =~ RUN ]]; then - tmp_test=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') - if [[ $SINGLE_NAME == $tmp_test && $compile_line != '' ]]; then - echo $compile_line >$TESTS_FILE - dep_test=$(echo $line | grep -w $tmp_test | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//') - if [[ $dep_test != '' ]]; then - dep_line=$(cat rt.conf | grep -w "$dep_test" | grep -v "$tmp_test") - dep_line="${dep_line#"${dep_line%%[![:space:]]*}"}" - echo $dep_line >>$TESTS_FILE - fi - echo $line >>$TESTS_FILE - break - fi - fi - done <'rt.conf' - - if [[ ! -f $TESTS_FILE ]]; then - echo "$SINGLE_NAME does not exist or cannot be run on $MACHINE_ID" - exit 1 - fi -} - -rt_35d() { -if [[ $TEST_NAME =~ '35d' ]] ; then - local sy=$(echo ${DATE_35D} | cut -c 1-4) - local sm=$(echo ${DATE_35D} | cut -c 5-6) - local new_test_name="tests/${TEST_NAME}_${DATE_35D}" - rm -f $new_test_name - cp tests/$TEST_NAME $new_test_name - - sed -i -e "s/\(export SYEAR\)/\1=\"$sy\"/" $new_test_name - sed -i -e "s/\(export SMONTH\)/\1=\"$sm\"/" $new_test_name - - TEST_NAME=${new_test_name#tests/} -fi -} - -rt_trap() { - [[ ${ROCOTO:-false} == true ]] && rocoto_kill - [[ ${ECFLOW:-false} == true ]] && ecflow_kill - cleanup -} - -cleanup() { - rm -rf ${LOCKDIR} - [[ ${ECFLOW:-false} == true ]] && ecflow_stop - trap 0 - exit -} - -trap '{ echo "rt.sh interrupted"; rt_trap ; }' INT -trap '{ echo "rt.sh quit"; rt_trap ; }' QUIT -trap '{ echo "rt.sh terminated"; rt_trap ; }' TERM -trap '{ echo "rt.sh error on line $LINENO"; cleanup ; }' ERR -trap '{ echo "rt.sh finished"; cleanup ; }' EXIT - -# PATHRT - Path to regression tests directory -readonly PATHRT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P )" -cd ${PATHRT} - -# PATHTR - Path to nmmb trunk directory -readonly PATHTR=$( cd ${PATHRT}/.. && pwd ) - -# make sure only one instance of rt.sh is running -readonly LOCKDIR="${PATHRT}"/lock -if mkdir "${LOCKDIR}" ; then - echo $(hostname) $$ > "${LOCKDIR}/PID" -else - echo "Only one instance of rt.sh can be running at a time" - exit 1 -fi - -# Default compiler "intel" -export RT_COMPILER=${RT_COMPILER:-intel} - -source detect_machine.sh # Note: this does not set ACCNR. The "if" block below does. -source rt_utils.sh - -source module-setup.sh - -if [[ $MACHINE_ID = wcoss_cray ]]; then - - module load xt-lsfhpc - - module use /usrx/local/emc_rocoto/modulefiles - module load rocoto/1.3.0rc2 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=lsfcray - - module use /gpfs/hps/nco/ops/nwtest/modulefiles - module load ecflow/intel/4.17.0.1 - ECFLOW_START=${ECF_ROOT}/bin/ecflow_start.sh - ECF_PORT=$(grep $USER /usrx/local/sys/ecflow/assigned_ports.txt | awk '{print $2}') - module load python/3.6.3 - - DISKNM=/gpfs/hps3/emc/nems/noscrub/emc.nemspara/RT - QUEUE=debug - COMPILE_QUEUE=dev - PARTITION= - ACCNR="${ACCNR:-GFS-DEV}" - if [[ -d /gpfs/hps3/ptmp ]] ; then - STMP=/gpfs/hps3/stmp - PTMP=/gpfs/hps3/stmp - else - STMP=/gpfs/hps3/stmp - PTMP=/gpfs/hps3/ptmp - fi - SCHEDULER=lsf - cp fv3_conf/fv3_bsub.IN_wcoss_cray fv3_conf/fv3_bsub.IN - cp fv3_conf/compile_bsub.IN_wcoss_cray fv3_conf/compile_bsub.IN - -elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then - - module load lsf/10.1 - module load python/3.6.3 - - module use /usrx/local/dev/emc_rocoto/modulefiles - module load ruby/2.5.1 rocoto/1.3.0rc2 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=lsf - - module load ips/18.0.1.163 - module load ecflow/4.17.0 - ECFLOW_START=${ECF_ROOT}/bin/ecflow_start.sh - ECF_PORT=$(grep $USER /usrx/local/sys/ecflow/assigned_ports.txt | awk '{print $2}') - - DISKNM=/gpfs/dell2/emc/modeling/noscrub/emc.nemspara/RT - QUEUE=debug - COMPILE_QUEUE=dev_transfer - PARTITION= - ACCNR="${ACCNR:-GFS-DEV}" - STMP=/gpfs/dell2/stmp - PTMP=/gpfs/dell2/ptmp - SCHEDULER=lsf - cp fv3_conf/fv3_bsub.IN_wcoss_dell_p3 fv3_conf/fv3_bsub.IN - cp fv3_conf/compile_bsub.IN_wcoss_dell_p3 fv3_conf/compile_bsub.IN - -elif [[ $MACHINE_ID = wcoss2 ]]; then - - #module use /usrx/local/dev/emc_rocoto/modulefiles - #module load ruby/2.5.1 rocoto/1.3.0rc2 - #ROCOTORUN=$(which rocotorun) - #ROCOTOSTAT=$(which rocotostat) - #ROCOTOCOMPLETE=$(which rocotocomplete) - #ROCOTO_SCHEDULER=lsf - - module load ecflow/5.6.0.6 - module load gcc/10.3.0 python/3.8.6 - ECFLOW_START=${ECF_ROOT}/scripts/server_check.sh - export ECF_OUTPUTDIR=${PATHRT}/ecf_outputdir - export ECF_COMDIR=${PATHRT}/ecf_comdir - rm -rf ${ECF_OUTPUTDIR} ${ECF_COMDIR} - mkdir -p ${ECF_OUTPUTDIR} - mkdir -p ${ECF_COMDIR} - export colonifnco=":output" # hack - - DISKNM=/lfs/h1/emc/eib/noscrub/Dusan.Jovic - QUEUE=dev - COMPILE_QUEUE=dev - PARTITION= - ACCNR="${ACCNR:-GFS-DEV}" - STMP=/lfs/h1/emc/ptmp - PTMP=/lfs/h1/emc/ptmp - SCHEDULER=pbs - cp fv3_conf/fv3_qsub.IN_wcoss2 fv3_conf/fv3_qsub.IN - cp fv3_conf/compile_qsub.IN_wcoss2 fv3_conf/compile_qsub.IN - -elif [[ $MACHINE_ID = gaea.* ]]; then - - export PATH=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/bin:$PATH - export PYTHONPATH=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/lib/python3.8/site-packages - ECFLOW_START=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/bin/ecflow_start.sh - ECF_PORT=$(( $(id -u) + 1500 )) - - DISKNM=/lustre/f2/pdata/ncep_shared/emc.nemspara/RT - QUEUE=normal - COMPILE_QUEUE=normal -# ACCNR="${ACCNR:-cmp}" - PARTITION=c4 - STMP=/lustre/f2/scratch - PTMP=/lustre/f2/scratch - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_gaea fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_gaea fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = hera.* ]]; then - - module load rocoto - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=slurm - - PYTHONHOME=/scratch1/NCEPDEV/nems/emc.nemspara/soft/miniconda3_new_20210629 - export PATH=$PYTHONHOME/bin:$PATH - export PYTHONPATH=$PYTHONHOME/lib/python3.7/site-packages - - module load ecflow - ECFLOW_START=ecflow_start.sh - - QUEUE=batch - COMPILE_QUEUE=batch - - ACCNR=ome - PARTITION= - dprefix=/scratch1/NCEPDEV - DISKNM=$dprefix/nems/emc.nemspara/RT - STMP=/scratch2/BMC/rem/Lisa.Bengtsson/stmp4 - PTMP=/scratch2/BMC/rem/Lisa.Bengtsson/stmp2 - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_hera fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_hera fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = orion.* ]]; then - - module load gcc/8.3.0 - - module load contrib rocoto/1.3.1 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - export PATH=/work/noaa/nems/emc.nemspara/soft/miniconda3/bin:$PATH - export PYTHONPATH=/work/noaa/nems/emc.nemspara/soft/miniconda3/lib/python3.8/site-packages - ECFLOW_START=/work/noaa/nems/emc.nemspara/soft/miniconda3/bin/ecflow_start.sh - ECF_PORT=$(( $(id -u) + 1500 )) - - QUEUE=batch - COMPILE_QUEUE=batch - PARTITION=orion - dprefix=/work/noaa/stmp/${USER} - DISKNM=/work/noaa/nems/emc.nemspara/RT - STMP=$dprefix/stmp - PTMP=$dprefix/stmp - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_orion fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_orion fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = jet.* ]]; then - - module load rocoto/1.3.2 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=slurm - - export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH - export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages - module load ecflow - ECFLOW_START=/apps/ecflow/5.5.3/bin/ecflow_start.sh - - QUEUE=batch - COMPILE_QUEUE=batch - ACCNR="${ACCNR:-h-nems}" - PARTITION=xjet - DISKNM=/lfs4/HFIP/h-nems/emc.nemspara/RT - dprefix=${dprefix:-/lfs4/HFIP/$ACCNR/$USER} - STMP=${STMP:-$dprefix/RT_BASELINE} - PTMP=${PTMP:-$dprefix/RT_RUNDIRS} - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_jet fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_jet fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = s4.* ]]; then - - module load rocoto/1.3.2 - module load ecflow/5.6.0 - module load miniconda/3.8-s4 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=slurm - - ECFLOW_START=/opt/ecflow/5.6.0/bin/ecflow_start.sh - ECF_PORT=$(( $(id -u) + 1500 )) - - QUEUE=s4 - COMPILE_QUEUE=s4 - - ACCNR="${ACCNR:-star}" - PARTITION=s4 - dprefix=/data/users/dhuber/save - DISKNM=$dprefix/nems/emc.nemspara/RT - STMP=/scratch/short/users - PTMP=/scratch/users - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_s4 fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_s4 fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = cheyenne.* ]]; then - - export PATH=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/bin:/glade/p/ral/jntp/tools/miniconda3/4.8.3/bin:$PATH - export PYTHONPATH=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/glade/p/ral/jntp/tools/miniconda3/4.8.3/lib/python3.8/site-packages - ECFLOW_START=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/bin/ecflow_start.sh - ECF_PORT=$(( $(id -u) + 1500 )) - - QUEUE=regular - COMPILE_QUEUE=regular - PARTITION= - dprefix=/glade/scratch - DISKNM=/glade/scratch/epicufsrt/GMTB/ufs-weather-model/RT - STMP=$dprefix - PTMP=$dprefix - SCHEDULER=pbs - cp fv3_conf/fv3_qsub.IN_cheyenne fv3_conf/fv3_qsub.IN - cp fv3_conf/compile_qsub.IN_cheyenne fv3_conf/compile_qsub.IN - -elif [[ $MACHINE_ID = stampede.* ]]; then - - export PYTHONPATH= - ECFLOW_START= - QUEUE=skx-normal - COMPILE_QUEUE=skx-dev - PARTITION= - ACCNR="${ACCNR:-TG-EES200015}" - dprefix=$SCRATCH/ufs-weather-model/run - DISKNM=/work2/07736/minsukji/stampede2/ufs-weather-model/RT - STMP=$dprefix - PTMP=$dprefix - SCHEDULER=slurm - MPIEXEC=ibrun - MPIEXECOPTS= - cp fv3_conf/fv3_slurm.IN_stampede fv3_conf/fv3_slurm.IN - -elif [[ $MACHINE_ID = expanse.* ]]; then - - export PYTHONPATH= - ECFLOW_START= - QUEUE=compute - COMPILE_QUEUE=shared - PARTITION= - ACCNR="${ACCNR:-TG-EES200015}" - dprefix=/expanse/lustre/scratch/$USER/temp_project/run - DISKNM=/expanse/lustre/scratch/domh/temp_project/RT - STMP=$dprefix - PTMP=$dprefix - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_expanse fv3_conf/fv3_slurm.IN - -else - die "Unknown machine ID, please edit detect_machine.sh file" -fi - -# If account is unspecified, assume the machine has a "nems" -# accounting code. -export ACCNR="${ACCNR:-nems}" - -# Display the machine and account using the format detect_machine.sh used: -echo "Machine: " $MACHINE_ID " Account: " $ACCNR - -mkdir -p ${STMP}/${USER} - -# Different own baseline directories for different compilers on Theia/Cheyenne -NEW_BASELINE=${STMP}/${USER}/FV3_RT/REGRESSION_TEST -if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]] || [[ $MACHINE_ID = s4.* ]] ; then - NEW_BASELINE=${NEW_BASELINE}_${RT_COMPILER^^} -fi - -# Overwrite default RUNDIR_ROOT if environment variable RUNDIR_ROOT is set -RUNDIR_ROOT=${RUNDIR_ROOT:-${PTMP}/${USER}/FV3_RT}/rt_$$ -mkdir -p ${RUNDIR_ROOT} - -CREATE_BASELINE=false -ROCOTO=false -ECFLOW=false -KEEP_RUNDIR=false -SINGLE_NAME='' -TEST_35D=false -export skip_check_results=false -export delete_rundir=false - -TESTS_FILE='rt.conf' - -while getopts ":cl:mn:dwkreh" opt; do - case $opt in - c) - CREATE_BASELINE=true - ;; - l) - TESTS_FILE=$OPTARG - ;; - m) - # redefine RTPWD to point to newly created baseline outputs - RTPWD=${NEW_BASELINE} - ;; - n) - SINGLE_NAME=$OPTARG - TESTS_FILE='rt.conf.single' - rm -f $TESTS_FILE - ;; - d) - export delete_rundir=true - awk -F "|" '{print $5}' rt.conf | grep "\S" > keep_tests.tmp - ;; - w) - export skip_check_results=true - ;; - k) - KEEP_RUNDIR=true - ;; - r) - ROCOTO=true - ECFLOW=false - ;; - e) - ECFLOW=true - ROCOTO=false - ;; - h) - usage - ;; - \?) - usage - die "Invalid option: -$OPTARG" - ;; - :) - usage - die "Option -$OPTARG requires an argument." - ;; - esac -done - -if [[ $SINGLE_NAME != '' ]]; then - rt_single -fi - -if [[ $TESTS_FILE =~ '35d' ]] || [[ $TESTS_FILE =~ 'weekly' ]]; then - TEST_35D=true -fi - -BL_DATE=20220408 -if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]] || [[ $MACHINE_ID = s4.* ]]; then - RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}/${RT_COMPILER^^}} -else - RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}} -fi - -INPUTDATA_ROOT=${INPUTDATA_ROOT:-$DISKNM/NEMSfv3gfs/input-data-20211210} -INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT}/WW3_input_data_20211113 -INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC:-$DISKNM/NEMSfv3gfs/BM_IC-20220207} - -shift $((OPTIND-1)) -[[ $# -gt 1 ]] && usage - -if [[ $CREATE_BASELINE == true ]]; then - # - # prepare new regression test directory - # - rm -rf "${NEW_BASELINE}" - mkdir -p "${NEW_BASELINE}" -fi - -if [[ $skip_check_results == true ]]; then - REGRESSIONTEST_LOG=${PATHRT}/RegressionTests_weekly_$MACHINE_ID.log -else - REGRESSIONTEST_LOG=${PATHRT}/RegressionTests_$MACHINE_ID.log -fi - -date > ${REGRESSIONTEST_LOG} -echo "Start Regression test" >> ${REGRESSIONTEST_LOG} -echo >> ${REGRESSIONTEST_LOG} - -source default_vars.sh - -JOB_NR=0 -TEST_NR=0 -COMPILE_NR=0 -rm -f fail_test* fail_compile* - -export LOG_DIR=${PATHRT}/log_$MACHINE_ID -rm -rf ${LOG_DIR} -mkdir ${LOG_DIR} - -if [[ $ROCOTO == true ]]; then - - ROCOTO_XML=${PATHRT}/rocoto_workflow.xml - ROCOTO_DB=${PATHRT}/rocoto_workflow.db - - rm -f $ROCOTO_XML $ROCOTO_DB *_lock.db - - if [[ $MACHINE_ID = wcoss ]]; then - QUEUE=dev - COMPILE_QUEUE=dev - ROCOTO_SCHEDULER=lsf - elif [[ $MACHINE_ID = wcoss_cray ]]; then - QUEUE=dev - COMPILE_QUEUE=dev - ROCOTO_SCHEDULER=lsfcray - elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then - QUEUE=dev - COMPILE_QUEUE=dev_transfer - ROCOTO_SCHEDULER=lsf - elif [[ $MACHINE_ID = wcoss2 ]]; then - QUEUE=dev - COMPILE_QUEUE=dev - ROCOTO_SCHEDULER=pbs - elif [[ $MACHINE_ID = hera.* ]]; then - QUEUE=batch - COMPILE_QUEUE=batch - ROCOTO_SCHEDULER=slurm - elif [[ $MACHINE_ID = orion.* ]]; then - QUEUE=batch - COMPILE_QUEUE=batch - ROCOTO_SCHEDULER=slurm - elif [[ $MACHINE_ID = s4.* ]]; then - QUEUE=s4 - COMPILE_QUEUE=s4 - ROCOTO_SCHEDULER=slurm - elif [[ $MACHINE_ID = jet.* ]]; then - QUEUE=batch - COMPILE_QUEUE=batch - ROCOTO_SCHEDULER=slurm - else - die "Rocoto is not supported on this machine $MACHINE_ID" - fi - - cat << EOF > $ROCOTO_XML - - - - - - - - - - -]> - - 197001010000 197001010000 01:00:00 - &LOG;/workflow.log -EOF - -fi - -if [[ $ECFLOW == true ]]; then - - # Default maximum number of compile and run jobs - MAX_BUILDS=10 - MAX_JOBS=30 - - # Default number of tries to run jobs - on wcoss, no error tolerance - ECF_TRIES=2 - if [[ $MACHINE_ID = wcoss* ]]; then - ECF_TRIES=1 - fi - - # Reduce maximum number of compile jobs on jet.intel and s4.intel because of licensing issues - if [[ $MACHINE_ID = jet.intel ]]; then - MAX_BUILDS=5 - elif [[ $MACHINE_ID = s4.intel ]]; then - MAX_BUILDS=1 - fi - - if [[ $MACHINE_ID = hera.* ]] && [[ ! $HOSTNAME = hecflow* ]]; then - echo "ERROR: To use ECFlow on Hera we must be logged into 'hecflow01' login node." - exit 1 - fi - - ECFLOW_RUN=${PATHRT}/ecflow_run - ECFLOW_SUITE=regtest_$$ - rm -rf ${ECFLOW_RUN} - mkdir -p ${ECFLOW_RUN}/${ECFLOW_SUITE} - cp head.h tail.h ${ECFLOW_RUN} - cat << EOF > ${ECFLOW_RUN}/${ECFLOW_SUITE}.def -suite ${ECFLOW_SUITE} - edit ECF_HOME '${ECFLOW_RUN}' - edit ECF_INCLUDE '${ECFLOW_RUN}' - edit ECF_KILL_CMD kill -15 %ECF_RID% > %ECF_JOB%.kill 2>&1 - edit ECF_TRIES ${ECF_TRIES} - label src_dir '${PATHTR}' - label run_dir '${RUNDIR_ROOT}' - limit max_builds ${MAX_BUILDS} - limit max_jobs ${MAX_JOBS} -EOF - - if [[ $MACHINE_ID = wcoss ]]; then - QUEUE=dev - elif [[ $MACHINE_ID = wcoss_cray ]]; then - QUEUE=dev - elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then - QUEUE=dev - elif [[ $MACHINE_ID = wcoss2 ]]; then - QUEUE=dev - elif [[ $MACHINE_ID = hera.* ]]; then - QUEUE=batch - elif [[ $MACHINE_ID = orion.* ]]; then - QUEUE=batch - elif [[ $MACHINE_ID = jet.* ]]; then - QUEUE=batch - elif [[ $MACHINE_ID = s4.* ]]; then - QUEUE=s4 - elif [[ $MACHINE_ID = gaea.* ]]; then - QUEUE=normal - elif [[ $MACHINE_ID = cheyenne.* ]]; then - QUEUE=regular - else - die "ecFlow is not supported on this machine $MACHINE_ID" - fi - -else - - if [[ $MACHINE_ID = hera.* ]] && [[ $HOSTNAME = hecflow* ]]; then - echo "ERROR: To run without using ECFlow on Hera, please do not use ecflow node." - exit 1 - fi - -fi - -## -## read rt.conf and then either execute the test script directly or create -## workflow description file -## - -new_compile=false -in_metatask=false - -[[ -f $TESTS_FILE ]] || die "$TESTS_FILE does not exist" - -while read -r line || [ "$line" ]; do - - line="${line#"${line%%[![:space:]]*}"}" - [[ ${#line} == 0 ]] && continue - [[ $line == \#* ]] && continue - - JOB_NR=$( printf '%03d' $(( 10#$JOB_NR + 1 )) ) - - if [[ $line == COMPILE* ]] ; then - - MAKE_OPT=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') - MACHINES=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') - CB=$( echo $line | cut -d'|' -f4) - - [[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue - - if [[ ${MACHINES} != '' ]]; then - if [[ ${MACHINES} == -* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue - elif [[ ${MACHINES} == +* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue - else - echo "MACHINES=|${MACHINES}|" - die "MACHINES spec must be either an empty string or start with either '+' or '-'" - fi - fi - - export COMPILE_NR=$( printf '%03d' $(( 10#$COMPILE_NR + 1 )) ) - - cat << EOF > ${RUNDIR_ROOT}/compile_${COMPILE_NR}.env - export JOB_NR=${JOB_NR} - export COMPILE_NR=${COMPILE_NR} - export MACHINE_ID=${MACHINE_ID} - export RT_COMPILER=${RT_COMPILER} - export PATHRT=${PATHRT} - export PATHTR=${PATHTR} - export SCHEDULER=${SCHEDULER} - export ACCNR=${ACCNR} - export QUEUE=${COMPILE_QUEUE} - export PARTITION=${PARTITION} - export ROCOTO=${ROCOTO} - export ECFLOW=${ECFLOW} - export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG} - export LOG_DIR=${LOG_DIR} -EOF - - if [[ $ROCOTO == true ]]; then - rocoto_create_compile_task - elif [[ $ECFLOW == true ]]; then - ecflow_create_compile_task - else - ./run_compile.sh ${PATHRT} ${RUNDIR_ROOT} "${MAKE_OPT}" ${COMPILE_NR} > ${LOG_DIR}/compile_${COMPILE_NR}.log 2>&1 - fi - - # Set RT_SUFFIX (regression test run directories and log files) and BL_SUFFIX - # (regression test baseline directories) for REPRO or PROD runs - if [[ ${MAKE_OPT^^} =~ "-DREPRO=ON" ]]; then - RT_SUFFIX="_repro" - BL_SUFFIX="_repro" - else - RT_SUFFIX="" - BL_SUFFIX="" - fi - - continue - - elif [[ $line == RUN* ]] ; then - - TEST_NAME=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') - MACHINES=$( echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') - CB=$( echo $line | cut -d'|' -f4) - DEP_RUN=$( echo $line | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//') - DATE_35D=$( echo $line | cut -d'|' -f6 | sed -e 's/^ *//' -e 's/ *$//') - - [[ -e "tests/$TEST_NAME" ]] || die "run test file tests/$TEST_NAME does not exist" - [[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue - - if [[ ${MACHINES} != '' ]]; then - if [[ ${MACHINES} == -* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue - elif [[ ${MACHINES} == +* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue - else - echo "MACHINES=|${MACHINES}|" - die "MACHINES spec must be either an empty string or start with either '+' or '-'" - fi - fi - - # 35 day tests - [[ $TEST_35D == true ]] && rt_35d - - # Avoid uninitialized RT_SUFFIX/BL_SUFFIX (see definition above) - RT_SUFFIX=${RT_SUFFIX:-""} - BL_SUFFIX=${BL_SUFFIX:-""} - - if [[ $ROCOTO == true && $new_compile == true ]]; then - new_compile=false - in_metatask=true - cat << EOF >> $ROCOTO_XML - 0 -EOF - fi - - TEST_NR=$( printf '%03d' $(( 10#$TEST_NR + 1 )) ) - - ( - source ${PATHRT}/tests/$TEST_NAME - - NODES=$(( TASKS / TPN )) - if (( NODES * TPN < TASKS )); then - NODES=$(( NODES + 1 )) - fi - - cat << EOF > ${RUNDIR_ROOT}/run_test_${TEST_NR}.env - export JOB_NR=${JOB_NR} - export MACHINE_ID=${MACHINE_ID} - export RT_COMPILER=${RT_COMPILER} - export RTPWD=${RTPWD} - export INPUTDATA_ROOT=${INPUTDATA_ROOT} - export INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT_WW3} - export INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC} - export PATHRT=${PATHRT} - export PATHTR=${PATHTR} - export NEW_BASELINE=${NEW_BASELINE} - export CREATE_BASELINE=${CREATE_BASELINE} - export RT_SUFFIX=${RT_SUFFIX} - export BL_SUFFIX=${BL_SUFFIX} - export SCHEDULER=${SCHEDULER} - export ACCNR=${ACCNR} - export QUEUE=${QUEUE} - export PARTITION=${PARTITION} - export ROCOTO=${ROCOTO} - export ECFLOW=${ECFLOW} - export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG} - export LOG_DIR=${LOG_DIR} - export DEP_RUN=${DEP_RUN} - export skip_check_results=${skip_check_results} - export delete_rundir=${delete_rundir} -EOF - if [[ $MACHINE_ID = jet.* ]]; then - cat << EOF >> ${RUNDIR_ROOT}/run_test_${TEST_NR}.env - export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH - export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages -EOF - fi - - if [[ $ROCOTO == true ]]; then - rocoto_create_run_task - elif [[ $ECFLOW == true ]]; then - ecflow_create_run_task - else - ./run_test.sh ${PATHRT} ${RUNDIR_ROOT} ${TEST_NAME} ${TEST_NR} ${COMPILE_NR} > ${LOG_DIR}/run_${TEST_NAME}${RT_SUFFIX}.log 2>&1 - fi - ) - - continue - else - die "Unknown command $line" - fi -done < $TESTS_FILE - -## -## run regression test workflow (currently Rocoto or ecFlow are supported) -## - -if [[ $ROCOTO == true ]]; then - if [[ $in_metatask == true ]]; then - echo " " >> $ROCOTO_XML - fi - echo "" >> $ROCOTO_XML - # run rocoto workflow until done - rocoto_run -fi - -if [[ $ECFLOW == true ]]; then - echo "endsuite" >> ${ECFLOW_RUN}/${ECFLOW_SUITE}.def - # run ecflow workflow until done - ecflow_run -fi - -## -## regression test is either failed or successful -## -set +e -cat ${LOG_DIR}/compile_*_time.log >> ${REGRESSIONTEST_LOG} -cat ${LOG_DIR}/rt_*.log >> ${REGRESSIONTEST_LOG} - -FILES="fail_test_* fail_compile_*" -for f in $FILES; do - if [[ -f "$f" ]]; then - cat "$f" >> fail_test - fi -done - -if [[ -e fail_test ]]; then - echo "FAILED TESTS: " - echo "FAILED TESTS: " >> ${REGRESSIONTEST_LOG} - while read -r failed_test_name - do - echo "Test ${failed_test_name} failed " - echo "Test ${failed_test_name} failed " >> ${REGRESSIONTEST_LOG} - done < fail_test - echo ; echo REGRESSION TEST FAILED - (echo ; echo REGRESSION TEST FAILED) >> ${REGRESSIONTEST_LOG} -else - echo ; echo REGRESSION TEST WAS SUCCESSFUL - (echo ; echo REGRESSION TEST WAS SUCCESSFUL) >> ${REGRESSIONTEST_LOG} - - rm -f fv3_*.x fv3_*.exe modules.fv3_* keep_tests.tmp - [[ ${KEEP_RUNDIR} == false ]] && rm -rf ${RUNDIR_ROOT} - [[ ${ROCOTO} == true ]] && rm -f ${ROCOTO_XML} ${ROCOTO_DB} *_lock.db - [[ ${TEST_35D} == true ]] && rm -f tests/cpld_bmark*_20* - [[ ${SINGLE_NAME} != '' ]] && rm -f rt.conf.single -fi - -date >> ${REGRESSIONTEST_LOG} - -elapsed_time=$( printf '%02dh:%02dm:%02ds\n' $((SECONDS%86400/3600)) $((SECONDS%3600/60)) $((SECONDS%60)) ) -echo "Elapsed time: ${elapsed_time}. Have a nice day!" >> ${REGRESSIONTEST_LOG} -echo "Elapsed time: ${elapsed_time}. Have a nice day!" diff --git a/tests/rt_orig.sh b/tests/rt_orig.sh deleted file mode 100755 index 22922303bd..0000000000 --- a/tests/rt_orig.sh +++ /dev/null @@ -1,898 +0,0 @@ -#!/bin/bash -set -eux - -SECONDS=0 - -hostname - -die() { echo "$@" >&2; exit 1; } -usage() { - set +x - echo - echo "Usage: $0 -c | -e | -h | -k | -w | -d | -l | -m | -n | -r " - echo - echo " -c create new baseline results" - echo " -e use ecFlow workflow manager" - echo " -h display this help" - echo " -k keep run directory after rt.sh is completed" - echo " -l runs test specified in " - echo " -m compare against new baseline results" - echo " -n run single test " - echo " -r use Rocoto workflow manager" - echo " -w for weekly_test, skip comparing baseline results" - echo " -d delete run direcotries that are not used by other tests" - echo - set -x - exit 1 -} - -[[ $# -eq 0 ]] && usage - -rt_single() { - local compile_line='' - local run_line='' - while read -r line || [ "$line" ]; do - line="${line#"${line%%[![:space:]]*}"}" - [[ ${#line} == 0 ]] && continue - [[ $line == \#* ]] && continue - - if [[ $line == COMPILE* ]] ; then - MACHINES=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') - if [[ ${MACHINES} == '' ]]; then - compile_line=$line - elif [[ ${MACHINES} == -* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] || compile_line=$line - elif [[ ${MACHINES} == +* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] && compile_line=$line - fi - fi - - if [[ $line =~ RUN ]]; then - tmp_test=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') - if [[ $SINGLE_NAME == $tmp_test && $compile_line != '' ]]; then - echo $compile_line >$TESTS_FILE - dep_test=$(echo $line | grep -w $tmp_test | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//') - if [[ $dep_test != '' ]]; then - dep_line=$(cat rt.conf | grep -w "$dep_test" | grep -v "$tmp_test") - dep_line="${dep_line#"${dep_line%%[![:space:]]*}"}" - echo $dep_line >>$TESTS_FILE - fi - echo $line >>$TESTS_FILE - break - fi - fi - done <'rt.conf' - - if [[ ! -f $TESTS_FILE ]]; then - echo "$SINGLE_NAME does not exist or cannot be run on $MACHINE_ID" - exit 1 - fi -} - -rt_35d() { -if [[ $TEST_NAME =~ '35d' ]] ; then - local sy=$(echo ${DATE_35D} | cut -c 1-4) - local sm=$(echo ${DATE_35D} | cut -c 5-6) - local new_test_name="tests/${TEST_NAME}_${DATE_35D}" - rm -f $new_test_name - cp tests/$TEST_NAME $new_test_name - - sed -i -e "s/\(export SYEAR\)/\1=\"$sy\"/" $new_test_name - sed -i -e "s/\(export SMONTH\)/\1=\"$sm\"/" $new_test_name - - TEST_NAME=${new_test_name#tests/} -fi -} - -rt_trap() { - [[ ${ROCOTO:-false} == true ]] && rocoto_kill - [[ ${ECFLOW:-false} == true ]] && ecflow_kill - cleanup -} - -cleanup() { - rm -rf ${LOCKDIR} - [[ ${ECFLOW:-false} == true ]] && ecflow_stop - trap 0 - exit -} - -trap '{ echo "rt.sh interrupted"; rt_trap ; }' INT -trap '{ echo "rt.sh quit"; rt_trap ; }' QUIT -trap '{ echo "rt.sh terminated"; rt_trap ; }' TERM -trap '{ echo "rt.sh error on line $LINENO"; cleanup ; }' ERR -trap '{ echo "rt.sh finished"; cleanup ; }' EXIT - -# PATHRT - Path to regression tests directory -readonly PATHRT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P )" -cd ${PATHRT} - -# PATHTR - Path to nmmb trunk directory -readonly PATHTR=$( cd ${PATHRT}/.. && pwd ) - -# make sure only one instance of rt.sh is running -readonly LOCKDIR="${PATHRT}"/lock -if mkdir "${LOCKDIR}" ; then - echo $(hostname) $$ > "${LOCKDIR}/PID" -else - echo "Only one instance of rt.sh can be running at a time" - exit 1 -fi - -# Default compiler "intel" -export RT_COMPILER=${RT_COMPILER:-intel} - -source detect_machine.sh # Note: this does not set ACCNR. The "if" block below does. -source rt_utils.sh - -source module-setup.sh - -if [[ $MACHINE_ID = wcoss_cray ]]; then - - module load xt-lsfhpc - - module use /usrx/local/emc_rocoto/modulefiles - module load rocoto/1.3.0rc2 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=lsfcray - - module use /gpfs/hps/nco/ops/nwtest/modulefiles - module load ecflow/intel/4.17.0.1 - ECFLOW_START=${ECF_ROOT}/bin/ecflow_start.sh - ECF_PORT=$(grep $USER /usrx/local/sys/ecflow/assigned_ports.txt | awk '{print $2}') - module load python/3.6.3 - - DISKNM=/gpfs/hps3/emc/nems/noscrub/emc.nemspara/RT - QUEUE=debug - COMPILE_QUEUE=dev - PARTITION= - ACCNR="${ACCNR:-GFS-DEV}" - if [[ -d /gpfs/hps3/ptmp ]] ; then - STMP=/gpfs/hps3/stmp - PTMP=/gpfs/hps3/stmp - else - STMP=/gpfs/hps3/stmp - PTMP=/gpfs/hps3/ptmp - fi - SCHEDULER=lsf - cp fv3_conf/fv3_bsub.IN_wcoss_cray fv3_conf/fv3_bsub.IN - cp fv3_conf/compile_bsub.IN_wcoss_cray fv3_conf/compile_bsub.IN - -elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then - - module load lsf/10.1 - module load python/3.6.3 - - module use /usrx/local/dev/emc_rocoto/modulefiles - module load ruby/2.5.1 rocoto/1.3.0rc2 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=lsf - - module load ips/18.0.1.163 - module load ecflow/4.17.0 - ECFLOW_START=${ECF_ROOT}/bin/ecflow_start.sh - ECF_PORT=$(grep $USER /usrx/local/sys/ecflow/assigned_ports.txt | awk '{print $2}') - - DISKNM=/gpfs/dell2/emc/modeling/noscrub/emc.nemspara/RT - QUEUE=debug - COMPILE_QUEUE=dev_transfer - PARTITION= - ACCNR="${ACCNR:-GFS-DEV}" - STMP=/gpfs/dell2/stmp - PTMP=/gpfs/dell2/ptmp - SCHEDULER=lsf - cp fv3_conf/fv3_bsub.IN_wcoss_dell_p3 fv3_conf/fv3_bsub.IN - cp fv3_conf/compile_bsub.IN_wcoss_dell_p3 fv3_conf/compile_bsub.IN - -elif [[ $MACHINE_ID = wcoss2 ]]; then - - #module use /usrx/local/dev/emc_rocoto/modulefiles - #module load ruby/2.5.1 rocoto/1.3.0rc2 - #ROCOTORUN=$(which rocotorun) - #ROCOTOSTAT=$(which rocotostat) - #ROCOTOCOMPLETE=$(which rocotocomplete) - #ROCOTO_SCHEDULER=lsf - - module load ecflow/5.6.0.6 - module load gcc/10.3.0 python/3.8.6 - ECFLOW_START=${ECF_ROOT}/scripts/server_check.sh - export ECF_OUTPUTDIR=${PATHRT}/ecf_outputdir - export ECF_COMDIR=${PATHRT}/ecf_comdir - rm -rf ${ECF_OUTPUTDIR} ${ECF_COMDIR} - mkdir -p ${ECF_OUTPUTDIR} - mkdir -p ${ECF_COMDIR} - export colonifnco=":output" # hack - - DISKNM=/lfs/h1/emc/eib/noscrub/Dusan.Jovic - QUEUE=dev - COMPILE_QUEUE=dev - PARTITION= - ACCNR="${ACCNR:-GFS-DEV}" - STMP=/lfs/h1/emc/ptmp - PTMP=/lfs/h1/emc/ptmp - SCHEDULER=pbs - cp fv3_conf/fv3_qsub.IN_wcoss2 fv3_conf/fv3_qsub.IN - cp fv3_conf/compile_qsub.IN_wcoss2 fv3_conf/compile_qsub.IN - -elif [[ $MACHINE_ID = gaea.* ]]; then - - export PATH=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/bin:$PATH - export PYTHONPATH=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/lib/python3.8/site-packages - ECFLOW_START=/lustre/f2/pdata/esrl/gsd/contrib/miniconda3/4.8.3/envs/ufs-weather-model/bin/ecflow_start.sh - ECF_PORT=$(( $(id -u) + 1500 )) - - DISKNM=/lustre/f2/pdata/ncep_shared/emc.nemspara/RT - QUEUE=normal - COMPILE_QUEUE=normal -# ACCNR="${ACCNR:-cmp}" - PARTITION=c4 - STMP=/lustre/f2/scratch - PTMP=/lustre/f2/scratch - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_gaea fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_gaea fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = hera.* ]]; then - - module load rocoto - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=slurm - - PYTHONHOME=/scratch1/NCEPDEV/nems/emc.nemspara/soft/miniconda3_new_20210629 - export PATH=$PYTHONHOME/bin:$PATH - export PYTHONPATH=$PYTHONHOME/lib/python3.7/site-packages - - module load ecflow - ECFLOW_START=ecflow_start.sh - - QUEUE=batch - COMPILE_QUEUE=batch - - #ACCNR="${ACCNR:-fv3-cpu} - PARTITION= - dprefix=/scratch1/NCEPDEV - DISKNM=$dprefix/nems/emc.nemspara/RT - STMP=$dprefix/stmp4 - PTMP=$dprefix/stmp2 - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_hera fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_hera fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = orion.* ]]; then - - module load gcc/8.3.0 - - module load contrib rocoto/1.3.1 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - export PATH=/work/noaa/nems/emc.nemspara/soft/miniconda3/bin:$PATH - export PYTHONPATH=/work/noaa/nems/emc.nemspara/soft/miniconda3/lib/python3.8/site-packages - ECFLOW_START=/work/noaa/nems/emc.nemspara/soft/miniconda3/bin/ecflow_start.sh - ECF_PORT=$(( $(id -u) + 1500 )) - - QUEUE=batch - COMPILE_QUEUE=batch - PARTITION=orion - dprefix=/work/noaa/stmp/${USER} - DISKNM=/work/noaa/nems/emc.nemspara/RT - STMP=$dprefix/stmp - PTMP=$dprefix/stmp - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_orion fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_orion fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = jet.* ]]; then - - module load rocoto/1.3.2 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=slurm - - export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH - export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages - module load ecflow - ECFLOW_START=/apps/ecflow/5.5.3/bin/ecflow_start.sh - - QUEUE=batch - COMPILE_QUEUE=batch - ACCNR="${ACCNR:-h-nems}" - PARTITION=xjet - DISKNM=/lfs4/HFIP/h-nems/emc.nemspara/RT - dprefix=${dprefix:-/lfs4/HFIP/$ACCNR/$USER} - STMP=${STMP:-$dprefix/RT_BASELINE} - PTMP=${PTMP:-$dprefix/RT_RUNDIRS} - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_jet fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_jet fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = s4.* ]]; then - - module load rocoto/1.3.2 - module load ecflow/5.6.0 - module load miniconda/3.8-s4 - ROCOTORUN=$(which rocotorun) - ROCOTOSTAT=$(which rocotostat) - ROCOTOCOMPLETE=$(which rocotocomplete) - ROCOTO_SCHEDULER=slurm - - ECFLOW_START=/opt/ecflow/5.6.0/bin/ecflow_start.sh - ECF_PORT=$(( $(id -u) + 1500 )) - - QUEUE=s4 - COMPILE_QUEUE=s4 - - ACCNR="${ACCNR:-star}" - PARTITION=s4 - dprefix=/data/users/dhuber/save - DISKNM=$dprefix/nems/emc.nemspara/RT - STMP=/scratch/short/users - PTMP=/scratch/users - - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_s4 fv3_conf/fv3_slurm.IN - cp fv3_conf/compile_slurm.IN_s4 fv3_conf/compile_slurm.IN - -elif [[ $MACHINE_ID = cheyenne.* ]]; then - - export PATH=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/bin:/glade/p/ral/jntp/tools/miniconda3/4.8.3/bin:$PATH - export PYTHONPATH=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/glade/p/ral/jntp/tools/miniconda3/4.8.3/lib/python3.8/site-packages - ECFLOW_START=/glade/p/ral/jntp/tools/miniconda3/4.8.3/envs/ufs-weather-model/bin/ecflow_start.sh - ECF_PORT=$(( $(id -u) + 1500 )) - - QUEUE=regular - COMPILE_QUEUE=regular - PARTITION= - dprefix=/glade/scratch - DISKNM=/glade/scratch/epicufsrt/GMTB/ufs-weather-model/RT - STMP=$dprefix - PTMP=$dprefix - SCHEDULER=pbs - cp fv3_conf/fv3_qsub.IN_cheyenne fv3_conf/fv3_qsub.IN - cp fv3_conf/compile_qsub.IN_cheyenne fv3_conf/compile_qsub.IN - -elif [[ $MACHINE_ID = stampede.* ]]; then - - export PYTHONPATH= - ECFLOW_START= - QUEUE=skx-normal - COMPILE_QUEUE=skx-dev - PARTITION= - ACCNR="${ACCNR:-TG-EES200015}" - dprefix=$SCRATCH/ufs-weather-model/run - DISKNM=/work2/07736/minsukji/stampede2/ufs-weather-model/RT - STMP=$dprefix - PTMP=$dprefix - SCHEDULER=slurm - MPIEXEC=ibrun - MPIEXECOPTS= - cp fv3_conf/fv3_slurm.IN_stampede fv3_conf/fv3_slurm.IN - -elif [[ $MACHINE_ID = expanse.* ]]; then - - export PYTHONPATH= - ECFLOW_START= - QUEUE=compute - COMPILE_QUEUE=shared - PARTITION= - ACCNR="${ACCNR:-TG-EES200015}" - dprefix=/expanse/lustre/scratch/$USER/temp_project/run - DISKNM=/expanse/lustre/scratch/domh/temp_project/RT - STMP=$dprefix - PTMP=$dprefix - SCHEDULER=slurm - cp fv3_conf/fv3_slurm.IN_expanse fv3_conf/fv3_slurm.IN - -else - die "Unknown machine ID, please edit detect_machine.sh file" -fi - -# If account is unspecified, assume the machine has a "nems" -# accounting code. -export ACCNR="${ACCNR:-nems}" - -# Display the machine and account using the format detect_machine.sh used: -echo "Machine: " $MACHINE_ID " Account: " $ACCNR - -mkdir -p ${STMP}/${USER} - -# Different own baseline directories for different compilers on Theia/Cheyenne -NEW_BASELINE=${STMP}/${USER}/FV3_RT/REGRESSION_TEST -if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]] || [[ $MACHINE_ID = s4.* ]] ; then - NEW_BASELINE=${NEW_BASELINE}_${RT_COMPILER^^} -fi - -# Overwrite default RUNDIR_ROOT if environment variable RUNDIR_ROOT is set -RUNDIR_ROOT=${RUNDIR_ROOT:-${PTMP}/${USER}/FV3_RT}/rt_$$ -mkdir -p ${RUNDIR_ROOT} - -CREATE_BASELINE=false -ROCOTO=false -ECFLOW=false -KEEP_RUNDIR=false -SINGLE_NAME='' -TEST_35D=false -export skip_check_results=false -export delete_rundir=false - -TESTS_FILE='rt.conf' - -while getopts ":cl:mn:dwkreh" opt; do - case $opt in - c) - CREATE_BASELINE=true - ;; - l) - TESTS_FILE=$OPTARG - ;; - m) - # redefine RTPWD to point to newly created baseline outputs - RTPWD=${NEW_BASELINE} - ;; - n) - SINGLE_NAME=$OPTARG - TESTS_FILE='rt.conf.single' - rm -f $TESTS_FILE - ;; - d) - export delete_rundir=true - awk -F "|" '{print $5}' rt.conf | grep "\S" > keep_tests.tmp - ;; - w) - export skip_check_results=true - ;; - k) - KEEP_RUNDIR=true - ;; - r) - ROCOTO=true - ECFLOW=false - ;; - e) - ECFLOW=true - ROCOTO=false - ;; - h) - usage - ;; - \?) - usage - die "Invalid option: -$OPTARG" - ;; - :) - usage - die "Option -$OPTARG requires an argument." - ;; - esac -done - -if [[ $SINGLE_NAME != '' ]]; then - rt_single -fi - -if [[ $TESTS_FILE =~ '35d' ]] || [[ $TESTS_FILE =~ 'weekly' ]]; then - TEST_35D=true -fi - -BL_DATE=20220408 -if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]] || [[ $MACHINE_ID = s4.* ]]; then - RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}/${RT_COMPILER^^}} -else - RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}} -fi - -INPUTDATA_ROOT=${INPUTDATA_ROOT:-$DISKNM/NEMSfv3gfs/input-data-20211210} -INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT}/WW3_input_data_20211113 -INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC:-$DISKNM/NEMSfv3gfs/BM_IC-20220207} - -shift $((OPTIND-1)) -[[ $# -gt 1 ]] && usage - -if [[ $CREATE_BASELINE == true ]]; then - # - # prepare new regression test directory - # - rm -rf "${NEW_BASELINE}" - mkdir -p "${NEW_BASELINE}" -fi - -if [[ $skip_check_results == true ]]; then - REGRESSIONTEST_LOG=${PATHRT}/RegressionTests_weekly_$MACHINE_ID.log -else - REGRESSIONTEST_LOG=${PATHRT}/RegressionTests_$MACHINE_ID.log -fi - -date > ${REGRESSIONTEST_LOG} -echo "Start Regression test" >> ${REGRESSIONTEST_LOG} -echo >> ${REGRESSIONTEST_LOG} - -source default_vars.sh - -JOB_NR=0 -TEST_NR=0 -COMPILE_NR=0 -rm -f fail_test* fail_compile* - -export LOG_DIR=${PATHRT}/log_$MACHINE_ID -rm -rf ${LOG_DIR} -mkdir ${LOG_DIR} - -if [[ $ROCOTO == true ]]; then - - ROCOTO_XML=${PATHRT}/rocoto_workflow.xml - ROCOTO_DB=${PATHRT}/rocoto_workflow.db - - rm -f $ROCOTO_XML $ROCOTO_DB *_lock.db - - if [[ $MACHINE_ID = wcoss ]]; then - QUEUE=dev - COMPILE_QUEUE=dev - ROCOTO_SCHEDULER=lsf - elif [[ $MACHINE_ID = wcoss_cray ]]; then - QUEUE=dev - COMPILE_QUEUE=dev - ROCOTO_SCHEDULER=lsfcray - elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then - QUEUE=dev - COMPILE_QUEUE=dev_transfer - ROCOTO_SCHEDULER=lsf - elif [[ $MACHINE_ID = wcoss2 ]]; then - QUEUE=dev - COMPILE_QUEUE=dev - ROCOTO_SCHEDULER=pbs - elif [[ $MACHINE_ID = hera.* ]]; then - QUEUE=batch - COMPILE_QUEUE=batch - ROCOTO_SCHEDULER=slurm - elif [[ $MACHINE_ID = orion.* ]]; then - QUEUE=batch - COMPILE_QUEUE=batch - ROCOTO_SCHEDULER=slurm - elif [[ $MACHINE_ID = s4.* ]]; then - QUEUE=s4 - COMPILE_QUEUE=s4 - ROCOTO_SCHEDULER=slurm - elif [[ $MACHINE_ID = jet.* ]]; then - QUEUE=batch - COMPILE_QUEUE=batch - ROCOTO_SCHEDULER=slurm - else - die "Rocoto is not supported on this machine $MACHINE_ID" - fi - - cat << EOF > $ROCOTO_XML - - - - - - - - - - -]> - - 197001010000 197001010000 01:00:00 - &LOG;/workflow.log -EOF - -fi - -if [[ $ECFLOW == true ]]; then - - # Default maximum number of compile and run jobs - MAX_BUILDS=10 - MAX_JOBS=30 - - # Default number of tries to run jobs - on wcoss, no error tolerance - ECF_TRIES=2 - if [[ $MACHINE_ID = wcoss* ]]; then - ECF_TRIES=1 - fi - - # Reduce maximum number of compile jobs on jet.intel and s4.intel because of licensing issues - if [[ $MACHINE_ID = jet.intel ]]; then - MAX_BUILDS=5 - elif [[ $MACHINE_ID = s4.intel ]]; then - MAX_BUILDS=1 - fi - - if [[ $MACHINE_ID = hera.* ]] && [[ ! $HOSTNAME = hecflow* ]]; then - echo "ERROR: To use ECFlow on Hera we must be logged into 'hecflow01' login node." - exit 1 - fi - - ECFLOW_RUN=${PATHRT}/ecflow_run - ECFLOW_SUITE=regtest_$$ - rm -rf ${ECFLOW_RUN} - mkdir -p ${ECFLOW_RUN}/${ECFLOW_SUITE} - cp head.h tail.h ${ECFLOW_RUN} - cat << EOF > ${ECFLOW_RUN}/${ECFLOW_SUITE}.def -suite ${ECFLOW_SUITE} - edit ECF_HOME '${ECFLOW_RUN}' - edit ECF_INCLUDE '${ECFLOW_RUN}' - edit ECF_KILL_CMD kill -15 %ECF_RID% > %ECF_JOB%.kill 2>&1 - edit ECF_TRIES ${ECF_TRIES} - label src_dir '${PATHTR}' - label run_dir '${RUNDIR_ROOT}' - limit max_builds ${MAX_BUILDS} - limit max_jobs ${MAX_JOBS} -EOF - - if [[ $MACHINE_ID = wcoss ]]; then - QUEUE=dev - elif [[ $MACHINE_ID = wcoss_cray ]]; then - QUEUE=dev - elif [[ $MACHINE_ID = wcoss_dell_p3 ]]; then - QUEUE=dev - elif [[ $MACHINE_ID = wcoss2 ]]; then - QUEUE=dev - elif [[ $MACHINE_ID = hera.* ]]; then - QUEUE=batch - elif [[ $MACHINE_ID = orion.* ]]; then - QUEUE=batch - elif [[ $MACHINE_ID = jet.* ]]; then - QUEUE=batch - elif [[ $MACHINE_ID = s4.* ]]; then - QUEUE=s4 - elif [[ $MACHINE_ID = gaea.* ]]; then - QUEUE=normal - elif [[ $MACHINE_ID = cheyenne.* ]]; then - QUEUE=regular - else - die "ecFlow is not supported on this machine $MACHINE_ID" - fi - -else - - if [[ $MACHINE_ID = hera.* ]] && [[ $HOSTNAME = hecflow* ]]; then - echo "ERROR: To run without using ECFlow on Hera, please do not use ecflow node." - exit 1 - fi - -fi - -## -## read rt.conf and then either execute the test script directly or create -## workflow description file -## - -new_compile=false -in_metatask=false - -[[ -f $TESTS_FILE ]] || die "$TESTS_FILE does not exist" - -while read -r line || [ "$line" ]; do - - line="${line#"${line%%[![:space:]]*}"}" - [[ ${#line} == 0 ]] && continue - [[ $line == \#* ]] && continue - - JOB_NR=$( printf '%03d' $(( 10#$JOB_NR + 1 )) ) - - if [[ $line == COMPILE* ]] ; then - - MAKE_OPT=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') - MACHINES=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') - CB=$( echo $line | cut -d'|' -f4) - - [[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue - - if [[ ${MACHINES} != '' ]]; then - if [[ ${MACHINES} == -* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue - elif [[ ${MACHINES} == +* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue - else - echo "MACHINES=|${MACHINES}|" - die "MACHINES spec must be either an empty string or start with either '+' or '-'" - fi - fi - - export COMPILE_NR=$( printf '%03d' $(( 10#$COMPILE_NR + 1 )) ) - - cat << EOF > ${RUNDIR_ROOT}/compile_${COMPILE_NR}.env - export JOB_NR=${JOB_NR} - export COMPILE_NR=${COMPILE_NR} - export MACHINE_ID=${MACHINE_ID} - export RT_COMPILER=${RT_COMPILER} - export PATHRT=${PATHRT} - export PATHTR=${PATHTR} - export SCHEDULER=${SCHEDULER} - export ACCNR=${ACCNR} - export QUEUE=${COMPILE_QUEUE} - export PARTITION=${PARTITION} - export ROCOTO=${ROCOTO} - export ECFLOW=${ECFLOW} - export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG} - export LOG_DIR=${LOG_DIR} -EOF - - if [[ $ROCOTO == true ]]; then - rocoto_create_compile_task - elif [[ $ECFLOW == true ]]; then - ecflow_create_compile_task - else - ./run_compile.sh ${PATHRT} ${RUNDIR_ROOT} "${MAKE_OPT}" ${COMPILE_NR} > ${LOG_DIR}/compile_${COMPILE_NR}.log 2>&1 - fi - - # Set RT_SUFFIX (regression test run directories and log files) and BL_SUFFIX - # (regression test baseline directories) for REPRO or PROD runs - if [[ ${MAKE_OPT^^} =~ "-DREPRO=ON" ]]; then - RT_SUFFIX="_repro" - BL_SUFFIX="_repro" - else - RT_SUFFIX="" - BL_SUFFIX="" - fi - - continue - - elif [[ $line == RUN* ]] ; then - - TEST_NAME=$(echo $line | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//') - MACHINES=$( echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//') - CB=$( echo $line | cut -d'|' -f4) - DEP_RUN=$( echo $line | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//') - DATE_35D=$( echo $line | cut -d'|' -f6 | sed -e 's/^ *//' -e 's/ *$//') - - [[ -e "tests/$TEST_NAME" ]] || die "run test file tests/$TEST_NAME does not exist" - [[ $CREATE_BASELINE == true && $CB != *fv3* ]] && continue - - if [[ ${MACHINES} != '' ]]; then - if [[ ${MACHINES} == -* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] && continue - elif [[ ${MACHINES} == +* ]]; then - [[ ${MACHINES} =~ ${MACHINE_ID} ]] || continue - else - echo "MACHINES=|${MACHINES}|" - die "MACHINES spec must be either an empty string or start with either '+' or '-'" - fi - fi - - # 35 day tests - [[ $TEST_35D == true ]] && rt_35d - - # Avoid uninitialized RT_SUFFIX/BL_SUFFIX (see definition above) - RT_SUFFIX=${RT_SUFFIX:-""} - BL_SUFFIX=${BL_SUFFIX:-""} - - if [[ $ROCOTO == true && $new_compile == true ]]; then - new_compile=false - in_metatask=true - cat << EOF >> $ROCOTO_XML - 0 -EOF - fi - - TEST_NR=$( printf '%03d' $(( 10#$TEST_NR + 1 )) ) - - ( - source ${PATHRT}/tests/$TEST_NAME - - NODES=$(( TASKS / TPN )) - if (( NODES * TPN < TASKS )); then - NODES=$(( NODES + 1 )) - fi - - cat << EOF > ${RUNDIR_ROOT}/run_test_${TEST_NR}.env - export JOB_NR=${JOB_NR} - export MACHINE_ID=${MACHINE_ID} - export RT_COMPILER=${RT_COMPILER} - export RTPWD=${RTPWD} - export INPUTDATA_ROOT=${INPUTDATA_ROOT} - export INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT_WW3} - export INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC} - export PATHRT=${PATHRT} - export PATHTR=${PATHTR} - export NEW_BASELINE=${NEW_BASELINE} - export CREATE_BASELINE=${CREATE_BASELINE} - export RT_SUFFIX=${RT_SUFFIX} - export BL_SUFFIX=${BL_SUFFIX} - export SCHEDULER=${SCHEDULER} - export ACCNR=${ACCNR} - export QUEUE=${QUEUE} - export PARTITION=${PARTITION} - export ROCOTO=${ROCOTO} - export ECFLOW=${ECFLOW} - export REGRESSIONTEST_LOG=${REGRESSIONTEST_LOG} - export LOG_DIR=${LOG_DIR} - export DEP_RUN=${DEP_RUN} - export skip_check_results=${skip_check_results} - export delete_rundir=${delete_rundir} -EOF - if [[ $MACHINE_ID = jet.* ]]; then - cat << EOF >> ${RUNDIR_ROOT}/run_test_${TEST_NR}.env - export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH - export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages -EOF - fi - - if [[ $ROCOTO == true ]]; then - rocoto_create_run_task - elif [[ $ECFLOW == true ]]; then - ecflow_create_run_task - else - ./run_test.sh ${PATHRT} ${RUNDIR_ROOT} ${TEST_NAME} ${TEST_NR} ${COMPILE_NR} > ${LOG_DIR}/run_${TEST_NAME}${RT_SUFFIX}.log 2>&1 - fi - ) - - continue - else - die "Unknown command $line" - fi -done < $TESTS_FILE - -## -## run regression test workflow (currently Rocoto or ecFlow are supported) -## - -if [[ $ROCOTO == true ]]; then - if [[ $in_metatask == true ]]; then - echo " " >> $ROCOTO_XML - fi - echo "" >> $ROCOTO_XML - # run rocoto workflow until done - rocoto_run -fi - -if [[ $ECFLOW == true ]]; then - echo "endsuite" >> ${ECFLOW_RUN}/${ECFLOW_SUITE}.def - # run ecflow workflow until done - ecflow_run -fi - -## -## regression test is either failed or successful -## -set +e -cat ${LOG_DIR}/compile_*_time.log >> ${REGRESSIONTEST_LOG} -cat ${LOG_DIR}/rt_*.log >> ${REGRESSIONTEST_LOG} - -FILES="fail_test_* fail_compile_*" -for f in $FILES; do - if [[ -f "$f" ]]; then - cat "$f" >> fail_test - fi -done - -if [[ -e fail_test ]]; then - echo "FAILED TESTS: " - echo "FAILED TESTS: " >> ${REGRESSIONTEST_LOG} - while read -r failed_test_name - do - echo "Test ${failed_test_name} failed " - echo "Test ${failed_test_name} failed " >> ${REGRESSIONTEST_LOG} - done < fail_test - echo ; echo REGRESSION TEST FAILED - (echo ; echo REGRESSION TEST FAILED) >> ${REGRESSIONTEST_LOG} -else - echo ; echo REGRESSION TEST WAS SUCCESSFUL - (echo ; echo REGRESSION TEST WAS SUCCESSFUL) >> ${REGRESSIONTEST_LOG} - - rm -f fv3_*.x fv3_*.exe modules.fv3_* keep_tests.tmp - [[ ${KEEP_RUNDIR} == false ]] && rm -rf ${RUNDIR_ROOT} - [[ ${ROCOTO} == true ]] && rm -f ${ROCOTO_XML} ${ROCOTO_DB} *_lock.db - [[ ${TEST_35D} == true ]] && rm -f tests/cpld_bmark*_20* - [[ ${SINGLE_NAME} != '' ]] && rm -f rt.conf.single -fi - -date >> ${REGRESSIONTEST_LOG} - -elapsed_time=$( printf '%02dh:%02dm:%02ds\n' $((SECONDS%86400/3600)) $((SECONDS%3600/60)) $((SECONDS%60)) ) -echo "Elapsed time: ${elapsed_time}. Have a nice day!" >> ${REGRESSIONTEST_LOG} -echo "Elapsed time: ${elapsed_time}. Have a nice day!" diff --git a/tests/tests/control_p8_progsigma b/tests/tests/control_p8_progsigma deleted file mode 100644 index 78880f94c1..0000000000 --- a/tests/tests/control_p8_progsigma +++ /dev/null @@ -1,167 +0,0 @@ -############################################################################### -# -# Global control test GFSv16 atmosphere only at C96L127, P8 configuration -# -############################################################################### - -export TEST_DESCR="Compare global control results with previous trunk version" - -export CNTL_DIR=control_p8 - -export LIST_FILES="sfcf000.nc \ - sfcf021.nc \ - sfcf024.nc \ - atmf000.nc \ - atmf021.nc \ - atmf024.nc \ - GFSFLX.GrbF00 \ - GFSFLX.GrbF21 \ - GFSFLX.GrbF24 \ - GFSPRS.GrbF00 \ - GFSPRS.GrbF21 \ - GFSPRS.GrbF24 \ - RESTART/coupler.res \ - RESTART/fv_core.res.nc \ - RESTART/fv_core.res.tile1.nc \ - RESTART/fv_core.res.tile2.nc \ - RESTART/fv_core.res.tile3.nc \ - RESTART/fv_core.res.tile4.nc \ - RESTART/fv_core.res.tile5.nc \ - RESTART/fv_core.res.tile6.nc \ - RESTART/fv_srf_wnd.res.tile1.nc \ - RESTART/fv_srf_wnd.res.tile2.nc \ - RESTART/fv_srf_wnd.res.tile3.nc \ - RESTART/fv_srf_wnd.res.tile4.nc \ - RESTART/fv_srf_wnd.res.tile5.nc \ - RESTART/fv_srf_wnd.res.tile6.nc \ - RESTART/fv_tracer.res.tile1.nc \ - RESTART/fv_tracer.res.tile2.nc \ - RESTART/fv_tracer.res.tile3.nc \ - RESTART/fv_tracer.res.tile4.nc \ - RESTART/fv_tracer.res.tile5.nc \ - RESTART/fv_tracer.res.tile6.nc \ - RESTART/phy_data.tile1.nc \ - RESTART/phy_data.tile2.nc \ - RESTART/phy_data.tile3.nc \ - RESTART/phy_data.tile4.nc \ - RESTART/phy_data.tile5.nc \ - RESTART/phy_data.tile6.nc \ - RESTART/sfc_data.tile1.nc \ - RESTART/sfc_data.tile2.nc \ - RESTART/sfc_data.tile3.nc \ - RESTART/sfc_data.tile4.nc \ - RESTART/sfc_data.tile5.nc \ - RESTART/sfc_data.tile6.nc" - -export_fv3 -export NPZ=127 -export NPZP=128 -export DT_ATMOS=720 -export SYEAR=2021 -export SMONTH=03 -export SDAY=22 -export SHOUR=06 -export RESTART_INTERVAL="12 -1" -export OUTPUT_GRID='gaussian_grid' -export WRITE_DOPOST=.true. -export OUTPUT_FH='0 21 24' - -# P7 default -export IALB=2 -export IEMS=2 -export LSM=2 -export IOPT_DVEG=4 -export IOPT_CRS=2 -export IOPT_RAD=3 -export IOPT_ALB=1 -export IOPT_STC=3 -# P8 -export IOPT_SFC=3 - -# FV3 P7 settings -export D2_BG_K1=0.20 -export D2_BG_K2=0.04 -export PSM_BC=1 -# P8 -export DDDMP=0.1 - -# P7 Merra2 Aerosols & NSST -export USE_MERRA2=.true. -export IAER=1011 -export NSTF_NAME=2,1,0,0,0 - -export LHEATSTRG=.true. -export LSEASPRAY=.true. - -# P7 UGWP1 -export GWD_OPT=2 -export DO_UGWP_V1=.false. -export KNOB_UGWP_VERSION=0 -export KNOB_UGWP_NSLOPE=1 -export DO_UGWP_V0=.true. -export DO_GSL_DRAG_LS_BL=.false. -export DO_GSL_DRAG_SS=.true. -export DO_GSL_DRAG_TOFD=.true. -export DO_UGWP_V1_OROG_ONLY=.false. -export DO_UGWP_V0_NST_ONLY=.false. -export LDIAG_UGWP=.false. - -# P7 CA -export DO_CA=.true. -export CA_SGS=.true. -export CA_GLOBAL=.false. -export NCA=1 -export NCELLS=5 -export NLIVES=12 -export NTHRESH=18 -export NSEED=1 -export NFRACSEED=0.5 -export CA_TRIGGER=.true. -export NSPINUP=1 -export ISEED_CA=12345 - -# P7 settings -export TILEDFIX=.true. -export FNALBC="'C96.snowfree_albedo.tileX.nc'" -export FNALBC2="'C96.facsf.tileX.nc'" -export FNTG3C="'C96.substrate_temperature.tileX.nc'" -export FNVEGC="'C96.vegetation_greenness.tileX.nc'" -export FNVETC="'C96.vegetation_type.tileX.nc'" -export FNSOTC="'C96.soil_type.tileX.nc'" -export FNSMCC=${FNSMCC_control} -export FNMSKH=${FNMSKH_control} -export FNVMNC="'C96.vegetation_greenness.tileX.nc'" -export FNVMXC="'C96.vegetation_greenness.tileX.nc'" -export FNSLPC="'C96.slope_type.tileX.nc'" -export FNABSC="'C96.maximum_snow_albedo.tileX.nc'" -export LANDICE=".false." -export FSICL=0 -export FSICS=0 - -export IMP_PHYSICS=8 -export LGFDLMPRAD=.false. -export DO_SAT_ADJ=.false. -export DNATS=2 -export DZ_MIN=6 - -#required for NML.IN sharing -export MIN_SEAICE=0.15 -export FRAC_GRID=.true. -export MOM6_RESTART_SETTING=n -# P8 (not used for standalone) -export USE_CICE_ALB=.false. - -export WRITE_NSFLIP=.true. - -export FV3_RUN=control_run.IN -export CCPP_SUITE=FV3_GFS_v17_p8 -export FIELD_TABLE=field_table_thompson_noaero_tke_progsigma -export DIAG_TABLE=diag_table_gfsv16_merra2 -# use same namelist for standalone,coupled P7 -export INPUT_NML=cpld_control.nml.IN - -# RRTMGP -export DO_RRTMGP=.true. -export DOGP_CLDOPTICS_LUT=.true. -export DOGP_LWSCAT=.true. -export DOGP_SGS_CNV=.true. From e7fd0d7cb415fe6d63bf92ba7f2509f8636634cc Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 20 Apr 2022 03:01:45 +0000 Subject: [PATCH 07/75] add test for prognostic area fraction --- tests/parm/cpld_control_progsigma.nml.IN | 372 ++++++++++++++++++ .../field_table_thompson_noaero_tke_progsigma | 70 ++++ tests/tests/control_p8_progsigma | 167 ++++++++ 3 files changed, 609 insertions(+) create mode 100644 tests/parm/cpld_control_progsigma.nml.IN create mode 100644 tests/parm/field_table/field_table_thompson_noaero_tke_progsigma create mode 100644 tests/tests/control_p8_progsigma diff --git a/tests/parm/cpld_control_progsigma.nml.IN b/tests/parm/cpld_control_progsigma.nml.IN new file mode 100644 index 0000000000..7f5869cff5 --- /dev/null +++ b/tests/parm/cpld_control_progsigma.nml.IN @@ -0,0 +1,372 @@ +&atmos_model_nml + blocksize = 32 + chksum_debug = .false. + dycore_only = .false. + ccpp_suite = '@[CCPP_SUITE]' +/ + +&diag_manager_nml + prepend_date = .false. + max_output_fields = @[MAX_OUTPUT_FIELDS] +/ + +&fms_io_nml + checksum_required = .false. + max_files_r = 100 + max_files_w = 100 +/ + +&mpp_io_nml +shuffle=1 +deflate_level=1 +/ + +&fms_nml + clock_grain = 'ROUTINE' + domains_stack_size = @[DOMAINS_STACK_SIZE] + print_memory_usage = .false. +/ + +&fv_core_nml + layout = @[INPES],@[JNPES] + io_layout = 1,1 + npx = @[NPX] + npy = @[NPY] + ntiles = 6 + npz = @[NPZ] + dz_min = @[DZ_MIN] + psm_bc = @[PSM_BC] + grid_type = -1 + make_nh = @[MAKE_NH] + fv_debug = .false. + range_warn = .true. + reset_eta = .false. + n_sponge = 42 + nudge_qv = .true. + nudge_dz = .false. + tau = 10.0 + rf_cutoff = 7.5e2 + d2_bg_k1 = @[D2_BG_K1] + d2_bg_k2 = @[D2_BG_K2] + kord_tm = -9 + kord_mt = 9 + kord_wz = 9 + kord_tr = 9 + hydrostatic = .false. + phys_hydrostatic = .false. + use_hydro_pressure = .false. + beta = 0. + a_imp = 1. + p_fac = 0.1 + k_split = 2 + n_split = 6 + nwat = 6 + na_init = @[NA_INIT] + d_ext = 0. + dnats = @[DNATS] + fv_sg_adj = 450 + d2_bg = 0. + nord = 2 + dddmp = @[DDDMP] + d4_bg = 0.12 + vtdm4 = 0.02 + delt_max = 0.002 + ke_bg = 0. + do_vort_damp = .true. + external_ic = @[EXTERNAL_IC] + external_eta = .true. + gfs_phil = .false. + nggps_ic = @[NGGPS_IC] + mountain = @[MOUNTAIN] + ncep_ic = .false. + d_con = 1. + hord_mt = 5 + hord_vt = 5 + hord_tm = 5 + hord_dp = -5 + hord_tr = 8 + adjust_dry_mass = .false. + dry_mass=98320.0 + consv_te = 1. + do_sat_adj = @[DO_SAT_ADJ] + consv_am = .false. + fill = .true. + dwind_2d = .false. + print_freq = 6 + warm_start = @[WARM_START] + no_dycore = .false. + z_tracer = .true. + agrid_vel_rst = .true. + read_increment = @[READ_INCREMENT] + res_latlon_dynamics = @[RES_LATLON_DYNAMICS] +/ + +&external_ic_nml + filtered_terrain = .true. + levp = @[NPZP] + gfs_dwinds = .true. + checker_tr = .false. + nt_checker = 0 +/ + +&gfs_physics_nml + fhzero = @[FHZERO] + h2o_phys = .true. + ldiag3d = @[LDIAG3D] + qdiag3d = @[QDIAG3D] + print_diff_pgr = @[PRINT_DIFF_PGR] + fhcyc = @[FHCYC] + use_ufo = .true. + pre_rad = .false. + imp_physics = @[IMP_PHYSICS] + iovr = 3 + ltaerosol = .false. + lradar = .false. + ttendlim = -999 + dt_inner = @[DT_INNER] + oz_phys = .false. + oz_phys_2015 = .true. + lsoil_lsm = 4 + do_mynnedmf = .false. + do_mynnsfclay = .false. + icloud_bl = 1 + bl_mynn_edmf = 1 + bl_mynn_tkeadvect = .true. + bl_mynn_edmf_mom = 1 + do_ugwp = .false. + do_tofd = .false. + gwd_opt = @[GWD_OPT] + do_ugwp_v0 = @[DO_UGWP_V0] + do_ugwp_v1 = @[DO_UGWP_V1] + do_ugwp_v0_orog_only = .false. + do_ugwp_v0_nst_only = @[DO_UGWP_V0_NST_ONLY] + do_gsl_drag_ls_bl = @[DO_GSL_DRAG_LS_BL] + do_gsl_drag_ss = @[DO_GSL_DRAG_SS] + do_gsl_drag_tofd = @[DO_GSL_DRAG_TOFD] + do_ugwp_v1_orog_only = @[DO_UGWP_V1_OROG_ONLY] + min_lakeice = 0.15 + min_seaice = @[MIN_SEAICE] + use_cice_alb = @[USE_CICE_ALB] + pdfcld = .false. + fhswr = 3600. + fhlwr = 3600. + ialb = @[IALB] + iems = @[IEMS] + iaer = @[IAER] + icliq_sw = 2 + ico2 = 2 + isubc_sw = 2 + isubc_lw = 2 + isol = 2 + lwhtr = .true. + swhtr = .true. + cnvgwd = .true. + shal_cnv = .true. + cal_pre = .false. + redrag = .true. + dspheat = .true. + hybedmf = .false. + satmedmf = .true. + isatmedmf = 1 + lheatstrg = @[LHEATSTRG] + lseaspray = @[LSEASPRAY] + random_clds = @[RANDOM_CLDS] + trans_trac = .true. + cnvcld = @[CNVCLD] + imfshalcnv = @[IMFSHALCNV] + imfdeepcnv = @[IMFDEEPCNV] + ras = @[RAS] + cdmbgwd = @[CDMBWD] + prslrd0 = 0. + ivegsrc = 1 + isot = 1 + lsoil = 4 + lsm = @[LSM] + iopt_dveg = @[IOPT_DVEG] + iopt_crs = @[IOPT_CRS] + iopt_btr = 1 + iopt_run = 1 + iopt_sfc = @[IOPT_SFC] + iopt_frz = 1 + iopt_inf = 1 + iopt_rad = @[IOPT_RAD] + iopt_alb = @[IOPT_ALB] + iopt_snf = 4 + iopt_tbot = 2 + iopt_stc = @[IOPT_STC] + debug = .false. + nstf_name = @[NSTF_NAME] + nst_anl = .true. + psautco = 0.0008,0.0005 + prautco = 0.00015,0.00015 + lgfdlmprad = @[LGFDLMPRAD] + effr_in = .true. + ldiag_ugwp = @[LDIAG_UGWP] + fscav_aero = @[FSCAV_AERO] + do_sppt = @[DO_SPPT] + do_shum = @[DO_SHUM] + do_skeb = @[DO_SKEB] + do_RRTMGP = @[DO_RRTMGP] + active_gases = 'h2o_co2_o3_n2o_ch4_o2' + ngases = 6 + lw_file_gas = 'rrtmgp-data-lw-g128-210809.nc' + lw_file_clouds = 'rrtmgp-cloud-optics-coeffs-lw.nc' + sw_file_gas = 'rrtmgp-data-sw-g112-210809.nc' + sw_file_clouds = 'rrtmgp-cloud-optics-coeffs-sw.nc' + rrtmgp_nGptsSW = 112 + rrtmgp_nGptsLW = 128 + rrtmgp_nBandsLW = 16 + rrtmgp_nBandsSW = 14 + doGP_cldoptics_LUT = @[DOGP_CLDOPTICS_LUT] + doGP_lwscat = @[DOGP_LWSCAT] + frac_grid = @[FRAC_GRID] + cplchm = @[CPLCHM] + cplflx = @[CPLFLX] + cplice = @[CPLICE] + cplwav = @[CPLWAV] + cplwav2atm = @[CPLWAV2ATM] + do_ca = @[DO_CA] + ca_global = @[CA_GLOBAL] + ca_sgs = @[CA_SGS] + nca = @[NCA] + ncells = @[NCELLS] + nlives = @[NLIVES] + nseed = @[NSEED] + nfracseed = @[NFRACSEED] + nthresh = @[NTHRESH] + ca_trigger = @[CA_TRIGGER] + nspinup = @[NSPINUP] + iseed_ca = @[ISEED_CA] + progsigma = .True. + wclosure = .True. +/ + +&cires_ugwp_nml + knob_ugwp_solver = 2 + knob_ugwp_source = 1,1,0,0 + knob_ugwp_wvspec = 1,25,25,25 + knob_ugwp_azdir = 2,4,4,4 + knob_ugwp_stoch = 0,0,0,0 + knob_ugwp_effac = 1,1,1,1 + knob_ugwp_doaxyz = 1 + knob_ugwp_doheat = 1 + knob_ugwp_dokdis = 1 + knob_ugwp_ndx4lh = 1 + knob_ugwp_version = @[KNOB_UGWP_VERSION] + launch_level = 54 +/ + +&gfdl_cloud_microphysics_nml + sedi_transport = .true. + do_sedi_heat = .false. + rad_snow = .true. + rad_graupel = .true. + rad_rain = .true. + const_vi = .false. + const_vs = .false. + const_vg = .false. + const_vr = .false. + vi_max = 1. + vs_max = 2. + vg_max = 12. + vr_max = 12. + qi_lim = 1. + prog_ccn = .false. + do_qa = .true. + fast_sat_adj = .true. + tau_l2v = 225. + tau_v2l = 150. + tau_g2v = 900. + rthresh = 10.e-6 ! This is a key parameter for cloud water + dw_land = 0.16 + dw_ocean = 0.10 + ql_gen = 1.0e-3 + ql_mlt = 1.0e-3 + qi0_crt = 8.0E-5 + qs0_crt = 1.0e-3 + tau_i2s = 1000. + c_psaci = 0.05 + c_pgacs = 0.01 + rh_inc = 0.30 + rh_inr = 0.30 + rh_ins = 0.30 + ccn_l = 300. + ccn_o = 100. + c_paut = 0.5 + c_cracw = 0.8 + use_ppm = .false. + use_ccn = .true. + mono_prof = .true. + z_slope_liq = .true. + z_slope_ice = .true. + de_ice = .false. + fix_negative = .true. + icloud_f = 1 + mp_time = 150. + reiflag = 2 +/ + +&interpolator_nml + interp_method = 'conserve_great_circle' +/ + +&namsfc + FNGLAC = 'global_glacier.2x2.grb' + FNMXIC = 'global_maxice.2x2.grb' + FNTSFC = 'RTGSST.1982.2012.monthly.clim.grb' + FNSNOC = 'global_snoclim.1.875.grb' + FNZORC = 'igbp' + FNALBC = @[FNALBC] + FNALBC2 = @[FNALBC2] + FNAISC = 'CFSR.SEAICE.1982.2012.monthly.clim.grb' + FNTG3C = @[FNTG3C] + FNVEGC = @[FNVEGC] + FNVETC = @[FNVETC] + FNSOTC = @[FNSOTC] + FNSMCC = @[FNSMCC] + FNMSKH = @[FNMSKH] + FNTSFA = '' + FNACNA = '' + FNSNOA = '' + FNVMNC = @[FNVMNC] + FNVMXC = @[FNVMXC] + FNSLPC = @[FNSLPC] + FNABSC = @[FNABSC] + LDEBUG =.false. + FSMCL(2) = 99999 + FSMCL(3) = 99999 + FSMCL(4) = 99999 + LANDICE = @[LANDICE] + FTSFS = 90 + FAISL = 99999 + FAISS = 99999 + FSNOL = 99999 + FSNOS = 99999 + FSICL = @[FSICL] + FSICS = @[FSICS] + FTSFL = 99999 + FVETL = 99999 + FSOTL = 99999 + FvmnL = 99999 + FvmxL = 99999 + FSLPL = 99999 + FABSL = 99999 +/ + +&fv_grid_nml + grid_file = 'INPUT/grid_spec.nc' +/ + +&nam_stochy +/ + +&nam_sfcperts +/ + +&MOM_input_nml + output_directory = 'MOM6_OUTPUT/', + input_filename = '@[MOM6_RESTART_SETTING]' + restart_input_dir = 'INPUT/', + restart_output_dir = 'RESTART/', + parameter_filename = 'INPUT/MOM_input', + 'INPUT/MOM_override'/ diff --git a/tests/parm/field_table/field_table_thompson_noaero_tke_progsigma b/tests/parm/field_table/field_table_thompson_noaero_tke_progsigma new file mode 100644 index 0000000000..e5b0f841d0 --- /dev/null +++ b/tests/parm/field_table/field_table_thompson_noaero_tke_progsigma @@ -0,0 +1,70 @@ +# added by FRE: sphum must be present in atmos +# specific humidity for moist runs + "TRACER", "atmos_mod", "sphum" + "longname", "specific humidity" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=3.e-6" / +# prognostic cloud water mixing ratio + "TRACER", "atmos_mod", "liq_wat" + "longname", "cloud water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic ice water mixing ratio + "TRACER", "atmos_mod", "ice_wat" + "longname", "cloud ice mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic rain water mixing ratio + "TRACER", "atmos_mod", "rainwat" + "longname", "rain water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic snow water mixing ratio + "TRACER", "atmos_mod", "snowwat" + "longname", "snow water mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic Grau water mixing ratio + "TRACER", "atmos_mod", "graupel" + "longname", "graupel mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# prognostic cloud water number concentration - not for non-aerosol runs +# "TRACER", "atmos_mod", "water_nc" +# "longname", "cloud liquid water number concentration" +# "units", "/kg" +# "profile_type", "fixed", "surface_value=0.0" / +# prognostic cloud ice number concentration + "TRACER", "atmos_mod", "ice_nc" + "longname", "cloud ice water number concentration" + "units", "/kg" + "profile_type", "fixed", "surface_value=0.0" / +# prognostic rain number concentration + "TRACER", "atmos_mod", "rain_nc" + "longname", "rain number concentration" + "units", "/kg" + "profile_type", "fixed", "surface_value=0.0" / +# prognostic ozone mixing ratio tracer + "TRACER", "atmos_mod", "o3mr" + "longname", "ozone mixing ratio" + "units", "kg/kg" + "profile_type", "fixed", "surface_value=1.e30" / +# water- and ice-friendly aerosols (Thompson) - not for non-aerosol runs +# "TRACER", "atmos_mod", "liq_aero" +# "longname", "water-friendly aerosol number concentration" +# "units", "/kg" +# "profile_type", "fixed", "surface_value=0.0" / +# "TRACER", "atmos_mod", "ice_aero" +# "longname", "ice-friendly aerosol number concentration" +# "units", "/kg" +# "profile_type", "fixed", "surface_value=0.0" / +# prognostic subgrid scale turbulent kinetic energy + "TRACER", "atmos_mod", "sgs_tke" + "longname", "subgrid scale turbulent kinetic energy" + "units", "m2/s2" + "profile_type", "fixed", "surface_value=0.0" / +# prognotsitc sigmab tracer + "TRACER", "atmos_mod", "sigmab" + "longname", "sigma fraction" + "units", "fraction" + "profile_type", "fixed", "surface_value=0.03" / diff --git a/tests/tests/control_p8_progsigma b/tests/tests/control_p8_progsigma new file mode 100644 index 0000000000..d19626bf95 --- /dev/null +++ b/tests/tests/control_p8_progsigma @@ -0,0 +1,167 @@ +############################################################################### +# +# Global control test GFSv16 atmosphere only at C96L127, P8 configuration +# +############################################################################### + +export TEST_DESCR="Compare global control results with previous trunk version" + +export CNTL_DIR=control_p8 + +export LIST_FILES="sfcf000.nc \ + sfcf021.nc \ + sfcf024.nc \ + atmf000.nc \ + atmf021.nc \ + atmf024.nc \ + GFSFLX.GrbF00 \ + GFSFLX.GrbF21 \ + GFSFLX.GrbF24 \ + GFSPRS.GrbF00 \ + GFSPRS.GrbF21 \ + GFSPRS.GrbF24 \ + RESTART/coupler.res \ + RESTART/fv_core.res.nc \ + RESTART/fv_core.res.tile1.nc \ + RESTART/fv_core.res.tile2.nc \ + RESTART/fv_core.res.tile3.nc \ + RESTART/fv_core.res.tile4.nc \ + RESTART/fv_core.res.tile5.nc \ + RESTART/fv_core.res.tile6.nc \ + RESTART/fv_srf_wnd.res.tile1.nc \ + RESTART/fv_srf_wnd.res.tile2.nc \ + RESTART/fv_srf_wnd.res.tile3.nc \ + RESTART/fv_srf_wnd.res.tile4.nc \ + RESTART/fv_srf_wnd.res.tile5.nc \ + RESTART/fv_srf_wnd.res.tile6.nc \ + RESTART/fv_tracer.res.tile1.nc \ + RESTART/fv_tracer.res.tile2.nc \ + RESTART/fv_tracer.res.tile3.nc \ + RESTART/fv_tracer.res.tile4.nc \ + RESTART/fv_tracer.res.tile5.nc \ + RESTART/fv_tracer.res.tile6.nc \ + RESTART/phy_data.tile1.nc \ + RESTART/phy_data.tile2.nc \ + RESTART/phy_data.tile3.nc \ + RESTART/phy_data.tile4.nc \ + RESTART/phy_data.tile5.nc \ + RESTART/phy_data.tile6.nc \ + RESTART/sfc_data.tile1.nc \ + RESTART/sfc_data.tile2.nc \ + RESTART/sfc_data.tile3.nc \ + RESTART/sfc_data.tile4.nc \ + RESTART/sfc_data.tile5.nc \ + RESTART/sfc_data.tile6.nc" + +export_fv3 +export NPZ=127 +export NPZP=128 +export DT_ATMOS=720 +export SYEAR=2021 +export SMONTH=03 +export SDAY=22 +export SHOUR=06 +export RESTART_INTERVAL="12 -1" +export OUTPUT_GRID='gaussian_grid' +export WRITE_DOPOST=.true. +export OUTPUT_FH='0 21 24' + +# P7 default +export IALB=2 +export IEMS=2 +export LSM=2 +export IOPT_DVEG=4 +export IOPT_CRS=2 +export IOPT_RAD=3 +export IOPT_ALB=1 +export IOPT_STC=3 +# P8 +export IOPT_SFC=3 + +# FV3 P7 settings +export D2_BG_K1=0.20 +export D2_BG_K2=0.04 +export PSM_BC=1 +# P8 +export DDDMP=0.1 + +# P7 Merra2 Aerosols & NSST +export USE_MERRA2=.true. +export IAER=1011 +export NSTF_NAME=2,1,0,0,0 + +export LHEATSTRG=.true. +export LSEASPRAY=.true. + +# P7 UGWP1 +export GWD_OPT=2 +export DO_UGWP_V1=.false. +export KNOB_UGWP_VERSION=0 +export KNOB_UGWP_NSLOPE=1 +export DO_UGWP_V0=.true. +export DO_GSL_DRAG_LS_BL=.false. +export DO_GSL_DRAG_SS=.true. +export DO_GSL_DRAG_TOFD=.true. +export DO_UGWP_V1_OROG_ONLY=.false. +export DO_UGWP_V0_NST_ONLY=.false. +export LDIAG_UGWP=.false. + +# P7 CA +export DO_CA=.true. +export CA_SGS=.true. +export CA_GLOBAL=.false. +export NCA=1 +export NCELLS=5 +export NLIVES=12 +export NTHRESH=18 +export NSEED=1 +export NFRACSEED=0.5 +export CA_TRIGGER=.true. +export NSPINUP=1 +export ISEED_CA=12345 + +# P7 settings +export TILEDFIX=.true. +export FNALBC="'C96.snowfree_albedo.tileX.nc'" +export FNALBC2="'C96.facsf.tileX.nc'" +export FNTG3C="'C96.substrate_temperature.tileX.nc'" +export FNVEGC="'C96.vegetation_greenness.tileX.nc'" +export FNVETC="'C96.vegetation_type.tileX.nc'" +export FNSOTC="'C96.soil_type.tileX.nc'" +export FNSMCC=${FNSMCC_control} +export FNMSKH=${FNMSKH_control} +export FNVMNC="'C96.vegetation_greenness.tileX.nc'" +export FNVMXC="'C96.vegetation_greenness.tileX.nc'" +export FNSLPC="'C96.slope_type.tileX.nc'" +export FNABSC="'C96.maximum_snow_albedo.tileX.nc'" +export LANDICE=".false." +export FSICL=0 +export FSICS=0 + +export IMP_PHYSICS=8 +export LGFDLMPRAD=.false. +export DO_SAT_ADJ=.false. +export DNATS=0 +export DZ_MIN=6 + +#required for NML.IN sharing +export MIN_SEAICE=0.15 +export FRAC_GRID=.true. +export MOM6_RESTART_SETTING=n +# P8 (not used for standalone) +export USE_CICE_ALB=.false. + +export WRITE_NSFLIP=.true. + +export FV3_RUN=control_run.IN +export CCPP_SUITE=FV3_GFS_v17_p8 +export FIELD_TABLE=field_table_thompson_noaero_tke_progsigma +export DIAG_TABLE=diag_table_gfsv16_merra2 +# use same namelist for standalone,coupled P7 +export INPUT_NML=cpld_control_progsigma.nml.IN + +# RRTMGP +export DO_RRTMGP=.true. +export DOGP_CLDOPTICS_LUT=.true. +export DOGP_LWSCAT=.true. +export DOGP_SGS_CNV=.true. From 5dbd0d29146cb404433010224f3c6400b923b7d1 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Thu, 21 Apr 2022 15:08:23 +0000 Subject: [PATCH 08/75] update submodules --- FV3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FV3 b/FV3 index f9ab9cd019..012c6d3e76 160000 --- a/FV3 +++ b/FV3 @@ -1 +1 @@ -Subproject commit f9ab9cd01918a7fd3f712daa76e8b666651a29ea +Subproject commit 012c6d3e768206ede97ed54968df0c95091b0983 From af9e265df06d877349bfd70cb810a01ebaf7adfd Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Fri, 22 Apr 2022 04:03:05 +0000 Subject: [PATCH 09/75] update submodules --- FV3 | 2 +- stochastic_physics | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FV3 b/FV3 index 012c6d3e76..db76c43693 160000 --- a/FV3 +++ b/FV3 @@ -1 +1 @@ -Subproject commit 012c6d3e768206ede97ed54968df0c95091b0983 +Subproject commit db76c43693891cfdb149a3bcca5851c1eff0db7c diff --git a/stochastic_physics b/stochastic_physics index 2b1240f439..00d063ed99 160000 --- a/stochastic_physics +++ b/stochastic_physics @@ -1 +1 @@ -Subproject commit 2b1240f439b4e83f0a4960c39c25cbc1f3b371a7 +Subproject commit 00d063ed991a1ca0d0705634366beadbff063345 From c0884a4862580de8d73d6a21cd2228d8850e459a Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Fri, 22 Apr 2022 04:09:52 +0000 Subject: [PATCH 10/75] fetch upstream and merge --- FV3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FV3 b/FV3 index db76c43693..9c4b34df7d 160000 --- a/FV3 +++ b/FV3 @@ -1 +1 @@ -Subproject commit db76c43693891cfdb149a3bcca5851c1eff0db7c +Subproject commit 9c4b34df7d4ce53038acf9c5f0094454059e93d4 From 377a0ceea2519a49f9e70d7f0495a3e9f329b029 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Fri, 22 Apr 2022 04:22:49 +0000 Subject: [PATCH 11/75] update stochastic physics submodule --- .gitmodules | 4 ---- stochastic_physics | 1 - 2 files changed, 5 deletions(-) delete mode 160000 stochastic_physics diff --git a/.gitmodules b/.gitmodules index 23a25d71d1..5d498908ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,10 +6,6 @@ path = WW3 url = https://github.com/NOAA-EMC/WW3 branch = dev/ufs-weather-model -[submodule "stochastic_physics"] - path = stochastic_physics - url = https://github.com/lisa-bengtsson/stochastic_physics - branch = master [submodule "CMakeModules"] path = CMakeModules url = https://github.com/NOAA-EMC/CMakeModules diff --git a/stochastic_physics b/stochastic_physics deleted file mode 160000 index 00d063ed99..0000000000 --- a/stochastic_physics +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 00d063ed991a1ca0d0705634366beadbff063345 From b00575a666cdc13bd09bdd6fb9a44e6d42ff33ef Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Fri, 22 Apr 2022 04:25:23 +0000 Subject: [PATCH 12/75] update stochastic physics submodule --- .gitmodules | 4 + stochastic_physics/.travis.yml | 57 + stochastic_physics/CMakeLists.txt | 61 + stochastic_physics/CODEOWNERS | 14 + stochastic_physics/Doxyfile | 22 + stochastic_physics/LICENSE.md | 21 + stochastic_physics/README.md | 3 + stochastic_physics/README.standalone | 33 + .../cellular_automata_global.F90 | 308 ++ stochastic_physics/cellular_automata_sgs.F90 | 338 +++ stochastic_physics/compns_stochy.F90 | 531 ++++ stochastic_physics/docs/Makefile | 20 + stochastic_physics/docs/UFS_logo.png | Bin 0 -> 14988 bytes stochastic_physics/docs/environment.yml | 7 + stochastic_physics/docs/make.bat | 35 + stochastic_physics/docs/source/conf.py | 70 + .../docs/source/developers_guide.rst | 14 + .../docs/source/getting_started.rst | 10 + stochastic_physics/docs/source/index.rst | 18 + .../docs/source/namelist_options.rst | 72 + stochastic_physics/docs/source/references.rst | 12 + .../docs/source/users_guide.rst | 19 + stochastic_physics/function2 | 5 + stochastic_physics/function_indlsev | 3 + stochastic_physics/function_indlsod | 3 + stochastic_physics/get_stochy_pattern.F90 | 670 +++++ stochastic_physics/halo_exchange.fv3.F90 | 100 + stochastic_physics/kinddef.F90 | 25 + stochastic_physics/lndp_apply_perts.F90 | 343 +++ stochastic_physics/main.doc | 34 + stochastic_physics/makefile | 93 + stochastic_physics/mersenne_twister.F90 | 493 ++++ stochastic_physics/mpi_wrapper.F90 | 716 +++++ stochastic_physics/plumes.F90 | 167 ++ stochastic_physics/random_numbers.F90 | 30 + stochastic_physics/spectral_transforms.F90 | 2371 +++++++++++++++ stochastic_physics/stochastic_physics.F90 | 567 ++++ stochastic_physics/stochy_data_mod.F90 | 771 +++++ stochastic_physics/stochy_doc.conf | 2542 +++++++++++++++++ .../stochy_internal_state_mod.F90 | 89 + stochastic_physics/stochy_namelist_def.F90 | 51 + .../stochy_patterngenerator.F90 | 396 +++ .../unit_tests/atmosphere_stub.F90 | 392 +++ .../unit_tests/compare_ca_output.F90 | 106 + .../unit_tests/compare_output.F90 | 162 ++ .../unit_tests/compile_compare.sh | 1 + .../unit_tests/compile_compare_ca.sh | 1 + .../unit_tests/compile_standalone.hera_gnu | 51 + .../unit_tests/compile_standalone.hera_intel | 46 + .../unit_tests/compile_standalone_ca.hera.gnu | 53 + .../compile_standalone_ca.hera.intel | 45 + .../unit_tests/fv_arrays_stub.F90 | 351 +++ .../unit_tests/fv_control_stub.F90 | 1166 ++++++++ .../unit_tests/fv_mp_stub_mod.F90 | 1387 +++++++++ .../unit_tests/input.nml.ca_template | 72 + stochastic_physics/unit_tests/input.nml.lnd1 | 149 + stochastic_physics/unit_tests/input.nml.noise | 72 + .../unit_tests/input.nml.template | 83 + stochastic_physics/unit_tests/module-setup.sh | 149 + .../unit_tests/modules.hera.intel | 26 + .../unit_tests/modules.orion.intel | 35 + stochastic_physics/unit_tests/modules.stoch | 26 + .../unit_tests/modules.stoch_gnu | 28 + .../unit_tests/modules.stoch_gnu_dbg | 27 + stochastic_physics/unit_tests/run_ca.sh | 69 + .../unit_tests/run_standalone.sh | 45 + .../unit_tests/run_unit_tests.sh | 102 + .../unit_tests/run_unit_tests_ca.sh | 165 ++ .../unit_tests/standalone_ca.F90 | 376 +++ .../unit_tests/standalone_stochy.F90 | 367 +++ stochastic_physics/update_ca.F90 | 862 ++++++ 71 files changed, 17552 insertions(+) create mode 100644 stochastic_physics/.travis.yml create mode 100644 stochastic_physics/CMakeLists.txt create mode 100644 stochastic_physics/CODEOWNERS create mode 100644 stochastic_physics/Doxyfile create mode 100644 stochastic_physics/LICENSE.md create mode 100644 stochastic_physics/README.md create mode 100644 stochastic_physics/README.standalone create mode 100644 stochastic_physics/cellular_automata_global.F90 create mode 100644 stochastic_physics/cellular_automata_sgs.F90 create mode 100644 stochastic_physics/compns_stochy.F90 create mode 100644 stochastic_physics/docs/Makefile create mode 100644 stochastic_physics/docs/UFS_logo.png create mode 100644 stochastic_physics/docs/environment.yml create mode 100644 stochastic_physics/docs/make.bat create mode 100644 stochastic_physics/docs/source/conf.py create mode 100644 stochastic_physics/docs/source/developers_guide.rst create mode 100644 stochastic_physics/docs/source/getting_started.rst create mode 100644 stochastic_physics/docs/source/index.rst create mode 100644 stochastic_physics/docs/source/namelist_options.rst create mode 100644 stochastic_physics/docs/source/references.rst create mode 100644 stochastic_physics/docs/source/users_guide.rst create mode 100644 stochastic_physics/function2 create mode 100644 stochastic_physics/function_indlsev create mode 100644 stochastic_physics/function_indlsod create mode 100644 stochastic_physics/get_stochy_pattern.F90 create mode 100644 stochastic_physics/halo_exchange.fv3.F90 create mode 100644 stochastic_physics/kinddef.F90 create mode 100644 stochastic_physics/lndp_apply_perts.F90 create mode 100644 stochastic_physics/main.doc create mode 100644 stochastic_physics/makefile create mode 100644 stochastic_physics/mersenne_twister.F90 create mode 100644 stochastic_physics/mpi_wrapper.F90 create mode 100644 stochastic_physics/plumes.F90 create mode 100644 stochastic_physics/random_numbers.F90 create mode 100644 stochastic_physics/spectral_transforms.F90 create mode 100644 stochastic_physics/stochastic_physics.F90 create mode 100644 stochastic_physics/stochy_data_mod.F90 create mode 100644 stochastic_physics/stochy_doc.conf create mode 100644 stochastic_physics/stochy_internal_state_mod.F90 create mode 100644 stochastic_physics/stochy_namelist_def.F90 create mode 100644 stochastic_physics/stochy_patterngenerator.F90 create mode 100644 stochastic_physics/unit_tests/atmosphere_stub.F90 create mode 100644 stochastic_physics/unit_tests/compare_ca_output.F90 create mode 100644 stochastic_physics/unit_tests/compare_output.F90 create mode 100755 stochastic_physics/unit_tests/compile_compare.sh create mode 100755 stochastic_physics/unit_tests/compile_compare_ca.sh create mode 100755 stochastic_physics/unit_tests/compile_standalone.hera_gnu create mode 100755 stochastic_physics/unit_tests/compile_standalone.hera_intel create mode 100755 stochastic_physics/unit_tests/compile_standalone_ca.hera.gnu create mode 100755 stochastic_physics/unit_tests/compile_standalone_ca.hera.intel create mode 100644 stochastic_physics/unit_tests/fv_arrays_stub.F90 create mode 100644 stochastic_physics/unit_tests/fv_control_stub.F90 create mode 100644 stochastic_physics/unit_tests/fv_mp_stub_mod.F90 create mode 100644 stochastic_physics/unit_tests/input.nml.ca_template create mode 100644 stochastic_physics/unit_tests/input.nml.lnd1 create mode 100644 stochastic_physics/unit_tests/input.nml.noise create mode 100644 stochastic_physics/unit_tests/input.nml.template create mode 100644 stochastic_physics/unit_tests/module-setup.sh create mode 100644 stochastic_physics/unit_tests/modules.hera.intel create mode 100644 stochastic_physics/unit_tests/modules.orion.intel create mode 100644 stochastic_physics/unit_tests/modules.stoch create mode 100644 stochastic_physics/unit_tests/modules.stoch_gnu create mode 100644 stochastic_physics/unit_tests/modules.stoch_gnu_dbg create mode 100755 stochastic_physics/unit_tests/run_ca.sh create mode 100755 stochastic_physics/unit_tests/run_standalone.sh create mode 100755 stochastic_physics/unit_tests/run_unit_tests.sh create mode 100755 stochastic_physics/unit_tests/run_unit_tests_ca.sh create mode 100644 stochastic_physics/unit_tests/standalone_ca.F90 create mode 100644 stochastic_physics/unit_tests/standalone_stochy.F90 create mode 100644 stochastic_physics/update_ca.F90 diff --git a/.gitmodules b/.gitmodules index 5d498908ed..26087a4b53 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,6 +6,10 @@ path = WW3 url = https://github.com/NOAA-EMC/WW3 branch = dev/ufs-weather-model +[submodule "stochastic_physics"] + path = stochastic_physics + url = https://github.com/noaa-psd/stochastic_physics + branch = master [submodule "CMakeModules"] path = CMakeModules url = https://github.com/NOAA-EMC/CMakeModules diff --git a/stochastic_physics/.travis.yml b/stochastic_physics/.travis.yml new file mode 100644 index 0000000000..378bc78a2e --- /dev/null +++ b/stochastic_physics/.travis.yml @@ -0,0 +1,57 @@ +# This will run on Travis' 'new' container-based infrastructure +sudo: false + +before_install: + - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh + - chmod +x miniconda.sh + - "./miniconda.sh -b" + - export PATH=/home/travis/miniconda2/bin:$PATH + - conda update --yes conda + +install: + - conda install --yes sphinx + - pip install sphinx_rtd_theme + +# Blacklist +branches: + only: + - ufs_public_release + - release/public-v1 + - release/ufs-v1.1.0 + +# Environment variables +env: + global: + - GH_REPO_NAME: stochastic_physics + - DOXYFILE: $TRAVIS_BUILD_DIR/ + - GH_REPO_REF: github.com/noaa-psd/stochastic_physics.git + +# Install dependencies +addons: + apt: + packages: + - doxygen + - graphviz + +# Build your code e.g. by calling make +script: + - doxygen + - pushd docs +# Use Sphinx to make the html docs + - make html +# Tell GitHub not to use jekyll to compile the docs + - touch build/html/.nojekyll + - popd + +# Generate and deploy documentation +before_deploy: + - cp -r html docs/build/html/doxygen +deploy: + provider: pages + skip_cleanup: true + local_dir: docs/build/html + github_token: $GH_REPO_TOKEN + on: + branch: + - ufs_public_release + - release/public-v1 diff --git a/stochastic_physics/CMakeLists.txt b/stochastic_physics/CMakeLists.txt new file mode 100644 index 0000000000..9f010c9f2b --- /dev/null +++ b/stochastic_physics/CMakeLists.txt @@ -0,0 +1,61 @@ +if(32BIT) + message ("Force 64 bits in stochastic_physics") + if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64") + elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8") + endif() +endif() + +list(APPEND _stoch_phys_srcs + kinddef.F90 + mpi_wrapper.F90 + halo_exchange.fv3.F90 + plumes.F90 + mersenne_twister.F90 + random_numbers.F90 + stochy_namelist_def.F90 + compns_stochy.F90 + stochy_internal_state_mod.F90 + spectral_transforms.F90 + stochastic_physics.F90 + stochy_patterngenerator.F90 + stochy_data_mod.F90 + get_stochy_pattern.F90 + cellular_automata_global.F90 + cellular_automata_sgs.F90 + update_ca.F90 + lndp_apply_perts.F90 +) + +add_library(stochastic_physics ${_stoch_phys_srcs}) +add_dependencies(stochastic_physics fms) + +if(32BIT) + target_compile_definitions(stochastic_physics PRIVATE INTERNAL_FILE_NML OVERLOAD_R4) +else() + target_compile_definitions(stochastic_physics PRIVATE INTERNAL_FILE_NML) +endif() + +set_target_properties(stochastic_physics PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod) +target_include_directories(stochastic_physics INTERFACE $ + $) + +target_link_libraries(stochastic_physics PUBLIC fms) +if(OPENMP) + target_link_libraries(stochastic_physics PRIVATE OpenMP::OpenMP_Fortran) +endif() + +############################################################################### +### Install +############################################################################### +install( + TARGETS stochastic_physics + EXPORT stochastic_physics-config + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX}) + +install(EXPORT stochastic_physics-config + DESTINATION lib/cmake) diff --git a/stochastic_physics/CODEOWNERS b/stochastic_physics/CODEOWNERS new file mode 100644 index 0000000000..3a6951e3d7 --- /dev/null +++ b/stochastic_physics/CODEOWNERS @@ -0,0 +1,14 @@ +# Lines starting with '#' are comments. +# Each line is a file pattern followed by one or more owners. + +# These owners will be the default owners for everything in the repo. +#* @defunkt +* @pjpegion + +# Order is important. The last matching pattern has the most precedence. +# So if a pull request only touches javascript files, only these owners +# will be requested to review. +#*.js @octocat @github/js + +# You can also use email addresses if you prefer. +#docs/* docs@example.com diff --git a/stochastic_physics/Doxyfile b/stochastic_physics/Doxyfile new file mode 100644 index 0000000000..b1b6812453 --- /dev/null +++ b/stochastic_physics/Doxyfile @@ -0,0 +1,22 @@ +PROJECT_NAME = "stochastic physics" +PROJECT_NUMBER = v1.1.0 +STRIP_FROM_PATH = +INPUT = +FILE_PATTERNS = *.md \ + *.h \ + *.doc \ + *.c \ + *.f \ + *.F90 +RECURSIVE = YES +USE_MDFILE_AS_MAINPAGE = README.md +OPTIMIZE_FOR_FORTRAN = YES +GENERATE_XML = NO +INLINE_SIMPLE_STRUCTS = YES +EXTRACT_ALL = YES +HAVE_DOT = YES +CALL_GRAPH = YES +CALLER_GRAPH = YES +PROJECT_LOGO = docs/UFS_logo.png +DISABLE_INDEX = YES +GENERATE_TREEVIEW = YES diff --git a/stochastic_physics/LICENSE.md b/stochastic_physics/LICENSE.md new file mode 100644 index 0000000000..fcd4df552f --- /dev/null +++ b/stochastic_physics/LICENSE.md @@ -0,0 +1,21 @@ +Copyright 2020 The Regents of the University of Colorado + +The stochastic_physics code incorporated in the Unified Forecast System (UFS) +was jointly developed by the National Oceanic and Atmospheric Administration and the +University of Colorado, Boulder. The gold standard copy of the Code +will be maintained by NOAA at https://github.com/noaa-psd/stochastic_physics. + +In cooperation with the Copyright Holder, the National Oceanic and +Atmospheric Administration is releasing this code under the +GNU Lesser General PUblic License v3.0 (the "License"); you may not use this +file except in compliance with the License. + +You may obtain a copy of the License at + + https://www.gnu.org/licenses/lgpl-3.0.en.html + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License diff --git a/stochastic_physics/README.md b/stochastic_physics/README.md new file mode 100644 index 0000000000..0451eb3595 --- /dev/null +++ b/stochastic_physics/README.md @@ -0,0 +1,3 @@ +# stochastic_physics + +Contains the stochastic physics pattern generator for the Unified Forecast System developed at NOAA/ESRL/PSL. diff --git a/stochastic_physics/README.standalone b/stochastic_physics/README.standalone new file mode 100644 index 0000000000..15e0651590 --- /dev/null +++ b/stochastic_physics/README.standalone @@ -0,0 +1,33 @@ +Instructions on how to build and run the stand alone ca_global code on hera +1. Copy enitre directory strucure + cd /scratch2/BMC/gsienkf/Philip.Pegion + cp -r NEMSfv3gfs_develop + +2. Optional Compile full model: (I alredy built is, so you should not have to) + cd /tests/ + ./compile.sh $PWD/../FV3 hera.intel '32BIT=Y HYDRO=N' 1 NO NO + +4. compile standalone model + cd ../stochastic_physics + # my loaded modules: + 1) intel/18.0.5.274 3) netcdf/4.7.0 5) contrib 7) anaconda/latest + 2) impi/2018.0.4 4) hdf5/1.10.5 6) grads/2.2.1 + + + compile_standalone_ca OR compile_standalone + +5. There is an input.nml which is currently set to run at C96, and the INPUT directory points to + C96 grid files. If you want to run at C384, you will need to rm INPUT and link in the C384 + directory (ln -sf INPUT_C384 INPUT) and make npx and npy 385 in input.nml + +5. get an interactive session + + salloc --x11=first -q debug -t 0:30:00 --nodes=1 -A -n 6 + +6. run job + srun standalone_ca OR standalone_stochy + +7. post-process job to 360x180 grid (script is on hera in ~Philip.Pegion) + run_fregrid.sh (OR run_fregrid_c384.sh) + + output file is ca_out.nc diff --git a/stochastic_physics/cellular_automata_global.F90 b/stochastic_physics/cellular_automata_global.F90 new file mode 100644 index 0000000000..2f3f236cf8 --- /dev/null +++ b/stochastic_physics/cellular_automata_global.F90 @@ -0,0 +1,308 @@ +module cellular_automata_global_mod + +use update_ca, only : domain_global,iscnx_g,iecnx_g,jscnx_g,jecnx_g,isdnx_g,iednx_g,jsdnx_g,jednx_g, & + nxncells_g,nyncells_g,csum,cold_start_ca_global +implicit none + +contains + +subroutine cellular_automata_global(kstep,restart,first_time_step,ca1_cpl,ca2_cpl,ca3_cpl, & + domain_in,nblks,isc,iec,jsc,jec,npx,npy,nlev, & + nca,ncells,nlives,nfracseed,nseed,iseed_ca, mytile, & + ca_smooth,nspinup,blocksize,nsmooth,ca_amplitude,mpiroot,mpicomm) + +use kinddef, only: kind_dbl_prec +use update_ca, only: update_cells_global,define_ca_domain +use halo_exchange, only: atmosphere_scalar_field_halo +use random_numbers, only: random_01_CB +use mpp_domains_mod, only: domain2D,mpp_get_global_domain,CENTER, mpp_get_data_domain, mpp_get_compute_domain,mpp_global_sum, & + BITWISE_EFP_SUM, BITWISE_EXACT_SUM +use block_control_mod, only: block_control_type, define_blocks_packed +use mpi_wrapper, only: mp_reduce_sum,mp_reduce_max,mp_reduce_min, & + mpi_wrapper_initialize,mype,is_rootpe + +implicit none + +!L.Bengtsson, 2017-06 +!P.Pegion, 2021-09 +! swtich to new random number generator and improve computational efficiency +! and remove unsued code. Also add restart capability ca_global + +!This program evolves a cellular automaton uniform over the globe + +integer, intent(in) :: kstep,ncells,nca,nlives,nseed,nspinup,nsmooth,mpiroot,mpicomm +integer(kind=kind_dbl_prec), intent(in) :: iseed_ca +integer, intent(in) :: mytile +real(kind=kind_dbl_prec), intent(in) :: nfracseed,ca_amplitude +logical, intent(in) :: ca_smooth,first_time_step, restart +integer, intent(in) :: nblks,isc,iec,jsc,jec,npx,npy,nlev,blocksize +real(kind=kind_dbl_prec), intent(out) :: ca1_cpl(:,:),ca2_cpl(:,:),ca3_cpl(:,:) +type(domain2D), intent(inout) :: domain_in +type(block_control_type) :: Atm_block +integer :: nlon, nlat, isize,jsize,nf,nn +integer :: inci, incj, nxc, nyc, nxch, nych +integer :: halo, k_in, i, j, k +integer :: seed, ierr7,blk, ix, iix, count4,ih,jh +integer :: blocksz,levs +integer,save :: isdnx,iednx,jsdnx,jednx +integer,save :: iscnx,iecnx,jscnx,jecnx +integer :: nxncells, nyncells +integer(8) :: count, count_rate, count_max, count_trunc,nx_full +integer(8) :: iscale = 10000000000 +integer, allocatable :: iini_g(:,:,:),ilives_g(:,:) +real(kind=kind_dbl_prec), allocatable :: field_out(:,:,:), field_smooth(:,:) +real(kind=kind_dbl_prec), allocatable :: CA(:,:),CA1(:,:),CA2(:,:),CA3(:,:),CAprime(:,:) +real*8 , allocatable :: noise(:,:,:) +real*8 :: psum,CAmean,sq_diff,CAstdv,inv9 +real*8 :: Detmax,Detmin +logical,save :: block_message=.true. +integer*8 :: i1,j1 +integer :: ct + + +!nca :: switch for number of cellular automata to be used. +!nfracseed :: switch for number of random cells initially seeded +!nlives :: switch for maximum number of lives a cell can have +!nspinup :: switch for number of itterations to spin up the ca +!ncells :: switch for higher resolution grid e.g ncells=4 +! gives 4x4 times the FV3 model grid resolution. +!ca_smooth :: switch to smooth the cellular automata +if (nca .LT. 1) return +! Initialize MPI and OpenMP +if (first_time_step) then + call mpi_wrapper_initialize(mpiroot,mpicomm) +end if + +halo=1 +k_in=1 + +!---------------------------------------------------------------------------- +! Get information about the compute domain, allocate fields on this +! domain + +! WRITE(*,*)'Entering cellular automata calculations' + +! Some security checks for namelist combinations: + if(nca > 3)then + write(0,*)'Namelist option nca cannot be larger than 3 - exiting' + stop + endif + + + nlon=iec-isc+1 + nlat=jec-jsc+1 + isize=nlon+2*halo + jsize=nlat+2*halo + + inci=ncells + incj=ncells + + + !--- get params from domain_ncellx for building board and board_halo + !Get CA domain + + if(first_time_step)then +! if (.not. restart) call define_ca_domain(domain_in,domain_global,ncells,nxncells_g,nyncells_g) + domain_global=domain_in + call mpp_get_data_domain (domain_global,isdnx_g,iednx_g,jsdnx_g,jednx_g) + call mpp_get_compute_domain (domain_global,iscnx_g,iecnx_g,jscnx_g,jecnx_g) + endif + + nxc = iecnx_g-iscnx_g+1 + nyc = jecnx_g-jscnx_g+1 + nxch = iednx_g-isdnx_g+1 + nych = jednx_g-jsdnx_g+1 + inv9=1.0/9.0 + if(first_time_step) csum=int(6*(npx-1),kind=8)*int((npx-1),kind=8) + + + !Allocate fields: + allocate(field_out(isize,jsize,1)) + allocate(field_smooth(nlon,nlat)) + allocate(iini_g(nxc,nyc,nca)) + allocate(ilives_g(nxc,nyc)) + allocate(CA(nlon,nlat)) + allocate(CAprime(nlon,nlat)) + allocate(CA1(nlon,nlat)) + allocate(CA2(nlon,nlat)) + allocate(CA3(nlon,nlat)) + allocate(noise(nxc,nyc,nca)) + nx_full=int(npx-1,kind=8) + + !Initialize: + + noise(:,:,:) = 0.0 + iini_g(:,:,:) = 0 + ilives_g(:,:) = 0 + CA1(:,:) = 0.0 + CA2(:,:) = 0.0 + CA3(:,:) = 0.0 + + !Put the blocks of model fields into a 2d array - can't use nlev and blocksize directly, + !because the arguments to define_blocks_packed are intent(inout) and not intent(in). + levs=nlev + blocksz=blocksize + + call define_blocks_packed('cellular_automata', Atm_block, isc, iec, jsc, jec, levs, & + blocksz, block_message) + + do j=1,nyc + j1=j+(jsc-1)*ncells + do i=1,nxc + i1=i+(isc-1)*ncells + if (iseed_ca <= 0) then + ! generate a random seed from system clock and ens member number + call system_clock(count, count_rate, count_max) + ! iseed is elapsed time since unix epoch began (secs) + ! truncate to 4 byte integer + count_trunc = iscale*(count/iscale) + count4 = count - count_trunc + mytile *( i1+nx_full*(j1-1)) ! no need to multply by 7 since time will be different in sgs + else + ! don't rely on compiler to truncate integer(8) to integer(4) on + ! overflow, do wrap around explicitly. + count4 = mod(((iseed_ca+7)*mytile)*(i1+nx_full*(j1-1))+ 2147483648, 4294967296) - 2147483648 + endif + ct=1 + do nf=1,nca + noise(i,j,nf)=real(random_01_CB(ct*kstep,count4),kind=8) + ct=ct+1 + enddo + enddo + enddo + +!Initiate the cellular automaton with random numbers larger than nfracseed + + do nf=1,nca + do j = 1,nyc + do i = 1,nxc + if (noise(i,j,nf) > nfracseed ) then + iini_g(i,j,nf)=1 + else + iini_g(i,j,nf)=0 + endif + enddo + enddo + enddo !nf + +!In case we want to condition the cellular automaton on a large scale field +!we here set the "condition" variable to a different model field depending +!on nf. (this is not used if ca_global = .true.) + + + do nf=1,nca !update each ca + do j = 1,nyc + do i = 1,nxc + ilives_g(i,j)=int(real(nlives)*1.5*noise(i,j,nf)) + enddo + enddo + + +!Calculate neighbours and update the automata +!If ca-global is used, then nca independent CAs are called and weighted together to create one field; CA + + + CA(:,:)=0. + + call update_cells_global(kstep,first_time_step,iseed_ca,restart,nca,nxc,nyc,nxch,nych,nlon,nlat,isc,iec,jsc,jec, & + npx,npy,CA,iini_g,ilives_g, & + nlives,ncells,nfracseed,nseed,nspinup,nf,mytile) + + if (ca_smooth) then + + field_out=0. + field_out(1+halo:nlon+halo,1+halo:nlat+halo,1) = real(CA(1:nlon,1:nlat),kind=8) + do nn=1,nsmooth !number of iterations for the smoothing. + + call atmosphere_scalar_field_halo(field_out,halo,isize,jsize,k_in,isc,iec,jsc,jec,npx,npy,domain_global) + + do j=1,nlat + do i=1,nlon + ih=i+halo + jh=j+halo + field_smooth(i,j)=(field_out(ih,jh,1)+field_out(ih-1,jh,1)+ & + field_out(ih,jh-1,1)+field_out(ih+1,jh,1)+& + field_out(ih,jh+1,1)+field_out(ih-1,jh-1,1)+& + field_out(ih-1,jh+1,1)+field_out(ih+1,jh+1,1)+& + field_out(ih+1,jh-1,1))*inv9 + enddo + enddo + field_out(1+halo:nlon+halo,1+halo:nlat+halo,1) = field_smooth(1:nlon,1:nlat) + enddo !nn + do j=1,nlat + do i=1,nlon + CA(i,j)=field_smooth(i,j) + enddo + enddo + endif !smooth + !mean: + !psum=SUM(CA) + !call mp_reduce_sum(psum) + + psum= mpp_global_sum (domain_global, CA, flags=BITWISE_EXACT_SUM) + CAmean=psum/csum + + !std: + !sq_diff = 0. + do j=1,nlat + do i=1,nlon + CAprime(i,j) = (CA(i,j)-CAmean)**2.0 + enddo + enddo + + !call mp_reduce_sum(sq_diff) + sq_diff= mpp_global_sum (domain_global, CAprime, flags=BITWISE_EXACT_SUM) + + CAstdv = sqrt(sq_diff/csum) + + !Transform to mean of 1 and ca_amplitude standard deviation + + do j=1,nlat + do i=1,nlon + CA(i,j)=1.0 + (CA(i,j)-CAmean)*(ca_amplitude/CAstdv) + enddo + enddo + do j=1,nlat + do i=1,nlon + CA(i,j)=min(max(CA(i,j),0.),2.0) + enddo + enddo + +!Put back into blocks 1D array to be passed to physics +!or diagnostics output + + if(nf==1)then + CA1(:,:)=CA(:,:) + elseif(nf==2)then + CA2(:,:)=CA(:,:) + else + CA3(:,:)=CA(:,:) + endif + + enddo !nf + + do blk = 1, Atm_block%nblks + do ix = 1,Atm_block%blksz(blk) + i = Atm_block%index(blk)%ii(ix) - isc + 1 + j = Atm_block%index(blk)%jj(ix) - jsc + 1 + ca1_cpl(blk,ix)=CA1(i,j) + ca2_cpl(blk,ix)=CA2(i,j) + ca3_cpl(blk,ix)=CA3(i,j) + enddo + enddo + + + + deallocate(field_out) + deallocate(field_smooth) + deallocate(iini_g) + deallocate(ilives_g) + deallocate(CA) + deallocate(CAprime) + deallocate(CA1) + deallocate(CA2) + deallocate(CA3) + deallocate(noise) + +end subroutine cellular_automata_global + +end module cellular_automata_global_mod diff --git a/stochastic_physics/cellular_automata_sgs.F90 b/stochastic_physics/cellular_automata_sgs.F90 new file mode 100644 index 0000000000..2bd47f6b49 --- /dev/null +++ b/stochastic_physics/cellular_automata_sgs.F90 @@ -0,0 +1,338 @@ +module cellular_automata_sgs_mod + +use update_ca, only : domain_global,domain_sgs,iscnx,iecnx,jscnx,jecnx,isdnx,iednx,jsdnx,jednx,nxncells,nyncells,cold_start_ca_sgs +implicit none + + +contains + +subroutine cellular_automata_sgs(kstep,dtf,restart,first_time_step,sst,lsmsk,lake,condition_cpl, & + ca_deep_cpl,ca_turb_cpl,ca_shal_cpl,domain_in, & + nblks,isc,iec,jsc,jec,npx,npy,nlev,nthresh, mytile, & + nca,ncells,nlives,nfracseed,nseed,iseed_ca, & + nspinup,ca_trigger,blocksize,mpiroot,mpicomm) + +use kinddef, only: kind_phys,kind_dbl_prec +use update_ca, only: update_cells_sgs, define_ca_domain +use random_numbers, only: random_01_CB +use mpp_domains_mod, only: domain2D,mpp_get_global_domain,CENTER, mpp_get_data_domain, mpp_get_compute_domain,& + mpp_define_io_domain,mpp_get_io_domain_layout +use block_control_mod, only: block_control_type, define_blocks_packed +use time_manager_mod, only: time_type +use mpi_wrapper, only: mype,mp_reduce_max, & + mpi_wrapper_initialize + + + +implicit none +!L.Bengtsson, 2017-06 + +!L.Bengtsson, 2021-05 +!Significant cleaning of old ideas +!Inclusion of restart capability +!Setting control variables as a function of dx and dt +!for scale adaptation. + +!P.Pegion, 2021-09 +! swtich to new random number generator and improve computational efficiency +! and remove unsued code + +!This routine produces an output field CA_DEEP for coupling to convection (saSAS). +!CA_DEEP can be either number of plumes in a cluster (nca_plumes=true) or updraft +!area fraction (nca_plumes=false) + +integer,intent(in) :: kstep,ncells,nca,nlives,nseed,nspinup,mpiroot,mpicomm,mytile +integer(kind=kind_dbl_prec), intent(in) :: iseed_ca +real(kind=kind_phys), intent(in) :: nfracseed,dtf,nthresh +logical,intent(in) :: restart,ca_trigger,first_time_step +integer, intent(in) :: nblks,isc,iec,jsc,jec,npx,npy,nlev,blocksize +real(kind=kind_phys), intent(in) :: sst(:,:),lsmsk(:,:),lake(:,:) +real(kind=kind_phys), intent(inout) :: condition_cpl(:,:) +real(kind=kind_phys), intent(inout) :: ca_deep_cpl(:,:) +real(kind=kind_phys), intent(inout) :: ca_turb_cpl(:,:) +real(kind=kind_phys), intent(inout) :: ca_shal_cpl(:,:) +type(domain2D), intent(inout) :: domain_in + +type(block_control_type) :: Atm_block +integer :: nlon, nlat, isize,jsize,nf,nn +integer :: inci, incj, nxc, nyc, nxch, nych, nx, ny +integer :: halo, k_in, i, j, k +integer :: seed, ierr7,blk, ix, iix, count4,ih,jh +integer :: blocksz,levs +integer, save :: initialize_ca +integer(8) :: count, count_rate, count_max, count_trunc,nx_full +integer(8) :: iscale = 10000000000 +integer, allocatable :: iini(:,:,:),ilives_in(:,:,:),ca_plumes(:,:),io_layout(:) +real(kind=kind_phys), allocatable :: ssti(:,:),lsmski(:,:),lakei(:,:) +real(kind=kind_phys), allocatable :: CA(:,:),condition(:,:),conditiongrid(:,:) +real(kind=kind_phys), allocatable :: CA_DEEP(:,:) +real*8 , allocatable :: noise(:,:,:) +real(kind=kind_phys) :: condmax,condmaxinv,livesmax,livesmaxinv,factor,dx,pi,re +logical,save :: block_message=.true. +logical :: nca_plumes +logical,save :: first_flag +integer*8 :: i1,j1 +integer :: ct + +!nca :: switch for number of cellular automata to be used. +! :: for the moment only 1 CA can be used +!nfracseed :: switch for number of random cells initially seeded +!nlives :: switch for time scale (s) +!nspinup :: switch for number of itterations to spin up the ca +!ncells :: switch for CA cell size (m) +!nca_plumes :: compute number of CA-cells ("plumes") within a NWP gridbox. + +if (nca .LT. 1) return +! Initialize MPI and OpenMP +if (first_time_step) then + call mpi_wrapper_initialize(mpiroot,mpicomm) +end if + +halo=1 +k_in=1 + +nca_plumes = .true. + +if(first_time_step)then + first_flag = .false. + initialize_ca = 100000 +endif + +!---------------------------------------------------------------------------- +! Get information about the compute domain, allocate fields on this +! domain + +! Some security checks for namelist combinations: + if(nca > 1)then + write(0,*)'When ca_sgs=.True., nca has to be 1 - exiting' + stop + endif + + nlon=iec-isc+1 + nlat=jec-jsc+1 + isize=nlon+2*halo + jsize=nlat+2*halo + + !Set time and length scales: + call mpp_get_global_domain(domain_in,xsize=nx,ysize=ny,position=CENTER) + + if(mype == 1)then + write(*,*)'ncells=',ncells + write(*,*)'nlives=',nlives + write(*,*)'nthresh=',nthresh + endif + + inci=ncells + incj=ncells + +!--- get params from domain_sgs for building board and board_halo + + if(first_time_step)then + !Get CA domain + if (.not.restart) then + allocate(io_layout(2)) + io_layout=mpp_get_io_domain_layout(domain_in) + call define_ca_domain(domain_in,domain_sgs,ncells,nxncells,nyncells) + call mpp_define_io_domain(domain_sgs, io_layout) + endif + call mpp_get_data_domain (domain_sgs,isdnx,iednx,jsdnx,jednx) + call mpp_get_compute_domain (domain_sgs,iscnx,iecnx,jscnx,jecnx) + !write(1000+mpp_pe(),*) "nxncells,nyncells: ",nxncells,nyncells + !write(1000+mpp_pe(),*) "iscnx,iecnx,jscnx,jecnx: ",iscnx,iecnx,jscnx,jecnx + !write(1000+mpp_pe(),*) "isdnx,iednx,jsdnx,jednx: ",isdnx,iednx,jsdnx,jednx +endif + + nxc = iecnx-iscnx+1 + nyc = jecnx-jscnx+1 + nxch = iednx-isdnx+1 + nych = jednx-jsdnx+1 + + !Allocate fields: + + allocate(ssti(nlon,nlat)) + allocate(lsmski(nlon,nlat)) + allocate(lakei(nlon,nlat)) + allocate(iini(nxc,nyc,nca)) + allocate(ilives_in(nxc,nyc,nca)) + allocate(condition(nxc,nyc)) + allocate(conditiongrid(nlon,nlat)) + allocate(CA(nlon,nlat)) + allocate(ca_plumes(nlon,nlat)) + allocate(CA_DEEP(nlon,nlat)) + + !Initialize: + ilives_in(:,:,:) = 0 + iini(:,:,:) = 0 + + !Put the blocks of model fields into a 2d array - can't use nlev and blocksize directly, + !because the arguments to define_blocks_packed are intent(inout) and not intent(in). + levs=nlev + blocksz=blocksize + + call define_blocks_packed('cellular_automata', Atm_block, isc, iec, jsc, jec, levs, & + blocksz, block_message) + + do blk = 1,Atm_block%nblks + do ix = 1, Atm_block%blksz(blk) + i = Atm_block%index(blk)%ii(ix) - isc + 1 + j = Atm_block%index(blk)%jj(ix) - jsc + 1 + conditiongrid(i,j) = condition_cpl(blk,ix) + ssti(i,j) = sst(blk,ix) + lsmski(i,j) = lsmsk(blk,ix) + lakei(i,j) = lake(blk,ix) + enddo + enddo + +!Initialize the CA when the condition field is populated + do j=1,nyc + do i=1,nxc + condition(i,j)=conditiongrid(inci/ncells,incj/ncells) + if(i.eq.inci)then + inci=inci+ncells + endif + enddo + inci=ncells + if(j.eq.incj)then + incj=incj+ncells + endif + enddo + + condmax=maxval(condition) + condmaxinv=0.0 + call mp_reduce_max(condmax) + if(condmax > 0.)then + if(.not. first_flag)then + first_flag = .true. + initialize_ca = kstep + endif + condmaxinv=1.0/condmax + endif + +if(kstep >=initialize_ca)then + do nf=1,nca + do j = 1,nyc + do i = 1,nxc + ilives_in(i,j,nf)=int(real(nlives)*(condition(i,j)*condmaxinv)) + enddo + enddo + enddo + +else + + do nf=1,nca + do j = 1,nyc + do i = 1,nxc + ilives_in(i,j,nf)=0 + enddo + enddo + enddo + +endif + +!Generate random number, following stochastic physics code: +if (cold_start_ca_sgs) then + if(kstep == initialize_ca) then + nx_full=int(ncells,kind=8)*int(npx-1,kind=8) + allocate(noise(nxc,nyc,nca)) + do j=1,nyc + j1=j+(jsc-1)*ncells + do i=1,nxc + i1=i+(isc-1)*ncells + if (iseed_ca <= 0) then + ! generate a random seed from system clock and ens member number + call system_clock(count, count_rate, count_max) + ! iseed is elapsed time since unix epoch began (secs) + ! truncate to 4 byte integer + count_trunc = iscale*(count/iscale) + count4 = count - count_trunc + mytile *( i1+nx_full*(j1-1)) ! no need to multply by 7 since time will be different in sgs + else + ! don't rely on compiler to truncate integer(8) to integer(4) on + ! overflow, do wrap around explicitly. + count4 = mod((iseed_ca+mytile)*(i1+nx_full*(j1-1))+ 2147483648, 4294967296) - 2147483648 + endif + ct=1 + do nf=1,nca + noise(i,j,nf)=real(random_01_CB(ct,count4),kind=8) + ct=ct+1 + enddo + enddo + enddo + + !Initiate the cellular automaton with random numbers larger than nfracseed + do nf=1,nca + do j = 1,nyc + do i = 1,nxc + if (noise(i,j,nf) > nfracseed ) then + iini(i,j,nf)=1 + else + iini(i,j,nf)=0 + endif + enddo + enddo + enddo !nf + + deallocate(noise) + endif ! +endif ! cold_start_ca_sgs + +!Calculate neighbours and update the automata + do nf=1,nca + call update_cells_sgs(kstep,initialize_ca,iseed_ca,first_flag,restart,first_time_step,nca,nxc,nyc, & + nxch,nych,nlon,nlat,isc,iec,jsc,jec, & + npx,npy,CA,ca_plumes,iini,ilives_in, & + nlives,nfracseed,nseed,nspinup,nf,nca_plumes,ncells,mytile) + + if(nca_plumes)then + do j=1,nlat + do i=1,nlon + CA_DEEP(i,j)=ca_plumes(i,j) + enddo + enddo + else + livesmax=maxval(ilives_in) + call mp_reduce_max(livesmax) + livesmaxinv=1.0/livesmax + do j=1,nlat + do i=1,nlon + CA_DEEP(i,j)=CA(i,j)*livesmaxinv + enddo + enddo + endif + + enddo !nf (nca) + +!Limit CA activity to the Tropical Ocean + +do j=1,nlat + do i=1,nlon + if(ssti(i,j) < 300. .or. lsmski(i,j) /= 0. .or. lakei(i,j) > 0.0)then + CA_DEEP(i,j)=0. + endif + enddo +enddo + +!Put back into blocks 1D array to be passed to physics +!or diagnostics output + + do blk = 1, Atm_block%nblks + do ix = 1,Atm_block%blksz(blk) + i = Atm_block%index(blk)%ii(ix) - isc + 1 + j = Atm_block%index(blk)%jj(ix) - jsc + 1 + ca_deep_cpl(blk,ix)=CA_DEEP(i,j) + enddo + enddo + + deallocate(conditiongrid) + deallocate(ssti) + deallocate(lsmski) + deallocate(lakei) + deallocate(iini) + deallocate(ilives_in) + deallocate(condition) + deallocate(CA) + deallocate(ca_plumes) + deallocate(CA_DEEP) + +end subroutine cellular_automata_sgs + +end module cellular_automata_sgs_mod diff --git a/stochastic_physics/compns_stochy.F90 b/stochastic_physics/compns_stochy.F90 new file mode 100644 index 0000000000..15b68bd3e5 --- /dev/null +++ b/stochastic_physics/compns_stochy.F90 @@ -0,0 +1,531 @@ +!>@brief The module 'compns_stochy_mod' contains the subroutine compns_stochy +module compns_stochy_mod + + implicit none + + contains + +!----------------------------------------------------------------------- +!>@brief The module 'compns_stochy_mod' set the default namelist options reads in the stochastic physics namelist +!! and sets logicals and other parameters based on the namelist +!>@details Namelist can be either a file, or an internal namelist + subroutine compns_stochy (me,sz_nml,input_nml_file,fn_nml,nlunit,deltim,iret) +!$$$ Subprogram Documentation Block +! +! Subprogram: compns Check and compute namelist frequencies +! Prgmmr: Iredell Org: NP23 Date: 1999-01-26 +! +! Abstract: This subprogram checks global spectral model namelist +! frequencies in hour units for validity. If they are valid, +! then the frequencies are computed in timestep units. +! The following rules are applied: +! 1. the timestep must be positive; +! +! Program History Log: +! 2016-10-11 Phil Pegion make the stochastic physics stand alone +! +! Usage: call compns_stochy (me,deltim,nlunit, stochy_namelist,iret) +! Input Arguments: +! deltim - real timestep in seconds +! Output Arguments: +! iret - integer return code (0 if successful or +! between 1 and 8 for which rule above was broken) +! stochy_namelist +! +! Attributes: +! Language: Fortran 90 +! +!$$$ + + + use stochy_namelist_def + + implicit none + + + integer, intent(out) :: iret + integer, intent(in) :: nlunit,me,sz_nml + character(len=*), intent(in) :: input_nml_file(sz_nml) + character(len=64), intent(in) :: fn_nml + real, intent(in) :: deltim + real tol,l_min + real :: rerth,circ,tmp_lat + integer k,ios + integer,parameter :: four=4 + +! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +! + namelist /nam_stochy/ntrunc,lon_s,lat_s,sppt,sppt_tau,sppt_lscale,sppt_logit, & + iseed_shum,iseed_sppt,shum,shum_tau,& + shum_lscale,stochini,skeb_varspect_opt,sppt_sfclimit, & + skeb,skeb_tau,skeb_vdof,skeb_lscale,iseed_skeb,skeb_vfilt,skeb_diss_smooth, & + skeb_sigtop1,skeb_sigtop2,skebnorm,sppt_sigtop1,sppt_sigtop2,& + shum_sigefold,spptint,shumint,skebint,skeb_npass,use_zmtnblck,new_lscale, & + epbl,epbl_lscale,epbl_tau,iseed_epbl, & + ocnsppt,ocnsppt_lscale,ocnsppt_tau,iseed_ocnsppt + namelist /nam_sfcperts/lndp_type,lndp_var_list, lndp_prt_list, iseed_lndp, & + lndp_tau,lndp_lscale +! For SPP physics parameterization perterbations + namelist /nam_sppperts/spp_var_list, spp_prt_list, iseed_spp, & + spp_tau,spp_lscale,spp_sigtop1, spp_sigtop2,spp_stddev_cutoff + + rerth =6.3712e+6 ! radius of earth (m) + tol=0.01 ! tolerance for calculations +! spectral resolution defintion + ntrunc=-999 + lon_s=-999 + lat_s=-999 + ! can specify up to 5 values for the stochastic physics parameters + ! (each is an array of length 5) + sppt = -999. ! stochastic physics tendency amplitude + shum = -999. ! stochastic boundary layer spf hum amp + skeb = -999. ! stochastic KE backscatter amplitude + lndp_var_list = 'XXX' + lndp_prt_list = -999. + spp_var_list = 'XXX' + spp_prt_list = -999. +! logicals + do_sppt = .false. + use_zmtnblck = .false. + new_lscale = .false. + do_shum = .false. + do_skeb = .false. + do_spp = .false. +! C. Draper July 2020. +! input land pert variables: +! LNDP_TYPE = 0 +! no explicit land perturbations +! LNDP_Type = 1 +! this is the initial land sfc pert scheme, introduced and tested for impact on GEFS forecasts. +! see https://journals.ametsoc.org/doi/full/10.1175/MWR-D-18-0057.1 +! perturbations are assigned once at the start of the forecast +! LNDP_TYPE = 2 +! this is the newer land pert scheme, introduced and tested for impact on UFS/GDAS cycling stsyem +! perturbations are assigned at each time step (for state variables), or each time parameters are updated +! and the perturbations evolve over time. + lndp_type = 0 ! + lndp_lscale = -999. ! length scales + lndp_tau = -999. ! time scales + iseed_lndp = 0 ! random seeds (if 0 use system clock) +! for SKEB random patterns. + skeb_vfilt = 0 + skebint = 0 + spptint = 0 + shumint = 0 + skeb_npass = 11 ! number of passes of smoother for dissipation estiamte + sppt_tau = -999. ! time scales + shum_tau = -999. + skeb_tau = -999. + skeb_vdof = 5 ! proxy for vertical correlation, 5 is close to 40 passes of the 1-2-1 filter in the GFS + skebnorm = 0 ! 0 - random pattern is stream function, 1- pattern is kenorm, 2- pattern is vorticity + sppt_lscale = -999. ! length scales + shum_lscale = -999. + skeb_lscale = -999. + iseed_sppt = 0 ! random seeds (if 0 use system clock) + iseed_shum = 0 + iseed_skeb = 0 +! parameters to control vertical tapering of stochastic physics with +! height + sppt_sigtop1 = 0.1 + sppt_sigtop2 = 0.025 + skeb_sigtop1 = 0.1 + skeb_sigtop2 = 0.025 + shum_sigefold = 0.2 + spp_sigtop1 = 0.1 + spp_sigtop2 = 0.025 +! reduce amplitude of sppt near surface (lowest 2 levels) + sppt_sfclimit = .false. +! gaussian or power law variance spectrum for skeb (0: gaussian, 1: +! power law). If power law, skeb_lscale interpreted as a power not a +! length scale. + skeb_varspect_opt = 0 + sppt_logit = .false. ! logit transform for sppt to bounded interval [-1,+1] + stochini = .false. ! true= read in pattern, false=initialize from seed +! For SPP perturbations + spp_lscale = -999. ! length scales + spp_tau = -999. ! time scales + spp_stddev_cutoff = 0 ! cutoff/limit for std-dev (zero==no limit applied) + iseed_spp = 0 ! random seeds (if 0 use system clock) + +#ifdef INTERNAL_FILE_NML + read(input_nml_file, nml=nam_stochy) +#else + rewind (nlunit) + open (unit=nlunit, file=fn_nml, action='READ', status='OLD', iostat=ios) + read(nlunit,nam_stochy) +#endif +#ifdef INTERNAL_FILE_NML + read(input_nml_file, nml=nam_sfcperts) +#else + rewind (nlunit) + open (unit=nlunit, file=fn_nml, action='READ', status='OLD', iostat=ios) + read(nlunit,nam_sfcperts) +#endif + +#ifdef INTERNAL_FILE_NML + read(input_nml_file, nml=nam_sppperts, iostat=ios) +#else + rewind (nlunit) + open (unit=nlunit, file=fn_nml, action='READ', status='OLD', iostat=ios) + read(nlunit,nam_sppperts) +#endif + + if (me == 0) then + print *,' in compns_stochy' + print*,'spp_lscale=',spp_lscale + print*,'spp_tau=',spp_tau + print*,'spp_stddev_cutoff=',spp_stddev_cutoff + endif + +! PJP stochastic physics additions + IF (sppt(1) > 0 ) THEN + do_sppt=.true. + ENDIF + IF (shum(1) > 0 ) THEN + do_shum=.true. +! shum parameter has units of 1/hour, to remove time step +! dependence. +! change shum parameter units from per hour to per timestep + DO k=1,5 + IF (shum(k) .gt. 0.0) shum(k)=shum(k)*deltim/3600.0 + ENDDO + ENDIF + IF (skeb(1) > 0 ) THEN + do_skeb=.true. + if (skebnorm==0) then ! stream function norm + skeb=skeb*1.111e3*sqrt(deltim) + endif + if (skebnorm==1) then ! stream function norm + skeb=skeb*0.00222*sqrt(deltim) + endif + if (skebnorm==2) then ! vorticty function norm + skeb=skeb*1.111e-9*sqrt(deltim) + endif + ENDIF +! compute frequencty to estimate dissipation timescale + IF (skebint == 0.) skebint=deltim + nsskeb=nint(skebint/deltim) ! skebint in seconds + IF(nsskeb<=0 .or. abs(nsskeb-skebint/deltim)>tol) THEN + WRITE(0,*) "SKEB interval is invalid",skebint + iret=9 + return + ENDIF + IF (spptint == 0.) spptint=deltim + nssppt=nint(spptint/deltim) ! spptint in seconds + IF(nssppt<=0 .or. abs(nssppt-spptint/deltim)>tol) THEN + WRITE(0,*) "SPPT interval is invalid",spptint + iret=9 + return + ENDIF + IF (shumint == 0.) shumint=deltim + nsshum=nint(shumint/deltim) ! shumint in seconds + IF(nsshum<=0 .or. abs(nsshum-shumint/deltim)>tol) THEN + WRITE(0,*) "SHUM interval is invalid",shumint + iret=9 + return + ENDIF +!calculate ntrunc if not supplied + if (ntrunc .LT. 1) then + if (me==0) print*,'ntrunc not supplied, calculating' + circ=2*3.1415928*rerth ! start with lengthscale that is circumference of the earth + l_min=circ + do k=1,5 + if (sppt(k).GT.0) l_min=min(sppt_lscale(k),l_min) + if (shum(k).GT.0) l_min=min(shum_lscale(k),l_min) + if (skeb(k).GT.0) l_min=min(skeb_lscale(k),l_min) + enddo + if (lndp_type.GT.0) l_min=min(lndp_lscale(1),l_min) + if (spp_prt_list(1).GT.0) l_min=min(spp_lscale(1),l_min) + !ntrunc=1.5*circ/l_min + ntrunc=circ/l_min + if (me==0) print*,'ntrunc calculated from l_min',l_min,ntrunc + endif + ! ensure lat_s is a mutiple of 4 with a reminader of two + ntrunc=INT((ntrunc+1)/four)*four+2 + if (me==0) print*,'NOTE ntrunc adjusted for even nlats',ntrunc + +! set up gaussian grid for ntrunc if not already defined. + if (lon_s.LT.1 .OR. lat_s.LT.1) then + lat_s=ntrunc*1.5+1 + lon_s=lat_s*2+4 +! Grid needs to be larger since interpolation is bi-linear + lat_s=lat_s*2 + lon_s=lon_s*2 + if (me==0) print*,'gaussian grid not set, defining here',lon_s,lat_s + endif + +! +! land perts - parse nml input +! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + select case (lndp_type) + case (0) + if (me==0) print*, & + 'no land perturbations selected' + case (1,2) + ! count requested pert variables + n_var_lndp= 0 + do k =1,size(lndp_var_list) + if ( (lndp_var_list(k) .EQ. 'XXX') .or. (lndp_prt_list(k) .LE. 0.) ) then + cycle + else + n_var_lndp=n_var_lndp+1 + lndp_var_list( n_var_lndp) = lndp_var_list(k) ! for lndp_type==2: + ! for state variables, unit is pert per hour + ! for parmaters, no time dimension in unit + ! since perturbations do not accumulate + ! (i.e., global_cycle overwrites the paramaters + ! each time it's called, so any previous perturbations + ! are lost). + lndp_prt_list( n_var_lndp) = lndp_prt_list(k) + endif + enddo + if (n_var_lndp > max_n_var_lndp) then + print*, 'ERROR: land perturbation requested for too many parameters', & + 'increase max_n_var_lndp' + iret = 10 + return + endif + + + if (lndp_type==1) then + if (me==0) print*, & + 'lndp_type=1, land perturbations will be applied to selected paramaters, using older scheme designed for S2S fcst spread' + ! sanity-check requested input + do k =1,n_var_lndp + select case (lndp_var_list(k)) + case('rz0','rzt','shc','lai','vgf','alb') + if (me==0) print*, 'land perturbation will be applied to ', lndp_var_list(k) + case default + print*, 'ERROR: land perturbation requested for unknown parameter', lndp_var_list(k) + iret = 10 + return + end select + enddo + elseif(lndp_type==2) then + if (me==0) print*, & + 'land perturbations will be applied to selected paramaters, using newer scheme designed for DA ens spread' + do k =1,n_var_lndp + select case (lndp_var_list(k)) + case('vgf','smc','stc','alb', 'sal','emi','zol') + if (me==0) print*, 'land perturbation will be applied to ', lndp_var_list(k) + case default + print*, 'ERROR: land perturbation requested for new parameter - will need to be coded in lndp_apply_pert', lndp_var_list(k) + iret = 10 + return + end select + enddo + endif + + case default + if (me==0) print*, & + 'lndp_type out of range, set to 0 (none), 1 (for fcst spread), 2 (for cycling DA spread)' + iret = 10 + return + end select +! +! SPP perts - parse nml input +! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ! count requested pert variables + n_var_spp= 0 + do k =1,size(spp_var_list) + if ( (spp_var_list(k) .EQ. 'XXX') .or. (spp_prt_list(k) .LE. 0.) ) then + cycle + else + n_var_spp=n_var_spp+1 + spp_var_list( n_var_spp) = spp_var_list(k) ! + spp_prt_list( n_var_spp) = spp_prt_list(k) + endif + enddo + IF (n_var_spp > 0 ) THEN + do_spp=.true. + ENDIF + if (n_var_spp > max_n_var_spp) then + print*, 'ERROR: SPP physics perturbation requested for too many parameters', & + 'increase max_n_var_spp' + iret = 10 + return + endif + if (me==0) print*, & + 'SPP physics perturbations will be applied to selected parameters', n_var_spp + do k =1,n_var_spp + select case (spp_var_list(k)) + case('pbl','sfc', 'mp','rad','gwd') + if (me==0) print*, 'SPP physics perturbation will be applied to ', spp_var_list(k) + case default + print*, 'ERROR: SPP physics perturbation requested for new parameter - will need to be coded in spp_apply_pert', spp_var_list(k) + iret = 10 + return + end select + enddo +! +! All checks are successful. +! + if (me == 0) then + print *, 'stochastic physics' + print *, ' do_sppt : ', do_sppt + print *, ' do_shum : ', do_shum + print *, ' do_skeb : ', do_skeb + print *, ' lndp_type : ', lndp_type + if (lndp_type .NE. 0) print *, ' n_var_lndp : ', n_var_lndp + print *, ' do_spp : ', do_spp + print *, ' n_var_spp : ', n_var_spp + endif + iret = 0 +! + return + end subroutine compns_stochy + + subroutine compns_stochy_ocn (deltim,iret) +!$$$ Subprogram Documentation Block +! +! Subprogram: compns Check and compute namelist frequencies +! Prgmmr: Iredell Org: NP23 Date: 1999-01-26 +! +! Abstract: This subprogram checks global spectral model namelist +! frequencies in hour units for validity. If they are valid, +! then the frequencies are computed in timestep units. +! The following rules are applied: +! 1. the timestep must be positive; +! +! Program History Log: +! 2016-10-11 Phil Pegion make the stochastic physics stand alone +! +! Usage: call compns_stochy (me,deltim,nlunit, stochy_namelist,iret) +! Input Arguments: +! deltim - real timestep in seconds +! Output Arguments: +! iret - integer return code (0 if successful or +! between 1 and 8 for which rule above was broken) +! stochy_namelist +! +! Attributes: +! Language: Fortran 90 +! +!$$$ + + + use stochy_namelist_def + use mpp_mod ,only: mpp_pe,mpp_root_pe + + implicit none + + + real, intent(in) :: deltim + integer, intent(out) :: iret + real tol,l_min + real :: rerth,circ + integer k,ios,nlunit + integer,parameter :: four=4 + +! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +! + namelist /nam_stochy/ntrunc,lon_s,lat_s,sppt,sppt_tau,sppt_lscale,sppt_logit, & + iseed_shum,iseed_sppt,shum,shum_tau, & + shum_lscale,stochini,skeb_varspect_opt,sppt_sfclimit, & + skeb,skeb_tau,skeb_vdof,skeb_lscale,iseed_skeb,skeb_vfilt,skeb_diss_smooth, & + skeb_sigtop1,skeb_sigtop2,skebnorm,sppt_sigtop1,sppt_sigtop2,& + shum_sigefold,spptint,shumint,skebint,skeb_npass,use_zmtnblck,new_lscale, & + epbl,epbl_lscale,epbl_tau,iseed_epbl, & + ocnsppt,ocnsppt_lscale,ocnsppt_tau,iseed_ocnsppt + + namelist /nam_sfcperts/lndp_type,lndp_var_list, lndp_prt_list, iseed_lndp, & + lndp_tau,lndp_lscale + + + rerth =6.3712e+6 ! radius of earth (m) + tol=0.01 ! tolerance for calculations + nlunit=322 +! spectral resolution defintion + ntrunc=-999 + lon_s=-999 + lat_s=-999 + ! can specify up to 5 values for the stochastic physics parameters + ! (each is an array of length 5) + epbl = -999. ! stochastic physics tendency amplitude + ocnsppt = -999. ! stochastic physics tendency amplitude +! logicals + pert_epbl = .false. + do_ocnsppt = .false. + new_lscale = .false. + epblint = 0 + ocnspptint = 0 + epbl_tau = -999. ! time scales + ocnsppt_tau = -999. ! time scales + epbl_lscale = -999. ! length scales + ocnsppt_lscale = -999. ! length scales + iseed_epbl = 0 ! random seeds (if 0 use system clock) + iseed_epbl2 = 0 ! random seeds (if 0 use system clock) + iseed_ocnsppt = 0 ! random seeds (if 0 use system clock) + rewind (nlunit) + open (unit=nlunit, file='input.nml', action='READ', status='OLD', iostat=ios) + read(nlunit,nam_stochy) + + if (mpp_pe()==mpp_root_pe()) then + print *,' in compns_stochy_ocn' + endif + +! PJP stochastic physics additions + IF (epbl(1) > 0 ) THEN + pert_epbl=.true. + ENDIF + IF (ocnsppt(1) > 0 ) THEN + do_ocnsppt=.true. + ENDIF +! compute frequencty to update random pattern + IF (epblint == 0.) epblint=deltim + nsepbl=nint(epblint/deltim) ! epblint in seconds + IF(nsepbl<=0 .or. abs(nsepbl-epblint/deltim)>tol) THEN + WRITE(0,*) "ePBL interval is invalid",epblint + iret=9 + return + ENDIF + IF (ocnspptint == 0.) ocnspptint=deltim + nsocnsppt=nint(ocnspptint/deltim) ! ocnspptint in seconds + IF(nsocnsppt<=0 .or. abs(nsocnsppt-ocnspptint/deltim)>tol) THEN + WRITE(0,*) "ePBL interval is invalid",ocnspptint + iret=9 + return + ENDIF +!calculate ntrunc if not supplied + if (ntrunc .LT. 1) then + if (mpp_pe()==mpp_root_pe()) print*,'ntrunc not supplied, calculating' + circ=2*3.1415928*rerth ! start with lengthscale that is circumference of the earth + l_min=circ + do k=1,5 + if (epbl(k).GT.0) l_min=min(epbl_lscale(k),l_min) + if (ocnsppt(k).GT.0) l_min=min(ocnsppt_lscale(k),l_min) + enddo + !ntrunc=1.5*circ/l_min + ntrunc=circ/l_min + if (mpp_pe()==mpp_root_pe()) print*,'ntrunc calculated from l_min',l_min,ntrunc + endif + ! ensure lat_s is a mutiple of 4 with a reminader of two + ntrunc=INT((ntrunc+1)/four)*four+2 + if (mpp_pe()==mpp_root_pe()) print*,'NOTE ntrunc adjusted for even nlats',ntrunc + +! set up gaussian grid for ntrunc if not already defined. + if (lon_s.LT.1 .OR. lat_s.LT.1) then + lat_s=ntrunc*1.5+1 + lon_s=lat_s*2+4 +! Grid needs to be larger since interpolation is bi-linear + lat_s=lat_s*2 + lon_s=lon_s*2 + if (mpp_pe()==mpp_root_pe()) print*,'gaussian grid not set, defining here',lon_s,lat_s + endif +! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +! +! All checks are successful. +! + if (mpp_pe()==mpp_root_pe()) then + print *, 'ocean stochastic physics' + print *, ' pert_epbl : ', pert_epbl + print *, ' do_ocnsppt : ', do_ocnsppt + endif + iret = 0 + if (iseed_epbl(1) > 0) iseed_epbl2(1)=iseed_epbl(1)-1234567 +! + return + end subroutine compns_stochy_ocn + +end module compns_stochy_mod diff --git a/stochastic_physics/docs/Makefile b/stochastic_physics/docs/Makefile new file mode 100644 index 0000000000..d0c3cbf102 --- /dev/null +++ b/stochastic_physics/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/stochastic_physics/docs/UFS_logo.png b/stochastic_physics/docs/UFS_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..0e46c127136c0959bee53be950efb1aac7c7ab73 GIT binary patch literal 14988 zcmbWe1ymf-mM)wGcMooj1$S#KIE}kIG#1>Q;4X~^4Hh&&2u^T!cXxO9NABEv*UZ0W z{x|FOTGdsj&Ud!&T~((}g)7QSq976=zI*o$1tcY={I;)t+a%y&-~PcVEo5)I_fE=^ zBJavai1yza(B{H&!tdVwibZ-df_ZBr*h^_Sy?cl0{C9i5Vn*uz?j6j9rK+a0rkpI$ z#LkAv$kfgl%;auk|Av0|j$g>#-pJ$&*qO{2Y;I{Q061-G1&~>q3IH@XfVBzd+4`gO`b8};IV`s8+G-qbz<>h5&VPj@vV|+s} zI(gVS8@V&uI#K+Kf*9Dz#L?2;+0xFI>@P(lV>=gT0l=H2|Dl47{lCfDI{nj3Zw6y_ zH?n7DWn%fO(m#NvCjZ9SyEt0^gSn{*GuRqz1GaT`dc(5*8*6W2=WOR>VfR0f{&)9( zVen>JIk|uH_-|#gvH3R(CuecjH#PogkpC9#r0QW0W>y9}*||8HfW=+k#H9GEjXhA* z5p3ja=csCDXZr*6}xo$Ux$vT&%oYT#Rf? ztp5;KP7VmNb#gYcH35Uf1ORUqVzRU}1%kmm#-`jxER0|-E@MUx4qjG9BTg1>Mh-9w zk1?AWJEsvB_+R72>`Yw##=*bFoBkco#$w8AVr&hm{(q+PH#`3Z5Kzj}>CLqs|I8m1u){x(tS!m@5i>v|lfStj z05JI*1YlFZKTli!cNX|xY49Ip-7LUwME`%{;y++cc4p3QMvh=%^EYe#?}Cr{f6~Co z$o2ms|NqK^|Fiu6C0PHT<^QLFO)QLT&B1RamKpF@Bj&%w=s(=U{QvdbKl=Vt;rbW+ zts4G4{C63CYy7*AgKghPJHC}^w5zAxckehTKw`qG?)t}iaE92^GcT^c)8*_abAqYm zRO8CY5M5!!l^DKQ2GS2sP>~B9$%r z5*?r3;ju`*Zzmh7K3bwfiWEF4BzE{{t^|B>6uCT(!fg)Ts^&?}&0Qn!x6bBMT||2N zbqKw%!VXhoMcrY+@_lSuR3aXx>4(sF;`hiNm*!>j-q5kP$6-x&76sc`-CC;bIlZHr zv8cP#5}_Y!YKXq~{uVOsuH6iaWZl%vLb{Z=>Qb{g>~A^Zr?I-u3R=KN$VF;s_ND9< zHyN#dsd_Ek_8LEIAVoJ}0{|oX^!NOGx4XaVEUabHl#7UDh{y0nzP1*96nU+5$Av}C zjuZjp-`4qAG_++uIytll8ssp646+S`p|s0Md?IUcrCOdnU#AXMIyyTp6c?ybAlfjWJUY|+P`TlYgL252VU0U0_ZB|&4Eq2A#&O-^wT z`9@}ZPr-rGZ^>VyO+*g5P$+PXhxO@=8K^Zg1!eJ<5bCN&<9!g&hCXY50O_!OfKts6 zsUw|1^EA57($&4X@Sdu`D8x(^1mI{=aN?v(4IL_%a*7NB8MW$0hMC&_pgnA)$wzMs zs=Z%b*setR1Jfg0g%mdQbdmJLPp*C>AUYLTf-n!rYbA8&ijpQKcwWWx-Y!jqUZN(M3+GRRUf8BSOB9Ye5%ymcpbN* zF+3ITFYW!?Ne}(D{h(hCPF(_LJh>G|}z7K3~Dd#Sl%H;0Jc`HFNC?E;W#JD>`doFw^J*M$Hvw=A}!7Y!|&cJ zg(RW}uzrdod0zOR90ZxkWtal-lkf1RN;IHmQC~iE(l8|)s=)+EqIJe)0F?VblZxa! zR>SmYyVOvWU|dCiOZ8T0;Z7i@EA_Aa?F{W|?N83C)u%Fzz?zs#CrQ40S7&%U1-~-S zzV}?vk*W<9Qty5(5N|lvKeXo3zqy;g%jtN}{zZvC0jW1K7Vuh2UriyiQH_vk?nKeh z3wLE`)lM3o~&EGN7 z#+LIUhT#m1jHNMuO!sw>MI2vxEcdTaVmi*H`{vPOCIQaEIdJ%OzERZ#;gxYy;ESSs z6@;Baw3U|(f`#$6t)x&41LR7oj=Yx06vT@ot?_VmX8FB)9_glKd z$UL2SZ&83pEMnt)v=SEGn-VOmo@V`NP~BQ#dolyb$z`oN%r>yyYM&l_-Mf{g4Agby z8n@Da!K$s0ZNq>Hl=!oh;mgTNjP|XzEceIGmxVq9Aj3njxF9tss+T@k z>GyQbM8)WQlDag#o}lG0KX25kxn(nswbbQElL~|IL`^Iv;wFN}KKG~}W|5@VVmWAs z+4Xqx%3vn^-vrb0(SSeB$wB zAhqM4gXugu1%Ua8=R$784R_T`y3$6|2fCSsY^Hr(n$p(vIM8BJNN|kz;N!`0Zto() z_NO%l!=VWwwO*c5m*s)|)-6X?U03*0Ge1=Z1zbM87n0qrWzgUrZTeB8N*%~+%7M7N z#613wBgtHSWA#af+V{y8-jE!7{SeN>XAYk?M-qO+i@K zII4a&BA==lq3nabMoo6U)S*OJg+b<#{Pk&#=CzEGVZvTb>!P+soL)On*D@tN>S% zj|{Saz!n;9XVV4rqDd}kDEbdznA%C5?_?q~Ov2b0S~)Ud6dzmCI331p$IqWXDPmFz zdY(c|)g2Y2f~9p@;La7AC1&YBW+AM!T2ZZCN(qogYuusCrv6LlSQ3$oM6CrSDhKJH z6K-QcN2!PiheAjy!jFVOsl)dGn@Mfc@GqLxG}&|?F(Pi*=XK1eWL}nt8vy-U%WIe3 z`ECXanm^%NPv}1*AC4q4=TBqReW=EE`~q6uaXjNn;I_t>uwF5{&QovZ&}F}(uNOFq z})cWTA;X@HkC zv+Cc-!jB0`dHo4iM}>`qL8yok9vH%rdU3_bB}hE3DdEV$EfWf|Y(186l+HkxxYCc7 zeTXlxj??#SCdh%)^65flha~j(J*I(69@UAc_hs)9x9Rg8S#lO(n))L@TNxHxTcY?5N6u^xIfcD~Cq z0*Eju#muxP8s$GxP^r^TV2KV7W%JrvLDVK-q_n3%>gmP9y!m`ig2bbyD403vkj8cD zOumQ$y2I&2I~FC3ecf^fV1ozguKx`_=LBw2C}s*pwQBg#&#&_KT&B0#&W2aG;72=w9nYv{?Rqg8zhQKn!Dvr0hyLE z<<9-67G$k#Ipv*H5A>%RcVHOa_KmMNTsd&?M%6$a*>pURq16~~)NYuV#5#{1M=D@Q z3YJE1l;C**h`>d7@rI4{K-Y-VBPr|qG6U-|(Ho+|x3k@-&wd(!V4a*z>37b_9u~6R z!Xj5h#OZG5PD>}QtHl`b;W6ChVvka#Zkh^xP>(X{V(WN0u@j3KP4L zR9+Z^nKWX^FQK!_j&d`KgIP&nX@_>Hzjonip~jKnKbY>HlV@mY}Jq5%GV@M zmq*S+k4VYr4N^{#B~hbd={T4{R0tu#Qdl;pT%HRv5!05)?S}SU2GYt^+o2VIib~Y{ z9rq{f%o#cNPLt8n14As?g^q%`#=BHG)jZmg>!OVJ;!? zB=jBzCyEhtg<$jw_~uYdSZmHYYGY(8#%k0X@yD5$avL?~z3{=Fdfr8JTsvAo*-F=8 z&<4Lxx&cW-oXZY{YYjpyr&9|Z*u}VF)M2nia`8u}jG5mYO{Y&BL|$vU z;pIs2*hVG}{SH>;@NOIm{wignNk^EeA~Gvx#+N<~xp=&>@zPe&L)yHQ3adk-@*>{I)FTTFw@hdgI+D8w=oIud8*3Tt!3)L8Rp3vvaC*{(h=i5X%W3vURUJk@ zjnG%(Skv50<{cK*g5MrdaP~)*z(3>F<>+WdpfSVy?ib=?!JsDbgbuCn@qBgku&^>- z?h1@RiGIj(7dMCWRQ|8`BtVPS<;bkW-dW?^$zV%8s%oZR_r9Jjbj8!^pP2(a|LB)1 z@_uWxnpe9PouXQ(?UFEgS%A_GACMSJlZh3Xoh5&8`czWci2g|~G}$Xfbni&{>bdo^ zNcxB!qZORwNU-RK*|0sLvMoJ+gTbGk*j^jxzS>^stW(&Ra2g!VYE+T(CH5coJzzag zmGY57|G=`2Uy+BU%KqsLE_oq}Vf4_)^mJw-#!~2&Up7j3!Ug8%eWh%SQ={Qx6xUXv z191K<#ncjrp%2ktpK{#a-ZYt_!b-n%#tFjeO=MV=?V^Pux~788@xm5{R~`n^3SXCx zHFvfL$&XHPN$0A@%EBalFG1(N()t8*zn~6ZCgWsXyV*eA*IGmWN5*&jMwK|Cxd8oT zE}P~6R)+2VE>XlZ$L66@R>4itKYc1tM7oUH-GWcb^SmdaS zDk{Y9=Wx4V6RBA_OIHHVL<5aAeVk8howO*jO=Nnk8(VBpez(*xt#|sYCGB<+KU0Nk zhPvy6N@4|d@`M?KuAAbC9zoZnqV(@q4QDT04N^+uXug^OVFZy&Uc_SB>80c0uzjD{ zE**O}H;1#P9b1QjG1T75(74%SejXujosHVk4+SBywgRc4wF<)`W)iss3<}K5QsJi9 z{9>5Q(}5O|2+{1Aib9MZ@z2LAEFB=t z!r=BDl(oT3uAzm~wp(szeErqwLWs3rWAnRM zhCx)~PUg?abj6WUL!?pg4A5v4)m<`QevKccfCHSotGlGwzcoyD9EOhW3v(2s!?iMI zW@LSvRJuEnVIz`~97~S9OL;|+;Wb$*`7jf6O#!6lu@@}qZ;&E*El5_u^w6lm)Kk}{ zBz}sSGvpIsLc-35`_bcks^B~3I1u{$>*egHF0`mNY_WB>c0CI`%DztJ*3PHq`q1p) z?H$2|m4Ua*m*||!5_Pky1h7hpX)X^+Jci6q189fbyXGl5avyF~yk+h(wL@z4p}zxUAj zzWT|NbY;b`TMh;5*YQY*`%h7nEw2xF%e+tx)s*wXk|ngks&PhNoIs7G6L;TcEb;ub z7>OM3rfpqbOG!VE0vNnT%33r^^zO zEzy&A*9~b4g>=*cuk6+RSw`Tek!UZ^ZVM2Z0=TL>2l27W3=(17^7Ti-#bHne{h;uUwAHedtj$Xh~KuJES1GwA} zP|Bw=<(UP{_lk9YI@y?P?}`Da4L&aFVlU;5tSe*C5vkN$^n#YSZLshiee2n~gaRUckBG{4;o~;U+TH zmZ`Er#(DC^X_#A$?6&)LJ{D?9E8eRzv9c~V>UQt(0&RK9KdrB@y}ttiD4GbBr-6I6 zvtdXV)onK*V@%myy&`Z1e!X#HVN|Hs0yJcfZCQjC2hvWL*x+MM*`o8(7R81z><`jt zsllU1`$(1$B}&q-C&j;JyOAyx+mh=*urLk!JW0SBW{iLv@&RyI%a4{!S$NsFm^>C_p(|EG zj7vG8hjIsF%{RVBFcwWe1(zg+Foj#LcdRr$*Bq`!ISJ-a97XL~#A|%R(qf4SMCwiT z766Yw_b3t+6x zr_~>(wq?tZ=h4}03(hm4yv;EM+TGj1lO_$TFy=GO<;zpuaEHpa+RxUoO!YC47dNoU z98MJ#Cu4;xBRpTs60$gsxR!Yz1FOpol(RE_Pe$zPII;R=qri0er&=T+r?X)~uID1i z!VOS2ZpWr+37x!5*K^ZyaGzF^z4=>vBD5WxNsfg;N$d8jA^BLPlm_loAkS-uDU;XV z{sL$R*iF4s!40LB0BYx-3y?trrupcWPBURGbw>%3*V^Gqlp`G8*5JwagU3+l+;`d9 z^4Dai4>wg)E;6j&rEp|2o8)U{0*~7l(RnI$8q;8|!l7tla(dF@AkS{0Zr#Q_S$Jg4 z5uT-eaU*4qq~g}C?Qhu+05^slE=*B@pGV-?_?qAIvpT_H>T3rywamxN^IeJ=_r$%& z%f~&U%A7vdNGWS^+_GSMHtP7%Ew-NQ(YpmiWxEnwQ2*M?B-Q>Rh_aRwIKP`IVI_6B zpHsd|f6%plePe0L@2CqefUbeuNG)?b4~Gc3JD2Bg;@1J%jzAkQt;WIz{>WQxYRxgq zlM4Ttr>X#@R^Doi9ipu0y{Fc_eB8ZzX828QS+t^rU_7%CaIlnYd@1%-HKy&PO4LV& z%DK=i=SLFjUSzbC?+vc3o}2Cl{ZhUL2ZhPmIBL!Le022L-|v)_8FU&wZQijheqwE`LJ5|Vb$%d>%338ZFj2trKqh0R>7l9 z?-=9z?#6!SfJiZ2XpCKP_`&VICna?k*=No`D9@~>M%JwQ>a6-TxbFjwPI==w%h>Bo(D(pa8a zq5?lS?1OQ;$HG`hS%%B`_M{cE?0j@9M|54Be7X95b?3SgtpTd15`nzoFpJ7~U=;ETt%1(%5f^J7Bi}l#sWe=3%qC{|$i7MCY1nxDx=0fsdNGO#f z75T;kwlseaiDsHOb%JI+^SzMnc2Q}QhN5!63B4M>-Sw@trz|8R)?VeMWmniFi4|i_ zR0h2u<$id@JmW^oh7{usJW20^SlNOiXh>JDE9hCCB&L^t8`j~VJy&AwwziUh?8-$B z_`WFZK1WND{tmYqrshbiMyVSW40A{?W7|`c9M;5AzbT2;V3wAQ?)RcRoh5M@Cub*^ z9T5z$@zA&4*Hd_!(Jg8`SE{!=M_6j*(TTB%v*@{eYT`fo4eLp*1MX1Pa>?pq4nXt*f~oDo8pgw zU(Xir7x;zH$`z*P=Y@1#-*x(~K()4qK~He=daLd%eed$Wu!?I24g`6j&-<9ugfDVT z2kb5sY~E0l=WW5o|MB@~+R0fNZf)??NnR$nE^*fW!`)4VWMw6lW_d%GEi29p3Uum; zK>clljA)6Dfk!orvo~`t>#&1-B1ZwU-vi+4I@yhfV;ZkI0w`V%$oDz~hGWvEieWye zwk5cDwPcFKlVij73)qbd*or@4Rao$386B=d^$-}f*qt1|y%gsCV%o&vzVjT` z!JP%^M|C-q%_5RCYAC-Nn`@=NqX1?@ zU532aW`oJrbsPaQ{r(*$gMtjil;D>~Qt#`pD6?fAa-g(otbEN>htIFYkkI6;&oA$i zrUZNiBSgh|XWHpE2&QpcEdre<7Y2uedLU>CK?!7xD}3;0_g! z6WeePpDJ#BF5XsUyl8Y=OCR$>xj*X$PusB=pZci|(jv?zqOE1|b9Jl^NvLkjStdmo zz3{a!h(|)1v$2LnTA%%3SR%scA&ilNXdpj2B4V(g>D0fyho*p%Lp6JG0#qFyT7N&c z8W*%lzZ|C2wbG0td)O?|f@2Me5|%KCpCbZln_Sp7CI-yU&bBAH7@r^O^HIAFV~@g4 z!*|7vu z6r6A@LA~jH9DMqSVfw=hj=0vbf9R8w>9F6of%P;VZC&T}=3pXQLu-5aZ>DC6GJ9oH znvL*~_!whLoA0<3A2Me=`rAJr1tz1(fo>dHYRm1gQp5{?$|M>0kPtRL7d@o+y7prm zxGWTURVF#_DP^)#;T7v-@~|O;Tyh>+=dmoGe-p#tEwHK4Nl8~@sMKxeJmWS&uE*7p z)BNBKY-@~DYEmN$vFoK)^;`IG?M7EZ=nXQ_I_p9M$nAODDSsa} z&vp?isZ|QOqIn-`B(ZpF0()=#q!#H23l7G_f(~L9&EOGA-}(FSt*4#YhC`SlI{oLo zL|cKn1OsZkc!AVEd!kT!A#sM}oPkp)B<6iGGwGmh^y|Pc7^Ng>OpFg95Lxz#Tb?m} z=eEi&hY=g8=u{_Bfr(7LddD53bKsv9R$_%XY%}kc(s$3eL*VnFDAF1_3jV) z-}bZV;WgM$1vi+!#H_D@zhcfONEND+`=hc=x@6jtUL4up6N?M|Oy477hp=lStaTv} zeqe`Fb{PD*Xw^1aq(K3g!z=SVqg)BkD{Nb$y>P=aZ#!I@fl)(O_jXBwwIK^^vgqtnYKbIAe2$-p`8DuBUMh_c_>Oe z68m?T5Sl?sFqbaPX{Ns#s)!tB(Q3-vl8q(%VOeZ>a&rA-te@Fu(2E4Ht0lQ zk!#@H6%bB*>3E6tGV_hZ z_s}*<{)=hHf+x%K-F-7t5@=KbCfH6eG~k6hk&^u~EQ|iUdE#x#zerJpJ?q(%f|_Bz zLLNy1GtHa~$0V+RUB;3N-m*VW&@@ws4L2N4HlG_! z+Znl7jEzKit&WNnx}YM7}0zRd59 zSL5_mzd40-eL*V*E!KtbktiqEkf=VKFA7N%x6lx=~A z&4PDQ%V+icB73&Oljp{#>h<~E#W1}0>P-I8UKLU_jP!VVJ;SUGyr};4*h!MwG|xU~ zS1n6MfYx!19?q~Q*|4qA-DG?%bt3+E{=MtLvAGaZ1VA2_(H#$Cp{L>N?(>XwtjhMEgi z-~P=!9A*7}Ki9r{nN8yr;=$TVTawt(@Op}=I1i*s+OG2e_s zCRV)k?YhdgKzYP%C=d6tylB`|S4c1{K__yK=0F{X!9m#|dkoBUEUWPwb)7qD$Vn`} z5DfFW@_18mEsX=VJoZ)3s&AJzFnlP`3dDBFJl(V8m{OZ({H9Kn+sie@jc%s6G z9Pw>K6Gf_O`Geek%hW#%kf0^HZ@jb@e_+1_ZuYz4yT9bhj;A-hR+2v2=t>?W4N2UCQ!KOdW0VGYPJwuY)arCvN} z1zdht3Pn+p(;+*VUuQ`}VAVzr$}DSWAQ-ws_v~CStyVlwc7b=#Hz#N+kti9gc}v zcz)7TF75hpD#@sjp7!f*eW%Yz3}nJR_;s;KCx3%VS^U8FjE1e>kiq_u^{J|{{9)4>OGIe!aZ2Logcf3DeW%Mu3xQi`; zM!Vi{2*~mf8f#XFqZ3{Ynnv`+Ez{p;&pUceX}@0`L|k>MFpU^`AuBTu1QK}$~CyP2#<5$oy7V}4wAUiPjfp7|K(^Q z*UYxx0;9c=b#*f*>NSQGF`+W|{bL9u3$bemHmbj6h(RMJ=<{_0osm&mC?JAtIHyC@ z?U%FB;*Q5h5$KntPn1Tn2yPg!IG6KDu(eQ6=`(=JFHQAS;KVusgG|7XH6%-eiBKWU z#A+FXnvGx-yHMPM8DDolc1T1y7sl+x#|FUpm;>e-{RCiy=;X80KLdY#>l5!X6Ba*o z{^^5Oqs%OAC|c3W-DEn}2KBSw;!qdPGH-^0eFd7n266S)Hl!RS!G79Yr!oPaSZ)?W zhy?`jNzQ+#hMjdl|J{SD3!S{fe0T1AD0K|06CK_qbWhxQ5J0X_`(f3eZ7fY!%>}VRYi!mI^+)vJ^ zv69vCY3(FPf-4I7*6}||u!-ImVQR`f2)GMGq&bzSvwh%S_$(t$bBTB^Qju)l|MdFq zO>MjDDIV2Fo+?dsY)3KORrQnCWagwvAucGJqMX_=vBg>bN9 zKy@ijXtS8JI{sZ+#sPJ4kYLv7$J|hj)LdzC%(Tn=50HF8_v&|>aL#RCeCT$21tMQ< zGq`eGj(ke_fSj`J=enVH-rc7q5ZM{ds{UFDuI9YJOU>5p27%<0!O(A#af&3bbZT#t z$(nvsOfO*SyWnp*=p7~=^5@)_oOkXmSxcd_AUD&Crc8a)-H*oCXD4{h!>e9;SmUb}W4{z5fGe7BmtEY*J>cmoQAo$VK#{QET$ie$;Yw#^ljxe7V zHR33*YNRI%6_voaGqzmwP7 z?aw^CNhQ|S^yhbMeP{>Q`waNbo_|RX^uwb~ZOnn?ksHi~N#^-XdF&P$W|5DUX%DS? z&Y!onJknQqThRpdL$9iUQ~hUyqDkm!tZNe?l?jLw{1h=^$7IHs7K&*Ak1__Z(G14K(J zFhc!&w?lWxHyzm^3 z1js?dD^Vg=ICG4*ebd7%2U#koai5Uxo0%mC>RS67FY}aG+>Snodh_d&#wMRE1kLv5 zuEo$po~}O(5W=X0%22AeU*3y#37p4g^qwOwt;g{=en33=gV=9SOlf=ux1FsOdE)xh zdRNcky)v#X#3jUL%tk8hEV{N}UKzKNss*1aFwA!ze&V6@S> zD%_6%-Yq-ux=a;PCkgjVQKtp4RM9$rNDLJ~LbHC`CK$JUPM8%P4wOp{i3$@y@Ay9ZnrQm;+Z3%Szzw1} zeZ1$#-b}_^vWP8i$N1 zAE2dIOnG{iPgrhY_M6!IHkY%G}tmFU!*HZ93S!XXaEw6|)6Z)vZtUn3X#Nz|QlV$OyYp z)b6@Vh3@pCu~tAy1oM>5)=tl0ci+T% zC4FTySfmSIl1a1p;(WSTF*YOeeV}ZPq*Y@kP(N0gWlLVme2%0^Qb%Q7uT_~g-)(#G zmw0~zncl_4=^yQ6oONb$XPz?D*o(pB%_`qsIQpbH;Z@on{_K?dco*}YFwceb^^f%6 zt|J@m^4y_SZ&|Iz=b&1(X81i5pD(A^JTNu$y9-$qpbUyvfbNe z_2ijDwT;8R!+B8hNdM**#m5-@a-Kr@xIY;;*VwyV5Le z$M5mewyA1pne*1QQHISt8Y%ZGL9dY2bw-Gc7>u9sXN(VL!W<)+q>gi z)ma_+l~#th+IQ`!j=x{&V2@xvFua7mdm>F}Ba;=;&z$)CNhnBMUaVZiFyQ|HTz?)D literal 0 HcmV?d00001 diff --git a/stochastic_physics/docs/environment.yml b/stochastic_physics/docs/environment.yml new file mode 100644 index 0000000000..5c23c825cb --- /dev/null +++ b/stochastic_physics/docs/environment.yml @@ -0,0 +1,7 @@ +name: stochast_physics-docs + +channels: + - conda-forge + +dependencies: + - breathe diff --git a/stochastic_physics/docs/make.bat b/stochastic_physics/docs/make.bat new file mode 100644 index 0000000000..6247f7e231 --- /dev/null +++ b/stochastic_physics/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/stochastic_physics/docs/source/conf.py b/stochastic_physics/docs/source/conf.py new file mode 100644 index 0000000000..b33583bfd1 --- /dev/null +++ b/stochastic_physics/docs/source/conf.py @@ -0,0 +1,70 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +#import os +#import sys +#sys.path.append( "/Users/ppegion/.local/bin" ) +#sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'UFS stochastic physics' +copyright = '2020, The Regents of the University of Colorado' +author = 'Philip Pegion' + +# The full version, including alpha/beta/rc tags +release = 'public' + +# assign master document + +master_doc = 'index' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. + +# create doxygen documentation +#import subprocess +#read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' +#print('read_the_docs_build',read_the_docs_build) +#if read_the_docs_build: +# subprocess.call('cd ../../ ; doxygen', shell=True) +#extensions = ['sphinx.ext.autodoc', 'breathe'] +##extensions = ['breathe'] +#breathe_projects = { "stochastic_physics": "../../xml/" } +#breathe_default_project = "stochastic_physics" + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + diff --git a/stochastic_physics/docs/source/developers_guide.rst b/stochastic_physics/docs/source/developers_guide.rst new file mode 100644 index 0000000000..7990c09e30 --- /dev/null +++ b/stochastic_physics/docs/source/developers_guide.rst @@ -0,0 +1,14 @@ +Developer's guide +================= + +Code is housed on github at https://github.com/noaa-psd/stochastic_physics. Please read more about the Development process at https://github.com/ufs-community/ufs/wiki/Developing-with-Gitflow. + +Please make a fork and checkout the entire ufs-community weather model at https://github.com/ufs-community/ufs-weather-model and point to your fork of the stochastic_physics submodule. + +Standalone testing +"""""""""""""""""" +If you intend to make modifications to the stochastic physics source code, there is a simplified program that exercises the random pattern generator without needing to run the entire model. Please see README.standalone in the stochastic_physics directory. + +Full model tests +"""""""""""""""" +The code updates are not expected to change existing results, so the full model regression tests need to be run. All of the tests must pass, although only a sub-set of tests are needed to consider adding changes to the stochastic_physics repository: fv3_control, fv3_stochy, fv3_ccpp_control, and fv3_ccpp_stochy. If the results are expected to change, then there needs to be scientific evidience that the change in results are what is expected. diff --git a/stochastic_physics/docs/source/getting_started.rst b/stochastic_physics/docs/source/getting_started.rst new file mode 100644 index 0000000000..13764b7dd5 --- /dev/null +++ b/stochastic_physics/docs/source/getting_started.rst @@ -0,0 +1,10 @@ +Getting Started +================================================== +The stochastic physics currently only works with the UFS-atmosphere model + +You should get the full system at https://github.com/ufs-community/ufs-weather-model, which will include the stochastic physics code. + +In order to enable stochastic physics in a model run, you will need to turn it on via `namelist options `_ + +If using the CIME workflow decribed at https://ufs-mrweather-app.readthedocs.io/en/latest/, please add do_sppt=T, etc. to user_nl_ufsatm in the case directory. + diff --git a/stochastic_physics/docs/source/index.rst b/stochastic_physics/docs/source/index.rst new file mode 100644 index 0000000000..65a44df8f0 --- /dev/null +++ b/stochastic_physics/docs/source/index.rst @@ -0,0 +1,18 @@ +Welcome to UFS stochastic physics's documentation! +================================================== + +.. toctree:: + :maxdepth: 2 + + getting_started + users_guide + namelist_options + developers_guide + references + + +Source Code Documentation +========================== + +Doxygen generated `content `_ + diff --git a/stochastic_physics/docs/source/namelist_options.rst b/stochastic_physics/docs/source/namelist_options.rst new file mode 100644 index 0000000000..f243739942 --- /dev/null +++ b/stochastic_physics/docs/source/namelist_options.rst @@ -0,0 +1,72 @@ +Stochastic Physics Namelist +=========================== + +General options +""""""""""""""" + +.. csv-table:: + :header: "Option", "Description" + :widths: 30, 50 + + "NTRUNC", "Optional, Spectral resolution (e.g. T126) of random patterns, default is for model to determine proper truncation" + "LAT_S", "Optional, number of latitude points for the gaussian grid (must be even), default is for model to determine gaussian grid" + "LON_S", "Optional, number of longitude points for the gaussian grid (recommend 2xLAT_S, default is for model to determine gaussian grid" + "FHSTOCH", "Optional, forecast hour to write out random pattern in order to restart the pattern for a different forecast (used in DA), file is stoch_out.F" + "STOCHINI", "Optional, set to true if wanting to read in a previous random pattern (input file needs to be named stoch_ini)." + +SPPT options +"""""""""""" + +.. csv-table:: + :header: "Option", "Description" + :widths: 30, 50 + + "DO_SPPT", "logical to tell parent atmospheric model to use SPPT" + "SPPT", "Amplitudes of random patterns (0.8,0.4,0.2,0.08,0.04) *" + "SPPT_TAU", "Decorrelation timescales in seconds (21600,1.728E5,6.912E5,7.776E6,3.1536E7) *" + "SPPT_LSCALE", "Decorrelation spatial scales in meters (250.E3,1000.E3,2000.E3,2000.E3,2000.E3) *" + "SPPT_LOGIT", "Should be true to limit the SPPT perturbations between 0 and 2. Otherwise model will crash." + "ISEED_SPPT", "Seeds for setting the random number sequence (ignored if stochini is true)" + "SPPT_SIGTOP1", "lower sigma level to taper perturbations to zero (default is 0.1)" + "SPPT_SIGTOP2", "upper sigma level to taper perturbations to zero (0.025)" + "SPPT_SFCLIMIT", ".T.=tapers the SPPT perturbations to zero at model’s lowest level (helps reduce model crashes)" + "SPPTINT", "Optional, interval in seconds to update random pattern. Perturbations still get applied every time-step" + "USE_ZMTNBLCK", ".T.=do not apply perturbations below the dividing streamline that is diagnosed by the gravity wave drag, mountain blocking scheme" + +``*`` **SPPT** uses 5 different patterns of varying time/length scales that are added together before being passed to physics + +SHUM options +"""""""""""" + +.. csv-table:: + :header: "Option", "Description" + :widths: 20, 50 + + "DO_SHUM", "logical to tell parent atmospheric model to use SHUM" + "SHUM", "Amplitudes of random patterns (0.004)" + "SHUM_TAU", "Decorrelation timescales in seconds (21600)" + "SHUM_LSCALE", "ecorrelation spatial scales in meters (250000)" + "SHUM_SIGEFOLD", "e-folding lengthscale (in units of sigma) of specific humidity perturbations, default is 0.2)" + "SHUMINT", "Optional, interval in seconds to update random pattern. Perturbations still get applied every time-step" + "ISEED_SHUM", "Seeds for setting the random number sequence (ignored if stochini is true)." + +SKEB options +"""""""""""" + +.. csv-table:: + :header: "Option", "Description" + :widths: 30, 50 + + "DO_SKEB", "logical to tell parent atmospheric model to use SKEB" + "SKEB", "Amplitudes of random patterns (0.5)" + "SKEB_TAU", "Decorrelation timescales in seconds (21600)" + "SKEB_LSCALE", "Decorrelation spatial scales in meters (250)" + "ISEED_SKEB", "Seeds for setting the random number sequence (ignored if stochini is true)." + "SKEBNORM", "0-random pattern is stream function, 1-pattern is K.E. norm, 2-pattern is vorticity (default is 0)" + "SKEB_VARSPECT_OPT", "0-gaussian (default), 1-power law (not tested)" + "SKEB_NPASS", "number of passes of the del2 smoothing for the dissipation estimate (default is 11, minimum is 3)" + "SKEB_VDOF", "the number of degrees of freedom in the vertical for the SKEB random pattern (default is 5)" + "SKEB_SIGTOP1", "lower sigma level to taper perturbations to zero (default is 0.1)" + "SKEB_SIGTOP2", "upper sigma level to taper perturbations to zero (0.025)" + "SKEBINT", "Optional, interval in seconds to update random pattern. Perturbations still get applied every time-step" + diff --git a/stochastic_physics/docs/source/references.rst b/stochastic_physics/docs/source/references.rst new file mode 100644 index 0000000000..ac2a26174f --- /dev/null +++ b/stochastic_physics/docs/source/references.rst @@ -0,0 +1,12 @@ +References +========== + +Berner, J., G. Shutts, M. Leutbecher, and T. Palmer, 2009: A spectral stochastic kinetic energy backscatter scheme and its impact on flow- dependent predictability in the ECMWF ensemble prediction system. J. Atmos. Sci., 66, 603–626, `doi:10.1175/2008JAS2677.1 `_ + +Gehne, M., T. Hamill, G. Bates, P. Pegion, W. Kolczynski 2019: Land-surface parameter and state perturbations in the Global Ensemble Forecast System. Mon. Wea. Rev. 147, 1319–1340 `doi:10.1175/MWR-D-18-0057.1 `_ + +Palmer, T. N., R. Buizza, F. Doblas-Reyes, T. Jung, M. Leutbecher, G. J. Shutts,M. Steinheimer, and A.Weisheimer, 2009: Stochastic parametrization and model uncertainty. ECMWF Tech. Memo. 598, 42 pp `doi:10.21957/ps8gbwbdv `_ + + +Tompkins, A. M., and J. Berner, 2008: A stochastic convective approach to account for model uncertainty due to unresolved humidity variability. J. Geophys. Res., 113, D18101, `doi:10.1029/2007JD009284 `_ + diff --git a/stochastic_physics/docs/source/users_guide.rst b/stochastic_physics/docs/source/users_guide.rst new file mode 100644 index 0000000000..0d258183f8 --- /dev/null +++ b/stochastic_physics/docs/source/users_guide.rst @@ -0,0 +1,19 @@ +Users Guide +================================================== +The stochastic physics currently only works with the UFS-atmosphere model + +Currently, 3 stochastic schemes are used operationally at NCEP/EMC: Stochastic Kinetic Energy Backscatter (SKEB; Berner et al., 2009), Stochastically Perturbed Physics Tendencies (SPPT; Palmer et al., 2009), and Specific Humidity perturbations (SHUM), which is inspired by Tompkins and Berner, 2008. In addition there is the ability to perturb certain land model/surface parameters (Gehne et al, 2019), and a cellular automata scheme (Bengtsson et al. 2019) which interacts directly with the convective parameterization. + +SKEB adds wind perturbations to model state. Perturbations are random in space/time, but amplitude is determined by a smoothed dissipation estimate provided by the dynamical core. +Addresses errors in the dynamics - more active in the mid-latitudes + +SPPT multiplies the physics tendencies by a random number O [0,2] before updating the model state. Addresses error in the physics parameterizations (either missing physics or unresolved subgrid processes). It is most active in boundary layer and convective regions + +SHUM multiply the low-level specific humidity by a small random number each time-step. It attempts to address missing physics (cold pools, gust fronts), most active in convective regions + +Land surface perturbations allow for land surface parameters such as Albedo, Soil Hydraulic Conductivity, LAI, and roughness lengths to vary in space. Addresses error in the land model and land-atmosphere interactions. + +Due to the model’s numerics, any stochastic perturbation needs to be correlated in space and time in order to have the desired effect of upscale growth of the perturbations. This is achieved by creating a random pattern that has a specified decorrelation length-scale and is a first order auto-regressive process AR(1) in time with a specified decorrelation time-scale. (The CA random pattern generator also satisfies this condition) + +Currently the Land surface perturbations and cellular automata are not supported at the workflow level. + diff --git a/stochastic_physics/function2 b/stochastic_physics/function2 new file mode 100644 index 0000000000..f3328235b7 --- /dev/null +++ b/stochastic_physics/function2 @@ -0,0 +1,5 @@ +!cc + indlsev(n,l) = jbasev + (n-l)/2 + 1 +!cc + indlsod(n,l) = jbasod + (n-l)/2 + 1 +!cc diff --git a/stochastic_physics/function_indlsev b/stochastic_physics/function_indlsev new file mode 100644 index 0000000000..94e605cfb8 --- /dev/null +++ b/stochastic_physics/function_indlsev @@ -0,0 +1,3 @@ +!cc + indlsev(n,l) = jbasev + (n-l)/2 + 1 +!cc diff --git a/stochastic_physics/function_indlsod b/stochastic_physics/function_indlsod new file mode 100644 index 0000000000..16c4e79965 --- /dev/null +++ b/stochastic_physics/function_indlsod @@ -0,0 +1,3 @@ +!cc + indlsod(n,l) = jbasod + (n-l)/2 + 1 +!cc diff --git a/stochastic_physics/get_stochy_pattern.F90 b/stochastic_physics/get_stochy_pattern.F90 new file mode 100644 index 0000000000..1fd00becca --- /dev/null +++ b/stochastic_physics/get_stochy_pattern.F90 @@ -0,0 +1,670 @@ +!>@brief The module 'get_stochy_pattern_mod' contains the subroutines to retrieve the random pattern in the cubed-sphere grid +module get_stochy_pattern_mod + use kinddef, only : kind_dbl_prec, kind_evod + use spectral_transforms, only : len_trie_ls, & + len_trio_ls, ls_dim, stochy_la2ga, & + coslat_a, latg, levs, lonf, skeblevs,& + four_to_grid, spec_to_four, dezouv_stochy,dozeuv_stochy + use stochy_namelist_def, only : n_var_lndp, ntrunc, stochini,n_var_spp + use stochy_data_mod, only : gg_lats, gg_lons, inttyp, nskeb, nshum, nsppt, & + nocnsppt,nepbl,nlndp, & + rnlat, rpattern_sfc, rpattern_skeb, & + rpattern_shum, rpattern_sppt, rpattern_ocnsppt,& + rpattern_epbl1, rpattern_epbl2, skebu_save, & + nspp,rpattern_spp, & + skebv_save, skeb_vwts, skeb_vpts, wlon + use stochy_patterngenerator_mod, only: random_pattern, ndimspec, & + patterngenerator_advance + use stochy_internal_state_mod, only: stochy_internal_state + use mpi_wrapper, only : mp_reduce_sum,is_rootpe + use mersenne_twister, only: random_seed + implicit none + private + + public get_random_pattern_vector,get_random_pattern_spp + public get_random_pattern_sfc,get_random_pattern_scalar + public write_stoch_restart_atm,write_stoch_restart_ocn + logical :: first_call=.true. + contains + +!>@brief The subroutine 'get_random_pattern_sfc' converts spherical harmonics to the gaussian grid then interpolates to the target grid +!>@details This subroutine is for a 2-D (lat-lon) scalar field +subroutine get_random_pattern_sfc(rpattern,npatterns,& + gis_stochy,pattern_3d) +!\callgraph + +! generate a random pattern for stochastic physics + implicit none + type(random_pattern), intent(inout) :: rpattern(npatterns) + type(stochy_internal_state), intent(in) :: gis_stochy + integer,intent(in):: npatterns + + integer i,j,lat,n,k + real(kind=kind_dbl_prec), dimension(lonf,gis_stochy%lats_node_a,1):: wrk2d + +! logical lprint + + real(kind=kind_dbl_prec), allocatable, dimension(:,:) :: workg + real (kind=kind_dbl_prec) glolal(lonf,gis_stochy%lats_node_a) + integer kmsk0(lonf,gis_stochy%lats_node_a) + real(kind=kind_dbl_prec),intent(out) :: pattern_3d(gis_stochy%nx,gis_stochy%ny,n_var_lndp) + real(kind=kind_dbl_prec) :: pattern_1d(gis_stochy%nx) + + do k=1,n_var_lndp + kmsk0 = 0 + glolal = 0. + do n=1,npatterns + call patterngenerator_advance(rpattern(n),k,.false.) +! if (is_rootpe()) print *, 'Random pattern for LNDP PERTS in get_random_pattern_fv3_sfc: k, min, max ',k,minval(rpattern_sfc(n)%spec_o(:,:,k)), maxval(rpattern_sfc(n)%spec_o(:,:,k)) + call scalarspect_to_gaugrid(rpattern(n),gis_stochy,wrk2d,k) + glolal = glolal + wrk2d(:,:,1) + enddo + + allocate(workg(lonf,latg)) + workg = 0. + do j=1,gis_stochy%lats_node_a + lat=gis_stochy%global_lats_a(gis_stochy%ipt_lats_node_a-1+j) + do i=1,lonf + workg(i,lat) = glolal(i,j) + enddo + enddo + + call mp_reduce_sum(workg,lonf,latg) +! if (is_rootpe()) print *, 'workg after mp_reduce_sum for LNDP PERTS in get_random_pattern_fv3_sfc: k, min, max ',k,minval(workg), maxval(workg) + +! interpolate to cube grid + + do j=1,gis_stochy%ny + pattern_1d = 0 + associate( tlats=>gis_stochy%parent_lats(1:gis_stochy%len(j),j),& + tlons=>gis_stochy%parent_lons(1:gis_stochy%len(j),j)) + call stochy_la2ga(workg,lonf,latg,gg_lons,gg_lats,wlon,rnlat,& + pattern_1d(1:gis_stochy%len(j)),gis_stochy%len(j),tlats,tlons) + pattern_3d(:,j,k)=pattern_1d(:) + end associate + enddo +! if (is_rootpe()) print *, '3D pattern for LNDP PERTS in get_random_pattern_fv3_sfc: k, min, max ',k,minval(pattern_3d(:,:,k)), maxval(pattern_3d(:,:,k)) + deallocate(workg) + + enddo ! loop over k, n_var_lndp + +end subroutine get_random_pattern_sfc + + +!>@brief The subroutine 'get_random_pattern_fv3_vect' converts spherical harmonics to a vector on gaussian grid then interpolates to the target grid +!>@details This subroutine is for a 2-D (lat-lon) vector field +subroutine get_random_pattern_vector(rpattern,npatterns,& + gis_stochy,upattern_3d,vpattern_3d) +!\callgraph + +! generate a random pattern for stochastic physics + implicit none + type(stochy_internal_state), intent(in) :: gis_stochy + type(random_pattern), intent(inout) :: rpattern(npatterns) + + real(kind=kind_evod), dimension(len_trie_ls,2) :: vrtspec_e,divspec_e + real(kind=kind_evod), dimension(len_trio_ls,2) :: vrtspec_o,divspec_o + integer:: npatterns + + real(kind=kind_dbl_prec) :: upattern_3d(gis_stochy%nx,gis_stochy%ny,levs) + real(kind=kind_dbl_prec) :: vpattern_3d(gis_stochy%nx,gis_stochy%ny,levs) + real(kind=kind_dbl_prec) :: pattern_1d(gis_stochy%nx) + integer i,j,lat,n,nn,k + real(kind_dbl_prec), dimension(lonf,gis_stochy%lats_node_a,1):: wrk2du,wrk2dv + +! logical lprint + + real, allocatable, dimension(:,:) :: workgu,workgv + integer kmsk0(lonf,gis_stochy%lats_node_a) + kmsk0 = 0 + allocate(workgu(lonf,latg)) + allocate(workgv(lonf,latg)) + divspec_e = 0; divspec_o = 0. + if (first_call) then + allocate(skebu_save(gis_stochy%nx,gis_stochy%ny,skeblevs)) + allocate(skebv_save(gis_stochy%nx,gis_stochy%ny,skeblevs)) + do k=2,skeblevs + workgu = 0. + workgv = 0. + do n=1,npatterns + if (.not. stochini) call patterngenerator_advance(rpattern(n),k,first_call) + ! ke norm (convert streamfunction forcing to vorticity forcing) + do nn=1,2 + vrtspec_e(:,nn) = gis_stochy%kenorm_e*rpattern(n)%spec_e(:,nn,k) + vrtspec_o(:,nn) = gis_stochy%kenorm_o*rpattern(n)%spec_o(:,nn,k) + enddo + ! convert to winds + call vrtdivspect_to_uvgrid( divspec_e,divspec_o,vrtspec_e,vrtspec_o,& + wrk2du,wrk2dv, gis_stochy) + do i=1,lonf + do j=1,gis_stochy%lats_node_a + lat=gis_stochy%global_lats_a(gis_stochy%ipt_lats_node_a-1+j) + workgu(i,lat) = workgu(i,lat) + wrk2du(i,j,1) + workgv(i,lat) = workgv(i,lat) + wrk2dv(i,j,1) + enddo + enddo + enddo + call mp_reduce_sum(workgu,lonf,latg) + call mp_reduce_sum(workgv,lonf,latg) + ! interpolate to cube grid + do j=1,gis_stochy%ny + pattern_1d = 0 + associate( tlats=>gis_stochy%parent_lats(1:gis_stochy%len(j),j),& + tlons=>gis_stochy%parent_lons(1:gis_stochy%len(j),j)) + call stochy_la2ga(workgu,lonf,latg,gg_lons,gg_lats,wlon,rnlat,& + pattern_1d(1:gis_stochy%len(j)),gis_stochy%len(j),tlats,tlons) + skebu_save(:,j,k)=pattern_1d(:) + call stochy_la2ga(workgv,lonf,latg,gg_lons,gg_lats,wlon,rnlat,& + pattern_1d(1:gis_stochy%len(j)),gis_stochy%len(j),tlats,tlons) + skebv_save(:,j,k)=-1*pattern_1d(:) + end associate + enddo + enddo + endif + do k=1,skeblevs-1 + skebu_save(:,:,k)=skebu_save(:,:,k+1) + skebv_save(:,:,k)=skebv_save(:,:,k+1) + do n=1,npatterns + rpattern(n)%spec_e(:,:,k)=rpattern(n)%spec_e(:,:,k+1) + rpattern(n)%spec_o(:,:,k)=rpattern(n)%spec_o(:,:,k+1) + enddo + enddo + ! get pattern for last level + workgu = 0. + workgv = 0. + do n=1,npatterns + call patterngenerator_advance(rpattern(n),skeblevs,first_call) + ! ke norm (convert streamfunction forcing to vorticity forcing) + divspec_e = 0; divspec_o = 0. + do nn=1,2 + vrtspec_e(:,nn) = gis_stochy%kenorm_e*rpattern(n)%spec_e(:,nn,skeblevs) + vrtspec_o(:,nn) = gis_stochy%kenorm_o*rpattern(n)%spec_o(:,nn,skeblevs) + enddo + ! convert to winds + call vrtdivspect_to_uvgrid(& + divspec_e,divspec_o,vrtspec_e,vrtspec_o,& + wrk2du,wrk2dv, gis_stochy) + do i=1,lonf + do j=1,gis_stochy%lats_node_a + lat=gis_stochy%global_lats_a(gis_stochy%ipt_lats_node_a-1+j) + workgu(i,lat) = workgu(i,lat) + wrk2du(i,j,1) + workgv(i,lat) = workgv(i,lat) + wrk2dv(i,j,1) + enddo + enddo + enddo + call mp_reduce_sum(workgu,lonf,latg) + call mp_reduce_sum(workgv,lonf,latg) + ! interpolate to cube grid + do j=1,gis_stochy%ny + pattern_1d = 0 + associate( tlats=>gis_stochy%parent_lats(:,j),& + tlons=>gis_stochy%parent_lons(:,j)) + call stochy_la2ga(workgu,lonf,latg,gg_lons,gg_lats,wlon,rnlat,& + pattern_1d(1:gis_stochy%len(j)),gis_stochy%len(j),tlats,tlons) + skebu_save(:,j,skeblevs)=pattern_1d(:) + call stochy_la2ga(workgv,lonf,latg,gg_lons,gg_lats,wlon,rnlat,& + pattern_1d(1:gis_stochy%len(j)),gis_stochy%len(j),tlats,tlons) + skebv_save(:,j,skeblevs)=-1*pattern_1d(:) + end associate + enddo + deallocate(workgu) + deallocate(workgv) + ! interpolate in the vertical ! consider moving to cubed sphere side, more memory, but less interpolations + do k=1,levs + do j=1,gis_stochy%ny + upattern_3d(:,j,k) = skeb_vwts(k,1)*skebu_save(:,j,skeb_vpts(k,1))+skeb_vwts(k,2)*skebu_save(:,j,skeb_vpts(k,2)) + vpattern_3d(:,j,k) = skeb_vwts(k,1)*skebv_save(:,j,skeb_vpts(k,1))+skeb_vwts(k,2)*skebv_save(:,j,skeb_vpts(k,2)) + enddo + enddo + first_call=.false. + +end subroutine get_random_pattern_vector + +!>@brief The subroutine 'get_random_pattern_scalar' converts spherical harmonics to the gaussian grid then interpolates to the target grid +!>@details This subroutine is for a 2-D (lat-lon) scalar field +subroutine get_random_pattern_scalar(rpattern,npatterns,& + gis_stochy,pattern_2d) + +! generate a random pattern for stochastic physics + implicit none + type(random_pattern), intent(inout) :: rpattern(npatterns) + type(stochy_internal_state) :: gis_stochy + integer,intent(in):: npatterns + + integer i,j,lat,n + real(kind=kind_dbl_prec), dimension(lonf,gis_stochy%lats_node_a,1):: wrk2d + +! logical lprint + + real(kind=kind_dbl_prec), allocatable, dimension(:,:) :: workg + real (kind=kind_dbl_prec) glolal(lonf,gis_stochy%lats_node_a) + integer kmsk0(lonf,gis_stochy%lats_node_a) + real(kind=kind_dbl_prec) :: pattern_2d(gis_stochy%nx,gis_stochy%ny) + real(kind=kind_dbl_prec) :: pattern_1d(gis_stochy%nx) + + kmsk0 = 0 + glolal = 0. + do n=1,npatterns + call patterngenerator_advance(rpattern(n),1,.false.) + call scalarspect_to_gaugrid(rpattern(n),gis_stochy, & + wrk2d,1) + glolal = glolal + wrk2d(:,:,1) + enddo + + allocate(workg(lonf,latg)) + workg = 0. + do j=1,gis_stochy%lats_node_a + lat=gis_stochy%global_lats_a(gis_stochy%ipt_lats_node_a-1+j) + do i=1,lonf + workg(i,lat) = glolal(i,j) + enddo + enddo + + call mp_reduce_sum(workg,lonf,latg) + +! interpolate to cube grid + do j=1,gis_stochy%ny + pattern_1d = 0 + associate( tlats=>gis_stochy%parent_lats(1:gis_stochy%len(j),j),& + tlons=>gis_stochy%parent_lons(1:gis_stochy%len(j),j)) + call stochy_la2ga(workg,lonf,latg,gg_lons,gg_lats,wlon,rnlat,& + pattern_1d(1:gis_stochy%len(j)),gis_stochy%len(j),tlats,tlons) + pattern_2d(:,j)=pattern_1d(:) + end associate + enddo + deallocate(workg) + +end subroutine get_random_pattern_scalar + +!>@brief The subroutine 'get_random_pattern_spp' converts spherical harmonics +!to the gaussian grid then interpolates to the target grid +!>@details This subroutine is for a 2-D (lat-lon) scalar field +subroutine get_random_pattern_spp(rpattern,npatterns,& + gis_stochy,pattern_3d) + +! generate a random pattern for stochastic physics + implicit none + type(random_pattern), intent(inout) :: rpattern(npatterns) + type(stochy_internal_state) :: gis_stochy + integer,intent(in):: npatterns + + integer i,j,lat,n + +! logical lprint + + real(kind=kind_dbl_prec), allocatable, dimension(:,:) :: workg + real (kind=kind_dbl_prec) glolal(lonf,gis_stochy%lats_node_a) + integer kmsk0(lonf,gis_stochy%lats_node_a) + real(kind=kind_dbl_prec) :: pattern_3d(gis_stochy%nx,gis_stochy%ny,npatterns) + real(kind=kind_dbl_prec) :: pattern_1d(gis_stochy%nx) + + allocate(workg(lonf,latg)) + do n=1,npatterns + kmsk0 = 0 + glolal = 0. + call patterngenerator_advance(rpattern(n),1,.false.) + call scalarspect_to_gaugrid(rpattern(n),gis_stochy, & + glolal,1) + + workg = 0. + do j=1,gis_stochy%lats_node_a + lat=gis_stochy%global_lats_a(gis_stochy%ipt_lats_node_a-1+j) + do i=1,lonf + workg(i,lat) = glolal(i,j) + enddo + enddo + + call mp_reduce_sum(workg,lonf,latg) + +! interpolate to cube grid + do j=1,gis_stochy%ny + pattern_1d = 0 + associate( tlats=>gis_stochy%parent_lats(1:gis_stochy%len(j),j),& + tlons=>gis_stochy%parent_lons(1:gis_stochy%len(j),j)) + call stochy_la2ga(workg,lonf,latg,gg_lons,gg_lats,wlon,rnlat,& + pattern_1d(1:gis_stochy%len(j)),gis_stochy%len(j),tlats,tlons) + pattern_3d(:,j,n)=pattern_1d(:) + end associate + enddo + enddo + deallocate(workg) + +end subroutine get_random_pattern_spp + +!>@brief The subroutine 'scalarspect_to_gaugrid' converts scalar spherical harmonics to a scalar on a gaussian grid +!>@details This subroutine is for a 2-D (lat-lon) scalar field +subroutine scalarspect_to_gaugrid(rpattern,gis_stochy,datag,n) +!\callgraph + + implicit none + type(random_pattern), intent(in) :: rpattern + type(stochy_internal_state), intent(in) :: gis_stochy + integer , intent(in) :: n + real(kind=kind_dbl_prec), intent(out) :: datag(lonf,gis_stochy%lats_node_a) +! local vars + real(kind=kind_dbl_prec) for_gr_a_1(gis_stochy%lon_dim_a,1,gis_stochy%lats_dim_a) + real(kind=kind_dbl_prec) for_gr_a_2(lonf,1,gis_stochy%lats_dim_a) + integer i,k + integer lan,lat + call spec_to_four(rpattern%spec_e(:,:,n), rpattern%spec_o(:,:,n), & + gis_stochy%plnev_a,gis_stochy%plnod_a,& + gis_stochy%ls_node, & + gis_stochy%lats_dim_a,for_gr_a_1,& + gis_stochy%ls_nodes,gis_stochy%max_ls_nodes,& + gis_stochy%lats_nodes_a,gis_stochy%global_lats_a,& + gis_stochy%lats_node_a,gis_stochy%ipt_lats_node_a,1) + do lan=1,gis_stochy%lats_node_a + lat = gis_stochy%global_lats_a(gis_stochy%ipt_lats_node_a-1+lan) + call four_to_grid(for_gr_a_1(:,:,lan),for_gr_a_2(:,:,lan),& + gis_stochy%lon_dim_a,1) + enddo + + datag = 0. + do lan=1,gis_stochy%lats_node_a + lat = gis_stochy%global_lats_a(gis_stochy%ipt_lats_node_a-1+lan) + do i=1,lonf + datag(i,lan) = for_gr_a_2(i,1,lan) + enddo + enddo + + return + end subroutine scalarspect_to_gaugrid + + +!>@brief The subroutine 'write_patterns' writes out a single pattern and the seed associated with the random number sequence in netcdf +!>@brief The subroutine 'write_stoch_restart_atm' writes out the speherical harmonics to a file, controlled by restart_interval +!>@details Only the active patterns are written out +subroutine write_stoch_restart_atm(sfile) +!\callgraph + use netcdf + use stochy_namelist_def, only : do_sppt,do_shum,do_skeb,lndp_type,do_spp + implicit none + character(len=*) :: sfile + integer :: stochlun,k,n,isize,ierr + integer :: ncid,varid1a,varid1b,varid2a,varid2b,varid3a,varid3b,varid4a,varid4b,varid5a,varid5b + integer :: seed_dim_id,spec_dim_id,zt_dim_id,ztsfc_dim_id,np_dim_id,npsfc_dim_id + integer :: ztspp_dim_id,npspp_dim_id + + include 'netcdf.inc' + + if ( ( .NOT. do_sppt) .AND. (.NOT. do_shum) .AND. (.NOT. do_skeb) .AND. (lndp_type==0 ) .AND. (.NOT. do_spp)) return + stochlun=99 + if (is_rootpe()) then + if (nsppt > 0 .OR. nshum > 0 .OR. nskeb > 0 .OR. nlndp>0 .OR. nspp>0 ) then + ierr=nf90_create(trim(sfile),cmode=NF90_CLOBBER,ncid=ncid) + ierr=NF90_PUT_ATT(ncid,NF_GLOBAL,"ntrunc",ntrunc) + call random_seed(size=isize) ! get seed size + ierr=NF90_DEF_DIM(ncid,"len_seed",isize,seed_dim_id) + ierr=NF90_PUT_ATT(ncid,seed_dim_id,"long_name","length of random seed") + ierr=NF90_DEF_DIM(ncid,"num_patterns",NF_UNLIMITED,np_dim_id) ! should be 5 + ierr=NF90_PUT_ATT(ncid,np_dim_id,"long_name","number of random patterns (max of 5)") + if (lndp_type .NE. 0) then + ierr=NF90_DEF_DIM(ncid,"num_patterns_sfc",nlndp,npsfc_dim_id) ! should be 5 + ierr=NF90_PUT_ATT(ncid,npsfc_dim_id,"long_name","number of random patterns for surface)") + ierr=NF90_DEF_DIM(ncid,"n_var_lndp",n_var_lndp,ztsfc_dim_id) + ierr=NF90_PUT_ATT(ncid,ztsfc_dim_id,"long_name","number of sfc perturbation types") + endif + if (nspp .GT. 0) then + ierr=NF90_DEF_DIM(ncid,"num_patterns_spp",nspp,npspp_dim_id) ! should be 5 + ierr=NF90_PUT_ATT(ncid,npspp_dim_id,"long_name","number of random patterns for spp)") + ierr=NF90_DEF_DIM(ncid,"n_var_spp",n_var_spp,ztspp_dim_id) + ierr=NF90_PUT_ATT(ncid,ztspp_dim_id,"long_name","number of spp perturbation types") + endif + ierr=NF90_DEF_DIM(ncid,"ndimspecx2",2*ndimspec,spec_dim_id) + ierr=NF90_PUT_ATT(ncid,spec_dim_id,"long_name","number of spectral cofficients") + if (do_sppt) then + ierr=NF90_DEF_VAR(ncid,"sppt_seed",NF90_DOUBLE,(/seed_dim_id, np_dim_id/), varid1a) + ierr=NF90_PUT_ATT(ncid,varid1a,"long_name","random number seed for SPPT") + ierr=NF90_DEF_VAR(ncid,"sppt_spec",NF90_DOUBLE,(/spec_dim_id, np_dim_id/), varid1b) + ierr=NF90_PUT_ATT(ncid,varid1b,"long_name","spectral cofficients SPPT") + endif + if (do_shum) then + ierr=NF90_DEF_VAR(ncid,"shum_seed",NF90_DOUBLE,(/seed_dim_id, np_dim_id/), varid2a) + ierr=NF90_PUT_ATT(ncid,varid2a,"long_name","random number seed for SHUM") + ierr=NF90_DEF_VAR(ncid,"shum_spec",NF90_DOUBLE,(/spec_dim_id, np_dim_id/), varid2b) + ierr=NF90_PUT_ATT(ncid,varid2b,"long_name","spectral cofficients SHUM") + endif + if (do_skeb) then + ierr=NF90_DEF_DIM(ncid,"skeblevs",skeblevs,zt_dim_id) + ierr=NF90_PUT_ATT(ncid,zt_dim_id,"long_name","number of vertical levels for SKEB") + ierr=NF90_DEF_VAR(ncid,"skeb_seed",NF90_DOUBLE,(/seed_dim_id, zt_dim_id,np_dim_id/), varid3a) + ierr=NF90_PUT_ATT(ncid,varid3a,"long_name","random number seed for SKEB") + ierr=NF90_DEF_VAR(ncid,"skeb_spec",NF90_DOUBLE,(/spec_dim_id, zt_dim_id,np_dim_id/), varid3b) + ierr=NF90_PUT_ATT(ncid,varid3b,"long_name","spectral cofficients SKEB") + endif + if (nlndp>0) then + ierr=NF90_DEF_VAR(ncid,"sfcpert_seed",NF90_DOUBLE,(/seed_dim_id, ztsfc_dim_id, npsfc_dim_id/), varid4a) + ierr=NF90_PUT_ATT(ncid,varid4a,"long_name","random number seed for SHUM") + ierr=NF90_DEF_VAR(ncid,"sfcpert_spec",NF90_DOUBLE,(/spec_dim_id, ztsfc_dim_id, npsfc_dim_id/), varid4b) + ierr=NF90_PUT_ATT(ncid,varid4b,"long_name","spectral cofficients SHUM") + endif + if (nspp>0) then + ierr=NF90_DEF_VAR(ncid,"spp_seed",NF90_DOUBLE,(/seed_dim_id, ztspp_dim_id, npspp_dim_id/), varid5a) + ierr=NF90_PUT_ATT(ncid,varid5a,"long_name","random number seed for SPP") + ierr=NF90_DEF_VAR(ncid,"spp_spec",NF90_DOUBLE,(/spec_dim_id, ztspp_dim_id, npspp_dim_id/), varid5b) + ierr=NF90_PUT_ATT(ncid,varid5b,"long_name","spectral cofficients SPP") + endif + ierr=NF90_ENDDEF(ncid) + if (ierr .NE. 0) then + write(0,*) 'error creating stochastic restart file' + return + end if + endif + endif + if (nsppt > 0) then + do n=1,nsppt + call write_pattern(rpattern_sppt(n),ncid,1,n,varid1a,varid1b,.false.,ierr) + enddo + endif + if (nshum > 0) then + do n=1,nshum + call write_pattern(rpattern_shum(n),ncid,1,n,varid2a,varid2b,.false.,ierr) + enddo + endif + if (nskeb > 0) then + do n=1,nskeb + do k=1,skeblevs + call write_pattern(rpattern_skeb(n),ncid,k,n,varid3a,varid3b,.true.,ierr) + enddo + enddo + endif + if (lndp_type .NE. 0 .AND. nlndp>0) then + do n=1,nlndp + do k=1,n_var_lndp + call write_pattern(rpattern_sfc(n),ncid,k,n,varid4a,varid4b,.true.,ierr) + enddo + enddo + endif + if (nspp > 0) then + do n=1,nspp + call write_pattern(rpattern_spp(n),ncid,1,n,varid5a,varid5b,.true.,ierr) + enddo + endif + if (is_rootpe() ) then + ierr=NF90_CLOSE(ncid) + if (ierr .NE. 0) then + write(0,*) 'error writing patterns and closing file' + return + endif + endif + end subroutine write_stoch_restart_atm + + +!>@brief The subroutine 'write_stoch_restart_ocn' writes out the speherical harmonics to a file, controlled by restart_interval +!>@details Only the active patterns are written out +subroutine write_stoch_restart_ocn(sfile) +!\callgraph + use netcdf + use stochy_namelist_def, only : do_ocnsppt,pert_epbl + implicit none + character(len=*) :: sfile + integer :: stochlun,k,n,isize,ierr + integer :: ncid,varid1a,varid1b,varid2a,varid2b,varid3a,varid3b + integer :: seed_dim_id,spec_dim_id,np_dim_id + include 'netcdf.inc' + if ( ( .NOT. do_ocnsppt) .AND. (.NOT. pert_epbl) ) return + stochlun=99 + if (is_rootpe()) then + ierr=nf90_create(trim(sfile),cmode=NF90_CLOBBER,ncid=ncid) + ierr=NF90_PUT_ATT(ncid,NF_GLOBAL,"ntrunc",ntrunc) + call random_seed(size=isize) ! get seed size + ierr=NF90_DEF_DIM(ncid,"len_seed",isize,seed_dim_id) + ierr=NF90_PUT_ATT(ncid,seed_dim_id,"long_name","length of random seed") + ierr=NF90_DEF_DIM(ncid,"num_patterns",NF_UNLIMITED,np_dim_id) ! should be 5 + ierr=NF90_PUT_ATT(ncid,np_dim_id,"long_name","number of random patterns (max of 5)") + ierr=NF90_DEF_DIM(ncid,"ndimspecx2",2*ndimspec,spec_dim_id) + ierr=NF90_PUT_ATT(ncid,spec_dim_id,"long_name","number of spectral cofficients") + if (do_ocnsppt) then + ierr=NF90_DEF_VAR(ncid,"ocnsppt_seed",NF90_DOUBLE,(/seed_dim_id, np_dim_id/), varid1a) + ierr=NF90_PUT_ATT(ncid,varid1a,"long_name","random number seed for SPPT") + ierr=NF90_DEF_VAR(ncid,"ocnsppt_spec",NF90_DOUBLE,(/spec_dim_id, np_dim_id/), varid1b) + ierr=NF90_PUT_ATT(ncid,varid1b,"long_name","spectral cofficients SPPT") + endif + if (pert_epbl) then + ierr=NF90_DEF_VAR(ncid,"epbl1_seed",NF90_DOUBLE,(/seed_dim_id, np_dim_id/), varid2a) + ierr=NF90_PUT_ATT(ncid,varid2a,"long_name","random number seed for EPBL1") + ierr=NF90_DEF_VAR(ncid,"epbl1_spec",NF90_DOUBLE,(/spec_dim_id, np_dim_id/), varid2b) + ierr=NF90_PUT_ATT(ncid,varid2b,"long_name","spectral cofficients EPBL1") + ierr=NF90_DEF_VAR(ncid,"epbl2_seed",NF90_DOUBLE,(/seed_dim_id, np_dim_id/), varid3a) + ierr=NF90_PUT_ATT(ncid,varid3a,"long_name","random number seed for EPBL2") + ierr=NF90_DEF_VAR(ncid,"epbl2_spec",NF90_DOUBLE,(/spec_dim_id, np_dim_id/), varid3b) + ierr=NF90_PUT_ATT(ncid,varid3b,"long_name","spectral cofficients EPBL2") + endif + ierr=NF90_ENDDEF(ncid) + if (ierr .NE. 0) then + write(0,*) 'error creating stochastic restart file' + return + end if + endif + if (nocnsppt > 0) then + do n=1,nocnsppt + call write_pattern(rpattern_ocnsppt(n),ncid,1,n,varid1a,varid1b,.false.,ierr) + enddo + endif + if (nepbl > 0) then + do n=1,nepbl + call write_pattern(rpattern_epbl1(n),ncid,1,n,varid2a,varid2b,.false.,ierr) + call write_pattern(rpattern_epbl2(n),ncid,1,n,varid3a,varid3b,.false.,ierr) + enddo + endif + if (is_rootpe() ) then + ierr=NF90_CLOSE(ncid) + if (ierr .NE. 0) then + write(0,*) 'error writing patterns and closing file' + return + endif + endif + end subroutine write_stoch_restart_ocn +!>@brief The subroutine 'write_patterns' writes out a single pattern and the seed associated with the random number sequence +!>@details Spherical harminoncs are stored with trianglular truncation + subroutine write_pattern(rpattern,outlun,lev,np,varid1,varid2,slice_of_3d,iret) +!\callgraph + use netcdf + implicit none + type(random_pattern), intent(inout) :: rpattern + integer, intent(in) :: outlun,lev + integer, intent(in) :: np,varid1,varid2 + logical, intent(in) :: slice_of_3d + integer, intent(out) :: iret + real(kind_dbl_prec), allocatable :: pattern2d(:) + integer nm,nn,arrlen,isize,ierr + integer,allocatable :: isave(:) + include 'netcdf.inc' + arrlen=2*ndimspec + iret=0 + allocate(pattern2d(arrlen)) + pattern2d=0.0 + ! fill in apprpriate pieces of array + do nn=1,len_trie_ls + nm = rpattern%idx_e(nn) + if (nm == 0) cycle + pattern2d(nm) = rpattern%spec_e(nn,1,lev) + pattern2d(ndimspec+nm) = rpattern%spec_e(nn,2,lev) + enddo + do nn=1,len_trio_ls + nm = rpattern%idx_o(nn) + if (nm == 0) cycle + pattern2d(nm) = rpattern%spec_o(nn,1,lev) + pattern2d(ndimspec+nm) = rpattern%spec_o(nn,2,lev) + enddo + call mp_reduce_sum(pattern2d,arrlen) + ! write only on root process + if (is_rootpe()) then + print*,'writing out random pattern (min/max/size)',& + minval(pattern2d),maxval(pattern2d),size(pattern2d) + call random_seed(size=isize) ! get seed size + allocate(isave(isize)) ! get seed + call random_seed(get=isave,stat=rpattern%rstate) ! write seed + ierr=NF90_PUT_VAR(outlun,varid1,isave,(/1,np/)) + if (slice_of_3d) then + ierr=NF90_PUT_VAR(outlun,varid2,pattern2d,(/1,lev,np/)) + else + ierr=NF90_PUT_VAR(outlun,varid2,pattern2d,(/1,np/)) + endif + if (ierr .NE. 0) then + write(0,*) 'error writing to stochastic restart file' + iret = ierr + return + end if + endif + deallocate(pattern2d) + end subroutine write_pattern +!>@brief The subroutine 'vrtdivspect_to_uvgrid' converts vorticty and divergence spherical harmonics to +! zonal and meridional winds on the gaussian grid +!>@details This subroutine is for a 2-D (lat-lon) vector field + subroutine vrtdivspect_to_uvgrid(& + trie_di,trio_di,trie_ze,trio_ze,& + uug,vvg, gis_stochy) +!\callgraph + + implicit none + type(stochy_internal_state), intent(in) :: gis_stochy + real(kind=kind_dbl_prec), intent(in) :: trie_di(len_trie_ls,2) + real(kind=kind_dbl_prec), intent(in) :: trio_di(len_trio_ls,2) + real(kind=kind_dbl_prec), intent(in) :: trie_ze(len_trie_ls,2) + real(kind=kind_dbl_prec), intent(in) :: trio_ze(len_trio_ls,2) + real(kind=kind_dbl_prec), intent(out) :: uug(lonf,gis_stochy%lats_node_a) + real(kind=kind_dbl_prec), intent(out) :: vvg(lonf,gis_stochy%lats_node_a) +! local vars + real(kind=kind_dbl_prec) trie_ls(len_trie_ls,2,2) + real(kind=kind_dbl_prec) trio_ls(len_trio_ls,2,2) + real(kind=kind_dbl_prec) for_gr_a_1(gis_stochy%lon_dim_a,2,gis_stochy%lats_dim_a) + real(kind=kind_dbl_prec) for_gr_a_2(lonf,2,gis_stochy%lats_dim_a) + integer i,k + integer lan,lat + real (kind=kind_dbl_prec) tx1 + + call dezouv_stochy(trie_di(:,:), trio_ze(:,:), & + trie_ls(:,:,1), trio_ls(:,:,2), gis_stochy%epsedn,gis_stochy%epsodn, & + gis_stochy%snnp1ev,gis_stochy%snnp1od,gis_stochy%ls_node) + call dozeuv_stochy(trio_di(:,:), trie_ze(:,:), & + trio_ls(:,:,1), trie_ls(:,:,2), gis_stochy%epsedn,gis_stochy%epsodn, & + gis_stochy%snnp1ev,gis_stochy%snnp1od,gis_stochy%ls_node) + + call spec_to_four(trie_ls, trio_ls, & + gis_stochy%plnev_a,gis_stochy%plnod_a,& + gis_stochy%ls_node,& + gis_stochy%lats_dim_a,for_gr_a_1,& + gis_stochy%ls_nodes,gis_stochy%max_ls_nodes,& + gis_stochy%lats_nodes_a,gis_stochy%global_lats_a,& + gis_stochy%lats_node_a,gis_stochy%ipt_lats_node_a,2) + + do lan=1,gis_stochy%lats_node_a + lat = gis_stochy%global_lats_a(gis_stochy%ipt_lats_node_a-1+lan) + call four_to_grid(for_gr_a_1(:,:,lan),for_gr_a_2(:,:,lan),& + gis_stochy%lon_dim_a,2) + enddo + + uug = 0.; vvg = 0. + do lan=1,gis_stochy%lats_node_a + lat = gis_stochy%global_lats_a(gis_stochy%ipt_lats_node_a-1+lan) + tx1 = 1. / coslat_a(lat) + do i=1,lonf + uug(i,lan) = for_gr_a_2(i,1,lan) * tx1 + vvg(i,lan) = for_gr_a_2(i,2,lan) * tx1 + enddo + enddo + + return + end subroutine vrtdivspect_to_uvgrid +end module get_stochy_pattern_mod diff --git a/stochastic_physics/halo_exchange.fv3.F90 b/stochastic_physics/halo_exchange.fv3.F90 new file mode 100644 index 0000000000..d3d1463b9b --- /dev/null +++ b/stochastic_physics/halo_exchange.fv3.F90 @@ -0,0 +1,100 @@ +module halo_exchange + +!> This halo exchange routine is for host model fv3atm and requires FMS + +use mpp_mod, only: mpp_error, FATAL +use mpp_parameter_mod, only: EUPDATE, WUPDATE, SUPDATE, NUPDATE +use mpp_domains_mod, only: domain2d, mpp_update_domains +use mpp_domains_mod, only: mpp_update_domains + +implicit none +private + +!--- utility routines +public :: atmosphere_scalar_field_halo + +contains + +!>@brief The subroutine 'atmosphere_scalar_field_halo' is an API to return halo information +!! of the current MPI_rank for an input scalar field. +!>@detail Up to three point haloes can be returned by this API which includes special handling for +!! the cubed-sphere tile corners. Output will be in (i,j,k) while input can be in (i,j,k) or +!! horizontally-packed form (ix,k). + + subroutine atmosphere_scalar_field_halo (data, halo, isize, jsize, ksize, & + isc, iec, jsc, jec, npx, npy, domain_for_coupler,data_p) + !-------------------------------------------------------------------- + ! data - output array to return the field with halo (i,j,k) + ! optionally input for field already in (i,j,k) form + ! sized to include the halo of the field (+ 2*halo) + ! halo - size of the halo (must be less than 3) + ! ied - horizontal resolution in i-dir with haloes + ! jed - horizontal resolution in j-dir with haloes + ! ksize - vertical resolution + ! data_p - optional input field in packed format (ix,k) + !-------------------------------------------------------------------- + !--- interface variables --- + real*8, dimension(1:isize,1:jsize,ksize), intent(inout) :: data !< output array to return the field with halo (i,j,k) + !< optionally input for field already in (i,j,k) form + !< sized to include the halo of the field (+ 2*halo) + integer, intent(in) :: halo !< size of the halo (must be less than 3) + integer, intent(in) :: isize !< horizontal resolution in i-dir with haloes + integer, intent(in) :: jsize !< horizontal resolution in j-dir with haloes + integer, intent(in) :: ksize !< vertical resolution + real*8, dimension(:,:), optional, intent(in) :: data_p !< optional input field in packed format (ix,k) + integer, intent(in) :: isc, iec, jsc, jec, npx, npy + type(domain2d), intent(inout) :: domain_for_coupler + !--- local variables --- + integer :: i, j, k + integer :: ic, jc + character(len=44) :: modname = 'atmosphere_mod::atmosphere_scalar_field_halo' + integer :: mpp_flags + + !--- perform error checking + if (halo .gt. 3) call mpp_error(FATAL, modname//' - halo.gt.3 requires extending the MPP domain to support') + ic = isize - 2 * halo + jc = jsize - 2 * halo + + !--- if packed data is present, unpack it into the two-dimensional data array + if (present(data_p)) then + if (ic*jc .ne. size(data_p,1)) call mpp_error(FATAL, modname//' - incorrect sizes for incoming & + &variables data and data_p') + data = 0. + do k = 1, ksize + do j = 1, jc + do i = 1, ic + data(i+halo, j+halo, k) = data_p(i + (j-1)*ic, k) + enddo + enddo + enddo + endif + + mpp_flags = EUPDATE + WUPDATE + SUPDATE + NUPDATE + if (halo == 1) then + call mpp_update_domains(data, domain_for_coupler, flags=mpp_flags, complete=.true.) + ! Not needed for cellular automata code + !elseif (halo == 3) then + ! call mpp_update_domains(data, Atm(mytile)%domain, flags=mpp_flags, complete=.true.) + else + call mpp_error(FATAL, modname//' - unsupported halo size') + endif + + !--- fill the halo points when at a corner of the cubed-sphere tile + !--- interior domain corners are handled correctly + if ( (isc==1) .or. (jsc==1) .or. (iec==npx-1) .or. (jec==npy-1) ) then + do k = 1, ksize + do j=1,halo + do i=1,halo + if ((isc== 1) .and. (jsc== 1)) data(halo+1-j ,halo+1-i ,k) = data(halo+i ,halo+1-j ,k) !SW Corner + if ((isc== 1) .and. (jec==npy-1)) data(halo+1-j ,halo+jc+i,k) = data(halo+i ,halo+jc+j,k) !NW Corner + if ((iec==npx-1) .and. (jsc== 1)) data(halo+ic+j,halo+1-i ,k) = data(halo+ic-i+1,halo+1-j ,k) !SE Corner + if ((iec==npx-1) .and. (jec==npy-1)) data(halo+ic+j,halo+jc+i,k) = data(halo+ic-i+1,halo+jc+j,k) !NE Corner + enddo + enddo + enddo + endif + + return + end subroutine atmosphere_scalar_field_halo + +end module halo_exchange diff --git a/stochastic_physics/kinddef.F90 b/stochastic_physics/kinddef.F90 new file mode 100644 index 0000000000..43cd3d494d --- /dev/null +++ b/stochastic_physics/kinddef.F90 @@ -0,0 +1,25 @@ +module kinddef + + implicit none + + private + + public :: kind_evod, kind_phys + public :: kind_dbl_prec, kind_qdt_prec + public :: kind_io4, kind_io8 + + integer, parameter :: kind_io4 = 4 + + ! DH* TODO - stochastic physics / CA should be using only one of these + integer, parameter :: kind_evod = 8 + integer, parameter :: kind_phys = 8 + integer, parameter :: kind_dbl_prec = 8 + integer, parameter :: kind_io8 = 8 + +#ifdef NO_QUAD_PRECISION + integer, parameter :: kind_qdt_prec = 8 +#else + integer, parameter :: kind_qdt_prec = 16 +#endif + +end module kinddef diff --git a/stochastic_physics/lndp_apply_perts.F90 b/stochastic_physics/lndp_apply_perts.F90 new file mode 100644 index 0000000000..bd3ef9f76b --- /dev/null +++ b/stochastic_physics/lndp_apply_perts.F90 @@ -0,0 +1,343 @@ +module lndp_apply_perts_mod + + use kinddef, only : kind_dbl_prec + + implicit none + + private + + public :: lndp_apply_perts + + contains + +!==================================================================== +! lndp_apply_perts +!==================================================================== +! Driver for applying perturbations to sprecified land states or parameters +! Draper, July 2020. + + subroutine lndp_apply_perts(blksz, lsm, lsm_noah, lsm_ruc, lsoil, & + dtf, kdt, lndp_each_step, & + n_var_lndp, lndp_var_list, lndp_prt_list, & + sfc_wts, xlon, xlat, stype, smcmax, smcmin, param_update_flag, & + smc, slc, stc, vfrac, alvsf, alnsf, alvwf, alnwf, facsf, facwf, & + snoalb, semis, zorll, ierr) + + implicit none + + ! intent(in) + integer, intent(in) :: blksz(:) + integer, intent(in) :: n_var_lndp, lsoil, kdt + logical, intent(in) :: lndp_each_step + integer, intent(in) :: lsm, lsm_noah, lsm_ruc + character(len=3), intent(in) :: lndp_var_list(:) + real(kind=kind_dbl_prec), intent(in) :: lndp_prt_list(:) + real(kind=kind_dbl_prec), intent(in) :: dtf + real(kind=kind_dbl_prec), intent(in) :: sfc_wts(:,:,:) + real(kind=kind_dbl_prec), intent(in) :: xlon(:,:) + real(kind=kind_dbl_prec), intent(in) :: xlat(:,:) + logical, intent(in) :: param_update_flag + ! true = parameters have been updated, apply perts + real(kind=kind_dbl_prec), intent(in) :: stype(:,:) + real(kind=kind_dbl_prec), intent(in) :: smcmax(:) + real(kind=kind_dbl_prec), intent(in) :: smcmin(:) + + ! intent(inout) + real(kind=kind_dbl_prec), intent(inout) :: smc(:,:,:) + real(kind=kind_dbl_prec), intent(inout) :: slc(:,:,:) + real(kind=kind_dbl_prec), intent(inout) :: stc(:,:,:) + real(kind=kind_dbl_prec), intent(inout) :: vfrac(:,:) + real(kind=kind_dbl_prec), intent(inout) :: snoalb(:,:) + real(kind=kind_dbl_prec), intent(inout) :: alvsf(:,:) + real(kind=kind_dbl_prec), intent(inout) :: alnsf(:,:) + real(kind=kind_dbl_prec), intent(inout) :: alvwf(:,:) + real(kind=kind_dbl_prec), intent(inout) :: alnwf(:,:) + real(kind=kind_dbl_prec), intent(inout) :: facsf(:,:) + real(kind=kind_dbl_prec), intent(inout) :: facwf(:,:) + real(kind=kind_dbl_prec), intent(inout) :: semis(:,:) + real(kind=kind_dbl_prec), intent(inout) :: zorll(:,:) + + ! intent(out) + integer, intent(out) :: ierr + + ! local + integer :: nblks, print_i, print_nb, i, nb + integer :: this_im, v, soiltyp, k + logical :: print_flag + + real(kind=kind_dbl_prec) :: p, min_bound, max_bound, tmp_sic, pert, factor + real(kind=kind_dbl_prec), dimension(lsoil) :: zslayer, smc_vertscale, stc_vertscale + + ! decrease in applied pert with depth + !-- Noah lsm + real(kind=kind_dbl_prec), dimension(4), parameter :: smc_vertscale_noah = (/1.0,0.5,0.25,0.125/) + real(kind=kind_dbl_prec), dimension(4), parameter :: stc_vertscale_noah = (/1.0,0.5,0.25,0.125/) + real(kind=kind_dbl_prec), dimension(4), parameter :: zs_noah = (/0.1, 0.3, 0.6, 1.0/) + !-- RUC lsm + real(kind=kind_dbl_prec), dimension(9), parameter :: smc_vertscale_ruc = (/1.0,0.9,0.8,0.6,0.4,0.2,0.1,0.05,0./) + real(kind=kind_dbl_prec), dimension(9), parameter :: stc_vertscale_ruc = (/1.0,0.9,0.8,0.6,0.4,0.2,0.1,0.05,0./) + real(kind=kind_dbl_prec), dimension(9), parameter :: zs_ruc = (/0.05, 0.15, 0.20, 0.20, 0.40, 0.60, 0.60, 0.80, 1.00/) + + ierr = 0 + + if (lsm/=lsm_noah .and. lsm/=lsm_ruc) then + write(6,*) 'ERROR: lndp_apply_pert assumes LSM is Noah or RUC,', & + ' may need to adapt variable names for a different LSM' + ierr=10 + return + endif + + !write (0,*) 'Input to lndp_apply_pert' + !write (0,*) 'lsm, lsoil, lsm_ruc, lsoil_lsm =', lsm, lsoil, lsm_ruc, lsoil_lsm + !write (0,*) 'zs_lsm =', zs_lsm + !write (0,*) 'n_var_lndp, lndp_var_list =', n_var_lndp, lndp_var_list + !write (0,*) 'smcmin =',smcmin + + ! lndp_prt_list input is per hour, factor converts to per timestep + ! Do conversion only when variables are perturbed at every time step + if(lndp_each_step) then + factor = dtf/3600. + else + factor = 1. + endif + + if (lsm == lsm_noah) then + do k = 1, lsoil + zslayer(k) = zs_noah(k) + smc_vertscale(k) = smc_vertscale_noah(k) + stc_vertscale(k) = stc_vertscale_noah(k) + enddo + elseif (lsm == lsm_ruc) then + do k = 1, lsoil + zslayer(k) = zs_ruc(k) + smc_vertscale(k) = smc_vertscale_ruc(k) + stc_vertscale(k) = stc_vertscale_ruc(k) + enddo + endif + + nblks = size(blksz) + + call set_printing_nb_i(blksz,xlon,xlat,print_i,print_nb) + + do nb =1,nblks + do i = 1, blksz(nb) + + !if ( nint(Sfcprop(nb)%slmsk(i)) .NE. 1) cycle ! skip if not land + + !if ( ((isot == 1) .and. (soiltyp == 16)) & + ! .or.( (isot == 0) .and. (soiltyp == 9 )) ) cycle ! skip if land-ice + + if ( smc(nb,i,1) .EQ. 1.) cycle ! skip non-soil (land-ice and non-land) + ! set printing + if ( (i==print_i) .and. (nb==print_nb) ) then + print_flag = .true. + else + print_flag=.false. + endif + + do v = 1,n_var_lndp + select case (trim(lndp_var_list(v))) + !================================================================= + ! State updates - performed every cycle + !================================================================= + case('smc') + p=5. + soiltyp = int( stype(nb,i)+0.5 ) ! also need for maxsmc + min_bound = smcmin(soiltyp) + max_bound = smcmax(soiltyp) + + if ((lsm /= lsm_ruc) .or. (lsm == lsm_ruc .and. kdt == 2)) then + ! with RUC LSM perturb smc only at time step = 2, as in HRRR + do k=1,lsoil + !store frozen soil moisture + tmp_sic= smc(nb,i,k) - slc(nb,i,k) + + ! perturb total soil moisture + ! factor of sldepth*1000 converts from mm to m3/m3 + ! lndp_prt_list(v) = 0.3 in input.nml + pert = sfc_wts(nb,i,v)*smc_vertscale(k)*lndp_prt_list(v)/(zslayer(k)*1000.) + pert = pert*dtf/3600. ! lndp_prt_list input is per hour, convert to per timestep + ! (necessary for state vars only) + call apply_pert('smc',pert,print_flag, smc(nb,i,k),ierr,p,min_bound, max_bound) + + ! assign all of applied pert to the liquid soil moisture + slc(nb,i,k) = smc(nb,i,k) - tmp_sic + enddo + endif + + case('stc') + + do k=1,lsoil + pert = sfc_wts(nb,i,v)*stc_vertscale(k)*lndp_prt_list(v) + pert = pert*dtf/3600. ! lndp_prt_list input is per hour, convert to per timestep + ! (necessary for state vars only) + call apply_pert('stc',pert,print_flag, stc(nb,i,k),ierr) + enddo + !================================================================= + ! Parameter updates - only if param_update_flag = TRUE + !================================================================= + case('vgf') ! vegetation fraction + if (param_update_flag .or. lndp_each_step) then + p =5. + min_bound=0. + max_bound=1. + + pert = sfc_wts(nb,i,v)*lndp_prt_list(v) + pert = pert*factor + call apply_pert ('vfrac',pert,print_flag, vfrac(nb,i), ierr,p,min_bound, max_bound) + endif + case('alb') ! albedo + if (param_update_flag .or. lndp_each_step) then + p =5. + min_bound=0.0 + max_bound=0.4 + + pert = sfc_wts(nb,i,v)*lndp_prt_list(v) + pert = pert*factor + !call apply_pert ('alvsf',pert,print_flag, alvsf(nb,i), ierr,p,min_bound, max_bound) + call apply_pert ('alnsf',pert,print_flag, alnsf(nb,i), ierr,p,min_bound, max_bound) + !call apply_pert ('alvwf',pert,print_flag, alvwf(nb,i), ierr,p,min_bound, max_bound) + call apply_pert ('alnwf',pert,print_flag, alnwf(nb,i), ierr,p,min_bound, max_bound) + !call apply_pert ('facsf',pert,print_flag, facsf(nb,i), ierr,p,min_bound, max_bound) + !call apply_pert ('facwf',pert,print_flag, facwf(nb,i), ierr,p,min_bound, max_bound) + endif + case('sal') ! snow albedo + if (param_update_flag .or. lndp_each_step) then + p =5. + min_bound=0.3 + max_bound=0.85 + + pert = sfc_wts(nb,i,v)*lndp_prt_list(v) + pert = pert*factor + call apply_pert ('snoalb',pert,print_flag, snoalb(nb,i), ierr,p,min_bound, max_bound) + endif + case('emi') ! emissivity + if (param_update_flag .or. lndp_each_step) then + p =5. + min_bound=0.8 + max_bound=1. + + pert = sfc_wts(nb,i,v)*lndp_prt_list(v) + pert = pert*factor + call apply_pert ('semis',pert,print_flag, semis(nb,i), ierr,p,min_bound, max_bound) + endif + case('zol') ! land roughness length + if (param_update_flag .or. lndp_each_step) then + p =5. + min_bound=0. + max_bound=300. + + pert = sfc_wts(nb,i,v)*lndp_prt_list(v) + pert = pert*factor + call apply_pert ('zol',pert,print_flag, zorll(nb,i), ierr,p,min_bound, max_bound) + endif + case default + print*, & + 'ERROR: unrecognised lndp_prt_list option in lndp_apply_pert, exiting', trim(lndp_var_list(v)) + ierr = 10 + return + end select + enddo + enddo + enddo + end subroutine lndp_apply_perts + +!==================================================================== +! apply_perts +!==================================================================== +! Apply perturbations to selected land states or parameters + + subroutine apply_pert(vname,pert,print_flag, state,ierr,p,vmin, vmax) + + ! intent in + logical, intent(in) :: print_flag + real(kind=kind_dbl_prec), intent(in) :: pert + character(len=*), intent(in) :: vname ! name of variable being perturbed + + real(kind=kind_dbl_prec), optional, intent(in) :: p ! flat-top paramater, 0 = no flat-top + ! flat-top function is used for bounded variables + ! to reduce the magnitude of perturbations near boundaries. + real(kind=kind_dbl_prec), optional, intent(in) :: vmin, vmax ! min,max bounds of variable being perturbed + + ! intent (inout) + real(kind=kind_dbl_prec), intent(inout) :: state + + ! intent out + integer :: ierr + + !local + real(kind=kind_dbl_prec) :: z + + if ( print_flag ) then + write(*,*) 'LNDP - applying lndp to ',vname, ', initial value', state + endif + + ! apply perturbation + if (present(p) ) then + if ( .not. (present(vmin) .and. present(vmax) )) then + ierr=20 + print*, 'error, flat-top function requires min & max to be specified' + endif + + z = -1. + 2*(state - vmin)/(vmax - vmin) ! flat-top function + state = state + pert*(1-abs(z**p)) + else + state = state + pert + endif + + if (present(vmax)) state = min( state , vmax ) + if (present(vmin)) state = max( state , vmin ) + !state = max( min( state , vmax ), vmin ) + + if ( print_flag ) then + write(*,*) 'LNDP - applying lndp to ',vname, ', final value', state + endif + + end subroutine apply_pert + + +!==================================================================== +! set_printing_nb_i +!==================================================================== +! routine to turn on print flag for selected location +! + subroutine set_printing_nb_i(blksz,xlon,xlat,print_i,print_nb) + + implicit none + + ! intent (in) + integer, intent(in) :: blksz(:) + real(kind=kind_dbl_prec), intent(in) :: xlon(:,:) + real(kind=kind_dbl_prec), intent(in) :: xlat(:,:) + + + ! intent (out) + integer, intent(out) :: print_i, print_nb + + ! local + integer :: nblks,nb,i + real, parameter :: plon_trunc = 114.9 + real, parameter :: plat_trunc = -26.6 + real, parameter :: delta = 1. + + nblks = size(blksz) + + print_i = -9 + print_nb = -9 + do nb = 1,nblks + do i = 1,blksz(nb) + if ( (xlon(nb,i)*57.29578 > plon_trunc) .and. (xlon(nb,i)*57.29578 < plon_trunc+delta ) .and. & + (xlat(nb,i)*57.29578 > plat_trunc ) .and. (xlat(nb,i)*57.29578 < plat_trunc+delta ) ) then + print_i=i + print_nb=nb + write(*,*) 'LNDP -print flag is on', xlon(nb,i)*57.29578, xlat(nb,i)*57.29578, nb, i + return + endif + enddo + enddo + + end subroutine set_printing_nb_i + +end module lndp_apply_perts_mod + + diff --git a/stochastic_physics/main.doc b/stochastic_physics/main.doc new file mode 100644 index 0000000000..eeedbefbe4 --- /dev/null +++ b/stochastic_physics/main.doc @@ -0,0 +1,34 @@ +/*! \mainpage My Personal Index Page + * + * \section intro_sec Introduction + * + * + * + *The stochastic physics currently only works with the UFS-atmosphere model + * + *Currently, 3 stochastic schemes are used operationally at NCEP/EMC: Stochastic Kinetic Energy Backscatter (SKEB; Berner et al., 2009), Stochastically Perturbed Physics Tendencies (SPPT; Palmer et al., 2009), and Specific Humidity perturbations (SHUM), which is inspired by Tompkins and Berner, 2008. In addition there is the ability to perturb certain land model/surface parameters (Gehne et al, 2019), and a cellular automata scheme (Bengtsson et al. 20XX) which interacts directly with the convective parameterization. + * + *SKEB adds wind perturbations to model state. Perturbations are random in space/time, but amplitude is determined by a smoothed dissipation estimate provided by the dynamical core. + *Addresses errors in the dynamics - more active in the mid-latitudes + * + *SPPT multiplies the physics tendencies by a random number O [0,2] before updating the model state. Addresses error in the physics parameterizations (either missing physics or unresolved subgrid processes). It is most active in boundary layer and convective regions + * + *SHUM multiply the low-level specific humidity by a small random number each time-step. It attempts to address missing physics (cold pools, gust fronts), most active in convective regions + *Land surface perturbations allow for land surface parameters such as Albedo, Soil Hydraulic Conductivity, LAI, and roughness lengths to vary in space. Addresses error in the land model and land-atmosphere interactions + * + *Due to the model’s numerics, any stochastic perturbation needs to be correlated in space and time in order to have the desired effect of upscale growth of the perturbations. This is achieved by creating a random pattern that has a specified decorrelation length-scale and is a first order auto-regressive process AR(1) in time with a specified decorrelation time-scale. (The CA random pattern generator also satisfies this condition). + * + * \section install_sec Installation + * + * \subsection step1 1: clone the entire github repo: + * >git clone https://github.com/ufs-community/ufs-weather-model + * + * >cd ufs-weather-model + * + * >git submodule update --init --recursive + * + * \subsection step2 2: build the ufs-weather-model + * >build the system + * + * follow the CMAKE build instructions + */ diff --git a/stochastic_physics/makefile b/stochastic_physics/makefile new file mode 100644 index 0000000000..b0e30afaaf --- /dev/null +++ b/stochastic_physics/makefile @@ -0,0 +1,93 @@ +SHELL = /bin/sh + +inside_nems := $(wildcard ../../../conf/configure.nems) +ifneq ($(strip $(inside_nems)),) + include ../../../conf/configure.nems +else + exist_configure_fv3 := $(wildcard ../FV3/conf/configure.fv3) + ifneq ($(strip $(exist_configure_fv3)),) + include ../FV3/conf/configure.fv3 + else + $(error "../FV3/conf/configure.fv3 file is missing. Run ./configure") + endif + $(info ) + $(info Build standalone FV3 stochastic_physics ...) + $(info ) +endif + +LIBRARY = libstochastic_physics.a + +FFLAGS += -I../FV3/gfsphysics/ -I../FV3/atmos_cubed_sphere -I$(FMS_DIR) + +SRCS_F = + +SRCS_f90 = \ + ./plumes.f90 + +SRCS_f = \ + ./stochy_gg_def.f \ + ./stochy_layout_lag.f \ + ./four_to_grid_stochy.f \ + ./glats_stochy.f \ + ./sumfln_stochy.f \ + ./gozrineo_stochy.f \ + ./get_ls_node_stochy.f \ + ./get_lats_node_a_stochy.f \ + ./setlats_a_stochy.f \ + ./setlats_lag_stochy.f \ + ./epslon_stochy.f \ + ./getcon_lag_stochy.f \ + ./pln2eo_stochy.f \ + ./dozeuv_stochy.f \ + ./dezouv_stochy.f + +SRCS_F90 = \ + ./kinddef.F90 \ + ./mpi_wrapper.F90 \ + ./halo_exchange.fv3.F90 \ + ./spectral_layout.F90 \ + ./getcon_spectral.F90 \ + ./stochy_namelist_def.F90 \ + ./compns_stochy.F90 \ + ./stochy_internal_state_mod.F90 \ + ./stochastic_physics.F90 \ + ./stochy_patterngenerator.F90 \ + ./stochy_data_mod.F90 \ + ./get_stochy_pattern.F90 \ + ./initialize_spectral_mod.F90 \ + ./cellular_automata_global.F90 \ + ./cellular_automata_sgs.F90 \ + ./update_ca.F90 \ + ./lndp_apply_perts.F90 + +SRCS_c = + +DEPEND_FILES = $(SRCS_f) $(SRCS_f90) $(SRCS_F) $(SRCS_F90) + +OBJS_f = $(SRCS_f:.f=.o) +OBJS_f90 = $(SRCS_f90:.f90=.o) +OBJS_F = $(SRCS_F:.F=.o) +OBJS_F90 = $(SRCS_F90:.F90=.o) +OBJS_c = $(SRCS_c:.c=.o) + +OBJS = $(OBJS_f) $(OBJS_f90) $(OBJS_F) $(OBJS_F90) $(OBJS_c) + +all default: depend $(LIBRARY) + +$(LIBRARY): $(OBJS) + $(AR) $(ARFLAGS) $@ $? + +.PHONY: clean +clean: + @echo "Cleaning stochastic_physics ... " + @echo + $(RM) -f $(LIBRARY) *__genmod.f90 *.o */*.o *.mod *.i90 *.lst *.i depend + +MKDEPENDS = ../FV3/mkDepends.pl +include ../FV3/conf/make.rules + +# do not include 'depend' file if the target contains string 'clean' +ifneq (clean,$(findstring clean,$(MAKECMDGOALS))) + -include depend +endif + diff --git a/stochastic_physics/mersenne_twister.F90 b/stochastic_physics/mersenne_twister.F90 new file mode 100644 index 0000000000..9ab6103e76 --- /dev/null +++ b/stochastic_physics/mersenne_twister.F90 @@ -0,0 +1,493 @@ +!>\file mersenne_twister.f +!! This file contains the module that calculates random numbers using the +!! Mersenne twister + +!> \defgroup mersenne_ge Mersenne Twister Module +!! Module: mersenne_twister Modern random number generator +!!\author Iredell Org: W/NX23 date: 2005-06-14 +!! Abstract: This module calculates random numbers using the Mersenne twister. +!! (It has been adapted to a Fortran 90 module from open source software. +!! The comments from the original software are given below in the remarks.) +!! The Mersenne twister (aka MT19937) is a state-of-the-art random number +!! generator based on Mersenne primes and originally developed in 1997 by +!! Matsumoto and Nishimura. It has a period before repeating of 2^19937-1, +!! which certainly should be good enough for geophysical purposes. :-) +!! Considering the algorithm's robustness, it runs fairly speedily. +!! (Some timing statistics are given below in the remarks.) +!! This adaptation uses the standard Fortran 90 random number interface, +!! which can generate an arbitrary number of random numbers at one time. +!! The random numbers generated are uniformly distributed between 0 and 1. +!! The module also can generate random numbers from a Gaussian distribution +!! with mean 0 and standard deviation 1, using a Numerical Recipes algorithm. +!! The module also can generate uniformly random integer indices. +!! There are also thread-safe versions of the generators in this adaptation, +!! necessitating the passing of generator states which must be kept private. +! +! Program History Log: +! 2005-06-14 Mark Iredell +! +! Usage: +! The module can be compiled with 4-byte reals or with 8-byte reals, but +! 4-byte integers are required. The module should be endian-independent. +! The Fortran 90 interfaces random_seed and random_number are overloaded +! and can be used as in the standard by adding the appropriate use statement +! use mersenne_twister +! In the below use cases, harvest is a real array of arbitrary size, +! and iharvest is an integer array of arbitrary size. +! To generate uniformly distributed random numbers between 0 and 1, +! call random_number(harvest) +! To generate Gaussian distributed random numbers with 0 mean and 1 sigma, +! call random_gauss(harvest) +! To generate uniformly distributed random integer indices between 0 and n, +! call random_index(n,iharvest) +! In standard "saved" mode, the random number generator can be used without +! setting a seed. But to set a seed, only 1 non-zero integer is required, e.g. +! call random_setseed(4357) ! set default seed +! The full generator state can be set via the standard interface random_seed, +! but it is recommended to use this method only to restore saved states, e.g. +! call random_seed(size=lsave) ! get size of generator state seed array +! allocate isave(lsave) ! allocate seed array +! call random_seed(get=isave) ! fill seed array (then maybe save to disk) +! call random_seed(put=isave) ! restore state (after read from disk maybe) +! Locally kept generator states can also be saved in a seed array, e.g. +! type(random_stat):: stat +! call random_seed(get=isave,stat=stat) ! fill seed array +! call random_seed(put=isave,stat=stat) ! restore state +! To generate random numbers in a threaded region, the "thread-safe" mode +! must be used where generator states of type random_state are passed, e.g. +! type(random_stat):: stat(8) +! do i=1,8 ! threadable loop +! call random_setseed(7171*i,stat(i)) ! thread-safe call +! enddo +! do i=1,8 ! threadable loop +! call random_number(harvest,stat(i)) ! thread-safe call +! enddo +! do i=1,8 ! threadable loop +! call random_gauss(harvest,stat(i)) ! thread-safe call +! enddo +! do i=1,8 ! threadable loop +! call random_index(n,iharvest,stat(i))! thread-safe call +! enddo +! There is also a relatively inefficient "interactive" mode available, where +! setting seeds and generating random numbers are done in the same call. +! There is also a functional mode available, returning one value at a time. +! +! Public Defined Types: +! random_stat Generator state (private contents) +! +! Public Subprograms: +! random_seed determine size or put or get state +! size optional integer output size of seed array +! put optional integer(:) input seed array +! get optional integer(:) output seed array +! stat optional type(random_stat) (thread-safe mode) +! random_setseed set seed (thread-safe mode) +! inseed integer seed input +! stat type(random_stat) output +! random_setseed set seed (saved mode) +! inseed integer seed input +! random_number get mersenne twister random numbers (thread-safe mode) +! harvest real(:) numbers output +! stat type(random_stat) input +! random_number get mersenne twister random numbers (saved mode) +! harvest real(:) numbers output +! random_number get mersenne twister random numbers (interactive mode) +! harvest real(:) numbers output +! inseed integer seed input +! random_number_f get mersenne twister random number (functional mode) +! harvest real number output +! random_gauss get gaussian random numbers (thread-safe mode) +! harvest real(:) numbers output +! stat type(random_stat) input +! random_gauss get gaussian random numbers (saved mode) +! harvest real(:) numbers output +! random_gauss get gaussian random numbers (interactive mode) +! harvest real(:) numbers output +! inseed integer seed input +! random_gauss_f get gaussian random number (functional mode) +! harvest real number output +! random_index get random indices (thread-safe mode) +! imax integer maximum index input +! iharvest integer(:) numbers output +! stat type(random_stat) input +! random_index get random indices (saved mode) +! imax integer maximum index input +! iharvest integer(:) numbers output +! random_index get random indices (interactive mode) +! imax integer maximum index input +! iharvest integer(:) numbers output +! inseed integer seed input +! random_index_f get random index (functional mode) +! imax integer maximum index input +! iharvest integer number output +! +! Remarks: +! (1) Here are the comments in the original open source code: +! A C-program for MT19937: Real number version +! genrand() generates one pseudorandom real number (double) +! which is uniformly distributed on [0,1]-interval, for each +! call. sgenrand(seed) set initial values to the working area +! of 624 words. Before genrand(), sgenrand(seed) must be +! called once. (seed is any 32-bit integer except for 0). +! Integer generator is obtained by modifying two lines. +! Coded by Takuji Nishimura, considering the suggestions by +! Topher Cooper and Marc Rieffel in July-Aug. 1997. +! This library is free software; you can redistribute it and/or +! modify it under the terms of the GNU Library General Public +! License as published by the Free Software Foundation; either +! version 2 of the License, or (at your option) any later +! version. +! This library is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +! See the GNU Library General Public License for more details. +! You should have received a copy of the GNU Library General +! Public License along with this library; if not, write to the +! Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +! 02111-1307 USA +! Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. +! When you use this, send an email to: matumoto@math.keio.ac.jp +! with an appropriate reference to your work. +! Fortran translation by Hiroshi Takano. Jan. 13, 1999. +! +! (2) On a single IBM Power4 processor on the NCEP operational cluster (2005) +! each Mersenne twister random number takes less than 30 ns, about 3 times +! slower than the default random number generator, and each random number +! from a Gaussian distribution takes less than 150 ns. +! +! Attributes: +! Language: Fortran 90 +! +!$$$ + module mersenne_twister + private +! Public declarations + public random_stat + public random_seed + public random_setseed + public random_number + public random_number_f + public random_gauss + public random_gauss_f + public random_index + public random_index_f +! Parameters + integer,parameter:: n=624 + integer,parameter:: m=397 + integer,parameter:: mata=-1727483681 !< constant vector a + integer,parameter:: umask=-2147483648 !< most significant w-r bits + integer,parameter:: lmask =2147483647 !< least significant r bits + integer,parameter:: tmaskb=-1658038656 !< tempering parameter + integer,parameter:: tmaskc=-272236544 !< tempering parameter + integer,parameter:: mag01(0:1)=(/0,mata/) + integer,parameter:: iseed=4357 + integer,parameter:: nrest=n+6 +! Defined types + type random_stat !< Generator state + private + integer:: mti=n+1 + integer:: mt(0:n-1) + integer:: iset + real:: gset + end type +! Saved data + type(random_stat),save:: sstat +! Overloaded interfaces + interface random_setseed + module procedure random_setseed_s + module procedure random_setseed_t + end interface + interface random_number + module procedure random_number_i + module procedure random_number_s + module procedure random_number_t + end interface + interface random_gauss + module procedure random_gauss_i + module procedure random_gauss_s + module procedure random_gauss_t + end interface + interface random_index + module procedure random_index_i + module procedure random_index_s + module procedure random_index_t + end interface +! All the subprograms + contains +! Subprogram random_seed +!> This subroutine sets and gets state; overloads Fortran 90 standard. + subroutine random_seed(size,put,get,stat) + implicit none + integer,intent(out),optional:: size + integer,intent(in),optional:: put(nrest) + integer,intent(out),optional:: get(nrest) + type(random_stat),intent(inout),optional:: stat + if(present(size)) then ! return size of seed array + size=nrest + elseif(present(put)) then ! restore from seed array + if(present(stat)) then + stat%mti=put(1) + stat%mt=put(2:n+1) + stat%iset=put(n+2) + stat%gset=transfer(put(n+3:nrest),stat%gset) + if(stat%mti.lt.0.or.stat%mti.gt.n.or.any(stat%mt.eq.0).or. & + stat%iset.lt.0.or.stat%iset.gt.1) then + call random_setseed_t(iseed,stat) +! call errmsg('RANDOM_SEED: invalid seeds put - default seeds used') + endif + else + sstat%mti=put(1) + sstat%mt=put(2:n+1) + sstat%iset=put(n+2) + sstat%gset=transfer(put(n+3:nrest),sstat%gset) + if(sstat%mti.lt.0.or.sstat%mti.gt.n.or.any(sstat%mt.eq.0) & + .or.sstat%iset.lt.0.or.sstat%iset.gt.1) then + call random_setseed_t(iseed,sstat) +! call errmsg('RANDOM_SEED: invalid seeds put - default seeds used') + endif + endif + elseif(present(get)) then ! save to seed array + if(present(stat)) then + if(stat%mti.eq.n+1) call random_setseed_t(iseed,stat) + get(1)=stat%mti + get(2:n+1)=stat%mt + get(n+2)=stat%iset + get(n+3:nrest)=transfer(stat%gset,get,nrest-(n+3)+1) + else + if(sstat%mti.eq.n+1) call random_setseed_t(iseed,sstat) + get(1)=sstat%mti + get(2:n+1)=sstat%mt + get(n+2)=sstat%iset + get(n+3:nrest)=transfer(sstat%gset,get,nrest-(n+3)+1) + endif + else ! reset default seed + if(present(stat)) then + call random_setseed_t(iseed,stat) + else + call random_setseed_t(iseed,sstat) + endif + endif + end subroutine +! Subprogram random_setseed_s +!> This subroutine sets seed in saved mode. + subroutine random_setseed_s(inseed) + implicit none + integer,intent(in):: inseed + call random_setseed_t(inseed,sstat) + end subroutine +! Subprogram random_setseed_t +!> This subroutine sets seed in thread-safe mode. + subroutine random_setseed_t(inseed,stat) + implicit none + integer,intent(in):: inseed + type(random_stat),intent(out):: stat + integer ii,mti + ii=inseed + if(ii.eq.0) ii=iseed + stat%mti=n + stat%mt(0)=iand(ii,-1) + do mti=1,n-1 + stat%mt(mti)=iand(69069*stat%mt(mti-1),-1) + enddo + stat%iset=0 + stat%gset=0. + end subroutine +! Subprogram random_number_f +!> This function generates random numbers in functional mode. + function random_number_f() result(harvest) + implicit none + real:: harvest + real h(1) + if(sstat%mti.eq.n+1) call random_setseed_t(iseed,sstat) + call random_number_t(h,sstat) + harvest=h(1) + end function +! Subprogram random_number_i +!> This subroutine generates random numbers in interactive mode. + subroutine random_number_i(harvest,inseed) + implicit none + real,intent(out):: harvest(:) + integer,intent(in):: inseed + type(random_stat) stat + call random_setseed_t(inseed,stat) + call random_number_t(harvest,stat) + end subroutine +! Subprogram random_number_s +!> This subroutine generates random numbers in saved mode; overloads Fortran 90 standard. + subroutine random_number_s(harvest) + implicit none + real,intent(out):: harvest(:) + if(sstat%mti.eq.n+1) call random_setseed_t(iseed,sstat) + call random_number_t(harvest,sstat) + end subroutine +! Subprogram random_number_t +!> This subroutine generates random numbers in thread-safe mode. + subroutine random_number_t(harvest,stat) + implicit none + real,intent(out):: harvest(:) + type(random_stat),intent(inout):: stat + integer j,kk,y + integer tshftu,tshfts,tshftt,tshftl + tshftu(y)=ishft(y,-11) + tshfts(y)=ishft(y,7) + tshftt(y)=ishft(y,15) + tshftl(y)=ishft(y,-18) + do j=1,size(harvest) + if(stat%mti.ge.n) then + do kk=0,n-m-1 + y=ior(iand(stat%mt(kk),umask),iand(stat%mt(kk+1),lmask)) + stat%mt(kk)=ieor(ieor(stat%mt(kk+m),ishft(y,-1)), mag01(iand(y,1))) + enddo + do kk=n-m,n-2 + y=ior(iand(stat%mt(kk),umask),iand(stat%mt(kk+1),lmask)) + stat%mt(kk)=ieor(ieor(stat%mt(kk+(m-n)),ishft(y,-1)), mag01(iand(y,1))) + enddo + y=ior(iand(stat%mt(n-1),umask),iand(stat%mt(0),lmask)) + stat%mt(n-1)=ieor(ieor(stat%mt(m-1),ishft(y,-1)), mag01(iand(y,1))) + stat%mti=0 + endif + y=stat%mt(stat%mti) + y=ieor(y,tshftu(y)) + y=ieor(y,iand(tshfts(y),tmaskb)) + y=ieor(y,iand(tshftt(y),tmaskc)) + y=ieor(y,tshftl(y)) + if(y.lt.0) then + harvest(j)=(real(y)+2.0**32)/(2.0**32-1.0) + else + harvest(j)=real(y)/(2.0**32-1.0) + endif + stat%mti=stat%mti+1 + enddo + end subroutine +! Subprogram random_gauss_f +!> This subrouitne generates Gaussian random numbers in functional mode. + function random_gauss_f() result(harvest) + implicit none + real:: harvest + real h(1) + if(sstat%mti.eq.n+1) call random_setseed_t(iseed,sstat) + call random_gauss_t(h,sstat) + harvest=h(1) + end function +! Subprogram random_gauss_i +!> This subrouitne generates Gaussian random numbers in interactive mode. + subroutine random_gauss_i(harvest,inseed) + implicit none + real,intent(out):: harvest(:) + integer,intent(in):: inseed + type(random_stat) stat + call random_setseed_t(inseed,stat) + call random_gauss_t(harvest,stat) + end subroutine +! Subprogram random_gauss_s +!> This subroutine generates Gaussian random numbers in saved mode. + subroutine random_gauss_s(harvest) + implicit none + real,intent(out):: harvest(:) + if(sstat%mti.eq.n+1) call random_setseed_t(iseed,sstat) + call random_gauss_t(harvest,sstat) + end subroutine +! Subprogram random_gauss_t +!> This subroutine generates Gaussian random numbers in thread-safe mode. + subroutine random_gauss_t(harvest,stat) + implicit none + real,intent(out):: harvest(:) + type(random_stat),intent(inout):: stat + integer mx,my,mz,j + real r2(2),r,g1,g2 + mz=size(harvest) + if(mz.le.0) return + mx=0 + if(stat%iset.eq.1) then + mx=1 + harvest(1)=stat%gset + stat%iset=0 + endif + my=(mz-mx)/2*2+mx + do + call random_number_t(harvest(mx+1:my),stat) + do j=mx,my-2,2 + call rgauss(harvest(j+1),harvest(j+2),r,g1,g2) + if(r.lt.1.) then + harvest(mx+1)=g1 + harvest(mx+2)=g2 + mx=mx+2 + endif + enddo + if(mx.eq.my) exit + enddo + if(my.lt.mz) then + do + call random_number_t(r2,stat) + call rgauss(r2(1),r2(2),r,g1,g2) + if(r.lt.1.) exit + enddo + harvest(mz)=g1 + stat%gset=g2 + stat%iset=1 + endif + contains +!> This subroutine contains numerical Recipes algorithm to generate Gaussian random numbers. + subroutine rgauss(r1,r2,r,g1,g2) + real,intent(in):: r1,r2 + real,intent(out):: r,g1,g2 + real v1,v2,fac + v1=2.*r1-1. + v2=2.*r2-1. + r=v1**2+v2**2 + if(r.lt.1.) then + fac=sqrt(-2.*log(r)/r) + g1=v1*fac + g2=v2*fac + endif + end subroutine + end subroutine +! Subprogram random_index_f +!> This subroutine generates random indices in functional mode. + function random_index_f(imax) result(iharvest) + implicit none + integer,intent(in):: imax + integer:: iharvest + integer ih(1) + if(sstat%mti.eq.n+1) call random_setseed_t(iseed,sstat) + call random_index_t(imax,ih,sstat) + iharvest=ih(1) + end function +! Subprogram random_index_i +!> This subroutine generates random indices in interactive mode. + subroutine random_index_i(imax,iharvest,inseed) + implicit none + integer,intent(in):: imax + integer,intent(out):: iharvest(:) + integer,intent(in):: inseed + type(random_stat) stat + call random_setseed_t(inseed,stat) + call random_index_t(imax,iharvest,stat) + end subroutine +! Subprogram random_index_s +!> This subroutine generates random indices in saved mode. + subroutine random_index_s(imax,iharvest) + implicit none + integer,intent(in):: imax + integer,intent(out):: iharvest(:) + if(sstat%mti.eq.n+1) call random_setseed_t(iseed,sstat) + call random_index_t(imax,iharvest,sstat) + end subroutine +! Subprogram random_index_t +!> This subroutine generates random indices in thread-safe mode. + subroutine random_index_t(imax,iharvest,stat) + implicit none + integer,intent(in):: imax + integer,intent(out):: iharvest(:) + type(random_stat),intent(inout):: stat + integer,parameter:: mh=n + integer i1,i2,mz + real h(mh) + mz=size(iharvest) + do i1=1,mz,mh + i2=min((i1-1)+mh,mz) + call random_number_t(h(:i2-(i1-1)),stat) + iharvest(i1:i2)=max(ceiling(h(:i2-(i1-1))*imax),1) + enddo + end subroutine + end module diff --git a/stochastic_physics/mpi_wrapper.F90 b/stochastic_physics/mpi_wrapper.F90 new file mode 100644 index 0000000000..e75667846c --- /dev/null +++ b/stochastic_physics/mpi_wrapper.F90 @@ -0,0 +1,716 @@ +module mpi_wrapper + + implicit none + + private + + public :: mype, npes, root, comm, is_rootpe + public :: mpi_wrapper_initialize, mpi_wrapper_finalize + public :: mp_reduce_min, mp_reduce_max, mp_reduce_sum + public :: mp_bcst, mp_alltoall + +#include "mpif.h" + + integer, save :: mype = -999 + integer, save :: npes = -999 + integer, save :: root = -999 + integer, save :: comm = -999 + logical, save :: initialized = .false. + + integer :: ierror + + INTERFACE mp_bcst + MODULE PROCEDURE mp_bcst_i + MODULE PROCEDURE mp_bcst_r4 + MODULE PROCEDURE mp_bcst_r8 + MODULE PROCEDURE mp_bcst_1d_r4 + MODULE PROCEDURE mp_bcst_1d_r8 + MODULE PROCEDURE mp_bcst_2d_r4 + MODULE PROCEDURE mp_bcst_2d_r8 + MODULE PROCEDURE mp_bcst_3d_r4 + MODULE PROCEDURE mp_bcst_3d_r8 + MODULE PROCEDURE mp_bcst_4d_r4 + MODULE PROCEDURE mp_bcst_4d_r8 + MODULE PROCEDURE mp_bcst_1d_i + MODULE PROCEDURE mp_bcst_2d_i + MODULE PROCEDURE mp_bcst_3d_i + MODULE PROCEDURE mp_bcst_4d_i + END INTERFACE + + INTERFACE mp_reduce_min + MODULE PROCEDURE mp_reduce_min_r4 + MODULE PROCEDURE mp_reduce_min_r8 + END INTERFACE + + INTERFACE mp_reduce_max + MODULE PROCEDURE mp_reduce_max_r4_1d + MODULE PROCEDURE mp_reduce_max_r4 + MODULE PROCEDURE mp_reduce_max_r8_1d + MODULE PROCEDURE mp_reduce_max_r8 + MODULE PROCEDURE mp_reduce_max_i + END INTERFACE + + INTERFACE mp_reduce_sum + MODULE PROCEDURE mp_reduce_sum_r4 + MODULE PROCEDURE mp_reduce_sum_r4_1d + MODULE PROCEDURE mp_reduce_sum_r4_1darr + MODULE PROCEDURE mp_reduce_sum_r4_2darr + MODULE PROCEDURE mp_reduce_sum_r8 + MODULE PROCEDURE mp_reduce_sum_r8_1d + MODULE PROCEDURE mp_reduce_sum_r8_1darr + MODULE PROCEDURE mp_reduce_sum_r8_2darr + MODULE PROCEDURE mp_reduce_sum_i + MODULE PROCEDURE mp_reduce_sum_i8 + END INTERFACE + + INTERFACE mp_alltoall + MODULE PROCEDURE mp_alltoall_r4_1darr + END INTERFACE + +contains + + logical function is_rootpe() + if (mype==root) then + is_rootpe = .true. + else + is_rootpe = .false. + end if + end function is_rootpe + + subroutine mpi_wrapper_initialize(mpiroot, mpicomm) + integer, intent(in) :: mpiroot, mpicomm + if (initialized) return + root = mpiroot + comm = mpicomm + call MPI_COMM_RANK(comm, mype, ierror) + call MPI_COMM_SIZE(comm, npes, ierror) + initialized = .true. + end subroutine mpi_wrapper_initialize + + subroutine mpi_wrapper_finalize() + if (.not.initialized) return + mype = -999 + npes = -999 + root = -999 + comm = -999 + initialized = .false. + end subroutine mpi_wrapper_finalize + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_i :: Call SPMD broadcast +! + subroutine mp_bcst_i(q) + integer, intent(INOUT) :: q + + call MPI_BCAST(q, 1, MPI_INTEGER, root, comm, ierror) + + end subroutine mp_bcst_i +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_r4 :: Call SPMD broadcast +! + subroutine mp_bcst_r4(q) + real(kind=4), intent(INOUT) :: q + + call MPI_BCAST(q, 1, MPI_REAL, root, comm, ierror) + + end subroutine mp_bcst_r4 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_r8 :: Call SPMD broadcast +! + subroutine mp_bcst_r8(q) + real(kind=8), intent(INOUT) :: q + + call MPI_BCAST(q, 1, MPI_DOUBLE_PRECISION, root, comm, ierror) + + end subroutine mp_bcst_r8 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_1d_r4 :: Call SPMD broadcast +! + subroutine mp_bcst_1d_r4(q, idim) + integer, intent(IN) :: idim + real(kind=4), intent(INOUT) :: q(idim) + + call MPI_BCAST(q, idim, MPI_REAL, root, comm, ierror) + + end subroutine mp_bcst_1d_r4 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_1d_r8 :: Call SPMD broadcast +! + subroutine mp_bcst_1d_r8(q, idim) + integer, intent(IN) :: idim + real(kind=8), intent(INOUT) :: q(idim) + + call MPI_BCAST(q, idim, MPI_DOUBLE_PRECISION, root, comm, ierror) + + end subroutine mp_bcst_1d_r8 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_2d_r4 :: Call SPMD broadcast +! + subroutine mp_bcst_2d_r4(q, idim, jdim) + integer, intent(IN) :: idim, jdim + real(kind=4), intent(INOUT) :: q(idim,jdim) + + call MPI_BCAST(q, idim*jdim, MPI_REAL, root, comm, ierror) + + end subroutine mp_bcst_2d_r4 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_2d_r8 :: Call SPMD broadcast +! + subroutine mp_bcst_2d_r8(q, idim, jdim) + integer, intent(IN) :: idim, jdim + real(kind=8), intent(INOUT) :: q(idim,jdim) + + call MPI_BCAST(q, idim*jdim, MPI_DOUBLE_PRECISION, root, comm, ierror) + + end subroutine mp_bcst_2d_r8 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_3d_r4 :: Call SPMD broadcast +! + subroutine mp_bcst_3d_r4(q, idim, jdim, kdim) + integer, intent(IN) :: idim, jdim, kdim + real(kind=4), intent(INOUT) :: q(idim,jdim,kdim) + + call MPI_BCAST(q, idim*jdim*kdim, MPI_REAL, root, comm, ierror) + + end subroutine mp_bcst_3d_r4 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_3d_r8 :: Call SPMD broadcast +! + subroutine mp_bcst_3d_r8(q, idim, jdim, kdim) + integer, intent(IN) :: idim, jdim, kdim + real(kind=8), intent(INOUT) :: q(idim,jdim,kdim) + + call MPI_BCAST(q, idim*jdim*kdim, MPI_DOUBLE_PRECISION, root, comm, ierror) + + end subroutine mp_bcst_3d_r8 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_4d_r4 :: Call SPMD broadcast +! + subroutine mp_bcst_4d_r4(q, idim, jdim, kdim, ldim) + integer, intent(IN) :: idim, jdim, kdim, ldim + real(kind=4), intent(INOUT) :: q(idim,jdim,kdim,ldim) + + call MPI_BCAST(q, idim*jdim*kdim*ldim, MPI_REAL, root, comm, ierror) + + end subroutine mp_bcst_4d_r4 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_4d_r8 :: Call SPMD broadcast +! + subroutine mp_bcst_4d_r8(q, idim, jdim, kdim, ldim) + integer, intent(IN) :: idim, jdim, kdim, ldim + real(kind=8), intent(INOUT) :: q(idim,jdim,kdim,ldim) + + call MPI_BCAST(q, idim*jdim*kdim*ldim, MPI_DOUBLE_PRECISION, root, comm, ierror) + + end subroutine mp_bcst_4d_r8 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_3d_i :: Call SPMD broadcast +! + subroutine mp_bcst_3d_i(q, idim, jdim, kdim) + integer, intent(IN) :: idim, jdim, kdim + integer, intent(INOUT) :: q(idim,jdim,kdim) + + call MPI_BCAST(q, idim*jdim*kdim, MPI_INTEGER, root, comm, ierror) + + end subroutine mp_bcst_3d_i +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_1d_i :: Call SPMD broadcast +! + subroutine mp_bcst_1d_i(q, idim) + integer, intent(IN) :: idim + integer, intent(INOUT) :: q(idim) + + call MPI_BCAST(q, idim, MPI_INTEGER, root, comm, ierror) + + end subroutine mp_bcst_1d_i +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_2d_i :: Call SPMD broadcast +! + subroutine mp_bcst_2d_i(q, idim, jdim) + integer, intent(IN) :: idim, jdim + integer, intent(INOUT) :: q(idim,jdim) + + call MPI_BCAST(q, idim*jdim, MPI_INTEGER, root, comm, ierror) + + end subroutine mp_bcst_2d_i +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_4d_i :: Call SPMD broadcast +! + subroutine mp_bcst_4d_i(q, idim, jdim, kdim, ldim) + integer, intent(IN) :: idim, jdim, kdim, ldim + integer, intent(INOUT) :: q(idim,jdim,kdim,ldim) + + call MPI_BCAST(q, idim*jdim*kdim*ldim, MPI_INTEGER, root, comm, ierror) + + end subroutine mp_bcst_4d_i +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_max_r4_1d :: Call SPMD REDUCE_MAX +! + subroutine mp_reduce_max_r4_1d(mymax,npts) + integer, intent(IN) :: npts + real(kind=4), intent(INOUT) :: mymax(npts) + + real(kind=4) :: gmax(npts) + + call MPI_ALLREDUCE( mymax, gmax, npts, MPI_REAL, MPI_MAX, & + comm, ierror ) + + mymax = gmax + + end subroutine mp_reduce_max_r4_1d +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_max_r8_1d :: Call SPMD REDUCE_MAX +! + subroutine mp_reduce_max_r8_1d(mymax,npts) + integer, intent(IN) :: npts + real(kind=8), intent(INOUT) :: mymax(npts) + + real(kind=8) :: gmax(npts) + + call MPI_ALLREDUCE( mymax, gmax, npts, MPI_DOUBLE_PRECISION, MPI_MAX, & + comm, ierror ) + + mymax = gmax + + end subroutine mp_reduce_max_r8_1d +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_max_r4 :: Call SPMD REDUCE_MAX +! + subroutine mp_reduce_max_r4(mymax) + real(kind=4), intent(INOUT) :: mymax + + real(kind=4) :: gmax + + call MPI_ALLREDUCE( mymax, gmax, 1, MPI_REAL, MPI_MAX, & + comm, ierror ) + + mymax = gmax + + end subroutine mp_reduce_max_r4 + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_max_r8 :: Call SPMD REDUCE_MAX +! + subroutine mp_reduce_max_r8(mymax) + real(kind=8), intent(INOUT) :: mymax + + real(kind=8) :: gmax + + call MPI_ALLREDUCE( mymax, gmax, 1, MPI_DOUBLE_PRECISION, MPI_MAX, & + comm, ierror ) + + mymax = gmax + + end subroutine mp_reduce_max_r8 + + subroutine mp_reduce_min_r4(mymin) + real(kind=4), intent(INOUT) :: mymin + + real(kind=4) :: gmin + + call MPI_ALLREDUCE( mymin, gmin, 1, MPI_REAL, MPI_MIN, & + comm, ierror ) + + mymin = gmin + + end subroutine mp_reduce_min_r4 + + subroutine mp_reduce_min_r8(mymin) + real(kind=8), intent(INOUT) :: mymin + + real(kind=8) :: gmin + + call MPI_ALLREDUCE( mymin, gmin, 1, MPI_DOUBLE_PRECISION, MPI_MIN, & + comm, ierror ) + + mymin = gmin + + end subroutine mp_reduce_min_r8 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_bcst_4d_i :: Call SPMD REDUCE_MAX +! + subroutine mp_reduce_max_i(mymax) + integer, intent(INOUT) :: mymax + + integer :: gmax + + call MPI_ALLREDUCE( mymax, gmax, 1, MPI_INTEGER, MPI_MAX, & + comm, ierror ) + + mymax = gmax + + end subroutine mp_reduce_max_i +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_sum_r4 :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_r4(mysum) + real(kind=4), intent(INOUT) :: mysum + + real(kind=4) :: gsum + + call MPI_ALLREDUCE( mysum, gsum, 1, MPI_REAL, MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_r4 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_sum_r8 :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_r8(mysum) + real(kind=8), intent(INOUT) :: mysum + + real(kind=8) :: gsum + + call MPI_ALLREDUCE( mysum, gsum, 1, MPI_DOUBLE_PRECISION, MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_r8 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +! ! +! +! mp_reduce_sum_r4_1darr :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_r4_1darr(mysum, npts) + integer, intent(in) :: npts + real(kind=4), intent(inout) :: mysum(npts) + real(kind=4) :: gsum(npts) + + gsum = 0.0 + call MPI_ALLREDUCE( mysum, gsum, npts, MPI_REAL, MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_r4_1darr +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +! ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +! ! +! +! mp_reduce_sum_r4_2darr :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_r4_2darr(mysum, npts1,npts2) + integer, intent(in) :: npts1,npts2 + real(kind=4), intent(inout) :: mysum(npts1,npts2) + real(kind=4) :: gsum(npts1,npts2) + + gsum = 0.0 + call MPI_ALLREDUCE( mysum, gsum, npts1*npts2, MPI_REAL, MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_r4_2darr +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +! ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_sum_r4_1d :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_r4_1d(mysum, sum1d, npts) + integer, intent(in) :: npts + real(kind=4), intent(in) :: sum1d(npts) + real(kind=4), intent(INOUT) :: mysum + + real(kind=4) :: gsum + integer :: i + + mysum = 0.0 + do i=1,npts + mysum = mysum + sum1d(i) + enddo + + call MPI_ALLREDUCE( mysum, gsum, 1, MPI_DOUBLE_PRECISION, MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_r4_1d +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_sum_r8_1d :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_r8_1d(mysum, sum1d, npts) + integer, intent(in) :: npts + real(kind=8), intent(in) :: sum1d(npts) + real(kind=8), intent(INOUT) :: mysum + + real(kind=8) :: gsum + integer :: i + + mysum = 0.0 + do i=1,npts + mysum = mysum + sum1d(i) + enddo + + call MPI_ALLREDUCE( mysum, gsum, 1, MPI_DOUBLE_PRECISION, MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_r8_1d +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +! ! +! +! mp_reduce_sum_r8_1darr :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_r8_1darr(mysum, npts) + integer, intent(in) :: npts + real(kind=8), intent(inout) :: mysum(npts) + real(kind=8) :: gsum(npts) + + gsum = 0.0 + + call MPI_ALLREDUCE( mysum, gsum, npts, MPI_DOUBLE_PRECISION, & + MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_r8_1darr +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +! ! + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +! ! +! +! mp_reduce_sum_r8_2darr :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_r8_2darr(mysum, npts1,npts2) + integer, intent(in) :: npts1,npts2 + real(kind=8), intent(inout) :: mysum(npts1,npts2) + real(kind=8) :: gsum(npts1,npts2) + + gsum = 0.0 + + call MPI_ALLREDUCE( mysum, gsum, npts1*npts2, & + MPI_DOUBLE_PRECISION, MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_r8_2darr +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +! ! + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_sum_i :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_i(mysum) + integer, intent(INOUT) :: mysum + + integer :: gsum + + call MPI_ALLREDUCE( mysum, gsum, 1, MPI_INTEGER, MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_i +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + + + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ! +! +! mp_reduce_sum_i8 :: Call SPMD REDUCE_SUM +! + subroutine mp_reduce_sum_i8(mysum) + integer*8, intent(INOUT) :: mysum + + integer*8 :: gsum + + call MPI_ALLREDUCE( mysum, gsum, 1, MPI_INTEGER8, MPI_SUM, & + comm, ierror ) + + mysum = gsum + + end subroutine mp_reduce_sum_i8 +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! +!------------------------------------------------------------------------------- + + + +!------------------------------------------------------------------------------- +! vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +! ! +! +! mp_reduce_sum_r8_2darr :: Call SPMD REDUCE_SUM +! + subroutine mp_alltoall_r4_1darr(sbuf, ssize, sdispl, rbuf, rsize, rdispl) + real(kind=4), intent(in) :: sbuf(:) + real(kind=4), intent(inout) :: rbuf(:) + integer, intent(in) :: ssize(:), rsize(:) + integer, intent(in) :: sdispl(:), rdispl(:) + + call MPI_ALLTOALLV( sbuf, ssize, sdispl, MPI_REAL, & + rbuf, rsize, rdispl, MPI_REAL, & + comm, ierror ) + + end subroutine mp_alltoall_r4_1darr +! +! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +! ! + +end module mpi_wrapper diff --git a/stochastic_physics/plumes.F90 b/stochastic_physics/plumes.F90 new file mode 100644 index 0000000000..80b301fe9e --- /dev/null +++ b/stochastic_physics/plumes.F90 @@ -0,0 +1,167 @@ +subroutine plumes(V,L,AG,a,row,col,kend) +implicit none + +!!January 2018 + +! The routine identifies all four-connected elements in a matrix. +! The returns are: +! V - arbitrary island number +! L - nx3 matrix where earch row has information about a particular cluster. +! the first column is the cluster number which corresponds to V. The second +! column is the number of elements in the cluster, and the third column is +! the value of the elements in that cluster (the elements of the input field). +! AG - Binary matrix with ones in the positions of the elements of the largers +! four-connected clusters. + +integer, intent(in) :: row,col,kend +integer, intent(in), dimension(row,col) :: a +integer, intent(out), dimension(kend) :: L,V +integer :: cnt,pp,mm,kk +integer :: i,j,cntr,gg,hh,ii,jj,idxx,IDX +integer, intent(out), dimension(row,col) :: AG + + + +do j=1,col + do i=1,row + AG(i,j) = 0 !! This matrix will hold all of the islands found. + enddo +enddo + + +do j=1,kend +V(j)=0 +enddo + +L = V !! Hold the number of elements in each island. +cntr = 1 !! Label the individual islands by the order they are found. + +!! Notes on comments in the loops: CRNT is the element of the matrix we are +!! currently looking at. RGHT is the element to the immediate right of +!! CRNT. RUD is the element to the right and up from the CRNT. +!! The RUD element is directly above RGHT. + +do gg = 1,col-1 !! Look along the first row. + if (a(1,gg) == a(1,gg+1))then !! CRNT matches RGHT. + if (AG(1,gg) == 0)then !! CRNT does not have an island number. + AG(1,gg) = cntr !! Assign an island number to CRNT. + AG(1,gg+1) = cntr !! Assign an island number to RGHT. + V(cntr) = a(1,gg) !! Assign the value of the island. + L(cntr) = 2 !! Add to the island count. + cntr = cntr + 1 !! Increment the counter. + else !! CRNT does have an island number. + AG(1,gg+1) = AG(1,gg) !! Assign the island number to RGHT. + L(AG(1,gg)) = L(AG(1,gg)) + 1 !! Add to the island count. + endif + endif +enddo + + +do hh = 1,row-1 !! Look down the first column. + if (a(hh,1)==a(hh+1,1))then !! CRNT matches 'RGHT'. + if (AG(hh,1)==0)then !! CRNT does not have an island number. + AG(hh,1) = cntr !! Assign an island number to CRNT. + AG(hh+1,1) = cntr !! Assign an island number to 'RGHT'. + V(cntr) = a(hh,1) !! Assign the value of the island. + L(cntr) = 2 !! Add to the island count. + cntr = cntr + 1 + else !! CRNT does have an island number. + AG(hh+1,1) = AG(hh,1) !! Assign an island number to 'RGHT'. + L(AG(hh,1)) = L(AG(hh,1)) + 1 !! Add to the island count. + endif + endif +enddo + + +!! Now we can look at the rest of the matrix. +do ii = 2,row !! Start on the second row. + do jj = 1,col-1 !! Start on the first column. + if (a(ii,jj)==a(ii,jj+1))then !! CRNT matches RGHT. + if (a(ii,jj)==a(ii-1,jj+1))then !! CRNT matches RUD too. + if (AG(ii,jj)==0 .and. AG(ii-1,jj+1)==0)then !! Both aren't yet grouped. + AG(ii,jj) = cntr !! Give CRNT a new island number. + AG(ii-1,jj+1) = cntr !! Give RUD the new island num. + AG(ii,jj+1) = cntr !! Give RGHT the new island number. + V(cntr) = a(ii,jj) !! Store the value of the island. + L(cntr) = 3 !! Number of members in the new island. + cntr = cntr + 1 !! Increment the counter. + elseif (AG(ii-1,jj+1)==0)then !! RUD not yet been grouped, CRNT is. + AG(ii-1,jj+1) = AG(ii,jj) !! Give RUD CRNTs isl. num. + AG(ii,jj+1) = AG(ii,jj) !! And RGHT as well. + L(AG(ii,jj)) = L(AG(ii,jj)) + 2 !! Add to island size. + elseif (AG(ii,jj)==0)then !! CRNT not yet grouped, RUD is grouped. + AG(ii,jj) = AG(ii-1,jj+1) !! Give CRNT RUDs isl. num. + AG(ii,jj+1) = AG(ii-1,jj+1) !! And RGHT as well. + L(AG(ii-1,jj+1)) = L(AG(ii-1,jj+1)) + 2 !! Add to cnt. + else !! Both CRNT and RUD have been grouped: merge islands. + !! First decide which island has the least members. + if (L(AG(ii-1,jj+1)) L(idxx))then + goto 101 !! Stop search do old islnds. + endif +101 endif + enddo + if (cnt > L(idxx))then + goto 102 !! Stop search do old island numbers. +102 endif + enddo + endif + AG(ii,jj+1) = IDX !! Give RGHT the island number. + L(IDX) = L(IDX) + cnt !! Add to count. + L(idxx) = L(idxx) - cnt + 1 !! subtract from old island. + endif + elseif (AG(ii,jj)==0)then !! RGHT matches CRNT, not RUD. Need new isl. + AG(ii,jj) = cntr !! Give CRNT a new island number. + AG(ii,jj+1) = cntr !! Give RGHT the new island number. + V(cntr) = a(ii,jj) !! Store the new island number. + L(cntr) = 2 !! The number of members in the new island. + cntr = cntr + 1 !! Increment the counter. + else !! RGHT matches CRNT, not RUD. No new island needed. + AG(ii,jj+1) = AG(ii,jj) !! Give RGHT CRNTs island number. + L(AG(ii,jj)) = L(AG(ii,jj)) + 1 !! Add to island count. + endif + elseif (a(ii,jj+1)==a(ii-1,jj+1))then !! RUD & RGHT match, not CRNT. + if (AG(ii-1,jj+1)==0)then !! RUD has not yet been grouped. + AG(ii,jj+1) = cntr !! Give RGHT new island number. + AG(ii-1,jj+1) = cntr !! Give RUD new island number. + V(cntr) = a(ii,jj+1) !! Store the value of the island. + L(cntr) = 2 !! Add to island count. + cntr = cntr + 1 + else !! RUD is already part of a island. + AG(ii,jj+1) = AG(ii-1,jj+1) !! Add RGHT to RUD's island. + L(AG(ii-1,jj+1)) = L(AG(ii-1,jj+1)) + 1 !! Add island cnt. + endif + endif + enddo +enddo + + +! NSV = [(1:cntr-1)',L(1:cntr-1)',V(1:cntr-1)'] !!2nd output. +! NSV(NSV(:,2)==0,:)=[] !! Clear empty islands. + + +end subroutine plumes diff --git a/stochastic_physics/random_numbers.F90 b/stochastic_physics/random_numbers.F90 new file mode 100644 index 0000000000..e082e8d54e --- /dev/null +++ b/stochastic_physics/random_numbers.F90 @@ -0,0 +1,30 @@ +module random_numbers + + implicit none + +contains +!> Returns a random number between 0 and 1 +!! See https://arxiv.org/abs/2004.06278. Not an exact reproduction of +!"squares" because Fortran +!! doesn't have a uint64 type, and not all compilers provide integers +!with > 64 bits... +real function random_01_CB(ctr, key) + use iso_fortran_env, only : int64 + integer, intent(in) :: ctr !< ctr should be incremented each time you call the function + integer, intent(in) :: key !< key is like a seed: use a different key for each random stream + integer(kind=int64) :: x, y, z ! Follows "Squares" naming convention + + x = (ctr + 1) * (key + 65536) ! 65536 added because keys below that don't work. + y = (ctr + 1) * (key + 65536) + z = y + (key + 65536) + x = x*x + y + x = ior(ishft(x,32),ishft(x,-32)) + x = x*x + z + x = ior(ishft(x,32),ishft(x,-32)) + x = x*x + y + x = ior(ishft(x,32),ishft(x,-32)) + x = x*x + z + random_01_CB = .5*(1. + .5*real(int(ishft(x,-32)))/real(2**30)) + +end function +end module random_numbers diff --git a/stochastic_physics/spectral_transforms.F90 b/stochastic_physics/spectral_transforms.F90 new file mode 100644 index 0000000000..59eeb9acd9 --- /dev/null +++ b/stochastic_physics/spectral_transforms.F90 @@ -0,0 +1,2371 @@ +!>@brief The module 'spectral_transforms' contains the subroutines spec_to_four and four_to_grid +module spectral_transforms + + use kinddef + use mpi_wrapper, only : mp_alltoall,mype,npes + use stochy_internal_state_mod, only : stochy_internal_state + use stochy_namelist_def + + private + public :: spec_to_four, four_to_grid,dozeuv_stochy,dezouv_stochy + public :: initialize_spectral,stochy_la2ga + + integer, public :: ls_dim, & + ls_max_node, & + len_trie_ls, & + len_trio_ls, & + jcap,latg,latg2, & + skeblevs,levs,lnt, & + lonf,lonfx + +! + integer, public, allocatable :: lat1s_a(:), lon_dims_a(:) + real, public, allocatable, dimension(:) :: colrad_a, wgt_a, rcs2_a, & + sinlat_a, coslat_a + + + contains + +!>@brief The subrountine 'spec_to_four' converts the spherical harmonics to fourier coefficients +!>@details This code is taken from the legacy spectral GFS + subroutine spec_to_four(flnev,flnod,plnev,plnod, & + ls_node, & + workdim,four_gr, & + ls_nodes,max_ls_nodes, & + lats_nodes,global_lats, & + lats_node,ipt_lats_node, & + nvars ) +! + + implicit none +! + external esmf_dgemm +! + integer, intent(in) :: nvars + real(kind=kind_dbl_prec) flnev(len_trie_ls,2*nvars) + real(kind=kind_dbl_prec) flnod(len_trio_ls,2*nvars) +! + real(kind=kind_dbl_prec) plnev(len_trie_ls,latg2) + real(kind=kind_dbl_prec) plnod(len_trio_ls,latg2) +! + integer ls_node(ls_dim,3) +! +!cmr ls_node(1,1) ... ls_node(ls_max_node,1) : values of L +!cmr ls_node(1,2) ... ls_node(ls_max_node,2) : values of jbasev +!cmr ls_node(1,3) ... ls_node(ls_max_node,3) : values of jbasod +! +! local scalars +! ------------- +! + integer j, l, lat, lat1, n, kn, n2,indev,indod +! +! local arrays +! ------------ +! + real(kind=kind_dbl_prec), dimension(nvars*2,latg2) :: apev, apod +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! + integer workdim, lats_node, ipt_lats_node +! + real(kind=kind_dbl_prec) four_gr(lonf+2,nvars,workdim) +! + integer ls_nodes(ls_dim,npes) + integer, dimension(npes) :: max_ls_nodes, lats_nodes + integer, dimension(latg) :: global_lats + real(kind=4),target,dimension(2,nvars,ls_dim*workdim,npes):: workr,works + real(kind=4),pointer:: work1dr(:),work1ds(:) + integer, dimension(npes) :: kpts, kptr, sendcounts, recvcounts, sdispls +! + integer ilat,ipt_ls, lmax,lval,jj,nv + integer node,arrsz,my_pe,nvar + integer ilat_list(npes) ! for OMP buffer copy +! +! statement functions +! ------------------- +! + integer indlsev, jbasev, indlsod, jbasod +! + include 'function_indlsev' + include 'function_indlsod' +! + real(kind=kind_dbl_prec), parameter :: cons0=0.0d0, cons1=1.0d0 +! +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! + n2=2*nvars + arrsz=n2*ls_dim*workdim*npes + kpts = 0 +! + do j = 1, ls_max_node ! start of do j loop ##################### +! + l = ls_node(j,1) + jbasev = ls_node(j,2) + jbasod = ls_node(j,3) + + indev = indlsev(l,l) + indod = indlsod(l+1,l) +! + lat1 = lat1s_a(l) + +! compute the even and odd components of the fourier coefficients +! +! compute the sum of the even real terms for each level +! compute the sum of the even imaginary terms for each level +! + call esmf_dgemm('t', 'n', n2, latg2-lat1+1, (jcap+3-l)/2, & + cons1, flnev(indev,1), len_trie_ls, plnev(indev,lat1), & + len_trie_ls, cons0, apev(1,lat1), n2 ) +! +! compute the sum of the odd real terms for each level +! compute the sum of the odd imaginary terms for each level +! + call esmf_dgemm('t', 'n', n2, latg2-lat1+1, (jcap+2-l)/2, & + cons1, flnod(indod,1), len_trio_ls, plnod(indod,lat1), & + len_trio_ls, cons0, apod(1,lat1), n2 ) +! +!cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! +! compute the fourier coefficients for each level +! ----------------------------------------------- +! + ilat_list(1) = 0 + do node = 1, npes - 1 + ilat_list(node+1) = ilat_list(node) + lats_nodes(node) + end do +!$omp parallel do private(node,jj,ilat,lat,ipt_ls,nvar,kn,n2) + do node=1,npes + do jj=1,lats_nodes(node) + ilat = ilat_list(node) + jj + lat = global_lats(ilat) + ipt_ls = min(lat,latg-lat+1) + if ( ipt_ls >= lat1s_a(ls_nodes(j,mype+1)) ) then + kpts(node) = kpts(node) + 1 + kn = kpts(node) +! + if ( lat <= latg2 ) then +! northern hemisphere + do nvar=1,nvars + n2 = nvar + nvar + works(1,nvar,kn,node) = apev(n2-1,ipt_ls) + apod(n2-1,ipt_ls) + works(2,nvar,kn,node) = apev(n2,ipt_ls) + apod(n2,ipt_ls) + enddo + else +! southern hemisphere + do nvar=1,nvars + n2 = nvar + nvar + works(1,nvar,kn,node) = apev(n2-1,ipt_ls) - apod(n2-1,ipt_ls) + works(2,nvar,kn,node) = apev(n2,ipt_ls) - apod(n2,ipt_ls) + enddo + endif + endif + enddo + enddo +! + enddo ! end of do j loop ####################################### +! + kptr = 0 + do node=1,npes + do l=1,max_ls_nodes(node) + lval = ls_nodes(l,node)+1 + do j=1,lats_node + lat = global_lats(ipt_lats_node-1+j) + if ( min(lat,latg-lat+1) >= lat1s_a(lval-1) ) then + kptr(node) = kptr(node) + 1 + endif + enddo + enddo + enddo +! +! +!$omp parallel do private(node) + do node=1,npes + sendcounts(node) = kpts(node) * n2 + recvcounts(node) = kptr(node) * n2 + sdispls(node) = (node-1) * n2 * ls_dim * workdim + end do + work1dr(1:arrsz)=>workr + work1ds(1:arrsz)=>works + call mp_alltoall(work1ds, sendcounts, sdispls, & + work1dr,recvcounts,sdispls) + nullify(work1dr) + nullify(work1ds) +!$omp parallel do private(j,lat,lmax,nvar,lval,nv) + do j=1,lats_node + lmax = min(jcap,lonf/2) + n2 = lmax + lmax + 3 + if ( n2 <= lonf+2 ) then + do nv=1,nvars + do lval = n2, lonf+2 + four_gr(lval,nv,j) = cons0 + enddo + enddo + endif + enddo +! + kptr = 0 +!! +!$omp parallel do private(node,l,lval,j,lat,nvar,kn,n2) + do node=1,npes + do l=1,max_ls_nodes(node) + lval = ls_nodes(l,node)+1 + n2 = lval + lval + do j=1,lats_node + lat = global_lats(ipt_lats_node-1+j) + if ( min(lat,latg-lat+1) >= lat1s_a(lval-1) ) then + kptr(node) = kptr(node) + 1 + kn = kptr(node) + do nv=1,nvars + four_gr(n2-1,nv,j) = workr(1,nv,kn,node) + four_gr(n2, nv,j) = workr(2,nv,kn,node) + enddo + endif + enddo + enddo + enddo +! + return + end subroutine spec_to_four + +!>@brief The subroutine 'four_to_grid' calculate real values form fourrier coefficients +!>@details This code is taken from the legacy spectral GFS + subroutine four_to_grid(syn_gr_a_1,syn_gr_a_2, lon_dim_coef,nvars) +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + implicit none +!! + integer, intent(in) :: nvars + real(kind=kind_dbl_prec) syn_gr_a_1(lon_dim_coef,nvars) + real(kind=kind_dbl_prec) syn_gr_a_2(lonf,nvars) + integer lon_dim_coef +!________________________________________________________ + real(kind=kind_dbl_prec) aux1crs(44002) + integer init +!________________________________________________________ + + + init = 1 + + call dcrft_stochy(init, & + syn_gr_a_1(:,:) ,lon_dim_coef, & + syn_gr_a_2(:,:) ,lonf, & + lonf, nvars, & + aux1crs,22000, & + aux1crs(22001),20000) + + init = 0 + call dcrft_stochy(init, & + syn_gr_a_1(:,:) ,lon_dim_coef, & + syn_gr_a_2(:,:) ,lonf, & + lonf, nvars, & + aux1crs,22000, & + aux1crs(22001),20000) + + return + end + + + SUBROUTINE dcrft_stochy(init,x,ldx,y,ldy,n,nvars, table,n1,wrk,n2) + + implicit none + integer ,intent(in) :: ldx,ldy,n,nvars + integer init,n1,n2,i,j + real x(ldx,nvars),y(ldy,nvars),table(44002),wrk + + IF (init.ne.0) THEN + CALL rffti_stochy(n,table) + ELSE + DO j=1,nvars + y(1,j)=x(1,j) + DO i=2,n + y(i,j)=x(i+1,j) + ENDDO + CALL rfftb_stochy(n,y(:,j),table) + ENDDO + ENDIF + + RETURN + END + +! ****************************************************************** +! ****************************************************************** +! ****** ****** +! ****** FFTPACK ****** +! ****** ****** +! ****************************************************************** +! ****************************************************************** +! + SUBROUTINE RFFTB_STOCHY (N,R,WSAVE) + + implicit none + + real, intent(inout) :: R(:) + real, intent(inout) :: WSAVE(44002) + + integer :: N + + IF (N .EQ. 1) RETURN + CALL RFFTB1_STOCHY (N,R,WSAVE,WSAVE(N+1:),WSAVE(2*N+1:)) + RETURN + END + + SUBROUTINE RFFTI_STOCHY (N,WSAVE) + + implicit none + + REAL, intent(inout) :: WSAVE(44002) + integer :: N + + IF (N .EQ. 1) RETURN + CALL RFFTI1_STOCHY (N,WSAVE(N+1:),WSAVE(2*N+1:)) + RETURN + END + + + SUBROUTINE RFFTB1_STOCHY (N,C,CH,WA,RFAC) + + implicit none + + integer, intent(in) :: N + real, intent(inout) :: CH(44002) + real, intent(inout) :: C(:) + real, intent(inout) :: WA(:) + real, intent(inout) :: RFAC(:) + + integer :: NF,NA,L1,IW,IP,L2,IDO,IDL1,IX2,IX3,IX4 + integer :: K1,I + + NF = INT(RFAC(2)) + NA = 0 + L1 = 1 + IW = 1 + DO 116 K1=1,NF + IP = INT(RFAC(K1+2)) + L2 = IP*L1 + IDO = N/L2 + IDL1 = IDO*L1 + IF (IP .NE. 4) GO TO 103 + IX2 = IW+IDO + IX3 = IX2+IDO + IF (NA .NE. 0) GO TO 101 + CALL RADB4_STOCHY (IDO,L1,C(1:4*IDO*L1),CH(1:4*IDO*L1),WA(IW:),WA(IX2:),WA(IX3:)) + GO TO 102 + 101 CALL RADB4_STOCHY (IDO,L1,CH(1:4*IDO*L1),C(1:4*IDO*L1),WA(IW:),WA(IX2:),WA(IX3:)) + 102 NA = 1-NA + GO TO 115 + 103 IF (IP .NE. 2) GO TO 106 + IF (NA .NE. 0) GO TO 104 + CALL RADB2_STOCHY (IDO,L1,C,CH,WA(IW:)) + GO TO 105 + 104 CALL RADB2_STOCHY (IDO,L1,CH,C,WA(IW:)) + 105 NA = 1-NA + GO TO 115 + 106 IF (IP .NE. 3) GO TO 109 + IX2 = IW+IDO + IF (NA .NE. 0) GO TO 107 + CALL RADB3_STOCHY (IDO,L1,C,CH,WA(IW:),WA(IX2:)) + GO TO 108 + 107 CALL RADB3_STOCHY (IDO,L1,CH,C,WA(IW:),WA(IX2:)) + 108 NA = 1-NA + GO TO 115 + 109 IF (IP .NE. 5) GO TO 112 + IX2 = IW+IDO + IX3 = IX2+IDO + IX4 = IX3+IDO + IF (NA .NE. 0) GO TO 110 + CALL RADB5_STOCHY (IDO,L1,C,CH,WA(IW:),WA(IX2:),WA(IX3:),WA(IX4:)) + GO TO 111 + 110 CALL RADB5_STOCHY (IDO,L1,CH,C,WA(IW:),WA(IX2:),WA(IX3:),WA(IX4:)) + 111 NA = 1-NA + GO TO 115 + 112 IF (NA .NE. 0) GO TO 113 + CALL RADBG_STOCHY (IDO,IP,L1,IDL1,C,C,C,CH,CH,WA(IW:)) + GO TO 114 + 113 CALL RADBG_STOCHY (IDO,IP,L1,IDL1,CH,CH,CH,C,C,WA(IW:)) + 114 IF (IDO .EQ. 1) NA = 1-NA + 115 L1 = L2 + IW = IW+(IP-1)*IDO + 116 CONTINUE + IF (NA .EQ. 0) RETURN + DO 117 I=1,N + C(I) = CH(I) + 117 CONTINUE + RETURN + END + + + SUBROUTINE RFFTI1_STOCHY (N,WA,RFAC) + + implicit none + + integer, intent(in) :: N + REAL, intent(inout) :: WA(:) + REAL, intent(inout) :: RFAC(:) + + integer :: NTRYH(4) + integer :: NL,NF, I, J, NQ,NR,LD,FI,IS,ID,L1,L2,IP + integer :: NTRY, NFM1, K1,II, IB, IDO, IPM, IC + REAL, parameter :: TPI=6.28318530717959 + real :: ARG,ARGLD,ARGH, TI2,TI4 + + DATA NTRYH(:) /4,2,3,5/ + + + NL = N + NF = 0 + J = 0 + 101 J = J+1 + IF ( (J-4) .LE. 0) THEN + GOTO 102 + ELSE + GOTO 103 + ENDIF + 102 NTRY = NTRYH(J) + GO TO 104 + 103 NTRY = NTRY+2 + 104 NQ = NL/NTRY + NR = NL-NTRY*NQ + IF (NR.EQ.0) THEN + GO TO 105 + ELSE + GO TO 101 + ENDIF + 105 NF = NF+1 + RFAC(NF+2) = FLOAT(NTRY) + NL = NQ + IF (NTRY .NE. 2) GO TO 107 + IF (NF .EQ. 1) GO TO 107 + DO 106 I=2,NF + IB = NF-I+2 + RFAC(IB+2) = RFAC(IB+1) + 106 CONTINUE + RFAC(3) = 2. + 107 IF (NL .NE. 1) GO TO 104 + RFAC(1) = FLOAT(N) + RFAC(2) = FLOAT(NF) + ARGH = TPI/FLOAT(N) + IS = 0 + NFM1 = NF-1 + L1 = 1 + IF (NFM1 .EQ. 0) RETURN +!OCL NOVREC + DO 110 K1=1,NFM1 + IP = INT(RFAC(K1+2)) + LD = 0 + L2 = L1*IP + IDO = N/L2 + IPM = IP-1 + DO 109 J=1,IPM + LD = LD+L1 + I = IS + ARGLD = FLOAT(LD)*ARGH + FI = 0 +!OCL SCALAR + DO 108 II=3,IDO,2 + I = I+2 + FI = FI+1 + ARG = FI*ARGLD + WA(I-1) = COS(ARG) + WA(I) = SIN(ARG) + 108 CONTINUE + IS = IS+IDO + 109 CONTINUE + L1 = L2 + 110 CONTINUE + RETURN + END + + + SUBROUTINE RADB2_STOCHY (IDO,L1,CC,CH,WA1) + + implicit none + + integer, intent(in) :: IDO + integer, intent(in) :: L1 + real, intent(inout) :: CC(IDO,2,L1) + real, intent(inout) :: CH(IDO,L1,2) + real, intent(inout) :: WA1(:) + + integer :: K,I,IC,IDP2 + real :: TR2,TI2 + DO 101 K=1,L1 + CH(1,K,1) = CC(1,1,K)+CC(IDO,2,K) + CH(1,K,2) = CC(1,1,K)-CC(IDO,2,K) + 101 CONTINUE + IF ( (IDO-2) .LT. 0) THEN + GO TO 107 + ELSE IF (( IDO-2).EQ. 0)THEN + GO TO 105 + ELSE + GO TO 102 + ENDIF + 102 IDP2 = IDO+2 +!OCL NOVREC + DO 104 K=1,L1 + DO 103 I=3,IDO,2 + IC = IDP2-I + CH(I-1,K,1) = CC(I-1,1,K)+CC(IC-1,2,K) + TR2 = CC(I-1,1,K)-CC(IC-1,2,K) + CH(I,K,1) = CC(I,1,K)-CC(IC,2,K) + TI2 = CC(I,1,K)+CC(IC,2,K) + CH(I-1,K,2) = WA1(I-2)*TR2-WA1(I-1)*TI2 + CH(I,K,2) = WA1(I-2)*TI2+WA1(I-1)*TR2 + 103 CONTINUE + 104 CONTINUE + IF (MOD(IDO,2) .EQ. 1) RETURN + 105 DO 106 K=1,L1 + CH(IDO,K,1) = CC(IDO,1,K)+CC(IDO,1,K) + CH(IDO,K,2) = -(CC(1,2,K)+CC(1,2,K)) + 106 CONTINUE + 107 RETURN + END + + + SUBROUTINE RADB3_STOCHY (IDO,L1,CC,CH,WA1,WA2) + + implicit none + + integer, intent(in) :: IDO,L1 + real, intent(inout) :: CC(IDO,3,L1) + real, intent(inout) :: CH(IDO,L1,3) + real, intent(inout) :: WA1(:) + real, intent(inout) :: WA2(:) + + REAL, parameter :: TAUR= -.5 + REAL, parameter :: TAUI=.866025403784439 + integer :: I,K,IDP2,IC + real :: TR2,CR2,TI1,CI2,CR3,CI3,DR2,DR3,DI2,DI3 + real :: TI2,TI4 + + + DO 101 K=1,L1 + TR2 = CC(IDO,2,K)+CC(IDO,2,K) + CR2 = CC(1,1,K)+TAUR*TR2 + CH(1,K,1) = CC(1,1,K)+TR2 + CI3 = TAUI*(CC(1,3,K)+CC(1,3,K)) + CH(1,K,2) = CR2-CI3 + CH(1,K,3) = CR2+CI3 + 101 CONTINUE + IF (IDO .EQ. 1) RETURN + IDP2 = IDO+2 +!OCL NOVREC + DO 103 K=1,L1 + DO 102 I=3,IDO,2 + IC = IDP2-I + TR2 = CC(I-1,3,K)+CC(IC-1,2,K) + CR2 = CC(I-1,1,K)+TAUR*TR2 + CH(I-1,K,1) = CC(I-1,1,K)+TR2 + TI2 = CC(I,3,K)-CC(IC,2,K) + CI2 = CC(I,1,K)+TAUR*TI2 + CH(I,K,1) = CC(I,1,K)+TI2 + CR3 = TAUI*(CC(I-1,3,K)-CC(IC-1,2,K)) + CI3 = TAUI*(CC(I,3,K)+CC(IC,2,K)) + DR2 = CR2-CI3 + DR3 = CR2+CI3 + DI2 = CI2+CR3 + DI3 = CI2-CR3 + CH(I-1,K,2) = WA1(I-2)*DR2-WA1(I-1)*DI2 + CH(I,K,2) = WA1(I-2)*DI2+WA1(I-1)*DR2 + CH(I-1,K,3) = WA2(I-2)*DR3-WA2(I-1)*DI3 + CH(I,K,3) = WA2(I-2)*DI3+WA2(I-1)*DR3 + 102 CONTINUE + 103 CONTINUE + RETURN + END + + + SUBROUTINE RADB4_STOCHY (IDO,L1,CC,CH,WA1,WA2,WA3) + + implicit none + + integer, intent(in) :: IDO,L1 + real, intent(inout) :: CC(IDO,4,L1) + real, intent(inout) :: CH(IDO,L1,4) + real, intent(inout) :: WA1(:) + real, intent(inout) :: WA2(:) + real, intent(inout) :: WA3(:) + + REAL, parameter :: SQRT2=1.414213562373095 + integer :: I,K,IDP2,IC + real :: TR1,TR2,TR3,TR4,TI1,TI2,TI3,TI4 + real :: CI2,CI3,CI4,CR2,CR3,CR4 + DO 101 K=1,L1 + TR1 = CC(1,1,K)-CC(IDO,4,K) + TR2 = CC(1,1,K)+CC(IDO,4,K) + TR3 = CC(IDO,2,K)+CC(IDO,2,K) + TR4 = CC(1,3,K)+CC(1,3,K) + CH(1,K,1) = TR2+TR3 + CH(1,K,2) = TR1-TR4 + CH(1,K,3) = TR2-TR3 + CH(1,K,4) = TR1+TR4 + 101 CONTINUE + IF ( (IDO-2) .LT.0 ) THEN + GO TO 107 + ELSE IF ( (IDO-2) .EQ.0 ) THEN + GO TO 105 + ELSE + GO TO 102 + ENDIF + 102 IDP2 = IDO+2 +!OCL NOVREC + DO 104 K=1,L1 + DO 103 I=3,IDO,2 + IC = IDP2-I + TI1 = CC(I,1,K)+CC(IC,4,K) + TI2 = CC(I,1,K)-CC(IC,4,K) + TI3 = CC(I,3,K)-CC(IC,2,K) + TR4 = CC(I,3,K)+CC(IC,2,K) + TR1 = CC(I-1,1,K)-CC(IC-1,4,K) + TR2 = CC(I-1,1,K)+CC(IC-1,4,K) + TI4 = CC(I-1,3,K)-CC(IC-1,2,K) + TR3 = CC(I-1,3,K)+CC(IC-1,2,K) + CH(I-1,K,1) = TR2+TR3 + CR3 = TR2-TR3 + CH(I,K,1) = TI2+TI3 + CI3 = TI2-TI3 + CR2 = TR1-TR4 + CR4 = TR1+TR4 + CI2 = TI1+TI4 + CI4 = TI1-TI4 + CH(I-1,K,2) = WA1(I-2)*CR2-WA1(I-1)*CI2 + CH(I,K,2) = WA1(I-2)*CI2+WA1(I-1)*CR2 + CH(I-1,K,3) = WA2(I-2)*CR3-WA2(I-1)*CI3 + CH(I,K,3) = WA2(I-2)*CI3+WA2(I-1)*CR3 + CH(I-1,K,4) = WA3(I-2)*CR4-WA3(I-1)*CI4 + CH(I,K,4) = WA3(I-2)*CI4+WA3(I-1)*CR4 + 103 CONTINUE + 104 CONTINUE + IF (MOD(IDO,2) .EQ. 1) RETURN + 105 CONTINUE + DO 106 K=1,L1 + TI1 = CC(1,2,K)+CC(1,4,K) + TI2 = CC(1,4,K)-CC(1,2,K) + TR1 = CC(IDO,1,K)-CC(IDO,3,K) + TR2 = CC(IDO,1,K)+CC(IDO,3,K) + CH(IDO,K,1) = TR2+TR2 + CH(IDO,K,2) = SQRT2*(TR1-TI1) + CH(IDO,K,3) = TI2+TI2 + CH(IDO,K,4) = -SQRT2*(TR1+TI1) + 106 CONTINUE + 107 RETURN + END + + + SUBROUTINE RADB5_STOCHY (IDO,L1,CC,CH,WA1,WA2,WA3,WA4) + DIMENSION CC(IDO,5,L1), CH(IDO,L1,5), WA1(*), WA2(*), WA3(*), WA4(*) + REAL, parameter :: TR11=0.309016994374947 + REAL, parameter :: TI11= 0.951056516295154 + REAL, parameter :: TR12=-0.809016994374947 + REAL, parameter :: TI12=0.587785252292473 + DO 101 K=1,L1 + TI5 = CC(1,3,K)+CC(1,3,K) + TI4 = CC(1,5,K)+CC(1,5,K) + TR2 = CC(IDO,2,K)+CC(IDO,2,K) + TR3 = CC(IDO,4,K)+CC(IDO,4,K) + CH(1,K,1) = CC(1,1,K)+TR2+TR3 + CR2 = CC(1,1,K)+TR11*TR2+TR12*TR3 + CR3 = CC(1,1,K)+TR12*TR2+TR11*TR3 + CI5 = TI11*TI5+TI12*TI4 + CI4 = TI12*TI5-TI11*TI4 + CH(1,K,2) = CR2-CI5 + CH(1,K,3) = CR3-CI4 + CH(1,K,4) = CR3+CI4 + CH(1,K,5) = CR2+CI5 + 101 CONTINUE + IF (IDO .EQ. 1) RETURN + IDP2 = IDO+2 + DO 103 K=1,L1 + DO 102 I=3,IDO,2 + IC = IDP2-I + TI5 = CC(I,3,K)+CC(IC,2,K) + TI2 = CC(I,3,K)-CC(IC,2,K) + TI4 = CC(I,5,K)+CC(IC,4,K) + TI3 = CC(I,5,K)-CC(IC,4,K) + TR5 = CC(I-1,3,K)-CC(IC-1,2,K) + TR2 = CC(I-1,3,K)+CC(IC-1,2,K) + TR4 = CC(I-1,5,K)-CC(IC-1,4,K) + TR3 = CC(I-1,5,K)+CC(IC-1,4,K) + CH(I-1,K,1) = CC(I-1,1,K)+TR2+TR3 + CH(I,K,1) = CC(I,1,K)+TI2+TI3 + CR2 = CC(I-1,1,K)+TR11*TR2+TR12*TR3 + CI2 = CC(I,1,K)+TR11*TI2+TR12*TI3 + CR3 = CC(I-1,1,K)+TR12*TR2+TR11*TR3 + CI3 = CC(I,1,K)+TR12*TI2+TR11*TI3 + CR5 = TI11*TR5+TI12*TR4 + CI5 = TI11*TI5+TI12*TI4 + CR4 = TI12*TR5-TI11*TR4 + CI4 = TI12*TI5-TI11*TI4 + DR3 = CR3-CI4 + DR4 = CR3+CI4 + DI3 = CI3+CR4 + DI4 = CI3-CR4 + DR5 = CR2+CI5 + DR2 = CR2-CI5 + DI5 = CI2-CR5 + DI2 = CI2+CR5 + CH(I-1,K,2) = WA1(I-2)*DR2-WA1(I-1)*DI2 + CH(I,K,2) = WA1(I-2)*DI2+WA1(I-1)*DR2 + CH(I-1,K,3) = WA2(I-2)*DR3-WA2(I-1)*DI3 + CH(I,K,3) = WA2(I-2)*DI3+WA2(I-1)*DR3 + CH(I-1,K,4) = WA3(I-2)*DR4-WA3(I-1)*DI4 + CH(I,K,4) = WA3(I-2)*DI4+WA3(I-1)*DR4 + CH(I-1,K,5) = WA4(I-2)*DR5-WA4(I-1)*DI5 + CH(I,K,5) = WA4(I-2)*DI5+WA4(I-1)*DR5 + 102 CONTINUE + 103 CONTINUE + RETURN + END + + + SUBROUTINE RADBG_STOCHY (IDO,IP,L1,IDL1,CC,C1,C2,CH,CH2,WA) + DIMENSION CH(IDO,L1,IP), CC(IDO,IP,L1), C1(IDO,L1,IP), C2(IDL1,IP), & + CH2(IDL1,IP) , WA(*) + REAL, parameter :: TPI=6.28318530717959 + ARG = TPI/FLOAT(IP) + DCP = COS(ARG) + DSP = SIN(ARG) + IDP2 = IDO+2 + NBD = (IDO-1)/2 + IPP2 = IP+2 + IPPH = (IP+1)/2 + IF (IDO .LT. L1) GO TO 103 + DO K=1,L1 + DO I=1,IDO + CH(I,K,1) = CC(I,1,K) + ENDDO + ENDDO + GO TO 106 + 103 DO 105 I=1,IDO + DO 104 K=1,L1 + CH(I,K,1) = CC(I,1,K) + 104 CONTINUE + 105 CONTINUE +!OCL NOVREC + 106 DO 108 J=2,IPPH + JC = IPP2-J + J2 = J+J + DO 107 K=1,L1 + CH(1,K,J) = CC(IDO,J2-2,K)+CC(IDO,J2-2,K) + CH(1,K,JC) = CC(1,J2-1,K)+CC(1,J2-1,K) + 107 CONTINUE + 108 CONTINUE + IF (IDO .EQ. 1) GO TO 116 + IF (NBD .LT. L1) GO TO 112 +!OCL NOVREC + DO 111 J=2,IPPH + JC = IPP2-J + DO 110 K=1,L1 + DO 109 I=3,IDO,2 + IC = IDP2-I + CH(I-1,K,J) = CC(I-1,2*J-1,K)+CC(IC-1,2*J-2,K) + CH(I-1,K,JC) = CC(I-1,2*J-1,K)-CC(IC-1,2*J-2,K) + CH(I,K,J) = CC(I,2*J-1,K)-CC(IC,2*J-2,K) + CH(I,K,JC) = CC(I,2*J-1,K)+CC(IC,2*J-2,K) + 109 CONTINUE + 110 CONTINUE + 111 CONTINUE + GO TO 116 + 112 DO 115 J=2,IPPH + JC = IPP2-J + DO 114 I=3,IDO,2 + IC = IDP2-I + DO 113 K=1,L1 + CH(I-1,K,J) = CC(I-1,2*J-1,K)+CC(IC-1,2*J-2,K) + CH(I-1,K,JC) = CC(I-1,2*J-1,K)-CC(IC-1,2*J-2,K) + CH(I,K,J) = CC(I,2*J-1,K)-CC(IC,2*J-2,K) + CH(I,K,JC) = CC(I,2*J-1,K)+CC(IC,2*J-2,K) + 113 CONTINUE + 114 CONTINUE + 115 CONTINUE + 116 AR1 = 1. + AI1 = 0. +!OCL NOVREC + DO 120 L=2,IPPH + LC = IPP2-L + AR1H = DCP*AR1-DSP*AI1 + AI1 = DCP*AI1+DSP*AR1 + AR1 = AR1H + DO 117 IK=1,IDL1 + C2(IK,L) = CH2(IK,1)+AR1*CH2(IK,2) + C2(IK,LC) = AI1*CH2(IK,IP) + 117 CONTINUE + DC2 = AR1 + DS2 = AI1 + AR2 = AR1 + AI2 = AI1 +!OCL NOVREC + DO 119 J=3,IPPH + JC = IPP2-J + AR2H = DC2*AR2-DS2*AI2 + AI2 = DC2*AI2+DS2*AR2 + AR2 = AR2H + DO 118 IK=1,IDL1 + C2(IK,L) = C2(IK,L)+AR2*CH2(IK,J) + C2(IK,LC) = C2(IK,LC)+AI2*CH2(IK,JC) + 118 CONTINUE + 119 CONTINUE + 120 CONTINUE +!OCL NOVREC + DO 122 J=2,IPPH + DO 121 IK=1,IDL1 + CH2(IK,1) = CH2(IK,1)+CH2(IK,J) + 121 CONTINUE + 122 CONTINUE +!OCL NOVREC + DO 124 J=2,IPPH + JC = IPP2-J + DO 123 K=1,L1 + CH(1,K,J) = C1(1,K,J)-C1(1,K,JC) + CH(1,K,JC) = C1(1,K,J)+C1(1,K,JC) + 123 CONTINUE + 124 CONTINUE + IF (IDO .EQ. 1) GO TO 132 + IF (NBD .LT. L1) GO TO 128 +!OCL NOVREC + DO 127 J=2,IPPH + JC = IPP2-J + DO 126 K=1,L1 + DO 125 I=3,IDO,2 + CH(I-1,K,J) = C1(I-1,K,J)-C1(I,K,JC) + CH(I-1,K,JC) = C1(I-1,K,J)+C1(I,K,JC) + CH(I,K,J) = C1(I,K,J)+C1(I-1,K,JC) + CH(I,K,JC) = C1(I,K,J)-C1(I-1,K,JC) + 125 CONTINUE + 126 CONTINUE + 127 CONTINUE + GO TO 132 + 128 DO 131 J=2,IPPH + JC = IPP2-J + DO 130 I=3,IDO,2 + DO 129 K=1,L1 + CH(I-1,K,J) = C1(I-1,K,J)-C1(I,K,JC) + CH(I-1,K,JC) = C1(I-1,K,J)+C1(I,K,JC) + CH(I,K,J) = C1(I,K,J)+C1(I-1,K,JC) + CH(I,K,JC) = C1(I,K,J)-C1(I-1,K,JC) + 129 CONTINUE + 130 CONTINUE + 131 CONTINUE + 132 CONTINUE + IF (IDO .EQ. 1) RETURN + DO 133 IK=1,IDL1 + C2(IK,1) = CH2(IK,1) + 133 CONTINUE + DO 135 J=2,IP + DO 134 K=1,L1 + C1(1,K,J) = CH(1,K,J) + 134 CONTINUE + 135 CONTINUE + IF (NBD .GT. L1) GO TO 139 + IS = -IDO + DO 138 J=2,IP + IS = IS+IDO + IDIJ = IS + DO 137 I=3,IDO,2 + IDIJ = IDIJ+2 + DO 136 K=1,L1 + C1(I-1,K,J) = WA(IDIJ-1)*CH(I-1,K,J)-WA(IDIJ)*CH(I,K,J) + C1(I,K,J) = WA(IDIJ-1)*CH(I,K,J)+WA(IDIJ)*CH(I-1,K,J) + 136 CONTINUE + 137 CONTINUE + 138 CONTINUE + GO TO 143 + 139 IS = -IDO +!OCL NOVREC + DO 142 J=2,IP + IS = IS+IDO + DO 141 K=1,L1 + IDIJ = IS + DO 140 I=3,IDO,2 + IDIJ = IDIJ+2 + C1(I-1,K,J) = WA(IDIJ-1)*CH(I-1,K,J)-WA(IDIJ)*CH(I,K,J) + C1(I,K,J) = WA(IDIJ-1)*CH(I,K,J)+WA(IDIJ)*CH(I-1,K,J) + 140 CONTINUE + 141 CONTINUE + 142 CONTINUE + 143 RETURN + END + + +!>@brief The subroutine 'dozeuv_stochy' caculates odd u and even v winds harmonics from the odd harmonics +! of divergence and even harmonics of vorticty +!>@details This code is taken from the legacy spectral GFS + subroutine dozeuv_stochy(dod,zev,uod,vev,epsedn,epsodn, snnp1ev,snnp1od,ls_node) + + + implicit none + real(kind_dbl_prec), intent(in) :: dod(len_trio_ls,2) + real(kind_dbl_prec), intent(in) :: zev(len_trie_ls,2) + real(kind_dbl_prec), intent(out) :: uod(len_trio_ls,2) + real(kind_dbl_prec), intent(out) :: vev(len_trie_ls,2) + real(kind_dbl_prec), intent(in) :: epsedn(len_trie_ls) + real(kind_dbl_prec), intent(in) :: epsodn(len_trio_ls) + real(kind_dbl_prec), intent(in) :: snnp1ev(len_trie_ls) + real(kind_dbl_prec), intent(in) :: snnp1od(len_trio_ls) + integer, intent(in) :: ls_node(ls_dim,3) +!cmr ls_node(1,1) ... ls_node(ls_max_node,1) : values of L +!cmr ls_node(1,2) ... ls_node(ls_max_node,2) : values of jbasev +!cmr ls_node(1,3) ... ls_node(ls_max_node,3) : values of jbasod +! locaals + integer l,locl,n + integer indev,indev1,indev2 + integer indod,indod1,indod2 + integer inddif + real(kind_dbl_prec) rl + real(kind_dbl_prec) cons0 !constant + integer indlsev,jbasev + integer indlsod,jbasod + real(kind_evod) rerth + + include 'function2' + + +!...................................................................... + cons0 = 0.d0 !constant + rerth =6.3712e+6 ! radius of earth (m) + + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + vev(indlsev(l,l),1) = cons0 !constant + vev(indlsev(l,l),2) = cons0 !constant + enddo +!...................................................................... + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap-1,L) + else + indev2 = indlsev(jcap ,L) + endif + indod1 = indlsod(l+1,l) + inddif = indev1 - indod1 + do indev = indev1 , indev2 + uod(indev-inddif,1) = -epsodn(indev-inddif) * zev(indev,1) + uod(indev-inddif,2) = -epsodn(indev-inddif) * zev(indev,2) + enddo + enddo +!...................................................................... + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + 1 + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap+1,L) + else + indev2 = indlsev(jcap ,L) + endif + indod1 = indlsod(l+1,l) + inddif = indev1 - indod1 + do indev = indev1 , indev2 + vev(indev,1) = epsedn(indev) * dod(indev-inddif,1) + vev(indev,2) = epsedn(indev) * dod(indev-inddif,2) + enddo + enddo + +!...................................................................... + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasod=ls_node(locl,3) + indod1 = indlsod(L+1,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indod2 = indlsod(jcap ,L) + else + indod2 = indlsod(jcap+1,L) - 1 + endif + if ( l .ge. 1 ) then + rl = l + do indod = indod1 , indod2 +! u(l,n)=-i*l*d(l,n)/(n*(n+1)) + uod(indod,1) = uod(indod,1) + rl * dod(indod,2) / snnp1od(indod) + uod(indod,2) = uod(indod,2) - rl * dod(indod,1) / snnp1od(indod) + enddo + endif + enddo +!...................................................................... + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + indev1 = indlsev(L,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap-1,L) + else + indev2 = indlsev(jcap ,L) + endif + if ( l .ge. 1 ) then + rl = l + do indev = indev1 , indev2 +! u(l,n)=-i*l*d(l,n)/(n*(n+1)) + vev(indev,1) = vev(indev,1) + rl * zev(indev,2) / snnp1ev(indev) + vev(indev,2) = vev(indev,2) - rl * zev(indev,1) / snnp1ev(indev) + enddo + endif + enddo +!...................................................................... + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + 1 + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap-1,L) + else + indev2 = indlsev(jcap ,L) + endif + indod1 = indlsod(l+1,l) + inddif = indev1 - indod1 + do indev = indev1 , indev2 + uod(indev-inddif,1) = uod(indev-inddif,1) + epsedn(indev) * zev(indev,1) + uod(indev-inddif,2) = uod(indev-inddif,2) + epsedn(indev) * zev(indev,2) + enddo + enddo +!...................................................................... + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap+1,L) - 1 + else + indev2 = indlsev(jcap ,L) - 1 + endif + indod1 = indlsod(l+1,l) + inddif = indev1 - indod1 + do indev = indev1 , indev2 + vev(indev,1) = vev(indev,1) - epsodn(indev-inddif) * dod(indev-inddif,1) + vev(indev,2) = vev(indev,2) - epsodn(indev-inddif) * dod(indev-inddif,2) + enddo + enddo +!...................................................................... + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + indod1 = indlsod(L+1,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap+1,L) + indod2 = indlsod(jcap ,L) + else + indev2 = indlsev(jcap ,L) + indod2 = indlsod(jcap+1,L) + endif + do indod = indod1 , indod2 + uod(indod,1) = uod(indod,1) * rerth + uod(indod,2) = uod(indod,2) * rerth + enddo + do indev = indev1 , indev2 + vev(indev,1) = vev(indev,1) * rerth + vev(indev,2) = vev(indev,2) * rerth + enddo + enddo + return + end + +!>@brief The subroutine 'dezouv_stochy' caculates even u and odd v winds harmonics from the even harmonics +! of divergence and odd harmonics of vorticty +!>@details This code is taken from the legacy spectral GFS + subroutine dezouv_stochy(dev,zod,uev,vod,epsedn,epsodn,snnp1ev,snnp1od,ls_node) + + + implicit none + + real(kind_dbl_prec), intent(in) :: dev(len_trie_ls,2) + real(kind_dbl_prec), intent(in) :: zod(len_trio_ls,2) + real(kind_dbl_prec), intent(out) :: uev(len_trie_ls,2) + real(kind_dbl_prec), intent(out) :: vod(len_trio_ls,2) + real(kind_dbl_prec), intent(in) :: epsedn(len_trie_ls) + real(kind_dbl_prec), intent(in) :: epsodn(len_trio_ls) + real(kind_dbl_prec), intent(in) :: snnp1ev(len_trie_ls) + real(kind_dbl_prec), intent(in) :: snnp1od(len_trio_ls) + integer, intent(in) :: ls_node(ls_dim,3) + +!cmr ls_node(1,1) ... ls_node(ls_max_node,1) : values of L +!cmr ls_node(1,2) ... ls_node(ls_max_node,2) : values of jbasev +!cmr ls_node(1,3) ... ls_node(ls_max_node,3) : values of jbasod + + integer l,locl,n + integer indev,indev1,indev2 + integer indod,indod1,indod2 + integer inddif + + real(kind_dbl_prec) rl + real(kind_dbl_prec) cons0 !constant + + integer indlsev,jbasev + integer indlsod,jbasod + real(kind_evod) rerth + + include 'function2' +!...................................................................... + cons0 = 0.d0 !constant + rerth =6.3712e+6 ! radius of earth (m) + + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + uev(indlsev(l,l),1) = cons0 !constant + uev(indlsev(l,l),2) = cons0 !constant + enddo + +!...................................................................... + + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + 1 + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap+1,L) + else + indev2 = indlsev(jcap ,L) + endif + indod1 = indlsod(l+1,l) + inddif = indev1 - indod1 + do indev = indev1 , indev2 + uev(indev,1) = -epsedn(indev) * zod(indev-inddif,1) + uev(indev,2) = -epsedn(indev) * zod(indev-inddif,2) + enddo + enddo + + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap-1,L) + else + indev2 = indlsev(jcap ,L) + endif + indod1 = indlsod(l+1,l) + inddif = indev1 - indod1 + + do indev = indev1 , indev2 + vod(indev-inddif,1) = epsodn(indev-inddif) * dev(indev,1) + vod(indev-inddif,2) = epsodn(indev-inddif) * dev(indev,2) + enddo + enddo + +!...................................................................... + + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + indev1 = indlsev(L,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap-1,L) + else + indev2 = indlsev(jcap ,L) + endif + if ( l .ge. 1 ) then + rl = l + do indev = indev1 , indev2 + uev(indev,1) = uev(indev,1) + rl * dev(indev,2) / snnp1ev(indev) + uev(indev,2) = uev(indev,2) - rl * dev(indev,1) / snnp1ev(indev) + enddo + endif + enddo + +!...................................................................... + + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasod=ls_node(locl,3) + indod1 = indlsod(L+1,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indod2 = indlsod(jcap ,L) + else + indod2 = indlsod(jcap+1,L) - 1 + endif + if ( l .ge. 1 ) then + rl = l + do indod = indod1 , indod2 + vod(indod,1) = vod(indod,1) + rl * zod(indod,2) / snnp1od(indod) + vod(indod,2) = vod(indod,2) - rl * zod(indod,1) / snnp1od(indod) + enddo + endif + enddo + +!...................................................................... + + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap+1,L) - 1 + else + indev2 = indlsev(jcap ,L) - 1 + endif + indod1 = indlsod(l+1,l) + inddif = indev1 - indod1 + + do indev = indev1 , indev2 + uev(indev,1) = uev(indev, 1) + epsodn(indev-inddif) * zod(indev-inddif,1) + uev(indev,2) = uev(indev, 2) + epsodn(indev-inddif) * zod(indev-inddif,2) + enddo + enddo +!...................................................................... + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + 1 + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap-1,L) + else + indev2 = indlsev(jcap ,L) + endif + indod1 = indlsod(l+1,l) + inddif = indev1 - indod1 + do indev = indev1 , indev2 + vod(indev-inddif,1) = vod(indev-inddif,1) - epsedn(indev) * dev(indev, 1) + vod(indev-inddif,2) = vod(indev-inddif,2) - epsedn(indev) * dev(indev, 2) + enddo + enddo +!...................................................................... + do locl=1,ls_max_node + l=ls_node(locl,1) + jbasev=ls_node(locl,2) + jbasod=ls_node(locl,3) + indev1 = indlsev(L,L) + indod1 = indlsod(L+1,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap+1,L) + indod2 = indlsod(jcap ,L) + else + indev2 = indlsev(jcap ,L) + indod2 = indlsod(jcap+1,L) + endif + do indev = indev1 , indev2 + uev(indev,1) = uev(indev,1) * rerth + uev(indev,2) = uev(indev,2) * rerth + enddo + + do indod = indod1 , indod2 + vod(indod,1) = vod(indod,1) * rerth + vod(indod,2) = vod(indod,2) * rerth + enddo + enddo + + return + end + + ! interpolation from lat/lon or gaussian grid to other lat/lon grid + ! +!>@brief The subroutine 'stochy_la2ga' intepolates from the global gaussian grid +!! to the cubed sphere points +!>@details This code is taken from the legacy spectral GFS + subroutine stochy_la2ga(regin,imxin,jmxin,rinlon,rinlat,rlon,rlat, & + gauout,len,outlat, outlon) + implicit none + ! interface variables + real (kind=kind_io8), intent(in) :: regin(imxin,jmxin) + integer, intent(in) :: imxin + integer, intent(in) :: jmxin + real (kind=kind_io8), intent(in) :: rinlon(imxin) + real (kind=kind_io8), intent(in) :: rinlat(jmxin) + real (kind=kind_io8), intent(in) :: rlon + real (kind=kind_io8), intent(in) :: rlat + real (kind=kind_io8), intent(out) :: gauout(len) + integer, intent(in) :: len + real (kind=kind_io8), intent(in) :: outlat(len) + real (kind=kind_io8), intent(in) :: outlon(len) + ! local variables + real (kind=kind_io8) :: sum2,sum1,sum3,sum4 + real (kind=kind_io8) :: wsum,wsumiv,sums,sumn,wi2j2,x,y,wi1j1 + real (kind=kind_io8) :: wi1j2,wi2j1,aphi,rnume,alamd,denom + integer :: i,j,jq,jx + integer :: j1,j2,ii,i1,i2 + integer :: iindx1(len) + integer :: iindx2(len) + integer :: jindx1(len) + integer :: jindx2(len) + real(kind=kind_io8) :: ddx(len) + real(kind=kind_io8) :: ddy(len) + real(kind=kind_io8) :: wrk(len) +! +! +! find i-index for interpolation + do i=1,len + alamd = outlon(i) + if (alamd .lt. rlon) alamd = alamd + 360.0 + if (alamd .gt. 360.0+rlon) alamd = alamd - 360.0 + wrk(i) = alamd + iindx1(i) = imxin + enddo + do i=1,len + do ii=1,imxin + if(wrk(i) .ge. rinlon(ii)) iindx1(i) = ii + enddo + enddo + do i=1,len + i1 = iindx1(i) + if (i1 .lt. 1) i1 = imxin + i2 = i1 + 1 + if (i2 .gt. imxin) i2 = 1 + iindx1(i) = i1 + iindx2(i) = i2 + denom = rinlon(i2) - rinlon(i1) + if(denom.lt.0.) denom = denom + 360. + rnume = wrk(i) - rinlon(i1) + if(rnume.lt.0.) rnume = rnume + 360. + ddx(i) = rnume / denom + enddo +! +! find j-index for interplation +! + if(rlat.gt.0.) then + do j=1,len + jindx1(j)=0 + enddo + do jx=1,jmxin + do j=1,len + if(outlat(j).le.rinlat(jx)) jindx1(j) = jx + enddo + enddo + do j=1,len + jq = jindx1(j) + aphi=outlat(j) + if(jq.ge.1 .and. jq .lt. jmxin) then + j2=jq+1 + j1=jq + ddy(j)=(aphi-rinlat(j1))/(rinlat(j2)-rinlat(j1)) + elseif (jq .eq. 0) then + j2=1 + j1=1 + if(abs(90.-rinlat(j1)).gt.0.001) then + ddy(j)=(aphi-rinlat(j1))/(90.-rinlat(j1)) + else + ddy(j)=0.0 + endif + else + j2=jmxin + j1=jmxin + if(abs(-90.-rinlat(j1)).gt.0.001) then + ddy(j)=(aphi-rinlat(j1))/(-90.-rinlat(j1)) + else + ddy(j)=0.0 + endif + endif + jindx1(j)=j1 + jindx2(j)=j2 + enddo + else + do j=1,len + jindx1(j) = jmxin+1 + enddo + do jx=jmxin,1,-1 + do j=1,len + if(outlat(j).le.rinlat(jx)) jindx1(j) = jx + enddo + enddo + do j=1,len + jq = jindx1(j) + aphi=outlat(j) + if(jq.gt.1 .and. jq .le. jmxin) then + j2=jq + j1=jq-1 + ddy(j)=(aphi-rinlat(j1))/(rinlat(j2)-rinlat(j1)) + elseif (jq .eq. 1) then + j2=1 + j1=1 + if(abs(-90.-rinlat(j1)).gt.0.001) then + ddy(j)=(aphi-rinlat(j1))/(-90.-rinlat(j1)) + else + ddy(j)=0.0 + endif + else + j2=jmxin + j1=jmxin + if(abs(90.-rinlat(j1)).gt.0.001) then + ddy(j)=(aphi-rinlat(j1))/(90.-rinlat(j1)) + else + ddy(j)=0.0 + endif + endif + jindx1(j)=j1 + jindx2(j)=j2 + enddo + endif +! + sum1 = 0. + sum2 = 0. + sum3 = 0. + sum4 = 0. + do i=1,imxin + sum1 = sum1 + regin(i,1) + sum2 = sum2 + regin(i,jmxin) + enddo + sum1 = sum1 / imxin + sum2 = sum2 / imxin + sum3 = sum1 + sum4 = sum2 +! +! quasi-bilinear interpolation +! + do i=1,len + y = ddy(i) + j1 = jindx1(i) + j2 = jindx2(i) + x = ddx(i) + i1 = iindx1(i) + i2 = iindx2(i) +! + wi1j1 = (1.-x) * (1.-y) + wi2j1 = x *( 1.-y) + wi1j2 = (1.-x) * y + wi2j2 = x * y +! + wsum = wi1j1 + wi2j1 + wi1j2 + wi2j2 + wrk(i) = wsum + if(wsum.ne.0.) then + wsumiv = 1./wsum + if(j1.ne.j2) then + gauout(i) = (wi1j1*regin(i1,j1) + wi2j1*regin(i2,j1) + & + wi1j2*regin(i1,j2) + wi2j2*regin(i2,j2)) & + *wsumiv + else + if (rlat .gt. 0.0) then + sumn = sum3 + sums = sum4 + if( j1 .eq. 1) then + gauout(i) = (wi1j1*sumn +wi2j1*sumn + & + wi1j2*regin(i1,j2)+wi2j2*regin(i2,j2)) & + * wsumiv + elseif (j1 .eq. jmxin) then + gauout(i) = (wi1j1*regin(i1,j1)+wi2j1*regin(i2,j1)+ & + wi1j2*sums +wi2j2*sums ) & + * wsumiv + endif + else + sums = sum3 + sumn = sum4 + if( j1 .eq. 1) then + gauout(i) = (wi1j1*regin(i1,j1)+wi2j1*regin(i2,j1)+ & + wi1j2*sums +wi2j2*sums ) & + * wsumiv + elseif (j1 .eq. jmxin) then + gauout(i) = (wi1j1*sumn +wi2j1*sumn + & + wi1j2*regin(i1,j2)+wi2j2*regin(i2,j2)) & + * wsumiv + endif + endif + endif ! if j1 .ne. j2 + endif + enddo + do i=1,len + j1 = jindx1(i) + j2 = jindx2(i) + i1 = iindx1(i) + i2 = iindx2(i) + if(wrk(i) .eq. 0.0) then + write(6,*) ' la2ga: error' + call sleep(2) + stop + endif + enddo + return +! + end subroutine stochy_la2ga + +!>@brief The subroutine 'initialize_spectral' initializes the +!gridded component of the stochastic physics pattern +!>@details This code is taken from the legacy spectral GFS + subroutine initialize_spectral(gis_stochy) + +! this subroutine set up the internal state variables, +! allocate internal state arrays for initializing the gfs system. +!---------------------------------------------------------------- +! + implicit none +! +! type(stochy_internal_state), pointer, intent(inout) :: gis_stochy + type(stochy_internal_state), intent(inout) :: gis_stochy + integer :: i, l, locl + +!------------------------------------------------------------------- + +! set up gfs internal state dimension and values for dynamics etc +!------------------------------------------------------------------- + gis_stochy%lon_dim_a = lon_s + 2 + jcap=ntrunc + latg = lat_s + latg2 = latg/2 + lonf = lon_s + + allocate(lat1s_a(0:jcap)) + allocate(lon_dims_a(latg)) + + allocate(wgt_a(latg2)) + allocate(rcs2_a(latg2)) + + ls_dim = (jcap)/gis_stochy%nodes+1 +!! +!cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! + allocate ( gis_stochy%ls_node (ls_dim,3) ) + allocate ( gis_stochy%ls_nodes(ls_dim,gis_stochy%nodes) ) + allocate ( gis_stochy%max_ls_nodes(gis_stochy%nodes) ) +! + allocate ( gis_stochy%lats_nodes_a(gis_stochy%nodes) ) + allocate ( gis_stochy%global_lats_a(latg) ) +! + + + +!--------------------------------------------------- +! + call get_ls_node_stochy( gis_stochy%mype, gis_stochy%ls_node(:,1), ls_max_node, gis_stochy%nodes) +! +! + len_trie_ls = 0 + len_trio_ls = 0 + do locl=1,ls_max_node + gis_stochy%ls_node(locl,2) = len_trie_ls + gis_stochy%ls_node(locl,3) = len_trio_ls + l = gis_stochy%ls_node(locl,1) + len_trie_ls = len_trie_ls+(jcap+3-l)/2 + len_trio_ls = len_trio_ls+(jcap+2-l)/2 + enddo +! + allocate ( gis_stochy%epse (len_trie_ls) ) + allocate ( gis_stochy%epso (len_trio_ls) ) + allocate ( gis_stochy%epsedn(len_trie_ls) ) + allocate ( gis_stochy%epsodn(len_trio_ls) ) + allocate ( gis_stochy%kenorm_e(len_trie_ls) ) + allocate ( gis_stochy%kenorm_o(len_trio_ls) ) +! + allocate ( gis_stochy%snnp1ev(len_trie_ls) ) + allocate ( gis_stochy%snnp1od(len_trio_ls) ) +! + allocate ( gis_stochy%plnev_a(len_trie_ls,latg2) ) + allocate ( gis_stochy%plnod_a(len_trio_ls,latg2) ) + allocate ( gis_stochy%plnew_a(len_trie_ls,latg2) ) + allocate ( gis_stochy%plnow_a(len_trio_ls,latg2) ) + + allocate(colrad_a(latg2)) + allocate(sinlat_a(latg)) + allocate(coslat_a(latg)) +!! + call getcon_spectral(gis_stochy) +! + gis_stochy%lats_node_a = gis_stochy%lats_nodes_a(gis_stochy%mype+1) + + + allocate ( gis_stochy%trie_ls (len_trie_ls,2,gis_stochy%lotls) ) + allocate ( gis_stochy%trio_ls (len_trio_ls,2,gis_stochy%lotls) ) + + + end subroutine initialize_spectral + + +!>@brief The subroutine 'get_ls_node_stochy' calculates the decomposition of the spherical harmonics based on the processor layout + subroutine get_ls_node_stochy(me_fake,ls_node,ls_max_node_fake, nodes) +!>@details This code is taken from the legacy spectral GFS +! + implicit none +! + integer me_fake, ls_max_node_fake, nodes + integer ls_node(ls_dim) + + integer ijk, jptls, l, node, nodesio, jcap1 +! + nodesio = nodes + + ls_node = -1 + jcap1=jcap+1 +! + jptls = 0 + l = 0 +!............................................. + do ijk=1,jcap1 +! + do node=1,nodesio + if (node == me_fake+1) then + jptls = jptls + 1 + ls_node(jptls) = l + endif + l = l + 1 + if (l > jcap) go to 200 + enddo +! + do node=nodesio,1,-1 + if (node == me_fake+1) then + jptls = jptls + 1 + ls_node(jptls) = l + endif + l = l + 1 + if (l > jcap) go to 200 + enddo +! + enddo +!............................................. +! + 200 continue +! +!............................................. +! + ls_max_node_fake = 0 + do ijk=1,ls_dim + if(ls_node(ijk) >= 0) then + ls_max_node_fake = ijk + endif + enddo +! + return + end + +!>@brief The subroutine 'getcon_spectral' gets various constants for the spectral and related gaussian grid +!! and caluated the assoicate legendre polynomials +!>@details This code is taken from the legacy spectral GFS + subroutine getcon_spectral ( gis_stochy) + + implicit none +! + integer i,j,l,lat,n + integer ls_node(ls_dim,3) +! +! ls_node(1,1) ... ls_node(ls_max_node,1) : values of L +! ls_node(1,2) ... ls_node(ls_max_node,2) : values of jbasev +! ls_node(1,3) ... ls_node(ls_max_node,3) : values of jbasod +! + type(stochy_internal_state), intent(inout) :: gis_stochy +! + integer locl,node, indev, indod, indlsev,jbasev,indlsod,jbasod +! + integer gl_lats_index + integer global_time_sort_index_a(latg) +! + include 'function2' +! + real(kind=kind_dbl_prec), parameter :: cons0 = 0.d0, cons0p5 = 0.5d0,& + cons1 = 1.d0, cons0p92 = 0.92d0 +! + gl_lats_index = 0 + gis_stochy%global_lats_a = -1 + global_time_sort_index_a=lonf + + do node=1,gis_stochy%nodes + call get_lats_node_a_stochy( node-1, gis_stochy%global_lats_a,gis_stochy%lats_nodes_a(node),& + gl_lats_index,global_time_sort_index_a, gis_stochy%nodes) + enddo + call setlats_a_stochy(gis_stochy) + + do node=1,gis_stochy%nodes + call get_ls_node_stochy( node-1, gis_stochy%ls_nodes(1,node),gis_stochy%max_ls_nodes(node), gis_stochy%nodes ) + enddo +! + gis_stochy%lats_dim_a = 0 + do node=1,gis_stochy%nodes + gis_stochy%lats_dim_a = max(gis_stochy%lats_dim_a,gis_stochy%lats_nodes_a(node)) + enddo + + gis_stochy%ipt_lats_node_a = 1 + if ( gis_stochy%mype > 0 ) then + do node=1,gis_stochy%mype + gis_stochy%ipt_lats_node_a = gis_stochy%ipt_lats_node_a + gis_stochy%lats_nodes_a(node) + enddo + endif + +! + call glats_stochy(latg2,colrad_a,wgt_a,rcs2_a) + call epslon_stochy(gis_stochy) + call pln2eo_a_stochy(gis_stochy,latg2) + call gozrineo_a_stochy(gis_stochy,latg2) +! +! + do locl=1,ls_max_node + l = gis_stochy%ls_node(locl,1) + jbasev = gis_stochy%ls_node(locl,2) + indev = indlsev(l,l) + do n = l, jcap, 2 + gis_stochy%snnp1ev(indev) = n*(n+1) + indev = indev+1 + end do + end do +! + do locl=1,ls_max_node + l = gis_stochy%ls_node(locl,1) + jbasod = gis_stochy%ls_node(locl,3) + if ( l <= jcap-1 ) then + indod = indlsod(l+1,l) + do n = l+1, jcap, 2 + gis_stochy%snnp1od(indod) = n*(n+1) + indod = indod+1 + end do + end if + end do +! +! + do locl=1,ls_max_node + l = gis_stochy%ls_node(locl,1) + jbasev = gis_stochy%ls_node(locl,2) + jbasod = gis_stochy%ls_node(locl,3) + if (mod(L,2) == mod(jcap+1,2)) then ! set even (n-l) terms of top row to zero + gis_stochy%snnp1ev(indlsev(jcap+1,l)) = cons0 + else ! set odd (n-l) terms of top row to zero + gis_stochy%snnp1od(indlsod(jcap+1,l)) = cons0 + endif + enddo +! + do j=1,latg + if( j <= latg2 ) then + sinlat_a(j) = cos(colrad_a(j)) + else + sinlat_a(j) = -cos(colrad_a(latg+1-j)) + endif + coslat_a(j) = sqrt(1.-sinlat_a(j)*sinlat_a(j)) + enddo +! + do L=0,jcap + do lat = 1, latg2 + if ( L <= min(jcap,lonf/2) ) then + lat1s_a(L) = lat + go to 200 + endif + end do + 200 continue + end do + + do j=1,gis_stochy%lats_node_a + lon_dims_a(j) = lonfx + enddo + return + end + +!>@brief The subroutine 'get_lats_node_a_stochy' calculates the decomposition of the gaussian grid based on the processor layout +!>@details This code is taken from the legacy spectral GFS + subroutine get_lats_node_a_stochy(me_fake,global_lats_a, & + lats_nodes_a_fake,gl_lats_index, & + global_time_sort_index,nodes) +! + implicit none + + integer,intent(in) :: me_fake + integer,intent(in) :: nodes + integer,intent(in) :: lats_nodes_a_fake + integer,intent(inout) :: gl_lats_index + integer,intent(inout) :: global_lats_a(latg) + integer, intent(in) :: global_time_sort_index(latg) + + integer :: ijk + integer :: jptlats + integer :: lat + integer :: node + + lat = 1 + +!............................................. + do ijk=1,latg + do node=1,nodes + if (node.eq.me_fake+1) then + gl_lats_index=gl_lats_index+1 + global_lats_a(gl_lats_index) = global_time_sort_index(lat) + endif + lat = lat + 1 + if (lat .gt. latg) go to 200 + enddo + + do node=nodes,1,-1 + if (node.eq.me_fake+1) then + gl_lats_index=gl_lats_index+1 + global_lats_a(gl_lats_index) = global_time_sort_index(lat) + endif + lat = lat + 1 + if (lat .gt. latg) go to 200 + enddo + enddo + 200 continue + return + end + +!>@brief The subroutine 'gozrineo_a_stochy' calculates the deriviates of assoicate legendre polynomials +!>@details This code is taken from the legacy spectral GFS + subroutine gozrineo_a_stochy(gis_stochy, num_lat) + + implicit none + + type(stochy_internal_state), intent(inout) :: gis_stochy + integer, intent(in) :: num_lat + + integer l,lat,locl,n + integer indev,indev1,indev2 + integer indod,indod1,indod2 + integer inddif + + real(kind=kind_dbl_prec) rn,rnp1,wcsa + + real(kind=kind_dbl_prec) cons0 !constant + real(kind=kind_dbl_prec) cons2 !constant + real rerth + + integer indlsev,jbasev + integer indlsod,jbasod + + include 'function2' + + + cons0 = 0.d0 !constant + cons2 = 2.d0 !constant + rerth =6.3712e+6 ! radius of earth (m) + + + do lat=1,num_lat + + wcsa=rcs2_a(lat)/rerth + + do locl=1,ls_max_node + l=gis_stochy%ls_node(locl,1) + jbasev=gis_stochy%ls_node(locl,2) + jbasod=gis_stochy%ls_node(locl,3) + indev1 = indlsev(L,L) + indod1 = indlsod(L+1,L) + if (mod(L,2).eq.mod(jcap+1,2)) then + indev2 = indlsev(jcap+1,L) + indod2 = indlsod(jcap ,L) + else + indev2 = indlsev(jcap ,L) + indod2 = indlsod(jcap+1,L) + endif + do indev = indev1 , indev2 + gis_stochy%plnew_a(indev,lat) = gis_stochy%plnev_a(indev,lat) * wgt_a(lat) + enddo + + do indod = indod1 , indod2 + gis_stochy%plnow_a(indod,lat) = gis_stochy%plnod_a(indod,lat) * wgt_a(lat) + enddo + enddo + enddo + return + end + +!>@brief The subroutine 'setlats_a_stochy' selects the latitude points on this task +!>@details This code is taken from the legacy spectral GFS + subroutine setlats_a_stochy(gis_stochy) +! + implicit none +! + type(stochy_internal_state), intent(inout) :: gis_stochy + + integer :: nodesio, & + jcount,jpt,lat,lats_sum,node,i,ii, & + ngrptg,ngrptl,ipe,irest,idp, & + ngrptgh,nodesioh +! + integer,allocatable :: lats_hold(:,:) +! + allocate ( lats_hold(latg,gis_stochy%nodes) ) +! + gis_stochy%lats_nodes_a = 0 + nodesio = gis_stochy%nodes +! + ngrptg = 0 + do lat=1,latg + do i=1,lonf + ngrptg = ngrptg + 1 + enddo + enddo + +! +! ngrptg contains total number of grid points. +! +! distribution of the grid + nodesioh = nodesio / 2 + + if (nodesioh*2 /= nodesio) then + ngrptl = 0 + ipe = 0 + irest = 0 + idp = 1 + + do lat=1,latg + ngrptl = ngrptl + lonf + + if (ngrptl*nodesio <= ngrptg+irest) then + gis_stochy%lats_nodes_a(ipe+1) = gis_stochy%lats_nodes_a(ipe+1) + 1 + lats_hold(idp,ipe+1) = lat + idp = idp + 1 + else + ipe = ipe + 1 + if (ipe <= nodesio) lats_hold(1,ipe+1) = lat + idp = 2 + irest = irest + ngrptg - (ngrptl-lonf)*nodesio + ngrptl = lonf + gis_stochy%lats_nodes_a(ipe+1) = gis_stochy%lats_nodes_a(ipe+1) + 1 + endif + enddo + else + nodesioh = nodesio/2 + ngrptgh = ngrptg/2 + ngrptl = 0 + ipe = 0 + irest = 0 + idp = 1 + + do lat=1,latg/2 + ngrptl = ngrptl + lonf + + if (ngrptl*nodesioh <= ngrptgh+irest .or. lat == latg/2) then + gis_stochy%lats_nodes_a(ipe+1) = gis_stochy%lats_nodes_a(ipe+1) + 1 + lats_hold(idp,ipe+1) = lat + idp = idp + 1 + else + ipe = ipe + 1 + if (ipe <= nodesioh) then + lats_hold(1,ipe+1) = lat + endif + idp = 2 + irest = irest + ngrptgh - (ngrptl-lonf)*nodesioh + ngrptl = lonf + gis_stochy%lats_nodes_a(ipe+1) = gis_stochy%lats_nodes_a(ipe+1) + 1 + endif + enddo + do node=1, nodesioh + ii = nodesio-node+1 + jpt = gis_stochy%lats_nodes_a(node) + gis_stochy%lats_nodes_a(ii) = jpt + do i=1,jpt + lats_hold(jpt+1-i,ii) = latg+1-lats_hold(i,node) + enddo + enddo + + + endif +!! +!!........................................................ +!! + jpt = 0 + do node=1,nodesio + if ( gis_stochy%lats_nodes_a(node) > 0 ) then + do jcount=1,gis_stochy%lats_nodes_a(node) + gis_stochy%global_lats_a(jpt+jcount) = lats_hold(jcount,node) + enddo + endif + jpt = jpt + gis_stochy%lats_nodes_a(node) + enddo + + deallocate (lats_hold) + + return + end + +!>@brief The subroutine 'glats_stochy' calculate the latitudes for the gaussian grid +!>@details This code is taken from the legacy spectral GFS + subroutine glats_stochy(lgghaf,colrad,wgt,rcs2) +! +! Jan 2013 Henry Juang increase precision by kind_qdt_prec=16 +! to help wgt (Gaussian weighting) + implicit none + integer iter,k,k1,l2,lgghaf +! +! increase precision for more significant digit to help wgt + real(kind=kind_qdt_prec) drad,dradz,p1,p2,phi,pi,rad,rc + real(kind=kind_qdt_prec) rl2,scale,si,sn,w,x + real(kind=kind_dbl_prec), dimension(lgghaf) :: colrad, wgt, rcs2 +! + real(kind=kind_dbl_prec), parameter :: cons0 = 0.d0, cons1 = 1.d0, & + cons2 = 2.d0, cons4 = 4.d0, & + cons180 = 180.d0, & + cons0p25 = 0.25d0 +#ifdef NO_QUAD_PRECISION + real(kind=kind_qdt_prec), parameter :: eps = 1.d-12 +#else + real(kind=kind_qdt_prec), parameter :: eps = 1.d-20 +#endif + +! +! for better accuracy to select smaller number +! eps = 1.d-12 +! eps = 1.d-20 +! + si = cons1 + l2 = 2*lgghaf + rl2 = l2 + scale = cons2/(rl2*rl2) + k1 = l2-1 + pi = atan(si)*cons4 + +! for better accuracy to start iteration + dradz = pi / float(lgghaf) / 200.0 + rad = cons0 + do k=1,lgghaf + iter = 0 + drad = dradz +1 call poly(l2,rad,p2) +2 p1 = p2 + iter = iter + 1 + rad = rad + drad + call poly(l2,rad,p2) + if(sign(si,p1) == sign(si,p2)) go to 2 + if(drad < eps)go to 3 + rad = rad-drad + drad = drad * cons0p25 + go to 1 +3 continue + colrad(k) = rad + phi = rad * cons180 / pi + call poly(k1,rad,p1) + x = cos(rad) + w = scale * (cons1 - x*x)/ (p1*p1) + wgt(k) = w + sn = sin(rad) + w = w/(sn*sn) + rc = cons1/(sn*sn) + rcs2(k) = rc + call poly(l2,rad,p1) + enddo +! + return + end + +!>@brief The subroutine 'poly' does something with latitudes +!>@details This code is taken from the legacy spectral GFS + subroutine poly(n,rad,p) +! + implicit none + integer i,n +! +! increase precision for more significant digit to help wgt + real(kind=kind_qdt_prec) floati,g,p,rad,x,y1,y2,y3 +! + real(kind=kind_dbl_prec), parameter :: cons1 = 1.d0 +! + x = cos(rad) + y1 = cons1 + y2 = x + do i=2,n + g = x*y2 + floati = i + y3 = g - y1 + g - (g-y1)/floati + y1 = y2 + y2 = y3 + enddo + p = y3 + return + end + +!>@brief The subroutine 'pln2eo_a_stochy' calculates the assoicated legendre polynomials +!>@details This code is taken from the legacy spectral GFS + subroutine pln2eo_a_stochy(gis_stochy,num_lat) +! +! use x-number method to archieve accuracy due to recursive to avoid +! underflow and overflow if necessary by henry juang 2012 july +! + implicit none +! +! define x number constant for real8 start + type(stochy_internal_state), intent(inout) :: gis_stochy + integer, intent(in) :: num_lat + integer, parameter :: in_f = 960 , in_h = in_f/2 + real(kind=kind_dbl_prec), parameter :: bb_f = 2.d0 ** ( in_f ) + real(kind=kind_dbl_prec), parameter :: bs_f = 2.d0 ** (-in_f ) + real(kind=kind_dbl_prec), parameter :: bb_h = 2.d0 ** ( in_h ) + real(kind=kind_dbl_prec), parameter :: bs_h = 2.d0 ** (-in_h ) +! define x number constant end + +!cmr ls_node(1,1) ... ls_node(ls_max_node,1) : values of L +!cmr ls_node(1,2) ... ls_node(ls_max_node,2) : values of jbasev +!cmr ls_node(1,3) ... ls_node(ls_max_node,3) : values of jbasod + integer l,lat,locl,max_l,n + integer indev + integer indod +! need index for alp to be x-number + integer id, ialp1, ialp2, ialp3, iprod + integer ialp10(0:jcap) + real(kind=kind_dbl_prec) aa, bb, w + + real(kind=kind_dbl_prec) alp1,alp2,alp3 + real(kind=kind_dbl_prec) cos2,fl,prod,sinlat,coslat + real(kind=kind_dbl_prec) alp10(0:jcap) + real(kind=kind_dbl_prec) cons0,cons0p5,cons1,cons2,cons3 !constant + integer indlsev,jbasev + integer indlsod,jbasod + + include 'function2' + + cons0=0.0d0 !constant + cons0p5=0.5d0 !constant + cons1=1.0d0 !constant + cons2=2.0d0 !constant + cons3=3.0d0 !constant + + max_l=-1 + do locl=1,ls_max_node + max_l = max ( max_l, gis_stochy%ls_node(locl,1) ) + enddo + + do lat=1,num_lat + + sinlat = cos(colrad_a(lat)) + cos2=cons1-sinlat*sinlat !constant + coslat = sqrt(cos2) + +! use x number for alp10 + alp10(0) = sqrt(0.5) + ialp10(0) = 0 + + do l=1,max_l + fl = l + prod=coslat*sqrt(cons1+cons1/(cons2*fl)) + iprod=0 + w = abs(prod) + if( w.ge.bb_h ) then + prod = prod * bs_f + iprod = iprod + 1 + elseif( w.lt.bs_h ) then + prod = prod * bb_f + iprod = iprod - 1 + endif + alp10(l)=alp10(l-1)*prod + ialp10(l)=ialp10(l-1)+iprod + w = abs(alp10(l)) + if( w.ge.bb_h ) then + alp10(l) = alp10(l) * bs_f + ialp10(l) = ialp10(l) + 1 + elseif( w.lt.bs_h ) then + alp10(l) = alp10(l) * bb_f + ialp10(l) = ialp10(l) - 1 + endif + enddo + + do locl=1,ls_max_node + l=gis_stochy%ls_node(locl,1) + jbasev=gis_stochy%ls_node(locl,2) + jbasod=gis_stochy%ls_node(locl,3) + n=l + fl=l +! get m=normalized x number for alp1 start + alp1=alp10(l) + ialp1=ialp10(l) + + indev=indlsev(n ,l) + indod=indlsod(n+1,l) +! x2f start + if( ialp1.eq.0 ) then + gis_stochy%plnev_a(indev ,lat)=alp1 + elseif( ialp1.eq.-1 ) then + gis_stochy%plnev_a(indev ,lat)=alp1 * bs_f + elseif( ialp1.lt.-1 ) then + gis_stochy%plnev_a(indev ,lat)=0.0 + else + gis_stochy%plnev_a(indev ,lat)=alp1 * bb_f + endif +! x2f end + +! xltime alp2=sqrt(cons2*fl+cons3)*sinlat*alp1 !constant +! xltime start + prod=sqrt(cons2*fl+cons3)*sinlat + iprod=0 + w = abs(prod) + if( w.ge.bb_h ) then + prod = prod * bs_f + iprod = iprod + 1 + elseif( w.lt.bs_h ) then + prod = prod * bb_f + iprod = iprod - 1 + endif + alp2=alp1*prod + ialp2 = ialp1 + iprod +! xltime end +! norm alp2 start + w = abs(alp2) + if( w.ge.bb_h ) then + alp2 = alp2*bs_f + ialp2 = ialp2 + 1 + elseif( w.lt.bs_h ) then + alp2 = alp2*bb_f + ialp2 = ialp2 - 1 + endif +! norm alp2 end + +! x2f start + if( ialp2.eq.0 ) then + gis_stochy%plnod_a(indod ,lat)=alp2 + elseif( ialp2.eq.-1 ) then + gis_stochy%plnod_a(indod ,lat)=alp2 * bs_f + elseif( ialp2.lt.-1 ) then + gis_stochy%plnod_a(indod ,lat)=0.0 + else + gis_stochy%plnod_a(indod ,lat)=alp2 * bb_f + endif +! x2f end + + do n=l+2,jcap+1 + if(mod(n+l,2).eq.0) then + indev=indev+1 +! xlsum2 start + aa = sinlat / gis_stochy%epse(indev) + bb = gis_stochy%epso(indod) / gis_stochy%epse(indev) + id = ialp2 - ialp1 + if( id.eq.0 ) then + alp3 = aa*alp2 - bb*alp1 + ialp3 = ialp1 + elseif( id.eq.1 ) then + alp3 = aa*alp2 - bb*alp1*bs_f + ialp3 = ialp2 + elseif( id.eq.-1 ) then + alp3 = aa*alp2*bs_f - bb*alp1 + ialp3 = ialp1 + elseif( id.gt.1 ) then + alp3 = aa*alp2 + ialp3 = ialp2 + else + alp3 = - bb*alp1 + ialp3 = ialp1 + endif +! xlsum2 end +! xnorm alp3 start + w = abs(alp3) + if( w.ge.bb_h ) then + alp3 = alp3*bs_f + ialp3 = ialp3 + 1 + elseif( w.lt.bs_h ) then + alp3 = alp3*bb_f + ialp3 = ialp3 - 1 + endif +! xnorm alp3 end + +! x2f alp3 start + if( ialp3.eq.0 ) then + gis_stochy%plnev_a(indev,lat)=alp3 + elseif( ialp3.eq.-1 ) then + gis_stochy%plnev_a(indev,lat)=alp3 * bs_f + elseif( ialp3.lt.-1 ) then + gis_stochy%plnev_a(indev,lat)=0.0 + else + gis_stochy%plnev_a(indev,lat)=alp3 * bb_f + endif +! x2f alp3 end + + else + indod=indod+1 + +! xlsum2 start + aa = sinlat / gis_stochy%epso(indod) + bb = gis_stochy%epse(indev) / gis_stochy%epso(indod) + id = ialp2 - ialp1 + if( id.eq.0 ) then + alp3 = aa*alp2 - bb*alp1 + ialp3 = ialp1 + elseif( id.eq.1 ) then + alp3 = aa*alp2 - bb*alp1*bs_f + ialp3 = ialp2 + elseif( id.eq.-1 ) then + alp3 = aa*alp2*bs_f - bb*alp1 + ialp3 = ialp1 + elseif( id.gt.1 ) then + alp3 = aa*alp2 + ialp3 = ialp2 + else + alp3 = - bb*alp1 + ialp3 = ialp1 + endif +! xlsum2 end +! xnorm alp3 start + w = abs(alp3) + if( w.ge.bb_h ) then + alp3 = alp3*bs_f + ialp3 = ialp3 + 1 + elseif( w.lt.bs_h ) then + alp3 = alp3*bb_f + ialp3 = ialp3 - 1 + endif +! xnorm alp3 end + +! x2f alp3 start + if( ialp3.eq.0 ) then + gis_stochy%plnod_a(indod,lat)=alp3 + elseif( ialp3.eq.-1 ) then + gis_stochy%plnod_a(indod,lat)=alp3 * bs_f + elseif( ialp3.lt.-1 ) then + gis_stochy%plnod_a(indod,lat)=0.0 + else + gis_stochy%plnod_a(indod,lat)=alp3 * bb_f + endif +! x2f alp3 end + endif + alp1=alp2 + alp2=alp3 + ialp1 = ialp2 + ialp2 = ialp3 + enddo + enddo + enddo + + return + end + +!>@brief The subroutine 'epslon_stochy' calculate coeffients for use in spectral space +!>@details This code is taken from the legacy spectral GFS + subroutine epslon_stochy(gis_stochy) + + implicit none + + type(stochy_internal_state), intent(inout) :: gis_stochy + + integer ls_node(ls_dim,3) + +!cmr ls_node(1,1) ... ls_node(ls_max_node,1) : values of L +!cmr ls_node(1,2) ... ls_node(ls_max_node,2) : values of jbasev +!cmr ls_node(1,3) ... ls_node(ls_max_node,3) : values of jbasod + + integer l,locl,n + + integer indev + integer indod + + real(kind_dbl_prec) f1,f2,rn,val + + real(kind_dbl_prec) cons0 !constant + + integer indlsev,jbasev + integer indlsod,jbasod + + include 'function2' + + cons0=0.0d0 !constant +!c +!c...................................................................... +!c + do locl=1,ls_max_node + l=gis_stochy%ls_node(locl,1) + jbasev=gis_stochy%ls_node(locl,2) + indev=indlsev(l,l) + gis_stochy%epse (indev)=cons0 !constant + gis_stochy%epsedn(indev)=cons0 !constant + indev=indev+1 + + do n=l+2,jcap+1,2 + rn=n + f1=n*n-l*l + f2=4*n*n-1 + val=sqrt(f1/f2) + gis_stochy%epse (indev)=val + gis_stochy%epsedn(indev)=val/rn + indev=indev+1 + enddo + enddo + do locl=1,ls_max_node + l=gis_stochy%ls_node(locl,1) + jbasod=gis_stochy%ls_node(locl,3) + indod=indlsod(l+1,l) + + do n=l+1,jcap+1,2 + rn=n + f1=n*n-l*l + f2=4*n*n-1 + val=sqrt(f1/f2) + gis_stochy%epso (indod)=val + gis_stochy%epsodn(indod)=val/rn + indod=indod+1 + enddo + enddo + + return + end + end module spectral_transforms diff --git a/stochastic_physics/stochastic_physics.F90 b/stochastic_physics/stochastic_physics.F90 new file mode 100644 index 0000000000..f76b3d3711 --- /dev/null +++ b/stochastic_physics/stochastic_physics.F90 @@ -0,0 +1,567 @@ +!>@brief The module 'stochastic_physics' is for initialization and running of +!! the stochastic physics random pattern generators +module stochastic_physics + +use kinddef, only : kind_dbl_prec + +implicit none + +private + +public :: init_stochastic_physics,init_stochastic_physics_ocn +public :: run_stochastic_physics,run_stochastic_physics_ocn +public :: finalize_stochastic_physics + +contains + +!>@brief The subroutine 'init_stochastic_physics' initializes the stochastic +!!pattern genertors +!>@details It reads the stochastic physics namelist (nam_stoch and nam_sfcperts) +!allocates and polulates the necessary arrays + +subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in, fn_nml, nlunit, & + xlon,xlat, & + do_sppt_in, do_shum_in, do_skeb_in, lndp_type_in, n_var_lndp_in, use_zmtnblck_out, skeb_npass_out, & + lndp_var_list_out, lndp_prt_list_out, & + n_var_spp_in, spp_var_list_out, spp_prt_list_out, spp_stddev_cutoff_out, do_spp_in, & + ak, bk, nthreads, mpiroot, mpicomm, iret) +!\callgraph +!use stochy_internal_state_moa +use stochy_data_mod, only : init_stochdata,gg_lats,gg_lons,nsppt, & + rad2deg,INTTYP,wlon,rnlat,gis_stochy, & + vfact_skeb,vfact_sppt,vfact_shum,skeb_vpts,skeb_vwts,sl, & + nspp, vfact_spp +use stochy_namelist_def +use spectral_transforms,only:colrad_a,latg,lonf,skeblevs +use mpi_wrapper, only : mpi_wrapper_initialize,mype,npes,is_rootpe + +implicit none +integer, intent(out) :: iret + +! Interface variables + +integer, intent(in) :: levs, nlunit, nthreads, mpiroot, mpicomm +integer, intent(in) :: blksz(:) +real(kind=kind_dbl_prec), intent(in) :: dtp +real(kind=kind_dbl_prec), intent(out) :: sppt_amp +character(len=*), intent(in) :: input_nml_file_in(:) +character(len=*), intent(in) :: fn_nml +real(kind=kind_dbl_prec), intent(in) :: xlon(:,:) +real(kind=kind_dbl_prec), intent(in) :: xlat(:,:) +logical, intent(in) :: do_sppt_in, do_shum_in, do_skeb_in ,do_spp_in +integer, intent(in) :: lndp_type_in, n_var_lndp_in +integer, intent(in) :: n_var_spp_in +real(kind=kind_dbl_prec), intent(in) :: ak(:), bk(:) +logical, intent(out) :: use_zmtnblck_out +integer, intent(out) :: skeb_npass_out +character(len=3), dimension(:), intent(out) :: lndp_var_list_out +real(kind=kind_dbl_prec), dimension(:), intent(out) :: lndp_prt_list_out +character(len=3), dimension(:), intent(out) :: spp_var_list_out +real(kind=kind_dbl_prec), dimension(:), intent(out) :: spp_prt_list_out +real(kind=kind_dbl_prec), dimension(:), intent(out) :: spp_stddev_cutoff_out + + +! Local variables +real(kind=kind_dbl_prec), parameter :: con_pi =4.0d0*atan(1.0d0) +integer :: nblks,len +real*8 :: PRSI(levs),PRSL(levs),dx +real, allocatable :: skeb_vloc(:) +integer :: k,kflip,latghf,blk,k2,v,i +character*2::proc + +! Initialize MPI and OpenMP +call mpi_wrapper_initialize(mpiroot,mpicomm) +gis_stochy%nodes = npes +gis_stochy%mype=mype +gis_stochy%nx=maxval(blksz) +nblks = size(blksz) +gis_stochy%ny=nblks +rad2deg=180.0/con_pi + +! ------------------------------------------ + +nblks = size(blksz) +allocate(gis_stochy%len(nblks)) +allocate(gis_stochy%parent_lons(gis_stochy%nx,gis_stochy%ny)) +allocate(gis_stochy%parent_lats(gis_stochy%nx,gis_stochy%ny)) +do blk=1,nblks + len=blksz(blk) + gis_stochy%parent_lons(1:len,blk)=xlon(blk,1:len)*rad2deg + gis_stochy%parent_lats(1:len,blk)=xlat(blk,1:len)*rad2deg + gis_stochy%len(blk)=len +enddo + +! replace +INTTYP=0 ! bilinear interpolation +call init_stochdata(levs,dtp,input_nml_file_in,fn_nml,nlunit,iret) +if (iret .ne. 0) return +! check namelist entries for consistency +if (do_sppt_in.neqv.do_sppt) then + write(0,'(*(a))') 'Logic error in stochastic_physics_init: incompatible', & + & ' namelist settings do_sppt and sppt' + iret = 20 + return +else if (do_shum_in.neqv.do_shum) then + write(0,'(*(a))') 'Logic error in stochastic_physics_init: incompatible', & + & ' namelist settings do_shum and shum' + iret = 20 + return +else if (do_skeb_in.neqv.do_skeb) then + write(0,'(*(a))') 'Logic error in stochastic_physics_init: incompatible', & + & ' namelist settings do_skeb and skeb' + iret = 20 + return +else if (lndp_type_in /= lndp_type) then + write(0,'(*(a))') 'Logic error in stochastic_physics_init: incompatible', & + & ' namelist settings lndp_type in physics and nam_sfcperts' + iret = 20 + return +else if (n_var_lndp_in /= n_var_lndp) then + write(0,'(*(a))') 'Logic error in stochastic_physics_init: incompatible', & + & ' namelist settings n_var_lndp in physics nml, and lndp_* in nam_sfcperts' + iret = 20 + return +else if (n_var_spp_in .ne. n_var_spp) then + write(0,'(*(a))') 'Logic error in stochastic_physics_init: incompatible', & + & ' namelist settings n_var_spp in physics nml, and spp_* in nam_sppperts' + write(0,*) 'n_var_spp, n_var_spp_in', n_var_spp, n_var_spp_in + iret = 20 + return +else if (do_spp_in.neqv.do_spp) then + write(0,'(*(a))') 'Logic error in stochastic_physics_init: incompatible', & + & ' namelist settings do_spp and spp' + iret = 20 + return +end if +! update remaining model configuration parameters from namelist +use_zmtnblck_out=use_zmtnblck +skeb_npass_out=skeb_npass +if (n_var_lndp>0) then + lndp_var_list_out=lndp_var_list(1:n_var_lndp) + lndp_prt_list_out=lndp_prt_list(1:n_var_lndp) +endif +if (n_var_spp>0) then + spp_var_list_out=spp_var_list(1:n_var_spp) + spp_prt_list_out=spp_prt_list(1:n_var_spp) + spp_stddev_cutoff_out=spp_stddev_cutoff(1:n_var_spp) +endif +if ( (.NOT. do_sppt) .AND. (.NOT. do_shum) .AND. (.NOT. do_skeb) .AND. (lndp_type==0) .AND. (.NOT. do_spp)) return +allocate(sl(levs)) +do k=1,levs + sl(k)= 0.5*(ak(k)/101300.+bk(k)+ak(k+1)/101300.0+bk(k+1)) ! si are now sigmas +enddo +if (do_sppt) then + allocate(vfact_sppt(levs)) + do k=1,levs + if (sl(k) .lt. sppt_sigtop1 .and. sl(k) .gt. sppt_sigtop2) then + vfact_sppt(k) = (sl(k)-sppt_sigtop2)/(sppt_sigtop1-sppt_sigtop2) + else if (sl(k) .lt. sppt_sigtop2) then + vfact_sppt(k) = 0.0 + else + vfact_sppt(k) = 1.0 + endif + enddo + if (sppt_sfclimit) then + vfact_sppt(2)=vfact_sppt(3)*0.5 + vfact_sppt(1)=0.0 + endif + if (is_rootpe()) then + do k=1,levs + print *,'sppt vert profile',k,sl(k),vfact_sppt(k) + enddo + endif + sppt_amp=sqrt(SUM(sppt(1:nsppt)**2)) +endif +if (do_skeb) then + allocate(vfact_skeb(levs)) + allocate(skeb_vloc(skeblevs)) ! local + allocate(skeb_vwts(levs,2)) ! save for later + allocate(skeb_vpts(levs,2)) ! save for later + do k=1,levs + if (sl(k) .lt. skeb_sigtop1 .and. sl(k) .gt. skeb_sigtop2) then + vfact_skeb(k) = (sl(k)-skeb_sigtop2)/(skeb_sigtop1-skeb_sigtop2) + else if (sl(k) .lt. skeb_sigtop2) then + vfact_skeb(k) = 0.0 + else + vfact_skeb(k) = 1.0 + endif + if (is_rootpe()) print *,'skeb vert profile',k,sl(k),vfact_skeb(k) + enddo +! calculate vertical interpolation weights + do k=1,skeblevs + skeb_vloc(k)=sl(1)-real(k-1)/real(skeblevs-1.0)*(sl(1)-sl(levs)) + enddo +! surface +skeb_vwts(1,2)=0 +skeb_vpts(1,1)=1 +! top +skeb_vwts(levs,2)=1 +skeb_vpts(levs,1)=skeblevs-2 +! internal +DO k=2,levs-1 + DO k2=1,skeblevs-1 + IF (sl(k) .LE. skeb_vloc(k2) .AND. sl(k) .GT. skeb_vloc(k2+1)) THEN + skeb_vpts(k,1)=k2 + skeb_vwts(k,2)=(skeb_vloc(k2)-sl(k))/(skeb_vloc(k2)-skeb_vloc(k2+1)) + ENDIF + ENDDO +ENDDO +deallocate(skeb_vloc) +if (is_rootpe()) then +DO k=1,levs + print*,'skeb vpts ',skeb_vpts(k,1),skeb_vwts(k,2) +ENDDO +endif +skeb_vwts(:,1)=1.0-skeb_vwts(:,2) +skeb_vpts(:,2)=skeb_vpts(:,1)+1.0 +endif + +if (do_shum) then + allocate(vfact_shum(levs)) + do k=1,levs + vfact_shum(k) = exp((sl(k)-1.)/shum_sigefold) + if (sl(k).LT. 2*shum_sigefold) then + vfact_shum(k)=0.0 + endif + if (is_rootpe()) print *,'shum vert profile',k,sl(k),vfact_shum(k) + enddo +endif +if (do_spp) then + allocate(vfact_spp(levs)) + do k=1,levs + if (sl(k) .lt. spp_sigtop1(1) .and. sl(k) .gt. spp_sigtop2(1)) then + vfact_spp(k) = (sl(k)-spp_sigtop2(1))/(spp_sigtop1(1)-spp_sigtop2(1)) + else if (sl(k) .lt. spp_sigtop2(1)) then + vfact_spp(k) = 0.0 + else + vfact_spp(k) = 1.0 + endif + if (is_rootpe()) print *,'spp vert profile',k,sl(k),vfact_spp(k) + enddo +endif +! get interpolation weights +! define gaussian grid lats and lons +latghf=latg/2 +allocate(gg_lats(latg)) +allocate(gg_lons(lonf)) +do k=1,latghf + gg_lats(k)=-1.0*colrad_a(latghf-k+1)*rad2deg + gg_lats(latg-k+1)=-1*gg_lats(k) +enddo +dx=360.0/lonf +do k=1,lonf + gg_lons(k)=dx*(k-1) +enddo +WLON=gg_lons(1)-(gg_lons(2)-gg_lons(1)) +RNLAT=gg_lats(1)*2-gg_lats(2) + +end subroutine init_stochastic_physics + +!!!!!!!!!!!!!!!!!!!! +subroutine init_stochastic_physics_ocn(delt,geoLonT,geoLatT,nx,ny,nz,pert_epbl_in,do_sppt_in, & + mpiroot, mpicomm, iret) +use stochy_data_mod, only : init_stochdata_ocn,gg_lats,gg_lons,& + rad2deg,INTTYP,wlon,rnlat,gis_stochy_ocn +use spectral_transforms , only : latg,lonf,colrad_a +!use MOM_grid, only : ocean_grid_type +use stochy_namelist_def +use mersenne_twister, only: random_gauss +use mpi_wrapper, only : mpi_wrapper_initialize,mype,npes,is_rootpe + +implicit none +real,intent(in) :: delt +integer,intent(in) :: nx,ny,nz +real,intent(in) :: geoLonT(nx,ny),geoLatT(nx,ny) +logical,intent(in) :: pert_epbl_in,do_sppt_in +integer,intent(in) :: mpiroot, mpicomm +integer, intent(out) :: iret +real(kind=kind_dbl_prec), parameter :: con_pi =4.0d0*atan(1.0d0) + +real :: dx +integer :: k,latghf,km +rad2deg=180.0/con_pi +call mpi_wrapper_initialize(mpiroot,mpicomm) +gis_stochy_ocn%nodes = npes +gis_stochy_ocn%mype = mype +gis_stochy_ocn%nx=nx +gis_stochy_ocn%ny=ny +allocate(gis_stochy_ocn%len(ny)) +allocate(gis_stochy_ocn%parent_lons(nx,ny)) +allocate(gis_stochy_ocn%parent_lats(nx,ny)) +gis_stochy_ocn%len(:)=nx +gis_stochy_ocn%parent_lons=geoLonT +gis_stochy_ocn%parent_lats=geoLatT + +INTTYP=0 ! bilinear interpolation +km=nz +call init_stochdata_ocn(km,delt,iret) +if (do_sppt_in.neqv.do_ocnsppt) then + write(0,'(*(a))') 'Logic error in stochastic_physics_ocn_init: incompatible', & + & ' namelist settings do_sppt and sppt' + iret = 20 + return +else if (pert_epbl_in.neqv.pert_epbl) then + write(0,'(*(a))') 'Logic error in stochastic_physics_ocn_init: incompatible', & + & ' namelist settings pert_epbl and epbl' + iret = 20 + return +end if + +! get interpolation weights +! define gaussian grid lats and lons +latghf=latg/2 +allocate(gg_lats(latg)) +allocate(gg_lons(lonf)) +do k=1,latghf + gg_lats(k)=-1.0*colrad_a(latghf-k+1)*rad2deg + gg_lats(latg-k+1)=-1*gg_lats(k) +enddo +dx=360.0/lonf +do k=1,lonf + gg_lons(k)=dx*(k-1) +enddo +WLON=gg_lons(1)-(gg_lons(2)-gg_lons(1)) +RNLAT=gg_lats(1)*2-gg_lats(2) +end subroutine init_stochastic_physics_ocn + +!!!!!!!!!!!!!!!!!!!! + + +!>@brief The subroutine 'run_stochastic_physics' updates the random patterns if +!!necessary +!>@details It updates the AR(1) in spectral space +!allocates and polulates the necessary arrays + +subroutine run_stochastic_physics(levs, kdt, fhour, blksz, sppt_wts, shum_wts, skebu_wts, & + skebv_wts, sfc_wts, spp_wts, nthreads) + +!\callgraph +!use stochy_internal_state_mod +use stochy_data_mod, only : nshum,rpattern_shum,rpattern_sppt,nsppt,rpattern_skeb,nskeb,& + gis_stochy,vfact_sppt,vfact_shum,vfact_skeb, rpattern_sfc, nlndp, & + rpattern_spp, nspp, vfact_spp +use get_stochy_pattern_mod,only : get_random_pattern_scalar,get_random_pattern_vector, & + get_random_pattern_sfc,get_random_pattern_spp +use stochy_namelist_def, only : do_shum,do_sppt,do_skeb,nssppt,nsshum,nsskeb,sppt_logit, & + lndp_type, n_var_lndp, n_var_spp, do_spp, spp_stddev_cutoff, spp_prt_list +use mpi_wrapper, only: is_rootpe +implicit none + +! Interface variables +integer, intent(in) :: levs, kdt +real(kind=kind_dbl_prec), intent(in) :: fhour +integer, intent(in) :: blksz(:) +real(kind=kind_dbl_prec), intent(inout) :: sppt_wts(:,:,:) +real(kind=kind_dbl_prec), intent(inout) :: shum_wts(:,:,:) +real(kind=kind_dbl_prec), intent(inout) :: skebu_wts(:,:,:) +real(kind=kind_dbl_prec), intent(inout) :: skebv_wts(:,:,:) +real(kind=kind_dbl_prec), intent(inout) :: sfc_wts(:,:,:) +real(kind=kind_dbl_prec), intent(inout) :: spp_wts(:,:,:,:) +integer, intent(in) :: nthreads + +real,allocatable :: tmp_wts(:,:),tmpu_wts(:,:,:),tmpv_wts(:,:,:),tmpl_wts(:,:,:),tmp_spp_wts(:,:,:) +!D-grid +integer :: k,v +integer j,ierr,i +integer :: nblks, blk, len, maxlen +character*120 :: sfile +character*6 :: STRFH +logical :: do_advance_pattern + +if ( (.NOT. do_sppt) .AND. (.NOT. do_shum) .AND. (.NOT. do_skeb) .AND. (lndp_type==0 ) .AND. (n_var_spp .le. 0)) return + +! Update number of threads in shared variables in spectral_layout_mod and set block-related variables +nblks = size(blksz) +maxlen = maxval(blksz(:)) + + +if ( (lndp_type==1) .and. (kdt==0) ) then ! old land pert scheme called once at start + write(0,*) 'calling get_random_pattern_sfc' + allocate(tmpl_wts(nblks,maxlen,n_var_lndp)) + call get_random_pattern_sfc(rpattern_sfc,nlndp,gis_stochy,tmpl_wts) + DO blk=1,nblks + len=blksz(blk) + ! for perturbing vars or states, saved value is N(0,1) and apply scaling later. + DO k=1,n_var_lndp + !sfc_wts(blk,1:len,k) = tmpl_wts(blk,1:len,k) + sfc_wts(blk,1:len,k) = tmpl_wts(1:len,blk,k) + ENDDO + ENDDO + deallocate(tmpl_wts) +endif +allocate(tmp_wts(gis_stochy%nx,gis_stochy%ny)) +allocate(tmpu_wts(gis_stochy%nx,gis_stochy%ny,levs)) +allocate(tmpv_wts(gis_stochy%nx,gis_stochy%ny,levs)) +if (do_sppt) then + if (mod(kdt,nssppt) == 1 .or. nssppt == 1) then + call get_random_pattern_scalar(rpattern_sppt,nsppt,gis_stochy,tmp_wts) + DO blk=1,nblks + len=blksz(blk) + DO k=1,levs + !sppt_wts(blk,1:len,k)=tmp_wts(blk,1:len)*vfact_sppt(k) + sppt_wts(blk,1:len,k)=tmp_wts(1:len,blk)*vfact_sppt(k) + ENDDO + if (sppt_logit) sppt_wts(blk,:,:) = (2./(1.+exp(sppt_wts(blk,:,:))))-1. + sppt_wts(blk,:,:) = sppt_wts(blk,:,:)+1.0 + ENDDO + endif +endif +if (do_shum) then + if (mod(kdt,nsshum) == 1 .or. nsshum == 1) then + call get_random_pattern_scalar(rpattern_shum,nshum,gis_stochy,tmp_wts) + DO blk=1,nblks + len=blksz(blk) + DO k=1,levs + shum_wts(blk,1:len,k)=tmp_wts(1:len,blk)*vfact_shum(k) + ENDDO + ENDDO + endif +endif +if (do_skeb) then + if (mod(kdt,nsskeb) == 1 .or. nsskeb == 1) then + call get_random_pattern_vector(rpattern_skeb,nskeb,gis_stochy,tmpu_wts,tmpv_wts) + DO blk=1,nblks + len=blksz(blk) + DO k=1,levs + skebu_wts(blk,1:len,k)=tmpu_wts(1:len,blk,k)*vfact_skeb(k) + skebv_wts(blk,1:len,k)=tmpv_wts(1:len,blk,k)*vfact_skeb(k) + ENDDO + ENDDO + endif +endif +if ( lndp_type .EQ. 2 ) then + ! add time check? + allocate(tmpl_wts(gis_stochy%nx,gis_stochy%ny,n_var_lndp)) + call get_random_pattern_sfc(rpattern_sfc,nlndp,gis_stochy,tmpl_wts) + DO blk=1,nblks + len=blksz(blk) + ! for perturbing vars or states, saved value is N(0,1) and apply scaling later. + DO k=1,n_var_lndp + sfc_wts(blk,1:len,k) = tmpl_wts(1:len,blk,k) + ENDDO + ENDDO + deallocate(tmpl_wts) +endif +if (n_var_spp .GE. 1) then + allocate(tmp_spp_wts(gis_stochy%nx,gis_stochy%ny,n_var_spp)) + call get_random_pattern_spp(rpattern_spp,nspp,gis_stochy,tmp_spp_wts) + DO v=1,n_var_spp + DO blk=1,nblks + len=blksz(blk) + DO k=1,levs + if (spp_stddev_cutoff(v).gt.0.0) then + spp_wts(blk,1:len,k,v)=MAX(MIN(tmp_spp_wts(1:len,blk,v)*vfact_spp(k),spp_stddev_cutoff(v)),-1.0*spp_stddev_cutoff(v))*spp_prt_list(v) + else + spp_wts(blk,1:len,k,v)=tmp_spp_wts(1:len,blk,v)*vfact_spp(k)*spp_prt_list(v) + endif + ENDDO + ENDDO + ENDDO + deallocate(tmp_spp_wts) +endif + deallocate(tmp_wts) + deallocate(tmpu_wts) + deallocate(tmpv_wts) + + +end subroutine run_stochastic_physics + +subroutine run_stochastic_physics_ocn(sppt_wts,t_rp1,t_rp2) +!use MOM_forcing_type, only : mech_forcing +!use MOM_grid, only : ocean_grid_type +use stochy_internal_state_mod +use stochy_data_mod, only : nepbl,nocnsppt,rpattern_epbl1,rpattern_epbl2,rpattern_ocnsppt, gis_stochy_ocn +use get_stochy_pattern_mod,only : get_random_pattern_scalar +use stochy_namelist_def +implicit none +!type(ocean_grid_type), intent(in) :: G +real, intent(inout) :: sppt_wts(:,:),t_rp1(:,:),t_rp2(:,:) +real, allocatable :: tmp_wts(:,:) +if (pert_epbl .OR. do_ocnsppt) then + allocate(tmp_wts(gis_stochy_ocn%nx,gis_stochy_ocn%ny)) + if (pert_epbl) then + call get_random_pattern_scalar(rpattern_epbl1,nepbl,gis_stochy_ocn,tmp_wts) + t_rp1(:,:)=2.0/(1+exp(-1*tmp_wts)) + call get_random_pattern_scalar(rpattern_epbl2,nepbl,gis_stochy_ocn,tmp_wts) + t_rp2(:,:)=2.0/(1+exp(-1*tmp_wts)) + else + t_rp1(:,:)=1.0 + t_rp2(:,:)=1.0 + endif + if (do_ocnsppt) then + call get_random_pattern_scalar(rpattern_ocnsppt,nocnsppt,gis_stochy_ocn,tmp_wts) + sppt_wts=2.0/(1+exp(-1*tmp_wts)) + else + sppt_wts=1.0 + endif + deallocate(tmp_wts) +else + sppt_wts(:,:)=1.0 + t_rp1(:,:)=1.0 + t_rp2(:,:)=1.0 +endif + +end subroutine run_stochastic_physics_ocn +subroutine finalize_stochastic_physics() +use stochy_data_mod, only : nshum,rpattern_shum,rpattern_sppt,nsppt,rpattern_skeb,nskeb,& + vfact_sppt,vfact_shum,vfact_skeb, skeb_vwts,skeb_vpts, & + rpattern_spp, vfact_spp, nspp, & + rpattern_sfc, nlndp,gg_lats,gg_lons,sl,skebu_save,skebv_save,gis_stochy +use spectral_transforms, only : lat1s_a ,lon_dims_a,wgt_a,sinlat_a,coslat_a,colrad_a,rcs2_a +implicit none + + if (allocated(gg_lats)) deallocate (gg_lats) + if (allocated(gg_lons)) deallocate (gg_lons) + if (allocated(sl)) deallocate (sl) + if (nsppt > 0) then + if (allocated(rpattern_sppt)) deallocate(rpattern_sppt) + if (allocated(vfact_sppt)) deallocate(vfact_sppt) + endif + if (nshum > 0) then + if (allocated(rpattern_shum)) deallocate(rpattern_shum) + if (allocated(vfact_shum)) deallocate(vfact_shum) + endif + if (nskeb > 0) then + if (allocated(rpattern_skeb)) deallocate(rpattern_skeb) + if (allocated(skeb_vwts)) deallocate (skeb_vwts) + if (allocated(skeb_vpts)) deallocate (skeb_vpts) + if (allocated(skebu_save)) deallocate (skebu_save) + if (allocated(skebv_save)) deallocate (skebv_save) + if (allocated(vfact_skeb)) deallocate(vfact_skeb) + endif + if (nlndp > 0) then + if (allocated(rpattern_sfc)) deallocate(rpattern_sfc) + endif + if (nspp > 0) then + if (allocated(rpattern_spp)) deallocate(rpattern_spp) + if (allocated(vfact_spp)) deallocate(vfact_spp) + endif + +deallocate(lat1s_a) +deallocate(lon_dims_a) +deallocate(wgt_a) +deallocate(rcs2_a) +deallocate(colrad_a) +deallocate(sinlat_a) +deallocate(coslat_a) +deallocate(gis_stochy%ls_node) +deallocate(gis_stochy%ls_nodes) +deallocate(gis_stochy%max_ls_nodes) +deallocate(gis_stochy%lats_nodes_a) +deallocate(gis_stochy%global_lats_a) +deallocate(gis_stochy%epse) +deallocate(gis_stochy%epso) +deallocate(gis_stochy%epsedn) +deallocate(gis_stochy%epsodn) +deallocate(gis_stochy%kenorm_e) +deallocate(gis_stochy%kenorm_o) +deallocate(gis_stochy%snnp1ev) +deallocate(gis_stochy%snnp1od) +deallocate(gis_stochy%plnev_a) +deallocate(gis_stochy%plnod_a) +deallocate(gis_stochy%plnew_a) +deallocate(gis_stochy%plnow_a) + +end subroutine finalize_stochastic_physics + +end module stochastic_physics diff --git a/stochastic_physics/stochy_data_mod.F90 b/stochastic_physics/stochy_data_mod.F90 new file mode 100644 index 0000000000..837587e30d --- /dev/null +++ b/stochastic_physics/stochy_data_mod.F90 @@ -0,0 +1,771 @@ +!>@brief The module 'stochy_data_mod' contains the initilization routine that read the stochastic phyiscs +!! namelist and determins the number of random patterns. +module stochy_data_mod + +! set up and initialize stochastic random patterns. + + use spectral_transforms, only: len_trie_ls,len_trio_ls,ls_dim,ls_max_node,& + skeblevs,levs,jcap,lonf,latg,initialize_spectral + use stochy_namelist_def + use constants_mod, only : radius + use mpi_wrapper, only: mp_bcst, is_rootpe, mype + use stochy_patterngenerator_mod, only: random_pattern, patterngenerator_init,& + getnoise, patterngenerator_advance,ndimspec,chgres_pattern,computevarspec_r + use stochy_internal_state_mod +! use mersenne_twister_stochy, only : random_seed + use mersenne_twister, only : random_seed + use compns_stochy_mod, only : compns_stochy + + implicit none + private + public :: init_stochdata,init_stochdata_ocn + + type(random_pattern), public, save, allocatable, dimension(:) :: & + rpattern_sppt,rpattern_shum,rpattern_skeb, rpattern_sfc,rpattern_epbl1,rpattern_epbl2,rpattern_ocnsppt,rpattern_spp + integer, public :: nepbl=0 + integer, public :: nocnsppt=0 + integer, public :: nsppt=0 + integer, public :: nshum=0 + integer, public :: nskeb=0 + integer, public :: nlndp=0 ! this is the number of different patterns (determined by the tau/lscale input) + integer, public :: nspp =0 ! this is the number of different patterns (determined by the tau/lscale input) + real*8, public,allocatable :: sl(:) + + real(kind=kind_dbl_prec),public, allocatable :: vfact_sppt(:),vfact_shum(:),vfact_skeb(:),vfact_spp(:) + real(kind=kind_dbl_prec),public, allocatable :: skeb_vwts(:,:) + integer ,public, allocatable :: skeb_vpts(:,:) + real(kind=kind_dbl_prec),public, allocatable :: gg_lats(:),gg_lons(:) + real(kind=kind_dbl_prec),public :: wlon,rnlat,rad2deg + real(kind=kind_dbl_prec),public, allocatable :: skebu_save(:,:,:),skebv_save(:,:,:) + integer,public :: INTTYP + type(stochy_internal_state),public :: gis_stochy,gis_stochy_ocn + + contains +!>@brief The subroutine 'init_stochdata' determins which stochastic physics +!!pattern genertors are needed. +!>@details it reads the nam_stochy namelist and allocates necessary arrays + subroutine init_stochdata(nlevs,delt,input_nml_file,fn_nml,nlunit,iret) +!\callgraph + +! initialize random patterns. + use netcdf + implicit none + integer, intent(in) :: nlunit,nlevs + character(len=*), intent(in) :: input_nml_file(:) + character(len=64), intent(in) :: fn_nml + real, intent(in) :: delt + integer, intent(out) :: iret + real :: ones(5) + + real :: rnn1 + integer :: nn,k,nm,stochlun,ierr,n + integer :: locl,indev,indod,indlsod,indlsev + integer :: l,jbasev,jbasod + integer :: jcapin,varid1,varid2 + real(kind_dbl_prec),allocatable :: noise_e(:,:),noise_o(:,:) + include 'function_indlsod' + include 'function_indlsev' + include 'netcdf.inc' + stochlun=99 + levs=nlevs + + iret=0 +! read in namelist + + call compns_stochy (mype,size(input_nml_file,1),input_nml_file(:),fn_nml,nlunit,delt,iret) + + if (iret/=0) return ! need to make sure that non-zero irets are being trapped. + if ( (.NOT. do_sppt) .AND. (.NOT. do_shum) .AND. (.NOT. do_skeb) .AND. (lndp_type==0) .AND. (.NOT. do_spp)) return + + call initialize_spectral(gis_stochy) + allocate(noise_e(len_trie_ls,2),noise_o(len_trio_ls,2)) +! determine number of random patterns to be used for each scheme. + do n=1,size(sppt) + if (sppt(n) > 0) then + nsppt=nsppt+1 + else + exit + endif + enddo + if (is_rootpe()) print *,'nsppt = ',nsppt + do n=1,size(shum) + if (shum(n) > 0) then + nshum=nshum+1 + else + exit + endif + enddo + if (is_rootpe()) print *,'nshum = ',nshum + do n=1,size(skeb) + if (skeb(n) > 0) then + nskeb=nskeb+1 + else + exit + endif + enddo + if (is_rootpe()) print *,'nskeb = ',nskeb + ! Draper: nlndp>1 was not properly coded. Hardcode to 1 for now + !do n=1,size(lndp_z0) + ! if (lndp_z0(n) > 0 .or. lndp_zt(n)>0 .or. lndp_hc(n)>0 .or. & + ! lndp_vf(n)>0 .or. lndp_la(n)>0 .or. lndp_al(n)>0) then + ! nlndp=nlndp+1 + ! else + ! exit + ! endif + !enddo + if (n_var_lndp>0) nlndp=1 + if (n_var_spp>0) nspp=n_var_spp + if (is_rootpe()) print *,' nlndp = ', nlndp + if (is_rootpe()) print *,' nspp = ', nspp + + if (nsppt > 0) allocate(rpattern_sppt(nsppt)) + if (nshum > 0) allocate(rpattern_shum(nshum)) + if (nskeb > 0) allocate(rpattern_skeb(nskeb)) + ! mg, sfc perts + if (nlndp > 0) allocate(rpattern_sfc(nlndp)) + if (nspp > 0) allocate(rpattern_spp(nspp)) + +! if stochini is true, then read in pattern from a file + if (is_rootpe()) then + if (stochini) then + print*,'opening stoch_ini' + !OPEN(stochlun,file='INPUT/atm_stoch.res.bin',form='unformatted',iostat=ierr,status='old') + ierr=nf90_open('INPUT/atm_stoch.res.nc',nf90_nowrite,ncid=stochlun) + if (ierr .NE. 0) then + write(0,*) 'error opening stoch_ini' + iret = ierr + return + end if + ierr=NF90_GET_ATT(stochlun,NF_GLOBAL,"ntrunc",jcapin) + if (ierr .NE. 0) then + write(0,*) 'error getting ntrunc' + iret = ierr + return + end if + print*,'ntrunc read in',jcapin + endif + endif + ! no spinup needed if initial patterns are defined correctly. + if (nsppt > 0) then + if (is_rootpe()) then + print *, 'Initialize random pattern for SPPT' + if (stochini) then + ierr=NF90_INQ_VARID(stochlun,"sppt_seed", varid1) + if (ierr .NE. 0) then + write(0,*) 'error inquring SPPT seed' + iret = ierr + return + end if + ierr=NF90_INQ_VARID(stochlun,"sppt_spec", varid2) + if (ierr .NE. 0) then + write(0,*) 'error inquring SPPT spec' + iret = ierr + return + end if + endif + endif + print*,'calling init',lonf,latg,jcap + call patterngenerator_init(sppt_lscale(1:nsppt),spptint,sppt_tau(1:nsppt),sppt(1:nsppt),iseed_sppt,rpattern_sppt, & + lonf,latg,jcap,gis_stochy%ls_node,nsppt,1,0,new_lscale) + do n=1,nsppt + if (stochini) then + call read_pattern(rpattern_sppt(n),jcapin,stochlun,1,n,varid1,varid2,.false.,ierr) + if (ierr .NE. 0) then + write(0,*) 'error reading SPPT pattern' + iret = ierr + return + end if + else + call getnoise(rpattern_sppt(n),noise_e,noise_o) + do nn=1,len_trie_ls + rpattern_sppt(n)%spec_e(nn,1,1)=noise_e(nn,1) + rpattern_sppt(n)%spec_e(nn,2,1)=noise_e(nn,2) + nm = rpattern_sppt(n)%idx_e(nn) + if (nm .eq. 0) cycle + rpattern_sppt(n)%spec_e(nn,1,1) = rpattern_sppt(n)%stdev*rpattern_sppt(n)%spec_e(nn,1,1)*rpattern_sppt(n)%varspectrum(nm) + rpattern_sppt(n)%spec_e(nn,2,1) = rpattern_sppt(n)%stdev*rpattern_sppt(n)%spec_e(nn,2,1)*rpattern_sppt(n)%varspectrum(nm) + enddo + do nn=1,len_trio_ls + rpattern_sppt(n)%spec_o(nn,1,1)=noise_o(nn,1) + rpattern_sppt(n)%spec_o(nn,2,1)=noise_o(nn,2) + nm = rpattern_sppt(n)%idx_o(nn) + if (nm .eq. 0) cycle + rpattern_sppt(n)%spec_o(nn,1,1) = rpattern_sppt(n)%stdev*rpattern_sppt(n)%spec_o(nn,1,1)*rpattern_sppt(n)%varspectrum(nm) + rpattern_sppt(n)%spec_o(nn,2,1) = rpattern_sppt(n)%stdev*rpattern_sppt(n)%spec_o(nn,2,1)*rpattern_sppt(n)%varspectrum(nm) + enddo + endif + enddo + endif + if (nshum > 0) then + if (is_rootpe()) then + print *, 'Initialize random pattern for SHUM' + if (stochini) then + ierr=NF90_INQ_VARID(stochlun,"shum_seed", varid1) + if (ierr .NE. 0) then + write(0,*) 'error inquring SHUM seed' + iret = ierr + return + end if + ierr=NF90_INQ_VARID(stochlun,"shum_spec", varid2) + if (ierr .NE. 0) then + write(0,*) 'error inquring SHUM spec' + iret = ierr + return + end if + endif + endif + call patterngenerator_init(shum_lscale(1:nshum),shumint,shum_tau(1:nshum),shum(1:nshum),iseed_shum,rpattern_shum, & + lonf,latg,jcap,gis_stochy%ls_node,nshum,1,0,new_lscale) + do n=1,nshum + if (stochini) then + call read_pattern(rpattern_shum(n),jcapin,stochlun,1,n,varid1,varid2,.false.,ierr) + if (ierr .NE. 0) then + write(0,*) 'error reading SHUM pattern' + iret = ierr + return + end if + else + call getnoise(rpattern_shum(n),noise_e,noise_o) + do nn=1,len_trie_ls + rpattern_shum(n)%spec_e(nn,1,1)=noise_e(nn,1) + rpattern_shum(n)%spec_e(nn,2,1)=noise_e(nn,2) + nm = rpattern_shum(n)%idx_e(nn) + if (nm .eq. 0) cycle + rpattern_shum(n)%spec_e(nn,1,1) = rpattern_shum(n)%stdev*rpattern_shum(n)%spec_e(nn,1,1)*rpattern_shum(n)%varspectrum(nm) + rpattern_shum(n)%spec_e(nn,2,1) = rpattern_shum(n)%stdev*rpattern_shum(n)%spec_e(nn,2,1)*rpattern_shum(n)%varspectrum(nm) + enddo + do nn=1,len_trio_ls + rpattern_shum(n)%spec_o(nn,1,1)=noise_o(nn,1) + rpattern_shum(n)%spec_o(nn,2,1)=noise_o(nn,2) + nm = rpattern_shum(n)%idx_o(nn) + if (nm .eq. 0) cycle + rpattern_shum(n)%spec_o(nn,1,1) = rpattern_shum(n)%stdev*rpattern_shum(n)%spec_o(nn,1,1)*rpattern_shum(n)%varspectrum(nm) + rpattern_shum(n)%spec_o(nn,2,1) = rpattern_shum(n)%stdev*rpattern_shum(n)%spec_o(nn,2,1)*rpattern_shum(n)%varspectrum(nm) + enddo + endif + enddo + endif + + if (nskeb > 0) then + ! determine number of skeb levels to deal with temperoal/vertical correlations + skeblevs=nint(skeb_tau(1)/skebint*skeb_vdof) +! backscatter noise. + if (is_rootpe()) then + print *, 'Initialize random pattern for SKEB' + if (stochini) then + ierr=NF90_INQ_VARID(stochlun,"skeb_seed", varid1) + if (ierr .NE. 0) then + write(0,*) 'error inquring SKEB seed' + iret = ierr + return + end if + ierr=NF90_INQ_VARID(stochlun,"skeb_spec", varid2) + if (ierr .NE. 0) then + write(0,*) 'error inquring SKEB spec' + iret = ierr + return + end if + endif + endif + call patterngenerator_init(skeb_lscale(1:nskeb),skebint,skeb_tau(1:nskeb),skeb(1:nskeb),iseed_skeb,rpattern_skeb, & + lonf,latg,jcap,gis_stochy%ls_node,nskeb,skeblevs,skeb_varspect_opt,new_lscale) + do n=1,nskeb + do k=1,skeblevs + if (stochini) then + call read_pattern(rpattern_skeb(n),jcapin,stochlun,k,n,varid1,varid2,.true.,ierr) + if (ierr .NE. 0) then + write(0,*) 'error reading SKEB pattern' + iret = ierr + return + end if + else + call getnoise(rpattern_skeb(n),noise_e,noise_o) + do nn=1,len_trie_ls + rpattern_skeb(n)%spec_e(nn,1,k)=noise_e(nn,1) + rpattern_skeb(n)%spec_e(nn,2,k)=noise_e(nn,2) + nm = rpattern_skeb(n)%idx_e(nn) + if (nm .eq. 0) cycle + rpattern_skeb(n)%spec_e(nn,1,k) = rpattern_skeb(n)%stdev*rpattern_skeb(n)%spec_e(nn,1,k)*rpattern_skeb(n)%varspectrum(nm) + rpattern_skeb(n)%spec_e(nn,2,k) = rpattern_skeb(n)%stdev*rpattern_skeb(n)%spec_e(nn,2,k)*rpattern_skeb(n)%varspectrum(nm) + enddo + do nn=1,len_trio_ls + rpattern_skeb(n)%spec_o(nn,1,k)=noise_o(nn,1) + rpattern_skeb(n)%spec_o(nn,2,k)=noise_o(nn,2) + nm = rpattern_skeb(n)%idx_o(nn) + if (nm .eq. 0) cycle + rpattern_skeb(n)%spec_o(nn,1,k) = rpattern_skeb(n)%stdev*rpattern_skeb(n)%spec_o(nn,1,k)*rpattern_skeb(n)%varspectrum(nm) + rpattern_skeb(n)%spec_o(nn,2,k) = rpattern_skeb(n)%stdev*rpattern_skeb(n)%spec_o(nn,2,k)*rpattern_skeb(n)%varspectrum(nm) + enddo + endif + enddo + enddo + + gis_stochy%kenorm_e=1. + gis_stochy%kenorm_o=1. ! used to convert forcing pattern to wind field. + if (skebnorm==0) then + do locl=1,ls_max_node + l = gis_stochy%ls_node(locl,1) + jbasev = gis_stochy%ls_node(locl,2) + indev = indlsev(l,l) + jbasod = gis_stochy%ls_node(locl,3) + indod = indlsod(l+1,l) + do n=l,jcap,2 + rnn1 = n*(n+1.) + gis_stochy%kenorm_e(indev) = rnn1/radius**2 + indev = indev + 1 + enddo + do n=l+1,jcap,2 + rnn1 = n*(n+1.) + gis_stochy%kenorm_o(indod) = rnn1/radius**2 + indod = indod + 1 + enddo + enddo + if (is_rootpe()) print*,'using streamfunction ',maxval(gis_stochy%kenorm_e(:)),minval(gis_stochy%kenorm_e(:)) + endif + if (skebnorm==1) then + do locl=1,ls_max_node + l = gis_stochy%ls_node(locl,1) + jbasev = gis_stochy%ls_node(locl,2) + indev = indlsev(l,l) + jbasod = gis_stochy%ls_node(locl,3) + indod = indlsod(l+1,l) + do n=l,jcap,2 + rnn1 = n*(n+1.) + gis_stochy%kenorm_e(indev) = sqrt(rnn1)/radius + indev = indev + 1 + enddo + do n=l+1,jcap,2 + rnn1 = n*(n+1.) + gis_stochy%kenorm_o(indod) = sqrt(rnn1)/radius + indod = indod + 1 + enddo + enddo + if (is_rootpe()) print*,'using kenorm ',maxval(gis_stochy%kenorm_e(:)),minval(gis_stochy%kenorm_e(:)) + endif + ! set the even and odd (n-l) terms of the top row to zero + do locl=1,ls_max_node + l = gis_stochy%ls_node(locl,1) + jbasev = gis_stochy%ls_node(locl,2) + jbasod = gis_stochy%ls_node(locl,3) + if (mod(l,2) .eq. mod(jcap+1,2)) then + gis_stochy%kenorm_e(indlsev(jcap+1,l)) = 0. + endif + if (mod(l,2) .ne. mod(jcap+1,2)) then + gis_stochy%kenorm_o(indlsod(jcap+1,l)) = 0. + endif + enddo + + endif ! skeb > 0 +! mg, sfc-perts + if (nlndp > 0) then + if (is_rootpe()) then + print *, 'Initialize random pattern for SFC-PERTS' + if (stochini) then + ierr=NF90_INQ_VARID(stochlun,"sfcpert_seed", varid1) + if (ierr .NE. 0) then + write(0,*) 'error inquring SFC-PERTS seed' + iret = ierr + return + end if + ierr=NF90_INQ_VARID(stochlun,"sfcpert_spec", varid2) + if (ierr .NE. 0) then + write(0,*) 'error inquring SFC-PERTS spec' + iret = ierr + return + end if + endif + endif + ones = 1. + call patterngenerator_init(lndp_lscale(1:nlndp),delt,lndp_tau(1:nlndp),ones(1:nlndp),iseed_lndp,rpattern_sfc, & + lonf,latg,jcap,gis_stochy%ls_node,nlndp,n_var_lndp,0,new_lscale) + do n=1,nlndp + if (is_rootpe()) print *, 'Initialize random pattern for LNDP PERTS' + do k=1,n_var_lndp + if (stochini) then + call read_pattern(rpattern_sfc(n),jcapin,stochlun,k,n,varid1,varid2,.true.,ierr) + if (ierr .NE. 0) then + write(0,*) 'error reading SHUM pattern' + iret = ierr + return + endif + if (is_rootpe()) print *, 'lndp pattern read',n,k,minval(rpattern_sfc(n)%spec_o(:,:,k)), maxval(rpattern_sfc(n)%spec_o(:,:,k)) + else + call getnoise(rpattern_sfc(n),noise_e,noise_o) + do nn=1,len_trie_ls + rpattern_sfc(n)%spec_e(nn,1,k)=noise_e(nn,1) + rpattern_sfc(n)%spec_e(nn,2,k)=noise_e(nn,2) + nm = rpattern_sfc(n)%idx_e(nn) + if (nm .eq. 0) cycle + rpattern_sfc(n)%spec_e(nn,1,k) = rpattern_sfc(n)%stdev*rpattern_sfc(n)%spec_e(nn,1,k)*rpattern_sfc(n)%varspectrum(nm) + rpattern_sfc(n)%spec_e(nn,2,k) = rpattern_sfc(n)%stdev*rpattern_sfc(n)%spec_e(nn,2,k)*rpattern_sfc(n)%varspectrum(nm) + enddo + do nn=1,len_trio_ls + rpattern_sfc(n)%spec_o(nn,1,k)=noise_o(nn,1) + rpattern_sfc(n)%spec_o(nn,2,k)=noise_o(nn,2) + nm = rpattern_sfc(n)%idx_o(nn) + if (nm .eq. 0) cycle + rpattern_sfc(n)%spec_o(nn,1,k) = rpattern_sfc(n)%stdev*rpattern_sfc(n)%spec_o(nn,1,k)*rpattern_sfc(n)%varspectrum(nm) + rpattern_sfc(n)%spec_o(nn,2,k) = rpattern_sfc(n)%stdev*rpattern_sfc(n)%spec_o(nn,2,k)*rpattern_sfc(n)%varspectrum(nm) + enddo + if (is_rootpe()) print *, 'lndp pattern initialized, ',n, k, minval(rpattern_sfc(n)%spec_o(:,:,k)), maxval(rpattern_sfc(n)%spec_o(:,:,k)) + endif ! stochini + enddo ! k, n_var_lndp + enddo ! n, nlndp + endif ! nlndp > 0 + if (nspp > 0) then + if (is_rootpe()) then + print *, 'Initialize random pattern for SPP-PERTS' + if (stochini) then + ierr=NF90_INQ_VARID(stochlun,"spppert_seed", varid1) + if (ierr .NE. 0) then + write(0,*) 'error inquring SPP-PERTS seed' + iret = ierr + return + end if + ierr=NF90_INQ_VARID(stochlun,"ppcpert_spec", varid2) + if (ierr .NE. 0) then + write(0,*) 'error inquring SPP-PERTS spec' + iret = ierr + return + end if + endif + endif + ones = 1. + call patterngenerator_init(spp_lscale(1:nspp),delt,spp_tau(1:nspp),ones(1:nspp),iseed_spp,rpattern_spp, & + lonf,latg,jcap,gis_stochy%ls_node,nspp,n_var_spp,0,new_lscale) + do n=1,nspp + if (is_rootpe()) print *, 'Initialize random pattern for SPP PERTS' + if (stochini) then + call read_pattern(rpattern_spp(n),jcapin,stochlun,1,n,varid1,varid2,.true.,ierr) + if (ierr .NE. 0) then + write(0,*) 'error reading SPP pattern' + iret = ierr + return + endif + if (is_rootpe()) print *, 'spp pattern read',n,1,minval(rpattern_spp(n)%spec_o(:,:,1)), maxval(rpattern_spp(n)%spec_o(:,:,1)) + else + call getnoise(rpattern_spp(n),noise_e,noise_o) + do nn=1,len_trie_ls + rpattern_spp(n)%spec_e(nn,1,1)=noise_e(nn,1) + rpattern_spp(n)%spec_e(nn,2,1)=noise_e(nn,2) + nm = rpattern_spp(n)%idx_e(nn) + if (nm .eq. 0) cycle + rpattern_spp(n)%spec_e(nn,1,1) = rpattern_spp(n)%stdev*rpattern_spp(n)%spec_e(nn,1,1)*rpattern_spp(n)%varspectrum(nm) + rpattern_spp(n)%spec_e(nn,2,1) = rpattern_spp(n)%stdev*rpattern_spp(n)%spec_e(nn,2,1)*rpattern_spp(n)%varspectrum(nm) + enddo + do nn=1,len_trio_ls + rpattern_spp(n)%spec_o(nn,1,1)=noise_o(nn,1) + rpattern_spp(n)%spec_o(nn,2,1)=noise_o(nn,2) + nm = rpattern_spp(n)%idx_o(nn) + if (nm .eq. 0) cycle + rpattern_spp(n)%spec_o(nn,1,1) = rpattern_spp(n)%stdev*rpattern_spp(n)%spec_o(nn,1,1)*rpattern_spp(n)%varspectrum(nm) + rpattern_spp(n)%spec_o(nn,2,1) = rpattern_spp(n)%stdev*rpattern_spp(n)%spec_o(nn,2,1)*rpattern_spp(n)%varspectrum(nm) + enddo + if (is_rootpe()) print *, 'spp pattern initialized, ',n, 1, minval(rpattern_spp(n)%spec_o(:,:,1)), maxval(rpattern_spp(n)%spec_o(:,:,1)) + endif ! stochini + enddo ! n, nspp + endif ! nspp > 0 + + if (is_rootpe() .and. stochini) CLOSE(stochlun) + deallocate(noise_e,noise_o) + end subroutine init_stochdata + + subroutine init_stochdata_ocn(nlevs,delt,iret) + + use netcdf + use compns_stochy_mod, only : compns_stochy_ocn + use mpp_domains_mod, only: mpp_broadcast_domain,MPP_DOMAIN_TIME,mpp_domains_init ,mpp_domains_set_stack_size +! initialize random patterns. A spinup period of spinup_efolds times the +! temporal time scale is run for each pattern. + integer, intent(in) :: nlevs + real, intent(in) :: delt + integer, intent(out) :: iret + + integer :: nn,nm,stochlun,n,jcapin + integer :: l,jbasev,jbasod + integer :: indev,indod,indlsod,indlsev,varid1,varid2,varid3,varid4,ierr + + real(kind_dbl_prec),allocatable :: noise_e(:,:),noise_o(:,:) + include 'function_indlsod' + include 'function_indlsev' + include 'netcdf.inc' + stochlun=99 + levs=nlevs + + iret=0 + call compns_stochy_ocn (delt,iret) + if(is_rootpe()) print*,'in init stochdata_ocn' + if ( (.NOT. pert_epbl) .AND. (.NOT. do_ocnsppt) ) return + call initialize_spectral(gis_stochy_ocn) + if (iret/=0) return + allocate(noise_e(len_trie_ls,2),noise_o(len_trio_ls,2)) +! determine number of random patterns to be used for each scheme. + do n=1,size(epbl) + if (epbl(n) > 0) then + nepbl=nepbl+1 + else + exit + endif + enddo + + do n=1,size(ocnsppt) + if (ocnsppt(n) > 0) then + nocnsppt=nocnsppt+1 + else + exit + endif + enddo + + if (nepbl > 0) then + allocate(rpattern_epbl1(nepbl)) + allocate(rpattern_epbl2(nepbl)) + endif + + if (nocnsppt > 0) allocate(rpattern_ocnsppt(nocnsppt)) + +! if stochini is true, then read in pattern from a file + if (is_rootpe()) then + if (stochini) then + print*,'opening stoch_ini' + ierr=nf90_open('INPUT/ocn_stoch.res.nc',nf90_nowrite,ncid=stochlun) + if (ierr .NE. 0) then + write(0,*) 'error opening stoch_ini' + iret = ierr + return + end if + ierr=NF90_GET_ATT(stochlun,NF_GLOBAL,"ntrunc",jcapin) + if (ierr .NE. 0) then + write(0,*) 'error getting ntrunc' + iret = ierr + return + end if + print*,'ntrunc read in',jcapin + endif + endif + + if (nepbl > 0) then + if (is_rootpe()) then + print *, 'Initialize random pattern for epbl' + if (stochini) then + ierr=NF90_INQ_VARID(stochlun,"epbl1_seed", varid1) + if (ierr .NE. 0) then + write(0,*) 'error inquring EPBL1 seed' + iret = ierr + return + end if + ierr=NF90_INQ_VARID(stochlun,"epbl1_spec", varid2) + if (ierr .NE. 0) then + write(0,*) 'error inquring EPBL1 spec' + iret = ierr + return + end if + ierr=NF90_INQ_VARID(stochlun,"epbl2_seed", varid3) + if (ierr .NE. 0) then + write(0,*) 'error inquring EPBL2 seed' + iret = ierr + return + end if + ierr=NF90_INQ_VARID(stochlun,"epbl2_spec", varid4) + if (ierr .NE. 0) then + write(0,*) 'error inquring EPBL2 spec' + iret = ierr + return + end if + end if + end if + call patterngenerator_init(epbl_lscale(1:nepbl),epblint,epbl_tau(1:nepbl),epbl(1:nepbl),iseed_epbl,rpattern_epbl1, & + lonf,latg,jcap,gis_stochy_ocn%ls_node,nepbl,1,0,new_lscale) + call patterngenerator_init(epbl_lscale(1:nepbl),epblint,epbl_tau(1:nepbl),epbl(1:nepbl),iseed_epbl2,rpattern_epbl2, & + lonf,latg,jcap,gis_stochy_ocn%ls_node,nepbl,1,0,new_lscale) + do n=1,nepbl + if (stochini) then + call read_pattern(rpattern_epbl1(n),jcapin,stochlun,1,n,varid1,varid2,.false.,ierr) + if (ierr .NE. 0) then + write(0,*) 'error reading EPBL1 pattern' + iret = ierr + return + end if + call read_pattern(rpattern_epbl2(n),jcapin,stochlun,1,n,varid3,varid4,.false.,ierr) + if (ierr .NE. 0) then + write(0,*) 'error reading EPBL1 pattern' + iret = ierr + return + end if + else + call getnoise(rpattern_epbl1(n),noise_e,noise_o) + do nn=1,len_trie_ls + rpattern_epbl1(n)%spec_e(nn,1,1)=noise_e(nn,1) + rpattern_epbl1(n)%spec_e(nn,2,1)=noise_e(nn,2) + rpattern_epbl1(n)%spec_e(nn,1,1)=noise_e(nn,1) + rpattern_epbl1(n)%spec_e(nn,2,1)=noise_e(nn,2) + nm = rpattern_epbl1(n)%idx_e(nn) + if (nm .eq. 0) cycle + rpattern_epbl1(n)%spec_e(nn,1,1) = rpattern_epbl1(n)%stdev*rpattern_epbl1(n)%spec_e(nn,1,1)*rpattern_epbl1(n)%varspectrum(nm) + rpattern_epbl1(n)%spec_e(nn,2,1) = rpattern_epbl1(n)%stdev*rpattern_epbl1(n)%spec_e(nn,2,1)*rpattern_epbl1(n)%varspectrum(nm) + enddo + do nn=1,len_trio_ls + rpattern_epbl1(n)%spec_o(nn,1,1)=noise_o(nn,1) + rpattern_epbl1(n)%spec_o(nn,2,1)=noise_o(nn,2) + nm = rpattern_epbl1(n)%idx_o(nn) + if (nm .eq. 0) cycle + rpattern_epbl1(n)%spec_o(nn,1,1) = rpattern_epbl1(n)%stdev*rpattern_epbl1(n)%spec_o(nn,1,1)*rpattern_epbl1(n)%varspectrum(nm) + rpattern_epbl1(n)%spec_o(nn,2,1) = rpattern_epbl1(n)%stdev*rpattern_epbl1(n)%spec_o(nn,2,1)*rpattern_epbl1(n)%varspectrum(nm) + enddo + call patterngenerator_advance(rpattern_epbl1(n),1,.false.) + + call getnoise(rpattern_epbl2(n),noise_e,noise_o) + do nn=1,len_trie_ls + rpattern_epbl2(n)%spec_e(nn,1,1)=noise_e(nn,1) + rpattern_epbl2(n)%spec_e(nn,2,1)=noise_e(nn,2) + rpattern_epbl2(n)%spec_e(nn,1,1)=noise_e(nn,1) + rpattern_epbl2(n)%spec_e(nn,2,1)=noise_e(nn,2) + nm = rpattern_epbl2(n)%idx_e(nn) + if (nm .eq. 0) cycle + rpattern_epbl2(n)%spec_e(nn,1,1) = rpattern_epbl2(n)%stdev*rpattern_epbl2(n)%spec_e(nn,1,1)*rpattern_epbl2(n)%varspectrum(nm) + rpattern_epbl2(n)%spec_e(nn,2,1) = rpattern_epbl2(n)%stdev*rpattern_epbl2(n)%spec_e(nn,2,1)*rpattern_epbl2(n)%varspectrum(nm) + enddo + do nn=1,len_trio_ls + rpattern_epbl2(n)%spec_o(nn,1,1)=noise_o(nn,1) + rpattern_epbl2(n)%spec_o(nn,2,1)=noise_o(nn,2) + nm = rpattern_epbl2(n)%idx_o(nn) + if (nm .eq. 0) cycle + rpattern_epbl2(n)%spec_o(nn,1,1) = rpattern_epbl2(n)%stdev*rpattern_epbl2(n)%spec_o(nn,1,1)*rpattern_epbl2(n)%varspectrum(nm) + rpattern_epbl2(n)%spec_o(nn,2,1) = rpattern_epbl2(n)%stdev*rpattern_epbl2(n)%spec_o(nn,2,1)*rpattern_epbl2(n)%varspectrum(nm) + enddo + call patterngenerator_advance(rpattern_epbl2(n),1,.false.) + endif + enddo + endif + + if (nocnsppt > 0) then + if (is_rootpe()) then + if (stochini) then + ierr=NF90_INQ_VARID(stochlun,"ocnsppt_seed", varid1) + if (ierr .NE. 0) then + write(0,*) 'error inquring OCNSPPT seed' + iret = ierr + return + end if + ierr=NF90_INQ_VARID(stochlun,"ocnsppt_spec", varid2) + if (ierr .NE. 0) then + write(0,*) 'error inquring OCNSPPT spec' + iret = ierr + return + end if + endif + endif + if (is_rootpe()) print *, 'Initialize random pattern for ocnsppt' + call patterngenerator_init(ocnsppt_lscale(1:nocnsppt),ocnspptint,ocnsppt_tau(1:nocnsppt),ocnsppt(1:nocnsppt),iseed_ocnsppt,rpattern_ocnsppt, & + lonf,latg,jcap,gis_stochy_ocn%ls_node,nocnsppt,1,0,new_lscale) + do n=1,nocnsppt + if (stochini) then + call read_pattern(rpattern_ocnsppt(n),jcapin,stochlun,1,n,varid1,varid2,.false.,ierr) + if (ierr .NE. 0) then + write(0,*) 'error reading SPPT pattern' + iret = ierr + return + end if + else + call getnoise(rpattern_ocnsppt(n),noise_e,noise_o) + do nn=1,len_trie_ls + rpattern_ocnsppt(n)%spec_e(nn,1,1)=noise_e(nn,1) + rpattern_ocnsppt(n)%spec_e(nn,2,1)=noise_e(nn,2) + nm = rpattern_ocnsppt(n)%idx_e(nn) + if (nm .eq. 0) cycle + rpattern_ocnsppt(n)%spec_e(nn,1,1) = rpattern_ocnsppt(n)%stdev*rpattern_ocnsppt(n)%spec_e(nn,1,1)*rpattern_ocnsppt(n)%varspectrum(nm) + rpattern_ocnsppt(n)%spec_e(nn,2,1) = rpattern_ocnsppt(n)%stdev*rpattern_ocnsppt(n)%spec_e(nn,2,1)*rpattern_ocnsppt(n)%varspectrum(nm) + enddo + do nn=1,len_trio_ls + rpattern_ocnsppt(n)%spec_o(nn,1,1)=noise_o(nn,1) + rpattern_ocnsppt(n)%spec_o(nn,2,1)=noise_o(nn,2) + nm = rpattern_ocnsppt(n)%idx_o(nn) + if (nm .eq. 0) cycle + rpattern_ocnsppt(n)%spec_o(nn,1,1) = rpattern_ocnsppt(n)%stdev*rpattern_ocnsppt(n)%spec_o(nn,1,1)*rpattern_ocnsppt(n)%varspectrum(nm) + rpattern_ocnsppt(n)%spec_o(nn,2,1) = rpattern_ocnsppt(n)%stdev*rpattern_ocnsppt(n)%spec_o(nn,2,1)*rpattern_ocnsppt(n)%varspectrum(nm) + enddo + call patterngenerator_advance(rpattern_ocnsppt(n),1,.false.) + endif + enddo + endif + deallocate(noise_e,noise_o) + end subroutine init_stochdata_ocn + + +!>@brief This subroutine 'read_pattern' will read in the spectral coeffients from a previous run (stored in stoch_ini, +!!turned on by setting STOCHINI=.true.) +!>@details Data read in are flat binary, so the number of stochastic physics patterns running must match previous run +subroutine read_pattern(rpattern,jcapin,lunptn,k,np,varid1,varid2,slice_of_3d,iret) +!\callgraph + use netcdf + type(random_pattern), intent(inout) :: rpattern + integer, intent(in) :: lunptn,np,varid1,varid2,jcapin + logical, intent(in) :: slice_of_3d + real(kind_dbl_prec),allocatable :: pattern2d(:),pattern2din(:) + real(kind_dbl_prec) :: stdevin,varin + integer nm,nn,iret,ierr,isize,k,ndimspec2 + integer, allocatable :: isave(:) + include 'netcdf.inc' + iret=0 + ndimspec2=2*ndimspec + allocate(pattern2d(ndimspec2)) + pattern2d=0. + call random_seed(size=isize,stat=rpattern%rstate) ! get size of generator state seed array + allocate(isave(isize)) + ! read only on root process, and send to all tasks + if (is_rootpe()) then + allocate(pattern2din((jcapin+1)*(jcapin+2))) + print*,'reading in random pattern at ',jcapin,ndimspec,size(pattern2din) + !read(lunptn) pattern2din + ierr=NF90_GET_VAR(lunptn,varid1,isave,(/1,np/)) + if (ierr .NE. 0) then + write(0,*) 'error reading seed' + iret = ierr + return + end if + if (slice_of_3d) then + ierr=NF90_GET_VAR(lunptn,varid2,pattern2din,(/1,k,np/),(/ndimspec2,1,1/)) + else + ierr=NF90_GET_VAR(lunptn,varid2,pattern2din,(/1,np/),(/ndimspec2,1/)) + endif + if (ierr .NE. 0) then + write(0,*) 'error reading spec var' + iret = ierr + return + end if + print*,'reading in random pattern (min/max/size/seed)',& + minval(pattern2din),maxval(pattern2din),size(pattern2din),isave(1:4) + if (jcapin .eq. ntrunc) then + pattern2d=pattern2din + else + call chgres_pattern(pattern2din,pattern2d,jcapin,ntrunc) ! chgres of spectral files + ! change the standard deviation of the patterns for a resolution change + ! needed for SKEB & SHUM + call computevarspec_r(rpattern,pattern2d,varin) + print*,'stddev in and out..',sqrt(varin),rpattern%stdev + stdevin=rpattern%stdev/sqrt(varin) + pattern2d(:)=pattern2d(:)*stdevin + endif + deallocate(pattern2din) + endif + call mp_bcst(isave,isize) ! blast out seed + call mp_bcst(pattern2d,2*ndimspec) + call random_seed(put=isave,stat=rpattern%rstate) + ! subset + do nn=1,len_trie_ls + nm = rpattern%idx_e(nn) + if (nm == 0) cycle + rpattern%spec_e(nn,1,k) = pattern2d(nm) + rpattern%spec_e(nn,2,k) = pattern2d(ndimspec+nm) + enddo + do nn=1,len_trio_ls + nm = rpattern%idx_o(nn) + if (nm == 0) cycle + rpattern%spec_o(nn,1,k) = pattern2d(nm) + rpattern%spec_o(nn,2,k) = pattern2d(ndimspec+nm) + enddo + !print*,'after scatter...',mype,maxval(pattern2d_e),maxval(pattern2d_o) & + ! ,minval(pattern2d_e),minval(pattern2d_o) + deallocate(pattern2d,isave) + end subroutine read_pattern + +end module stochy_data_mod diff --git a/stochastic_physics/stochy_doc.conf b/stochastic_physics/stochy_doc.conf new file mode 100644 index 0000000000..ab09709df4 --- /dev/null +++ b/stochastic_physics/stochy_doc.conf @@ -0,0 +1,2542 @@ +# Doxyfile 1.8.17 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "My Project" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is +# Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# (including Cygwin) ands Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. If +# EXTRACT_ALL is set to YES then this flag will automatically be disabled. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: https://www.gnu.org/software/libiconv/) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), +# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen +# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.doc \ + *.txt \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.ice + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# entity all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via Javascript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have Javascript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: https://developer.apple.com/xcode/), introduced with OSX +# 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /