Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gsd/develop: update from NOAA-EMC develop #28

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b7a44c5
parallel netcdf IO (#41)
jswhit2 Feb 4, 2020
8683a69
Iaudrymass coupledfield ww3 (#61)
junwang-noaa Feb 18, 2020
38a495e
Sm jan102020 (#44)
SMoorthi-emc Mar 6, 2020
fc9a4c2
fix omp error in dycore and atmos_model.F90 (#77)
DusanJovic-NOAA Mar 11, 2020
515a83f
Update EMC develop from NCAR dtc/develop 2020/03/17 (#81)
climbfuji Mar 19, 2020
083dc6c
Regain bit-for-bit identical results between IPD and CCPP for coupled…
climbfuji Mar 27, 2020
7c3eade
Regional BC blending and BCs into GSI (#80)
TomBlack-NOAA Apr 8, 2020
9b5a420
options for IN/CNN and MERRA2 climo of microphysics fv3atm (#46)
AnningCheng-NOAA Apr 10, 2020
92a1b38
Merge NCAR:dtc/develop into develop 2020/04/14 (#98)
climbfuji Apr 17, 2020
f908c18
Port to Orion (#102)
DusanJovic-NOAA Apr 22, 2020
aac9ff9
Remove dynamic CCPP build (#103)
climbfuji Apr 23, 2020
bc9aa3b
Chsp physics update, global latlon grid, post changes and CCN-IN foll…
junwang-noaa Apr 28, 2020
e8fd6ee
Ca develop (#87)
lisa-bengtsson May 4, 2020
63658ed
Bugfixes from public release (#112)
DusanJovic-NOAA May 8, 2020
2418b18
Bring hotfixes for ccpp-framework and ccpp-physics from release/publi…
climbfuji May 11, 2020
6590d4b
CCPP regional suites, bugfix for GNU compiler, bugfix in CCPP_typedef…
climbfuji May 13, 2020
325ebd2
Update .gitmodules and submodule pointers for GFDL_atmos_cubed_sphere…
climbfuji May 15, 2020
a7cd9d1
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into upd…
climbfuji May 15, 2020
f1cfcfd
Update submodule pointer for ccpp-physics
climbfuji May 15, 2020
f87cbd4
Fix bugs from merge process
climbfuji May 15, 2020
dabf9e6
Add CCPP annotation to GFS_physics_driver.F90, add new suite suite_FV…
climbfuji May 19, 2020
7af8c0a
Revert change to .gitmodules and update submodule pointers for GFDL_a…
climbfuji May 20, 2020
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
20 changes: 5 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
if( NOT DEFINED PHYS)
set(PHYS gfs)
endif()

if (PHYS MATCHES "nam")
add_definitions(-DNAM_phys)
endif()

if(CCPP)
add_definitions(-DCCPP)
if(STATIC)
add_definitions(-DSTATIC)
endif()
endif()

add_subdirectory(cpl)
add_subdirectory(${PHYS}physics)
add_subdirectory(gfsphysics)
add_subdirectory(ipd)
add_subdirectory(io)

Expand Down Expand Up @@ -73,7 +62,7 @@ set_property(SOURCE atmos_cubed_sphere/model/nh_utils.F90 APPEND_STRING PROPERTY
set_property(SOURCE atmos_cubed_sphere/model/fv_mapz.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "${FAST}")

target_link_libraries(fv3core PRIVATE fms)
target_link_libraries(fv3core PRIVATE ${PHYS}physics)
target_link_libraries(fv3core PRIVATE gfsphysics)
target_link_libraries(fv3core PRIVATE ipd)

target_include_directories(fv3core PRIVATE ${ESMF_MOD})
Expand All @@ -86,7 +75,7 @@ target_include_directories(fv3core PRIVATE ${ESMF_MOD})
if(CCPP)
add_subdirectory(ccpp)
add_subdirectory(ccpp/driver)
add_dependencies(${PHYS}physics ccpp ccppphys)
add_dependencies(gfsphysics ccpp ccppphys)
add_dependencies(ccppdriver ccpp ccppphys)
add_dependencies(ccppphys ccpp)

Expand All @@ -113,14 +102,15 @@ add_library(

if(CCPP)
target_include_directories(fv3cap PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver/mod)
add_dependencies(fv3cap ccppdriver ccppphys)
endif()
target_include_directories(fv3cap PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/stochastic_physics)
target_compile_definitions(fv3cap PRIVATE -DESMF_VERSION_MAJOR=${ESMF_VERSION_MAJOR})
target_include_directories(fv3cap PRIVATE ${ESMF_MOD})

target_link_libraries(fv3cap PRIVATE fms)
target_link_libraries(fv3cap PRIVATE fv3cpl)
target_link_libraries(fv3cap PRIVATE ${PHYS}physics)
target_link_libraries(fv3cap PRIVATE gfsphysics)
target_link_libraries(fv3cap PRIVATE ipd)
target_link_libraries(fv3cap PRIVATE io)
target_link_libraries(fv3cap PRIVATE fv3core)
Expand Down
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
157 changes: 108 additions & 49 deletions atmos_model.F90

Large diffs are not rendered by default.

26 changes: 3 additions & 23 deletions ccpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required(VERSION 3.0)

# Use rpaths on MacOSX
set(CMAKE_MACOSX_RPATH 1)

if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif(POLICY CMP0048)

if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif(POLICY CMP0042)

PROJECT(CCPP-FV3)
project(CCPP-FV3
LANGUAGES C CXX Fortran)
set(PROJECT "CCPP-FV3")

ENABLE_LANGUAGE(Fortran)

include(CMakeForceCompiler)

#------------------------------------------------------------------------------
Expand Down Expand Up @@ -177,27 +171,13 @@ if (MPI)
ADD_DEFINITIONS(-DMPI)
endif (MPI)

#------------------------------------------------------------------------------
# Set flags for static building/linking of CCPP
if (STATIC)
ADD_DEFINITIONS(-DSTATIC)
endif (STATIC)

#------------------------------------------------------------------------------
# Set flag for 32bit dynamics build
if (DYN32)
message(STATUS "Dynamics compiled with 32-bit option, adjust fv_sat_adj types")
ADD_DEFINITIONS(-DOVERLOAD_R4)
endif (DYN32)

#------------------------------------------------------------------------------
# If a dynamic build is requested, set TARGET_SUPPORTS_SHARED_LIBS to TRUE; on
# some systems, cmake doesn't set this even though the system supports shared
# libraries (e.g. Cray systems)
if(NOT STATIC)
SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
endif(NOT STATIC)

#------------------------------------------------------------------------------
# Add model-specific flags for C/C++/Fortran preprocessor
ADD_DEFINITIONS(-DMOIST_CAPPA -DUSE_COND -DNEMS_GSM)
Expand Down
54 changes: 9 additions & 45 deletions ccpp/build_ccpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu

# List of valid/tested machines
VALID_MACHINES=( wcoss_cray wcoss_dell_p3 gaea.intel jet.intel \
hera.intel \
hera.intel hera.gnu orion.intel \
cheyenne.intel cheyenne.intel-impi cheyenne.gnu cheyenne.pgi endeavor.intel \
stampede.intel supermuc_phase2.intel macosx.gnu \
linux.intel linux.gnu linux.pgi )
Expand All @@ -25,11 +25,9 @@ function usage {
echo " REPRO=Y/N (default N)"
echo " OPENMP=Y/N (default Y)"
echo " 32BIT=Y/N (default N, affects dynamics/fast physics only)"
echo " STATIC=Y/N (default N, STATIC=Y requires SUITES=...)"
echo " SUITES=ABC,XYZ (comma-separated list of CCPP suites; "
echo " corresponding filenames: suite_ABC.xml. ...)"
echo " MULTI_GASES=Y/N (default N)"
echo " INTEL16=Y/N (default N)"
echo " clean_before [optional] can be 'YES' (default) or 'NO'"
echo " clean_after [optional] can be 'YES' (default) or 'NO'"
exit 1
Expand Down Expand Up @@ -125,25 +123,14 @@ if [[ "${MAKE_OPT}" == *"32BIT=Y"* ]]; then
else
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DDYN32=OFF"
fi
if [[ "${MAKE_OPT}" == *"STATIC=Y"* ]]; then
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DSTATIC=ON"
else
# Dynamic builds require linking the NCEPlibs, provide path to them
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DSTATIC=OFF -DBACIO_LIB4=${BACIO_LIB4} -DSP_LIBd=${SP_LIBd} -DW3NCO_LIBd=${W3NCO_LIBd}"
fi
if [[ "${MAKE_OPT}" == *"MULTI_GASES=Y"* ]]; then
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DMULTI_GASES=ON"
else
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DMULTI_GASES=OFF"
fi
if [[ "${MAKE_OPT}" == *"INTEL16=Y"* ]]; then
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DLEGACY_INTEL=ON"
elif [[ "${MACHINE_ID}" == "wcoss_cray" ]]; then
echo "In ccpp_build.sh: flag to cmake that wcoss_cray uses Intel 16"
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DLEGACY_INTEL=ON"
else
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DLEGACY_INTEL=OFF"
fi

# Flag to cmake that modern Intel compilers are used
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DLEGACY_INTEL=OFF"

# Generate additional CCPP cmake flags depending on machine / compiler
if [[ "${MACHINE_ID}" == "macosx.gnu" ]]; then
Expand All @@ -164,20 +151,6 @@ elif [[ "${MACHINE_ID}" == "gaea.intel" || "${MACHINE_ID}" == "wcoss_cray" ]]; t
if [[ "${MACHINE_ID}" == "gaea.intel" ]]; then
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DLIBXML2_LIB_DIR=${LIBXML2_LIB_DIR} -DLIBXML2_INCLUDE_DIR=${LIBXML2_INCLUDE_DIR}"
fi
# DH* At this time, it is not possible to use the dynamic CCPP
# build on gaea/wcoss_cray. While compiling/linking works, the model
# crashes immediately. This may be related to 64bit/32bit mismatches
# in the MPI libraries (missing "-fPIC" flags when the MPI libraries
# were compiled on the system?) - to be investigated.
if [[ "${MAKE_OPT}" == *"STATIC=Y"* ]]; then
:
else
## FOR DYNAMIC BUILD, SET ENVIRONMENT VARIABLE CRAYPE_LINK_TYPE
#export CRAYPE_LINK_TYPE=dynamic
echo "Dynamic CCPP build not supported on gaea/wcoss_cray at this time."
exit 1
fi
# *DH
fi

CCPP_CMAKE_FLAGS=$(trim "${CCPP_CMAKE_FLAGS}")
Expand Down Expand Up @@ -205,21 +178,12 @@ make ${CCPP_MAKE_FLAGS} install

# Generate ESMF makefile fragment

# Explicitly append libxml2, with or without path
CCPP_XML2_LIB="${LIBXML2_LIB_DIR:+-L${LIBXML2_LIB_DIR} }-lxml2"
set -u
if ( echo "${MAKE_OPT}" | grep STATIC=Y ) ; then
# Set linker flags for static build
CCPP_LINK_OBJS="-L${PATH_CCPP_LIB} -lccpp -lccppphys ${CCPP_XML2_LIB}"
else
# Set link objects
if ( echo "$MACHINE_ID" | grep gaea ) ; then
CCPP_LINK_OBJS="-dynamic -L${PATH_CCPP_LIB} -lccpp ${CCPP_XML2_LIB} ${CRAY_PMI_POST_LINK_OPTS} -lpmi"
else
CCPP_LINK_OBJS="-L${PATH_CCPP_LIB} -lccpp ${CCPP_XML2_LIB}"
fi
fi
echo "ESMF_DEP_INCPATH=${PATH_CCPP_INC}" > ${CCPP_MK}

# Set linker flags
CCPP_LINK_OBJS="-L${PATH_CCPP_LIB} -lccpp -lccppphys"

echo "ESMF_DEP_INCPATH=${PATH_CCPP_INC} ${PATH_CCPP_BUILD}/physics" > ${CCPP_MK}
echo "ESMF_DEP_LINK_OBJS=${CCPP_LINK_OBJS}" >> ${CCPP_MK}

if [ $clean_after = YES ]; then
Expand Down
Loading