Skip to content

Commit

Permalink
Update gsl develop from master (ufs-community#63)
Browse files Browse the repository at this point in the history
* Updates to stochastic_physics_wrapper (ufs-community#280)

Fix to stochastic_physics_wrapper to allow for random patterns to update at a longer time-step than model

Co-authored-by: Dom Heinzeller <climbfuji@ymail.com>

* Update for Jet, bug fixes in running with frac_grid=T and GFDL MP, and in restarting with frac_grid=T  (ufs-community#304)

Update the modulefile for jet.intel to enable UPP v10.0.0. The hpc-stack v1.0.0 pre-release is used for this. Small changes are made to tests.rt.sh for jet.intel and gaea.intel (consistency with other platforms).

The submodule pointer update for fv3atm addresses bugs in the ufs-weather-model with frac_grid=T and GFDL microphysics, and with restarting the model when frac_grid=T (from @shansun6 and @SMoorthi-emc).

* Feature/update mom6 and retain b4b results for 025x025 resolution (ufs-community#290)

* point MOM6 to new branch which corresponding to GFDL 20201022 commit
* modify fms_files.cmake and mom6_files.cmake to reflect changes in MOM6 code as this version of MOM6 contains some file deletion, new files being added and renaming of files
* manually set MOM6 parameters in order to retain origonal results for 0.25x0.25 resolution
* update MOM6 to include Bugfix for mom6solo to be built
* modify compile.sh to allow mom6solo compiling
* modify MOM_input_template for all resolutions based on GFDL MOM6-example main branch update on 20201022
* change executable permissions for CMakeLists.txt
* chmod 644 to 6 files Dom pointed out
* chmod for CMakeLists.txt and tests/compile.sh
* change baseline directpory to 20201202 in rt.sh

* Update CICE, Move regression test input outside baseline directory (ufs-community#270)

*Updates CICE to most recent develop branch of NOAA-EMC
* Sets n_aero (number of aerosols) in ice_in_template to 0.
* removes trailing whitespace from ice_in
* moves regression test input outside baseline directory (ufs-weather PR ufs-community#312)

Co-authored-by: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com>
Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>

* Updates to build for JEDI linking/control, add wcoss2 (ufs-community#295)

* Build on wcoss2 (acorn)
* Use -march=core-avx2 instead of -xCORE-AVX2 on wcoss2
* Updates to build for JEDI linking/control
* Removed unnecessary include files and INLINE POST setting
* Updated to address PR suggestions.
* Add rt_acorn.conf. Change /lfs/h2 to /lfs/h1.
* Update .gitmodules and submodule pointer for fv3atm for code review and testing
* regression test results
* Updated .gitmodules and removed extraneous file
* Fixed .gitmodules and updated pointer for FV3
* Updated pointer to NEMS repo
Co-authored-by: Dusan Jovic <dusan.jovic@noaa.gov>
Co-authored-by: Dom Heinzeller <climbfuji@ymail.com>

* Final-final GFS v16 updates / restart reproducibility bugfixes (ufs-community#325)

* Update .gitmodules and submodule pointer for fv3atm for code review and testing
* Add GFS v16 beta restart test, update stochastics test
* Update regression test baseline date tag to 20201214; skip-ci
* tests/rt.conf: bugfix, add missing 'fv3' to new stochy tests; skip-ci
* Regression test logs for gaea.intel, hera.gnu, hera.intel, jet.intel, orion.intel; skip-ci
* Run GFS v16beta tests also on wcoss; regression test logs for wcoss; skip-ci
* Regression test logs for cheyenne.intel and cheyenne.gnu
* Revert change to .gitmodules and update submodule pointer for fv3atm

* Add optional bulk flux calculation in ufs-datm (ufs-community#266)


* Update NEMS DATM and CMEPS to allow the optional bulk flux formulation; add two tests using the option
* Update top level CMakeList.txt to have compile flags for MOM6 and CICE6 identical for ufs-cpld and ufs-datm
* Add optional configuration variable to nems.configure to specify the directory where CMEPS will write restarts
* Adds cheyenne tasking variables to default_vars and sets WW3_COMP to cheyenne for platform cheyenne.intel 

*NOTE: Baselines develop-20201215 exist on all platforms, regression tests were run against exactly that baseline on all systems except cheyenne.intel. On cheyenne.intel the tests were run against 20201214, and this baseline is identical to 20201215 (as per "diff -r develop-20201214 develop-20201215").

Co-authors:
@DusanJovic-NOAA
@aerorahul
@JessicaMeixner-NOAA

skip-ci

* Add 2 new tests for DATM-MOM6-CICE6 application (ufs-community#332)

* Add the following 2 tests: datm_restart_cfsr, datm_debug_cfsr
* Add wcoss_dell_p3.log.
* Add Hera log, Orion log, wcoss_dell_p3 log.

* RRTMGP and Thompson MP coupling (ufs-community#323)

* Feature branch with RRTMGP and Thompson MP
* Updated FV3/ccpp-physics. Added namelist and configuration for RRTMGP RTs using GSD physics.
* Updated FV3
* Update physics in FV3
* Updated baselines in rt.sh
* Updated RT logs. Updated FV3 physics submodule pointer.
* Updated FV3 hash and .gitmodules

* Regression test log for PR ufs-community#323 for jet.intel (ufs-community#336)

* Update modules with hpc-stack v1.1.0 (ufs-community#319)

* Update modules with hpc-stack v1.1.0
* Minor bug fixes to CCPP UGWP

Co-authored-by: Dom Heinzeller <climbfuji@ymail.com>

* Replace old regional SDF with FV3_GFS_v15_thompson_mynn (ufs-community#333)

* Replace old FV3_GFS_2017_gfdlmp_regional SDF for regional tests with FV3_GFS_v15_thompson_mynn.
* Final path to IC's and new results.  Also, input.nml updated.
* Update RegressionTests_wcoss_dell_p3.log
* Update RegressionTests_wcoss_cray.log
* Update RegressionTests_hera.intel.log
* Update RegressionTests_jet.intel.log
* Update RegressionTests_orion.intel.log
* Update RegressionTests_cheyenne* logs.
* Update RegressionTests_hera.gnu.log

* Feature/ww3update (ufs-community#334)

This updates the WW3 submodule pointer to point to the top of the WW3 develop branch.
The path to WW3 inputs is changed to input-data-20201201/WW3_input_data_20201207/

* Remove IPD (step 1) (ufs-community#331)

Make CCPP=Y the default in tests/compile.sh. Remove CCPP=Y from tests/rt*.conf and adjust formatting.
Update submodule pointer for MOM6 to include PR ufs-community#341 ("Update MOM6 to GFDL's 20201218 commit")
Add modulefiles/wcoss_cray/fv3_debug (identical to modulefiles/wcoss_cray/fv3)
Fix broken utest (see ufs-community#348)

* Update the format of rt.conf (ufs-community#349)

Update the format of MACHINES column in rt.conf (and other .conf files). This column can be either empty, which means a test will run on all supported machines, or start with - or + sign to exclude or include specified machines explicitly.

* Add checkpoint restarts for ufs-cpld (ufs-community#342)


* Adds 3 checkpoint restart tests for the ufs-cpld model
* Drops the existing c92mx025 restart test
* Adds cheyenne.intel as tested configuration for ufs-cpld and ufs-datm
* Fixes instances of srf_data* in various fv3_conf files

* add frac grid input, update and add additional cpld tests (ufs-community#354)


* Updates FV3_input_frac to add both benchmark dates and L127 files
* Adds additional tests and restart tests for coupled model
* Sets all cpld tests to use frac grid input by default
* Removes all instances of  USE_LA_LI2016=True except for benchmark+wave configurations

* Remove unnecessary SIMD instruction sets for Jet, first round of cleanup in rt.conf, initialize cld_amt to zero for regional runs (dycore) (ufs-community#353)

* Reduce SIMDMULTIARCH sets from four to two in cmake/Intel.cmake
* First cleanup of regression test config tests/rt.conf
* tests/rt.sh: reduce number of build jobs on jet.intel from 10 to 5
* Remove flags -f and -s from rt.sh, remove SET logic, remove corresponding column in all rt*conf files
* Remove tests/rt_acorn.conf and run GFS v15p2 and GFS v16beta DEBUG tests on all platforms

* Implementation of CCPP timestep_init and timestep_final phases (ufs-community#337)

* Update .gitmodules and submodule pointer for fv3atm for code review and testing
* Update submodule pointer for fv3atm; skip-ci
* Don't try to compile all suites in DEBUG mode on cheyenne.intel, weird bug on compute nodes; skip-ci
* Don't try to compile all suites in DEBUG mode on wcoss_cray; skip-ci
* Regression test logs for cheyenne.gnu, cheyenne.intel, gaea.intel, hera.gnu, hera.intel, jet.intel, orion.intel; skip-ci
* Don't try to compile all suites in DEBUG mode on wcoss_dell_p3; skip-ci
* Regression test logs for wcoss_cray and wcoss_dell_p3
* Revert change to .gitmodules and update submodule pointer for fv3atm

* Update CMEPS  (ufs-community#345)


* Update CMEPS for recent changes, including addition of new run "post" run phases to eliminate redundant mapping, multiple ice sheet capability and ocn->land ice dynamic mapping
* Add a new test fv3_gfs_v16_RRTMGP_c192L127

Co-authored-by: Jun Wang <junwang-noaa@users.noreply.github.com>

* Remove IPD steps 3 and 5 (ufs-community#357)

Reduce SIMDMULTIARCH sets from four to two in cmake/Intel.cmake
* First cleanup of regression test config tests/rt.conf
* tests/rt.sh: reduce number of build jobs on jet.intel from 10 to 5; skip-ci
* Remove flags -f and -s from rt.sh, remove SET logic, remove corresponding column in all rt*conf files
* Update usage in rt.sh, add modulefiles/jet.intel/fv3_debug; skip-ci
* CCPP is default in cmake build
* Add debug modulefiles for linux.gnu and macosx.gnu
* Update submodule pointer for fv3atm
* Change logic in CMakeLists.txt and tests/compile.sh so that 32BIT=ON automatically sets DYN32=ON; skip-ci
* Move logic to set DYN32 - depending on 32BIT setting - to fv3atm
* Remove -DCCPP=ON from tests/compile.sh; update submodule pointer for fv3atm; skip-ci

* point fv3 to EMC develop branch (ufs-community#377)

* update cpl gfsv16 tests, rrtmgp fix and bug fixes in cmeps (ufs-community#378)

* update CMEPS, fix character length error for gnu compile
* add Dusan's fix for rt_utils.sh
* update cpl gfsv16 tests, replace seaice_newland.grb with global_slmask.t1534.3072.1536.grb, recover input.mom6.nml.IN, update input directory, update global thread and decomp tests, update fdiag for global control
* point to Dustins rrtmgp fix branch
* update input directory

Co-authored-by: denise.worthen <Denise.Worthen@noaa.gov>
Co-authored-by: Jun Wang <junwang-noaa@users.noreply.github.com>

* Update develop from NOAA-GSL: RUC ice, MYNN sfclay, stochastic land perturbations (ufs-community#386)

* Update .gitmodules and submodule pointer for fv3atm for gsl/develop branch
* RUC ice for gsl/develop (replaces ufs-community#47) (ufs-community#49)Implementation of RUC LSM ice model in CCPP
* Squash-merge climbfuji:rucice_gfsv16dzmin into gsl/develop
* Add kice=9 to tests/tests/fv3_ccpp_rap and tests/tests/fv3_ccpp_hrrr
* Change NEW_BASELINE directory for gsl/develop to avoid conflicts with development work on the authoritative branches
* Add KICE=9 to tests/tests/fv3_ccpp_gsd_unified_ugwp and tests/tests/fv3_ccpp_gsd_drag_suite_unified_ugwp
* Revert change to .gitmodules and update submodule pointer for fv3atm
* Update gsl/develop from develop 2020/12/08 (ufs-community#50)
* Updates to stochastic_physics_wrapper (ufs-community#280)
Fix to stochastic_physics_wrapper to allow for random patterns to update at a longer time-step than model
* Update for Jet, bug fixes in running with frac_grid=T and GFDL MP, and in restarting with frac_grid=T  (ufs-community#304)
Update the modulefile for jet.intel to enable UPP v10.0.0. The hpc-stack v1.0.0 pre-release is used for this. Small changes are made to tests.rt.sh for jet.intel and gaea.intel (consistency with other platforms).
The submodule pointer update for fv3atm addresses bugs in the ufs-weather-model with frac_grid=T and GFDL microphysics, and with restarting the model when frac_grid=T (from @shansun6 and @SMoorthi-emc).
* Land stochastic perturbations (ufs-community#57)

* dycore options to add zero-gradient BC to reconstruct interface u/v and change dz_min as input (ufs-community#369)

* Update fv3atm
* update ccpp control test forecast length to 24h
* remove rename command
* Add CI related changes
* Update RT logs
* Update RT log files
* Add the gaea RT log file
* Update the point of fv3atm
* Update fv3atm
Co-authored-by: Jun Wang <junwang-noaa@users.noreply.github.com>
Co-authored-by: MinsukJi-NOAA <minsuk.ji@noaa.gov>
Co-authored-by: Jun Wang <37633869+junwang-noaa@users.noreply.github.com>

* MOM6 bugfixes, GFDL update, update CDMBGWD settings; fix for restart reproducibility (without waves) when USE_LA_LI2016=True, sign error on fprec passed to ocean, GFDL update, resolution dependent cdmbgwd settings (ufs-community#379)


* implements two MOM6 bugfixes in the NUOPC MOM6 cap to allow restart reproducibility when USE_LA_LI2016=True and to change the sign of the latent heat flux associated with frozen precipitation (fprec) exported to MOM6

* updates MOM6 to include the GFDL 20210120 main branch which contains EMC's wave coupling code, alone with some minor code standardization and documentation

* updates the cdmbgwd namelist settings for FV3 standalone tests at C96 and implements resolution dependent values for ufs-cpld tests

Co-authored-by: Ali <ali.abdolali@noaa.gov>

* Remove legacy gnumake build from fv3atm and NEMS, remove legacy Python 2.7 support, rename v16beta to v16 and RT updates (ufs-community#384)

* Update .gitmodules and submodule pointers for fv3atm and NEMS
* Remove Python 2.7 support from top-level CMakeLists.txt
* Reduce forecast length of test fv3_ccpp_gfs_v16_RRTMGP_c192L127 from 24h to 12h
* Rename v16beta to v16 everywhere except the public release documentation
* Bugfixes and missing changes
* Remove 'export CCPP_LIB_DIR=ccpp/lib' from all regression tests
* Update regression test baseline date tag to 20210128; skip-ci
* Update ecflow-python environment on cheyenne and jet; skip-ci

* Update CMEPS for HAFS integration; add datm and coupled-model tests on Gaea (ufs-community#401)


* Add HAFS support in NOAA-EMC/CMEPS 
* Add coupled and datm tests for Gaea.intel

Co-authored-by: Jun Wang <junwang-noaa@users.noreply.github.com>
Co-authored-by: Bin Li <Bin.Li@gaea13.ncrc.gov>

* Move LSM vegetation lookup tables into CCPP, clean up RUC snow cover on ice initialization (remove IPD step 2)  (ufs-community#407)

* Regression test logs for all tier=1 platforms

* updates FMS to 2020.04.01 (ufs-community#392)

* updates FMS to 2020.04.01
* fixes fms_files.cmake
* removes extra horiz_interp
* Workaround for FMS 2020.04.01 for Cheyenne with GNU 9.1.0, incl. regression test log
Co-authored-by: Mikyung Lee <mlee@Orion-login-1.HPC.MsState.Edu>
Co-authored-by: Dom Heinzeller <climbfuji@ymail.com>

* add optional mesh in MOM6; add dz_min and min_seaice as configurable variables for coupled model (ufs-community#399)

*Implements an optional setting in the cpld and datm nems.configure files to specify whether the MOM6 cap should use a mesh or a grid

*Adds configurable settings for min_seaice to gfs_physics_nml and dz_min to fv_core_nml.

* UGWP v0 v1 combined (ufs-community#396)

- combines the changes in PRs ufs-community#360 and ufs-community#382
- adds three regression tests `fv3_ccpp_gfsv16_ugwpv1 `, `fv3_ccpp_gfsv16_ugwpv1_warmstart` and `fv3_ccpp_gfsv16_ugwpv1_debug`
- contains updates and bugfixes for `nc_compare.py` and the CI tests from @MinsukJi-NOAA 
- update Python3 environment on jet.intel, gaea.intel, cheyenne.{intel,gnu}
- turn off (again) test `fv3_ccpp_decomp` on jet.intel, this test didn't work in the past, but recently it "passed", because the error checking with `nc_compare.py` failed silently and we didn't notice it

Co-authored-by: valery.yudin <valery.yudin@noaa.gov>
Co-authored-by: Michael Toy <michael.toy@noaa.gov>
Co-authored-by: MinsukJi-NOAA <minsuk.ji@noaa.gov>

* Update regression tests from GFSv15+Thompson to GFSv16+Thompson, include "Add one regional regression test in DEBUG mode. (ufs-community#419)" (ufs-community#421)

* Add one regional regression test in DEBUG mode.
* Update .gitmodules and submodule pointer for fv3atm for code review and testing
* Update regression tests from GFSv15+Thompson to GFSv16+Thompson
* Combine several COMPILE lines in tests/rt.conf and tests/rt_gnu.conf
* Regression test log for cheyenne.{gnu,intel},gaea.intel, hera.gnu, jet.intel,hera.intel,orion.intel;wcoss_cray and wcoss_dell_p3;

Co-authored-by: Phil Pegion <38869668+pjpegion@users.noreply.github.com>
Co-authored-by: jiandewang <jiande.wang@noaa.gov>
Co-authored-by: Denise Worthen <denise.worthen@noaa.gov>
Co-authored-by: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com>
Co-authored-by: Mark Potts <33099090+mark-a-potts@users.noreply.github.com>
Co-authored-by: BinLi-NOAA <bin.li@noaa.gov>
Co-authored-by: dustinswales <dustin.swales@noaa.gov>
Co-authored-by: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com>
Co-authored-by: RatkoVasic-NOAA <37597874+RatkoVasic-NOAA@users.noreply.github.com>
Co-authored-by: Ali.Abdolali <37336972+aliabdolali@users.noreply.github.com>
Co-authored-by: Jun Wang <junwang-noaa@users.noreply.github.com>
Co-authored-by: Jun Wang <37633869+junwang-noaa@users.noreply.github.com>
Co-authored-by: XiaqiongZhou-NOAA <48254930+XiaqiongZhou-NOAA@users.noreply.github.com>
Co-authored-by: Ali <ali.abdolali@noaa.gov>
Co-authored-by: Bin Li <Bin.Li@gaea13.ncrc.gov>
Co-authored-by: MiKyung Lee <58964324+mlee03@users.noreply.github.com>
Co-authored-by: valery.yudin <valery.yudin@noaa.gov>
Co-authored-by: Michael Toy <michael.toy@noaa.gov>
Co-authored-by: MinsukJi-NOAA <minsuk.ji@noaa.gov>
  • Loading branch information
20 people committed Feb 23, 2021
1 parent 77f56a4 commit 56e9901
Show file tree
Hide file tree
Showing 327 changed files with 21,685 additions and 11,521 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[submodule "FMS"]
path = FMS
url = https://github.com/NOAA-GFDL/FMS
branch = master
branch = release/2020.04
[submodule "WW3"]
path = WW3
url = https://github.com/NOAA-EMC/WW3
Expand Down
2 changes: 1 addition & 1 deletion CICE-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS "-g -traceback")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -FR -convert big_endian -assume byterecl -ftz -align array64byte -xHOST")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fp-model precise")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created -link_mpi=dbg")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created")
set(CMAKE_Fortran_LINK_FLAGS "")
else()
message(WARNING "Fortran compiler with ID ${CMAKE_Fortran_COMPILER_ID} will be used with CMake default options")
Expand Down
2 changes: 1 addition & 1 deletion CMEPS-interface/CMEPS
Submodule CMEPS updated 71 files
+17 −5 .github/pull_request_template.md
+16 −6 .github/workflows/extbuild.yml
+0 −4 .gitmodules
+48 −0 CMakeLists.txt
+16 −7 Makefile
+10 −9 cime_config/buildnml
+16 −8 cime_config/config_component.xml
+3 −1 cime_config/config_component_cesm.xml
+198 −109 cime_config/namelist_definition_drv.xml
+26 −20 cime_config/runseq/runseq_D.py
+0 −82 cime_config/runseq/runseq_NEMS.py
+2 −3 cime_config/runseq/runseq_TG.py
+91 −65 cime_config/runseq/runseq_general.py
+15 −87 cime_config/testdefs/testlist_drv.xml
+47 −0 cmake/FindESMF.cmake
+103 −0 cmake/FindPIO.cmake
+104 −0 cmake/LibCheck.cmake
+333 −0 cmake/LibFind.cmake
+0 −1 doc/source/field_naming_convention.rst
+39 −0 mediator/CMakeLists.txt
+16 −5 mediator/Makefile
+72 −87 mediator/esmFlds.F90
+420 −337 mediator/esmFldsExchange_cesm_mod.F90
+474 −71 mediator/esmFldsExchange_hafs_mod.F90
+23 −20 mediator/esmFldsExchange_nems_mod.F90
+14 −0 mediator/fd_cesm.yaml
+0 −485 mediator/fd_hafs.yaml
+61 −9 mediator/fd_nems.yaml
+508 −275 mediator/med.F90
+291 −180 mediator/med_diag_mod.F90
+225 −222 mediator/med_fraction_mod.F90
+4 −28 mediator/med_internalstate_mod.F90
+201 −155 mediator/med_io_mod.F90
+63 −16 mediator/med_map_mod.F90
+25 −17 mediator/med_merge_mod.F90
+132 −11 mediator/med_methods_mod.F90
+83 −38 mediator/med_phases_aofluxes_mod.F90
+1 −1 mediator/med_phases_history_mod.F90
+1 −1 mediator/med_phases_ocnalb_mod.F90
+103 −0 mediator/med_phases_post_atm_mod.F90
+569 −0 mediator/med_phases_post_glc_mod.F90
+104 −0 mediator/med_phases_post_ice_mod.F90
+152 −0 mediator/med_phases_post_lnd_mod.F90
+93 −0 mediator/med_phases_post_ocn_mod.F90
+96 −0 mediator/med_phases_post_rof_mod.F90
+79 −0 mediator/med_phases_post_wav_mod.F90
+122 −137 mediator/med_phases_prep_atm_mod.F90
+864 −621 mediator/med_phases_prep_glc_mod.F90
+83 −132 mediator/med_phases_prep_ice_mod.F90
+48 −408 mediator/med_phases_prep_lnd_mod.F90
+67 −186 mediator/med_phases_prep_ocn_mod.F90
+240 −203 mediator/med_phases_prep_rof_mod.F90
+6 −10 mediator/med_phases_profile_mod.F90
+13 −2 mediator/med_phases_restart_mod.F90
+0 −2 mediator/med_utils_mod.F90
+0 −1 nems/lib/genf90
+7 −0 util/CMakeLists.txt
+6 −3 util/Makefile
+0 −0 util/dtypes.h
+0 −0 util/genf90.pl
+0 −0 util/glc_elevclass_mod.F90
+0 −0 util/perf_mod.F90
+0 −0 util/shr_abort_mod.F90
+0 −0 util/shr_const_mod.F90
+27 −23 util/shr_flux_mod.F90
+0 −0 util/shr_kind_mod.F90
+0 −0 util/shr_log_mod.F90
+0 −0 util/shr_mem_mod.F90
+0 −0 util/shr_mpi_mod.F90
+0 −0 util/shr_pio_mod.F90
+0 −0 util/shr_sys_mod.F90
31 changes: 19 additions & 12 deletions CMEPS-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ else()
endif()

list(APPEND _nems_util_files
CMEPS/nems/util/shr_abort_mod.F90
CMEPS/nems/util/shr_log_mod.F90
CMEPS/nems/util/shr_pio_mod.F90
CMEPS/nems/util/shr_sys_mod.F90
CMEPS/nems/util/shr_flux_mod.F90
CMEPS/nems/util/shr_mpi_mod.F90
CMEPS/nems/util/glc_elevclass_mod.F90
CMEPS/nems/util/shr_mem_mod.F90
CMEPS/nems/util/shr_kind_mod.F90
CMEPS/nems/util/perf_mod.F90
CMEPS/nems/util/shr_const_mod.F90)
CMEPS/util/shr_abort_mod.F90
CMEPS/util/shr_log_mod.F90
CMEPS/util/shr_pio_mod.F90
CMEPS/util/shr_sys_mod.F90
CMEPS/util/shr_flux_mod.F90
CMEPS/util/shr_mpi_mod.F90
CMEPS/util/glc_elevclass_mod.F90
CMEPS/util/shr_mem_mod.F90
CMEPS/util/shr_kind_mod.F90
CMEPS/util/perf_mod.F90
CMEPS/util/shr_const_mod.F90)

list(APPEND _mediator_files
CMEPS/mediator/med_phases_restart_mod.F90
Expand Down Expand Up @@ -56,7 +56,14 @@ list(APPEND _mediator_files
CMEPS/mediator/med_fraction_mod.F90
CMEPS/mediator/med_phases_aofluxes_mod.F90
CMEPS/mediator/med_io_mod.F90
CMEPS/mediator/med_diag_mod.F90)
CMEPS/mediator/med_diag_mod.F90
CMEPS/mediator/med_phases_post_atm_mod.F90
CMEPS/mediator/med_phases_post_ice_mod.F90
CMEPS/mediator/med_phases_post_ocn_mod.F90
CMEPS/mediator/med_phases_post_lnd_mod.F90
CMEPS/mediator/med_phases_post_glc_mod.F90
CMEPS/mediator/med_phases_post_rof_mod.F90
CMEPS/mediator/med_phases_post_wav_mod.F90)

list(APPEND _mediator_defs ESMF_VERSION_MAJOR=${ESMF_VERSION_MAJOR}
ESMF_VERSION_MINOR=${ESMF_VERSION_MINOR}
Expand Down
83 changes: 59 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules/Modules)
set(32BIT OFF CACHE BOOL "Enable 32BIT (single precision arithmetic in dycore)")
set(AVX2 ON CACHE BOOL "Enable AVX2 instruction set")
set(SIMDMULTIARCH OFF CACHE BOOL "Enable multi-target SIMD instruction sets")
set(CCPP ON CACHE BOOL "Enable CCPP")
set(DEBUG OFF CACHE BOOL "Enable DEBUG mode")
set(DEBUG_LINKMPI ON CACHE BOOL "Enable linkmpi option when DEBUG mode is on")
set(INLINE_POST OFF CACHE BOOL "Enable inline post")
Expand All @@ -32,13 +31,16 @@ set(QUAD_PRECISION ON CACHE BOOL "Enable QUAD_PRECISION (for certain grid metr
set(REPRO OFF CACHE BOOL "Enable REPRO mode")
set(WW3 OFF CACHE BOOL "Enable WW3")
set(S2S OFF CACHE BOOL "Enable S2S")
set(JEDI_DRIVER OFF CACHE BOOL "Enable JEDI as top level driver")
set(DATM OFF CACHE BOOL "Enable Data Atmosphere")

###############################################################################
### Set CMAKE_BUILD_TYPE for DEBUG mode
###############################################################################
if(DEBUG)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Set type of build to Debug." FORCE)
else()
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Set type of build to Release." FORCE)
endif()

if(CMAKE_Platform)
Expand All @@ -49,13 +51,23 @@ if(CMAKE_Platform)
else()
message("Platform '${CMAKE_Platform}' configuration file does not exist")
endif()

# DH* 20210208 temporary workaround for FMS issues on Cheyenne with GNU 9.1.0
if (CMAKE_Platform MATCHES "cheyenne.gnu")
message("Applying patch cheyenne_gnu_fms_mpp_util_mpi_inc.patch")
execute_process(COMMAND patch -N -p0 INPUT_FILE cheyenne_gnu_fms_mpp_util_mpi_inc.patch
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/cheyenne_gnu_fms_mpp_util_mpi_inc.patch.out
ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/cheyenne_gnu_fms_mpp_util_mpi_inc.patch.err
RESULT_VARIABLE RC)
# *DH 20210208
endif()
endif()

message("")
message("32BIT ............ ${32BIT}")
message("AVX2 ............. ${AVX2}")
message("SIMDMULTIARCH ... ${SIMDMULTIARCH}")
message("CCPP ............. ${CCPP}")
message("DEBUG ............ ${DEBUG}")
message("DEBUG_LINKMPI .... ${DEBUG_LINKMPI}")
message("INLINE_POST ...... ${INLINE_POST}")
Expand Down Expand Up @@ -109,13 +121,9 @@ endif()
# See https://github.com/NOAA-EMC/NCEPLIBS-nemsio/pull/22
target_link_libraries(nemsio::nemsio INTERFACE w3emc::w3emc_d bacio::bacio_4)

if(CCPP)
find_package(Python 3 QUIET COMPONENTS Interpreter)
if (NOT Python_Interpreter_FOUND)
find_package(Python 2.7 REQUIRED COMPONENTS Interpreter)
endif()
message("Found Python: ${Python_EXECUTABLE}")
endif()
# Configure Python
find_package(Python 3 REQUIRED COMPONENTS Interpreter)
message("Found Python: ${Python_EXECUTABLE}")

###############################################################################
### Checks
Expand All @@ -132,9 +140,7 @@ endif()
### FMS
###############################################################################
include(fms_files.cmake)
add_library(fms ${fms_src_files})
# stupid cmake can not figure out dependency of fft.F90 on fft99.F90 because 'use fft99_mod' is inside ifdefs
set_property(SOURCE FMS/fft/fft.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "-DSGICRAY=0 -DNAGFFT=0")
add_library(fms ${fms_src_files} ${fms_headers})

list(APPEND _fms_defs_public use_libMPI
use_netCDF
Expand All @@ -143,26 +149,39 @@ list(APPEND _fms_defs_public use_libMPI
if(QUAD_PRECISION)
list(APPEND _fms_defs_public ENABLE_QUAD_PRECISION)
endif()

# check gettid
include(CheckFunctionExists)
check_function_exists(gettid HAVE_GETTID)
if(HAVE_GETTID)
list(APPEND _fms_defs_public HAVE_GETTID)
endif()

target_compile_definitions(fms PUBLIC "${_fms_defs_public}")

if(32BIT)
list(APPEND _fms_defs_private OVERLOAD_R4
OVERLOAD_R8)
endif()

target_compile_definitions(fms PRIVATE "${_fms_defs_private}")

target_include_directories(fms PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/FMS/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/FMS/fms>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/FMS/fms2_io/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/FMS/mod>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/FMS/mpp/include>)
target_include_directories(fms INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/mod>)
target_link_libraries(fms PUBLIC MPI::MPI_Fortran
NetCDF::NetCDF_Fortran)
if(OpenMP_Fortran_FOUND)
target_link_libraries(fms PRIVATE OpenMP::OpenMP_Fortran)
endif()
set_target_properties(fms PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/FMS)
set_target_properties(fms PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/FMS/mod)
target_include_directories(fms INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/FMS/mod>
$<INSTALL_INTERFACE:FMS/mod>)
set_target_properties(fms PROPERTIES PUBLIC_HEADER "${fms_headers}" )

###############################################################################
### stochastic_physics
Expand All @@ -189,6 +208,10 @@ if(WW3)
set(WW3_COMP "hera")
elseif(${CMAKE_Platform} STREQUAL "orion.intel")
set(WW3_COMP "orion")
elseif(${CMAKE_Platform} STREQUAL "cheyenne.intel")
set(WW3_COMP "cheyenne")
elseif(${CMAKE_Platform} STREQUAL "wcoss2")
set(WW3_COMP "wcoss_cray")
elseif(${CMAKE_Platform} MATCHES "linux*" OR ${CMAKE_Platform} MATCHES "macosx*")
if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(WW3_COMP "gnu")
Expand Down Expand Up @@ -232,8 +255,7 @@ list(APPEND _nems_srcs NEMS/src/module_NEMS_UTILS.F90
NEMS/src/module_NEMS_INTERNAL_STATE.F90
NEMS/src/module_NEMS_GRID_COMP.F90
NEMS/src/module_NEMS_Rusage.F90
NEMS/src/nems_c_rusage.c
NEMS/src/ENS_Cpl/ENS_CplComp_ESMFMod_STUB.F90)
NEMS/src/nems_c_rusage.c)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/NEMS/src/ESMFVersionDefine_ESMF_NUOPC.h
${CMAKE_CURRENT_BINARY_DIR}/NEMS/src/ESMFVersionDefine.h
Expand All @@ -259,7 +281,9 @@ else()
list(APPEND _ufs_defs_private FRONT_FV3=fv3gfs_cap_mod)
add_dependencies(ufs fv3atm)
endif()

if(JEDI_DRIVER)
list(APPEND _ufs_defs_private JEDI_DRIVER=ON)
endif()
set_target_properties(ufs PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(ufs PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/NEMS/src)

Expand Down Expand Up @@ -314,7 +338,7 @@ endif()
target_compile_definitions(ufs_model PRIVATE "${_ufs_model_defs_private}")

if(DATM)
target_link_libraries(ufs_model PRIVATE ufs w3nco::w3nco_d)
target_link_libraries(ufs_model PUBLIC ufs w3nco::w3nco_d)
endif()
target_link_libraries(ufs_model PRIVATE ufs
esmf
Expand All @@ -325,17 +349,28 @@ target_link_libraries(ufs_model PRIVATE ufs
### Install
###############################################################################
install(
TARGETS ufs_model ufs fms
EXPORT ufs-config
RUNTIME DESTINATION bin
TARGETS fms
EXPORT fms-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include )

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/FMS/mod DESTINATION ${CMAKE_INSTALL_PREFIX})

install(EXPORT fms-config
DESTINATION lib/cmake
)
install(
TARGETS ufs
EXPORT ufs-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX})

install(EXPORT ufs-config
DESTINATION lib/cmake)

install(EXPORT ufs-config
DESTINATION lib/cmake
)
###############################################################################
### Done
###############################################################################
2 changes: 1 addition & 1 deletion DATM
2 changes: 1 addition & 1 deletion FMS
Submodule FMS updated 330 files
2 changes: 1 addition & 1 deletion FV3
Submodule FV3 updated 195 files
2 changes: 1 addition & 1 deletion MOM6-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -i4 -r8")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -sox")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -debug minimal -fp-model source")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check -check noarg_temp_created -check nopointer -fpe0 -ftrapuv -link_mpi=dbg")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check -check noarg_temp_created -check nopointer -fpe0 -ftrapuv")
set(CMAKE_Fortran_LINK_FLAGS "")
else()
message(WARNING "Fortran compiler with ID ${CMAKE_Fortran_COMPILER_ID} will be used with CMake default options")
Expand Down
2 changes: 1 addition & 1 deletion NEMS
Submodule NEMS updated 135 files
2 changes: 1 addition & 1 deletion WW3
Submodule WW3 updated 107 files
12 changes: 12 additions & 0 deletions cheyenne_gnu_fms_mpp_util_mpi_inc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- FMS/mpp/include/mpp_util_mpi.inc 2021-02-08 08:24:21.000000000 -0700
+++ FMS/mpp/include/mpp_util_mpi.inc 2021-02-08 08:24:15.000000000 -0700
@@ -169,7 +169,8 @@
integer, intent(in ), optional :: msg_size(:)
integer, intent(in ), optional :: msg_type(:)

- integer :: i, m, n, stride, my_check, rsize
+ integer :: i, m, n, stride, my_check
+ integer, volatile :: rsize

if( debug .and. (current_clock.NE.0) )call SYSTEM_CLOCK(start_tick)
my_check = EVENT_SEND
10 changes: 6 additions & 4 deletions cmake/Intel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ elseif(DEBUG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align")
else()
if(AVX2)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -xCORE-AVX2 -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -xCORE-AVX2 -qno-opt-dynamic-align")
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -xCORE-AVX2 -qno-opt-dynamic-align")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -xCORE-AVX2 -qno-opt-dynamic-align")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -march=core-avx2 -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=core-avx2 -qno-opt-dynamic-align")
elseif(SIMDMULTIARCH)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -axSSE4.2,AVX,CORE-AVX2,CORE-AVX512 -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -axSSE4.2,AVX,CORE-AVX2,CORE-AVX512 -qno-opt-dynamic-align")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -axSSE4.2,CORE-AVX2 -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -axSSE4.2,CORE-AVX2 -qno-opt-dynamic-align")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align")
Expand Down
3 changes: 3 additions & 0 deletions cmake/configure_wcoss2.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(INLINE_POST ON CACHE BOOL "Enable inline post" FORCE)
set(PARALLEL_NETCDF ON CACHE BOOL "Enable parallel NetCDF" FORCE)
set(DEBUG_LINKMPI OFF CACHE BOOL "Enable linkmpi option when DEBUG mode is on" FORCE)
Loading

0 comments on commit 56e9901

Please sign in to comment.