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 #22

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
31821b0
parallel netcdf writes, inpost with no thread (#43)
junwang-noaa Feb 4, 2020
47c7f9b
Iaudrymass coupledfield ww3 (#56)
junwang-noaa Feb 19, 2020
efd63fb
Sm feb242020 (#72)
junwang-noaa Mar 6, 2020
0a88706
fix omp error in dycore and atmos_model.F90 (#80)
DusanJovic-NOAA Mar 11, 2020
44604a0
Update EMC develop from NCAR dtc/develop 2020/03/17 (#84)
climbfuji Mar 19, 2020
db103ca
Coupled model: IPD-CCPP b4b for coupled model, bugfix for stochastic …
climbfuji Mar 27, 2020
7097078
Regional BC blending and BCs into GSI (#83)
TomBlack-NOAA Apr 9, 2020
7c3cdca
Options for IN/CNN and MERRA2 climo of microphysics (#90)
AnningCheng-NOAA Apr 11, 2020
3b16cad
Merge NCAR:dtc/develop into develop 2020/04/14 (#102)
climbfuji Apr 17, 2020
8baa79d
Port to Orion (#105)
DusanJovic-NOAA Apr 22, 2020
ce9fefb
Remove dynamic CCPP build (#107)
climbfuji Apr 23, 2020
d202a02
Chsp latlon post (#108)
junwang-noaa Apr 28, 2020
6585dd5
Ca develop (#96)
lisa-bengtsson May 5, 2020
8b0d9b7
Remove all IPD and all REPRO tests from rt.conf (#117)
DusanJovic-NOAA May 6, 2020
95fcb7c
Bugfixes from public release (#119)
DusanJovic-NOAA May 8, 2020
237388e
Bring hotfixes for ccpp-framework and ccpp-physics from release/publi…
climbfuji May 11, 2020
e661c03
Call ccpp_prebuild.py from cmake, CCPP suites argument optional, upda…
climbfuji May 13, 2020
656c597
Update .gitmodules and submodule pointer for fv3atm for code review a…
climbfuji May 15, 2020
cad5238
Merge branch 'develop' of https://github.com/ufs-community/ufs-weathe…
climbfuji May 15, 2020
935d124
Update submodule pointer for fv3atm
climbfuji May 15, 2020
bd1c7c9
Allow switch of effective radii calculation in parm/ccpp_gsd.nml.IN, …
climbfuji May 19, 2020
0e5dc8b
Revert change to .gitmodules and update submodule pointer for fv3atm
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
2 changes: 1 addition & 1 deletion CCPP.appBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

COMPONENTS=( CCPP FMS FV3 )

FV3_MAKEOPT="CCPP=Y STATIC=Y SUITES=FV3_GFS_2017"
FV3_MAKEOPT="CCPP=Y"

# The modules.nems and configure.nems are selected by
# conf/before_appbuilder_file.mk.
2 changes: 1 addition & 1 deletion CCPP_repro.appBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

COMPONENTS=( CCPP FMS FV3 )

FV3_MAKEOPT="REPRO=Y CCPP=Y STATIC=Y SUITES=FV3_GFS_2017"
FV3_MAKEOPT="REPRO=Y CCPP=Y"

# The modules.nems and configure.nems are selected by
# conf/before_appbuilder_file.mk.
70 changes: 60 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.15)

foreach(env_var IN ITEMS
CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_Fortran_COMPILER
Expand All @@ -13,21 +13,16 @@ set(CMAKE_CXX_COMPILER $ENV{CMAKE_CXX_COMPILER})
set(CMAKE_Fortran_COMPILER $ENV{CMAKE_Fortran_COMPILER})
set(CMAKE_Platform $ENV{CMAKE_Platform})

project(NEMSfv3gfs C CXX Fortran)
project(ufs-weather-model
VERSION 1.0
LANGUAGES C CXX Fortran)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
find_package(MPI REQUIRED)
find_package(ESMF REQUIRED)

include(${PROJECT_SOURCE_DIR}/cmake/configure_${CMAKE_Platform}.cmake)

if(NOT DEFINED PHYS)
set(PHYS gfs)
endif()
message("")
message("Selected physics package: ${PHYS}")
message("")

add_definitions(-Duse_libMPI)
add_definitions(-Duse_netCDF)
add_definitions(-Duse_WRTCOMP)
Expand All @@ -41,6 +36,58 @@ add_definitions(-DUSE_COND)
add_definitions(-DNEW_TAUCTMAX)
add_definitions(-DINTERNAL_FILE_NML)

if(CCPP)

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

if(DEFINED CCPP_SUITES)
message("Calling CCPP code generator (ccpp_prebuild.py) for SUITES = ${CCPP_SUITES}")
execute_process(COMMAND FV3/ccpp/framework/scripts/ccpp_prebuild.py
"--config=FV3/ccpp/config/ccpp_prebuild_config.py"
"--suites=${CCPP_SUITES}"
"--builddir=${PROJECT_BINARY_DIR}/FV3"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out
ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err
RESULT_VARIABLE RC
)
else()
message("Calling CCPP code generator (ccpp_prebuild.py) ...")
execute_process(COMMAND FV3/ccpp/framework/scripts/ccpp_prebuild.py
"--config=FV3/ccpp/config/ccpp_prebuild_config.py"
"--builddir=${PROJECT_BINARY_DIR}/FV3"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out
ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err
RESULT_VARIABLE RC
)
endif()

# Check return code from ccpp_prebuild.py
if(RC EQUAL 0)
message("")
else()
message(FATAL_ERROR "An error occured while running ccpp_prebuild.py, check ${PROJECT_BINARY_DIR}/ccpp_prebuild.{out,err}")
endif()

# this should not be necessary; including CCPP_*.cmake here and passing
# SCHEMES, CAPS and TYPEDEFS via environment variables to CCPP build.
# CCPP should be able to directly include those three .cmake files.

include(${PROJECT_BINARY_DIR}/FV3/ccpp/physics/CCPP_SCHEMES.cmake)
include(${PROJECT_BINARY_DIR}/FV3/ccpp/physics/CCPP_CAPS.cmake)
include(${PROJECT_BINARY_DIR}/FV3/ccpp/physics/CCPP_TYPEDEFS.cmake)

set(ENV{CCPP_SCHEMES} "${SCHEMES}")
set(ENV{CCPP_CAPS} "${CAPS}")
set(ENV{CCPP_TYPEDEFS} "${TYPEDEFS}")

endif()

###############################################################################
### FMS
###############################################################################
Expand Down Expand Up @@ -152,6 +199,9 @@ if(WW3)
if(${CMAKE_Platform} STREQUAL "hera.intel")
set(WW3_COMP "hera")
endif()
if(${CMAKE_Platform} STREQUAL "orion.intel")
set(WW3_COMP "orion")
endif()
message("Build WW3:")
message(" run: ${CMAKE_BUILD_TOOL} WW3_PARCOMPN=4 WW3_COMP=${WW3_COMP} ww3_nems")
message(" in: ${PROJECT_SOURCE_DIR}/WW3/model/esmf")
Expand Down Expand Up @@ -221,7 +271,7 @@ target_link_libraries(NEMS.exe
fv3core
io
${IPD_LIBRARIES}
${PHYS}physics
gfsphysics
${CCPP_LIBRARIES}
fv3cpl
stochastic_physics
Expand Down
2 changes: 1 addition & 1 deletion FV3
Submodule FV3 updated from bfe13b to c441a8
13 changes: 1 addition & 12 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,7 @@ rm -rf ${BUILD_DIR}
mkdir ${BUILD_DIR}

CCPP_SUITES="${CCPP_SUITES:-FV3_GFS_2017_gfdlmp}"

./FV3/ccpp/framework/scripts/ccpp_prebuild.py \
--config=FV3/ccpp/config/ccpp_prebuild_config.py \
--static \
--suites=${CCPP_SUITES} \
--builddir=${BUILD_DIR}/FV3 > ${BUILD_DIR}/ccpp_prebuild.log 2>&1

source ${BUILD_DIR}/FV3/ccpp/physics/CCPP_SCHEMES.sh
source ${BUILD_DIR}/FV3/ccpp/physics/CCPP_CAPS.sh
source ${BUILD_DIR}/FV3/ccpp/physics/CCPP_STATIC_API.sh

CMAKE_FLAGS+=" -DCCPP=ON -DSTATIC=ON -DSUITES=${CCPP_SUITES} -DNETCDF_DIR=${NETCDF}"
CMAKE_FLAGS+=" -DCCPP=ON -DSUITES=${CCPP_SUITES} -DNETCDF_DIR=${NETCDF}"

cd ${BUILD_DIR}
cmake .. ${CMAKE_FLAGS}
Expand Down
35 changes: 35 additions & 0 deletions cmake/configure_hera.gnu.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
message("")
message("Setting configuration for $ENV{CMAKE_Platform}")
message("")

get_filename_component (C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME)
get_filename_component (CXX_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME)
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
message("C compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION} (${C_COMPILER_NAME})")
message("CXX compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} (${CXX_COMPILER_NAME})")
message("Fortran compiler: ${CMAKE_Fortran_COMPILER_ID} ${CMAKE_Fortran_COMPILER_VERSION} (${Fortran_COMPILER_NAME})")
message("")

option(DEBUG "Enable DEBUG mode" OFF)
option(REPRO "Enable REPRO mode" OFF)
option(VERBOSE "Enable VERBOSE mode" OFF)
option(32BIT "Enable 32BIT (single precision arithmetic in dycore)" OFF)
option(OPENMP "Enable OpenMP threading" ON)
option(AVX2 "Enable AVX2 instruction set" OFF)

option(INLINE_POST "Enable inline post" OFF)

include( cmake/${CMAKE_Fortran_COMPILER_ID}.cmake )

set(NEMSIO_INC $ENV{NEMSIO_INC})
set(POST_INC $ENV{POST_INC})
set(NCEP_LIBS $ENV{POST_LIB} $ENV{NEMSIO_LIB} $ENV{G2_LIB4} $ENV{G2TMPL_LIB} $ENV{BACIO_LIB4} $ENV{SP_LIBd} $ENV{W3EMC_LIBd} $ENV{W3NCO_LIBd} $ENV{CRTM_LIB} $ENV{PNG_LIB} $ENV{JASPER_LIB} $ENV{Z_LIB})

set(ESMF_MOD ${ESMF_F90COMPILEPATHS})
set(ESMF_LIBS "${ESMF_F90ESMFLINKRPATHS} ${ESMF_F90ESMFLINKPATHS} ${ESMF_F90ESMFLINKLIBS}")

set(NETCDF_INC_DIR $ENV{NETCDF}/include)
set(NETCDF_LIBDIR $ENV{NETCDF}/lib)
set(NETCDF_LIBS -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf)

message("")
5 changes: 5 additions & 0 deletions cmake/configure_macosx.gnu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ option(DEBUG "Enable DEBUG mode" OFF)
option(REPRO "Enable REPRO mode" OFF)
option(VERBOSE "Enable VERBOSE mode" OFF)
option(32BIT "Enable 32BIT (single precision arithmetic in dycore)" OFF)
# OpenMP broken for clang compiler
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang*")
option(OPENMP "Enable OpenMP threading" OFF)
else()
option(OPENMP "Enable OpenMP threading" ON)
endif()
option(AVX2 "Enable AVX2 instruction set" OFF)

option(INLINE_POST "Enable inline post" OFF)
Expand Down
35 changes: 35 additions & 0 deletions cmake/configure_orion.intel.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
message("")
message("Setting configuration for $ENV{CMAKE_Platform}")
message("")

get_filename_component (C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME)
get_filename_component (CXX_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME)
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
message("C compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION} (${C_COMPILER_NAME})")
message("CXX compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} (${CXX_COMPILER_NAME})")
message("Fortran compiler: ${CMAKE_Fortran_COMPILER_ID} ${CMAKE_Fortran_COMPILER_VERSION} (${Fortran_COMPILER_NAME})")
message("")

option(DEBUG "Enable DEBUG mode" OFF)
option(REPRO "Enable REPRO mode" OFF)
option(VERBOSE "Enable VERBOSE mode" OFF)
option(32BIT "Enable 32BIT (single precision arithmetic in dycore)" OFF)
option(OPENMP "Enable OpenMP threading" ON)
option(AVX2 "Enable AVX2 instruction set" ON)

option(INLINE_POST "Enable inline post" ON)

include( cmake/${CMAKE_Fortran_COMPILER_ID}.cmake )

set(NEMSIO_INC $ENV{NEMSIO_INC})
set(POST_INC $ENV{POST_INC})
set(NCEP_LIBS $ENV{POST_LIB} $ENV{NEMSIO_LIB} $ENV{G2_LIB4} $ENV{G2TMPL_LIB} $ENV{BACIO_LIB4} $ENV{SP_LIBd} $ENV{W3EMC_LIBd} $ENV{W3NCO_LIBd} $ENV{CRTM_LIB} $ENV{PNG_LIB} $ENV{JASPER_LIB} $ENV{Z_LIB})

set(ESMF_MOD ${ESMF_F90COMPILEPATHS})
set(ESMF_LIBS "${ESMF_F90ESMFLINKRPATHS} ${ESMF_F90ESMFLINKPATHS} ${ESMF_F90ESMFLINKLIBS}")

set(NETCDF_INC_DIR $ENV{NETCDF}/include)
set(NETCDF_LIBDIR $ENV{NETCDF}/lib)
set(NETCDF_LIBS -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf)

message("")
2 changes: 1 addition & 1 deletion compsets/all.input
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ run fv3_restart @ fv3, standard, baseline
run fv3_read_inc @ fv3, standard, baseline
run fv3_gfdlmp @ fv3, standard, baseline
run fv3_gfdlmprad @ fv3, standard, baseline, ww3, plat==hera.intel,plat==wcoss_dell_p3,plat==wcoss.cray
run fv3_gfdlmprad_atmwav @ fv3, standard, baseline, ww3, plat==hera.intel,plat==wcoss_dell_p3,plat==wcoss.cray
run fv3_gfdlmprad_gwd @ fv3, standard, baseline
run fv3_gfdlmprad_noahmp @ fv3, standard, baseline
run fv3_thompson @ fv3, standard, baseline
run fv3_wsm6 @ fv3, standard, baseline
run fv3_csawmgshoc @ fv3, standard, baseline
run fv3_rasmgshoc @ fv3, standard, baseline
Expand Down
Loading