Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
89ef2e4
working version with JEDI
mark-a-potts Sep 23, 2021
d3d3070
Merge branch 'develop' of github.com:ufs-community/ufs-weather-model …
mark-a-potts Oct 29, 2021
362ba02
update pointer
mark-a-potts Dec 20, 2021
abc42eb
Updated pointer again
mark-a-potts Dec 20, 2021
2f9696f
added public
mark-a-potts Dec 20, 2021
6e3e51d
removed source
mark-a-potts Dec 20, 2021
be8bfcd
changed inline post to off for JEDI
mark-a-potts Jan 4, 2022
d6081c9
updated cdeps repo
mark-a-potts Jan 11, 2022
aad8eb9
updated MOM6 to work with SOCA
mark-a-potts Jan 11, 2022
41febf9
Updates for build with mom6
mark-a-potts Jan 11, 2022
3be7fa2
removed gsw from list of files
mark-a-potts Jan 11, 2022
50f5e02
Using jcsda version of MOM6
mark-a-potts Jan 25, 2022
a4d10cd
updates for finding gsw
mark-a-potts Jan 25, 2022
4135a5c
added gsw to link
mark-a-potts Jan 25, 2022
5b1efb6
turn on mom6solo
mark-a-potts Jan 25, 2022
07592a4
changed mom to my fork
mark-a-potts Jan 25, 2022
6bf36e5
added -fPIC
mark-a-potts Jan 25, 2022
3c00149
moved more into libmom
mark-a-potts Jan 26, 2022
7975947
Updating pointer
mark-a-potts Jan 26, 2022
37e0917
tweak for pnetcdf
mark-a-potts Jan 27, 2022
b38c867
changed MOM6 to my version
mark-a-potts Mar 10, 2022
68f2f37
updated pointer
mark-a-potts Mar 10, 2022
983ade7
cherry pick of cmakelists.txt
mark-a-potts Mar 10, 2022
29be1ac
cherry pick of cmake_files
mark-a-potts Mar 10, 2022
25bfc69
added pio includes
mark-a-potts Mar 10, 2022
195d7fd
added gsw to link
mark-a-potts Mar 10, 2022
2148f61
tweaked PIO
mark-a-potts Mar 10, 2022
8b9a1eb
turned on inline post
mark-a-potts Mar 12, 2022
2942439
fixes for inline post
mark-a-potts Mar 12, 2022
dc06e4e
updates for inline post stubs
mark-a-potts Mar 12, 2022
0c57527
removed file from mom6 list
mark-a-potts Mar 12, 2022
c8fc25a
added files to mom6 list
mark-a-potts Mar 12, 2022
ac2241f
updated pointer to mom6
mark-a-potts Mar 16, 2022
11e32e6
updated files
mark-a-potts Mar 16, 2022
b4f653f
adding some debuggin
mark-a-potts Mar 16, 2022
1d15e9b
adding some debuggin
mark-a-potts Mar 16, 2022
05009e3
adding some debuggin
mark-a-potts Mar 16, 2022
f7e30b9
more debuggin
mark-a-potts Mar 16, 2022
90b5b00
made remap winds/scalar public
mark-a-potts Mar 30, 2022
c7c15ae
trying to add 3d t/s fields to ocean_public
mark-a-potts Apr 21, 2022
795d684
exposing tocn
mark-a-potts Apr 22, 2022
7ca0506
exposing PT
mark-a-potts Apr 22, 2022
ad0b97a
exposing PT
mark-a-potts Apr 22, 2022
74656cd
debugging
mark-a-potts Apr 25, 2022
f627a78
debugging
mark-a-potts Apr 25, 2022
66b7560
debugging
mark-a-potts Apr 25, 2022
00a9b3c
Updated version of mom6 with tocn being passed to soca
mark-a-potts Apr 29, 2022
d6c90e0
added socn to fields exported
mark-a-potts May 2, 2022
83b11cf
Merge branch 'feature/godas' of https://github.com/mark-a-potts/ufs-w…
mark-a-potts May 2, 2022
5cecebd
Merge branch 'feature/soca' of https://github.com/mark-a-potts/ufs-we…
mark-a-potts May 2, 2022
e2d70ea
adding u and v
mark-a-potts May 2, 2022
3530d3b
Merge branch 'feature/godas' of https://github.com/mark-a-potts/ufs-w…
mark-a-potts May 2, 2022
4a1bf3d
bug fix
mark-a-potts May 2, 2022
f94c25b
replaced cmakelists
mark-a-potts May 2, 2022
f77fc59
merging in updates
mark-a-potts May 16, 2022
cdcbc2f
updated pointers
mark-a-potts May 16, 2022
6241501
more pointer stuff
mark-a-potts May 16, 2022
5d52e2e
more pointer stuff
mark-a-potts May 16, 2022
753a773
added ccpp_physics as dependency
mark-a-potts May 18, 2022
a33644f
change
mark-a-potts May 18, 2022
9454ef7
release/public-v3: Create/merge Release public v3 branch for SRW rele…
mark-a-potts Jun 16, 2022
7b7fbc9
Merge remote-tracking branch 'upstream/release/public-v3.0' into HEAD
mark-a-potts Jun 24, 2022
af36142
updated mom6 pointer
mark-a-potts Jun 24, 2022
9fa8d78
updated pointer to atmos_cubed_sphere
mark-a-potts Jun 27, 2022
2b92586
removed debug statements
mark-a-potts Jun 28, 2022
9f23976
Testing out merge
mark-a-potts Jun 28, 2022
afe792c
fixed merge
mark-a-potts Jun 28, 2022
85b8918
changes to cap
mark-a-potts Jun 29, 2022
3df7047
fixed missing 2d section
mark-a-potts Jun 29, 2022
fc07a73
updated pointer
mark-a-potts Jun 29, 2022
e4d8ad8
mods for jedi build
mark-a-potts Jun 30, 2022
bf1fe65
updated pointer
mark-a-potts Jul 26, 2022
e4874d2
updated pointer
mark-a-potts Jul 26, 2022
38b63b4
Update .gitmodules to point to Dom's forks of mom6 and fv3atm
climbfuji Oct 18, 2022
97197ce
Update .gitmodules to point to Dom's fork for AQM
climbfuji Oct 18, 2022
8230673
Find PIO
climbfuji Oct 20, 2022
4305fc1
Update submodule pointer for CMakeModules
climbfuji Oct 20, 2022
2f29989
Debug finding PIO
climbfuji Oct 20, 2022
7de6eb8
Debug finding PIO
climbfuji Oct 20, 2022
d0a5424
Debug finding PIO
climbfuji Oct 20, 2022
f7e7c8b
Debug finding PIO
climbfuji Oct 20, 2022
d3d9a92
Debug finding PIO
climbfuji Oct 20, 2022
e90bd85
Debug finding PIO
climbfuji Oct 20, 2022
4dbab82
Fix CDEPS-interface/ufs/cdeps_share/shr_infnan_mod.F90
climbfuji Oct 20, 2022
d4daea9
Fix MOM6-interface/CMakeLists.txt
climbfuji Oct 20, 2022
7ab3210
Merge develop into JEDI dev branch
climbfuji Nov 15, 2022
970aa77
Update submodule pointer for MOM6-interface/MOM6
climbfuji Nov 15, 2022
3999730
Remove external gsw from MOM6-interface/CMakeLists.txt
climbfuji Nov 17, 2022
e5c48dd
Merge branch 'feature/consolidate_dom_update_20221114' of https://git…
climbfuji Nov 17, 2022
4d1f1b7
Update submodule pointer for MOM6
climbfuji Nov 17, 2022
7b0bbad
Update submodule pointer for MOM6-interface/MOM6
climbfuji Nov 18, 2022
611f6f7
Update submodule pointer for MOM6
climbfuji Nov 18, 2022
1148b75
Update CMakeLists.txt
climbfuji Nov 19, 2022
a368dc6
Revert MOM6 cmakelist changes
climbfuji Nov 19, 2022
2d9a051
Link against external gsw in MOM6, if available
climbfuji Nov 19, 2022
43ddfbf
Debugging info
climbfuji Nov 21, 2022
cd86914
Revert debugging info
climbfuji Nov 21, 2022
719cf1b
Update submodule pointer for MOM6-interface/MOM6
climbfuji Nov 23, 2022
1cb4634
Merge commit '8d90fe7abed9cecda39e84be99b1ac744d6466c6' of https://gi…
climbfuji Nov 23, 2022
df8dc47
Cleanup for PR
climbfuji Nov 23, 2022
f847066
Update submodule pointer for FV3
climbfuji Nov 23, 2022
859af0f
Point FV3 back to NOAA-EMC develop
climbfuji Nov 23, 2022
b435b85
Put several files back into mom6_nuopc_src_files
climbfuji Nov 23, 2022
f626f5a
Update .gitmodules and submodule pointer for fv3atm
climbfuji Jan 17, 2023
c5c9ce8
Merge branch 'develop' of https://github.com/ufs-community/ufs-weathe…
climbfuji Jan 18, 2023
1452be4
Update submodule pointer for MOM6-interface/MOM6
climbfuji Jan 20, 2023
db622d0
Update submodule pointer for fv3atm
climbfuji Jan 23, 2023
bd64387
Update submodule pointer for FV3
climbfuji Feb 23, 2023
27c994a
Update from develop on 2023/03/06
climbfuji Mar 6, 2023
4de0750
Update .gitmodules
climbfuji Mar 13, 2023
8806f06
Update submodule pointer for fv3atm
climbfuji Mar 16, 2023
d1ffbcb
Update submodule pointer for fv3atm
climbfuji Mar 18, 2023
3eba73a
Revert .gitmodules and update submodule pointer for fv3atm
climbfuji Mar 20, 2023
173d224
Update submodule pointer for FV3
climbfuji Mar 20, 2023
fd9bc6c
Feature/move exchange for jedi (#13)
climbfuji Mar 22, 2023
81fc699
Merge branch 'develop' of https://github.com/ufs-community/ufs-weathe…
climbfuji Jul 17, 2023
652c82f
Update submodule pointer for FV3
climbfuji Jul 17, 2023
83adbeb
Revert .gitmodules and update submodule pointer for FV3
climbfuji Jul 18, 2023
8ad5e99
Update .gitmodules and submodule pointer for GOCART for spack-stack-1…
climbfuji Sep 26, 2023
12ddb22
Update .gitmodules and submodule pointer for GOCART
climbfuji Sep 27, 2023
5f09e89
Add additional inputs in GOCART control file for FENGSHA
bbakernoaa Sep 25, 2023
2a0e1fa
Update submodule pointer for MOM6-interface/MOM6
climbfuji Dec 13, 2023
88602d3
Update submodule pointer for MOM6
climbfuji Dec 15, 2023
e05fa95
Update submodule pointer for MOM6
climbfuji Dec 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[submodule "FV3"]
path = FV3
url = https://github.com/NOAA-EMC/fv3atm
branch = develop
#url = https://github.com/NOAA-EMC/fv3atm
#branch = develop
url = https://github.com/climbfuji/fv3atm
branch = feature/ufs_jedi
[submodule "WW3"]
path = WW3
url = https://github.com/NOAA-EMC/WW3
Expand All @@ -24,8 +26,10 @@
branch = emc/develop
[submodule "MOM6"]
path = MOM6-interface/MOM6
url = https://github.com/NOAA-EMC/MOM6
branch = dev/emc
#url = https://github.com/NOAA-EMC/MOM6
#branch = dev/emc
url = https://github.com/climbfuji/MOM6
branch = feature/ufs-bundle-dom
[submodule "CICE"]
path = CICE-interface/CICE
url = https://github.com/NOAA-EMC/CICE
Expand All @@ -40,8 +44,10 @@
branch = develop
[submodule "AQM"]
path = AQM
url = https://github.com/NOAA-EMC/AQM
branch = develop
#url = https://github.com/NOAA-EMC/AQM
#branch = develop
url = https://github.com/climbfuji/AQM
branch = feature/ufs-bundle-dom
[submodule "NOAHMP"]

@climbfuji climbfuji Nov 23, 2022

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self. This PR contains develop as of Nov 14, therefore the NoahMP submodule still shows up as a change. Need to pull in/fast forward and then this should go away (and some other stuff)

path = NOAHMP-interface/noahmp
url = https://github.com/NOAA-EMC/noahmp
Expand Down
2 changes: 1 addition & 1 deletion AQM
Submodule AQM updated 2 files
+2 −2 .gitmodules
+1 −1 src/model/CMAQ
2 changes: 2 additions & 0 deletions CDEPS-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ add_library(docn OBJECT ${cdeps_docn_files})
add_dependencies(docn share streams dshr)
set_target_properties(docn PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(docn PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>)
set(PIO_Fortran_INCLUDE_DIR ${PIO_MODULE_DIR})
target_include_directories (docn PRIVATE "${PIO_Fortran_INCLUDE_DIR}")
target_link_libraries(docn PRIVATE dshr share streams)
target_link_libraries(docn PRIVATE esmf PIO::PIO_Fortran)

Expand Down
16 changes: 8 additions & 8 deletions CDEPS-interface/ufs/cdeps_share/shr_infnan_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,11 @@ elemental function shr_infnan_isposinf_double(x) result(isposinf)
use, intrinsic :: ieee_arithmetic, only: &
ieee_class, &
ieee_positive_inf, &
operator(==)
operator(.eq.)

@climbfuji climbfuji Nov 23, 2022

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was required for macOS and should work on Linux, too.

real(r8), intent(in) :: x
logical :: isposinf

isposinf = (ieee_positive_inf == ieee_class(x))
isposinf = (ieee_positive_inf .eq. ieee_class(x))

# 202 "shr_infnan_mod.F90.in"
end function shr_infnan_isposinf_double
Expand All @@ -331,11 +331,11 @@ elemental function shr_infnan_isposinf_real(x) result(isposinf)
use, intrinsic :: ieee_arithmetic, only: &
ieee_class, &
ieee_positive_inf, &
operator(==)
operator(.eq.)
real(r4), intent(in) :: x
logical :: isposinf

isposinf = (ieee_positive_inf == ieee_class(x))
isposinf = (ieee_positive_inf .eq. ieee_class(x))

# 202 "shr_infnan_mod.F90.in"
end function shr_infnan_isposinf_real
Expand All @@ -346,11 +346,11 @@ elemental function shr_infnan_isneginf_double(x) result(isneginf)
use, intrinsic :: ieee_arithmetic, only: &
ieee_class, &
ieee_negative_inf, &
operator(==)
operator(.eq.)
real(r8), intent(in) :: x
logical :: isneginf

isneginf = (ieee_negative_inf == ieee_class(x))
isneginf = (ieee_negative_inf .eq. ieee_class(x))

# 215 "shr_infnan_mod.F90.in"
end function shr_infnan_isneginf_double
Expand All @@ -360,11 +360,11 @@ elemental function shr_infnan_isneginf_real(x) result(isneginf)
use, intrinsic :: ieee_arithmetic, only: &
ieee_class, &
ieee_negative_inf, &
operator(==)
operator(.eq.)
real(r4), intent(in) :: x
logical :: isneginf

isneginf = (ieee_negative_inf == ieee_class(x))
isneginf = (ieee_negative_inf .eq. ieee_class(x))

# 215 "shr_infnan_mod.F90.in"
end function shr_infnan_isneginf_real
Expand Down
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,17 @@ target_link_libraries(ufs PUBLIC "${_ufs_libs_public}")
###############################################################################
add_executable(ufs_model driver/UFS.F90)
add_dependencies(ufs_model ufs)
target_link_libraries(ufs_model ufs esmf w3emc::w3emc_d)

# DH* 20230717
# Note to self - this needs to be inside an if block for the JEDI-UFS build,
# and the commmented line below needs to be reinstantiated as "else" (or similar)
if(APP MATCHES "^(ATM)$")
target_link_libraries(ufs_model ufs esmf w3emc::w3emc_d)
else()
target_link_libraries(ufs_model ufs esmf w3emc::w3emc_d gsw)
endif()
#target_link_libraries(ufs_model ufs esmf w3emc::w3emc_d)
# *DH 20230717
set_target_properties(ufs_model PROPERTIES LINKER_LANGUAGE Fortran)

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion FV3
2 changes: 1 addition & 1 deletion GOCART
Submodule GOCART updated 58 files
+2 −2 .circleci/config.yml
+29 −0 .github/workflows/enforce-labels.yml
+83 −1 CHANGELOG.md
+6 −0 CMakeLists.txt
+29 −17 ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP.20C/CA2G_GridComp_ExtData.rc
+31 −19 ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.rc
+49 −62 ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.yaml
+101 −70 ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90
+31 −19 ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc
+47 −60 ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.yaml
+32 −31 ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc
+4 −1 ESMF/GOCART2G_GridComp/CA2G_GridComp/CMakeLists.txt
+5 −0 ESMF/GOCART2G_GridComp/CMakeLists.txt
+34 −74 ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP/DU2G_GridComp_ExtData.yaml
+5 −0 ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeLists.txt
+111 −79 ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90
+29 −29 ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc
+34 −74 ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.yaml
+1 −0 ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc
+2 −0 ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc
+5 −0 ESMF/GOCART2G_GridComp/GA_Environment/CMakeLists.txt
+215 −164 ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90
+9 −3 ESMF/GOCART2G_GridComp/GOCART2G_StateSpecs.rc
+3 −3 ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP.20C/NI2G_GridComp_ExtData.rc
+4 −4 ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.rc
+7 −17 ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.yaml
+5 −0 ESMF/GOCART2G_GridComp/NI2G_GridComp/CMakeLists.txt
+136 −92 ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90
+4 −4 ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc
+6 −16 ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.yaml
+12 −11 ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc
+34 −74 ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP/SS2G_GridComp_ExtData.yaml
+4 −1 ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeLists.txt
+84 −68 ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90
+25 −25 ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.rc
+34 −74 ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.yaml
+8 −7 ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc
+13 −13 ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_GridComp_ExtData.rc
+14 −14 ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.rc
+19 −52 ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.yaml
+5 −0 ESMF/GOCART2G_GridComp/SU2G_GridComp/CMakeLists.txt
+179 −142 ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90
+14 −14 ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc
+18 −51 ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.yaml
+11 −9 ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc
+1 −1 ESMF/GOCART_GridComp/CO_GridComp/AMIP/CO_GridComp_ExtData.rc
+3 −3 ESMF/GOCART_GridComp/CO_GridComp/AMIP/CO_GridComp_ExtData.yaml
+1 −1 ESMF/GOCART_GridComp/CO_GridComp/CO_GridComp_ExtData.rc
+2 −2 ESMF/GOCART_GridComp/CO_GridComp/CO_GridComp_ExtData.yaml
+1 −1 ESMF/GOCART_GridComp/GOCART_GridCompMod.F90
+1 −1 ESMF/GOCART_GridComp/O3_GridComp/AMIP.20C/O3_GridComp.rc
+1 −1 ESMF/GOCART_GridComp/O3_GridComp/AMIP/O3_GridComp.rc
+1 −1 ESMF/GOCART_GridComp/O3_GridComp/O3_GridComp.rc
+1 −1 ESMF/Shared/Chem_AeroGeneric.F90
+5 −0 Process_Library/CMakeLists.txt
+34 −24 Process_Library/GOCART2G_MieMod.F90
+110 −58 Process_Library/GOCART2G_Process.F90
+7 −6 components.yaml
35 changes: 30 additions & 5 deletions MOM6-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,34 @@ 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 -init=snan,arrays")
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")
endif()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${MOM6_Extra_FORTRAN_FLAGS}")

# User option to build MOM6 solo executable
set(MOM6SOLO OFF CACHE BOOL "Build MOM6 solo")
set(MOM6SOLO ON CACHE BOOL "Build MOM6 solo")

# Too many files to list, so include them via this file
include("mom6_files.cmake")

### Use common object library for building target library
add_library(mom6_obj OBJECT ${mom6_src_files})
### Use common object library for building target library,
### link against external gsw if found.
# GSW
find_package( gsw QUIET )
if( ${gsw_FOUND} )
message(STATUS "GSW FOUND; link against external gsw")
else( ${gsw_FOUND} )
message(STATUS "GSW NOT FOUND: build internal gsw")
endif( ${gsw_FOUND} )

if(${gsw_FOUND})
add_library(mom6_obj OBJECT ${mom6_src_files})
else()
add_library(mom6_obj OBJECT ${mom6_src_files} ${gsw_src_files})
endif()
set_target_properties(mom6_obj PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(mom6_obj PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>)
target_include_directories(mom6_obj PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/MOM6/config_src/memory/dynamic_nonsymmetric>
Expand All @@ -34,6 +47,10 @@ target_link_libraries(mom6_obj PRIVATE fms
esmf
stochastic_physics
NetCDF::NetCDF_Fortran)
if(${gsw_FOUND})
target_link_libraries(mom6_obj PRIVATE gsw)
endif()

# OpenMP is disabled in MOM6
#if(OpenMP_Fortran_FOUND)
# target_link_libraries(mom6_obj PRIVATE OpenMP::OpenMP_Fortran)
Expand All @@ -42,12 +59,16 @@ target_link_libraries(mom6_obj PRIVATE fms
add_library(mom6_nuopc_obj OBJECT ${mom6_nuopc_src_files})
set_target_properties(mom6_nuopc_obj PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(mom6_nuopc_obj PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>)
target_include_directories(mom6_nuopc_obj PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../stochastic_physics/mod>)
target_include_directories(mom6_nuopc_obj PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/MOM6/config_src/memory/dynamic_nonsymmetric>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/MOM6/src/framework>)
target_link_libraries(mom6_nuopc_obj PRIVATE mom6_obj
fms
stochastic_physics
esmf)
if(${gsw_FOUND})
target_link_libraries(mom6_nuopc_obj PRIVATE PRIVATE gsw)
endif()

# OpenMP is disabled in MOM6
#if(OpenMP_Fortran_FOUND)
# target_link_libraries(mom6_nuopc_obj PRIVATE OpenMP::OpenMP_Fortran)
Expand Down Expand Up @@ -84,6 +105,10 @@ if(MOM6SOLO)
stochastic_physics
esmf
NetCDF::NetCDF_Fortran)
if(${gsw_FOUND})
target_link_libraries(mom6_nuopc_obj PRIVATE PRIVATE gsw)
endif()

# OpenMP is disabled in MOM6
#if(OpenMP_Fortran_FOUND)
# target_link_libraries(mom6solo PRIVATE OpenMP::OpenMP_Fortran)
Expand Down
74 changes: 41 additions & 33 deletions MOM6-interface/mom6_files.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
list(APPEND gsw_src_files
MOM6/src/equation_of_state/TEOS10/gsw_chem_potential_water_t_exact.f90
MOM6/src/equation_of_state/TEOS10/gsw_ct_freezing_exact.f90
MOM6/src/equation_of_state/TEOS10/gsw_ct_freezing_poly.f90
MOM6/src/equation_of_state/TEOS10/gsw_ct_from_pt.f90
MOM6/src/equation_of_state/TEOS10/gsw_ct_from_t.f90
MOM6/src/equation_of_state/TEOS10/gsw_entropy_part.f90
MOM6/src/equation_of_state/TEOS10/gsw_entropy_part_zerop.f90
MOM6/src/equation_of_state/TEOS10/gsw_gibbs.f90
MOM6/src/equation_of_state/TEOS10/gsw_gibbs_ice.f90
MOM6/src/equation_of_state/TEOS10/gsw_gibbs_pt0_pt0.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_error_functions.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_freezing_poly_coefficients.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_gibbs_ice_coefficients.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_kinds.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_specvol_coefficients.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_teos10_constants.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_toolbox.f90
MOM6/src/equation_of_state/TEOS10/gsw_pt0_from_t.f90
MOM6/src/equation_of_state/TEOS10/gsw_pt_from_ct.f90
MOM6/src/equation_of_state/TEOS10/gsw_pt_from_t.f90
MOM6/src/equation_of_state/TEOS10/gsw_rho.f90
MOM6/src/equation_of_state/TEOS10/gsw_rho_first_derivatives.f90
MOM6/src/equation_of_state/TEOS10/gsw_rho_second_derivatives.f90
MOM6/src/equation_of_state/TEOS10/gsw_sp_from_sr.f90
MOM6/src/equation_of_state/TEOS10/gsw_specvol.f90
MOM6/src/equation_of_state/TEOS10/gsw_specvol_first_derivatives.f90
MOM6/src/equation_of_state/TEOS10/gsw_specvol_second_derivatives.f90
MOM6/src/equation_of_state/TEOS10/gsw_sr_from_sp.f90
MOM6/src/equation_of_state/TEOS10/gsw_t_deriv_chem_potential_water_t_exact.f90
MOM6/src/equation_of_state/TEOS10/gsw_t_freezing_exact.f90
MOM6/src/equation_of_state/TEOS10/gsw_t_freezing_poly.f90
MOM6/src/equation_of_state/TEOS10/gsw_t_from_ct.f90
)

list(APPEND mom6_src_files
MOM6/src/ALE/MOM_ALE.F90
MOM6/src/ALE/MOM_regridding.F90
Expand Down Expand Up @@ -68,39 +103,6 @@ list(APPEND mom6_src_files
MOM6/src/equation_of_state/MOM_EOS_linear.F90
MOM6/src/equation_of_state/MOM_TFreeze.F90

MOM6/src/equation_of_state/TEOS10/gsw_chem_potential_water_t_exact.f90
MOM6/src/equation_of_state/TEOS10/gsw_ct_freezing_exact.f90
MOM6/src/equation_of_state/TEOS10/gsw_ct_freezing_poly.f90
MOM6/src/equation_of_state/TEOS10/gsw_ct_from_pt.f90
MOM6/src/equation_of_state/TEOS10/gsw_ct_from_t.f90
MOM6/src/equation_of_state/TEOS10/gsw_entropy_part.f90
MOM6/src/equation_of_state/TEOS10/gsw_entropy_part_zerop.f90
MOM6/src/equation_of_state/TEOS10/gsw_gibbs.f90
MOM6/src/equation_of_state/TEOS10/gsw_gibbs_ice.f90
MOM6/src/equation_of_state/TEOS10/gsw_gibbs_pt0_pt0.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_error_functions.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_freezing_poly_coefficients.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_gibbs_ice_coefficients.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_kinds.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_specvol_coefficients.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_teos10_constants.f90
MOM6/src/equation_of_state/TEOS10/gsw_mod_toolbox.f90
MOM6/src/equation_of_state/TEOS10/gsw_pt0_from_t.f90
MOM6/src/equation_of_state/TEOS10/gsw_pt_from_ct.f90
MOM6/src/equation_of_state/TEOS10/gsw_pt_from_t.f90
MOM6/src/equation_of_state/TEOS10/gsw_rho.f90
MOM6/src/equation_of_state/TEOS10/gsw_rho_first_derivatives.f90
MOM6/src/equation_of_state/TEOS10/gsw_rho_second_derivatives.f90
MOM6/src/equation_of_state/TEOS10/gsw_sp_from_sr.f90
MOM6/src/equation_of_state/TEOS10/gsw_specvol.f90
MOM6/src/equation_of_state/TEOS10/gsw_specvol_first_derivatives.f90
MOM6/src/equation_of_state/TEOS10/gsw_specvol_second_derivatives.f90
MOM6/src/equation_of_state/TEOS10/gsw_sr_from_sp.f90
MOM6/src/equation_of_state/TEOS10/gsw_t_deriv_chem_potential_water_t_exact.f90
MOM6/src/equation_of_state/TEOS10/gsw_t_freezing_exact.f90
MOM6/src/equation_of_state/TEOS10/gsw_t_freezing_poly.f90
MOM6/src/equation_of_state/TEOS10/gsw_t_from_ct.f90

MOM6/src/framework/MOM_array_transform.F90
MOM6/src/framework/MOM_checksums.F90
MOM6/src/framework/MOM_coms.F90
Expand Down Expand Up @@ -128,10 +130,12 @@ list(APPEND mom6_src_files
MOM6/src/framework/MOM_restart.F90
MOM6/src/framework/MOM_safe_alloc.F90
MOM6/src/framework/MOM_string_functions.F90
MOM6/src/framework/MOM_unique_scales.F90
MOM6/src/framework/MOM_unit_scaling.F90
MOM6/src/framework/MOM_unique_scales.F90
MOM6/src/framework/MOM_unit_testing.F90
MOM6/src/framework/MOM_write_cputime.F90
MOM6/src/framework/posix.F90
MOM6/src/framework/testing/MOM_file_parser_tests.F90

MOM6/src/ice_shelf/MOM_ice_shelf.F90
Expand Down Expand Up @@ -300,6 +304,10 @@ list(APPEND mom6_nuopc_src_files
MOM6/config_src/drivers/nuopc_cap/mom_cap_time.F90
MOM6/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90
MOM6/config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90
MOM6/config_src/drivers/solo_driver/MESO_surface_forcing.F90
MOM6/config_src/drivers/solo_driver/MOM_surface_forcing.F90
MOM6/config_src/drivers/solo_driver/atmos_ocean_fluxes.F90
MOM6/config_src/drivers/solo_driver/user_surface_forcing.F90
MOM6/config_src/drivers/unit_tests/MOM_unit_test_driver.F90
)

Expand Down
5 changes: 3 additions & 2 deletions cmake/GNU.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ endif()

if(DEBUG)
add_definitions(-DDEBUG)
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check -fPIC")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -fPIC")

@climbfuji climbfuji Nov 23, 2022

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self. This should be

Suggested change
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -fPIC")

else()
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_RELEASE "-O2")
Expand Down
3 changes: 2 additions & 1 deletion cmake/Intel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ endif()
if(DEBUG)
add_definitions(-DDEBUG)
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv -init=snan,arrays")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ftrapuv")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ftrapuv -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "-g -fPIC" CACHE STRING "" FORCE)

@climbfuji climbfuji Nov 23, 2022

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self. Should this be

Suggested change
set(CMAKE_CXX_FLAGS_DEBUG "-g -fPIC" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -fPIC")

?

else()
if(FASTER)
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise -assume buffered_stdout -fno-alias -align all -debug minimal -qoverride-limits -ftz -no-ip")
Expand Down
3 changes: 0 additions & 3 deletions modulefiles/ufs_cheyenne.gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ load(pathJoin("hpc-gnu", hpc_gnu_ver))
hpc_mpt_ver=os.getenv("hpc_mpt_ver") or "2.25"
load(pathJoin("hpc-mpt", hpc_mpt_ver))

scotch_ver=os.getenv("scotch_ver") or "7.0.3"
load(pathJoin("scotch", scotch_ver))

load("ufs_common")

setenv("CC", "mpicc")
Expand Down
3 changes: 0 additions & 3 deletions modulefiles/ufs_cheyenne.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ load(pathJoin("hpc-intel", hpc_intel_ver))
hpc_mpt_ver=os.getenv("hpc_mpt_ver") or "2.25"
load(pathJoin("hpc-mpt", hpc_mpt_ver))

scotch_ver=os.getenv("scotch_ver") or "7.0.3"
load(pathJoin("scotch", scotch_ver))

load("ufs_common")

setenv("CC", "mpicc")
Expand Down
2 changes: 2 additions & 0 deletions tests/parm/gocart/DU2G_instance_DU.rc
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ emission_scheme: fengsha # choose among: fengsha, ginoux, k14
alpha: 0.039
gamma: 0.8
vertical_to_horizontal_flux_ratio_limit: 2.e-04
soil_moisture_factor: 1.0
soil_drylimit_factor: 1.0