Skip to content

Commit

Permalink
Merge branch 'support/HAFS' of https://github.com/hafs-community/ufs-…
Browse files Browse the repository at this point in the history
…weather-model into update_dtc_hwrf_physics_from_hafs_community
  • Loading branch information
climbfuji committed May 14, 2020
2 parents 8be42ad + c3a13c0 commit 0c986cd
Show file tree
Hide file tree
Showing 126 changed files with 249,896 additions and 155,899 deletions.
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.
9 changes: 7 additions & 2 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.0)

foreach(env_var IN ITEMS
CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_Fortran_COMPILER
Expand All @@ -13,7 +13,9 @@ 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)
Expand Down Expand Up @@ -152,6 +154,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
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ 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
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("")
20 changes: 18 additions & 2 deletions compsets/fv3.input
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ build fv3.exe {
}

build fv3_ccpp_control.exe {
# This block builds the FV3 with CCPP in static mode for the control setup.
# This block builds the FV3 with CCPP for the control setup.
# It is otherwise identical to the fv3.exe block.
use plat

Expand All @@ -106,7 +106,7 @@ build fv3_ccpp_control.exe {
# build: script to build the NEMS.x. For now, this is an embedded
# bash script.
build=compile.sh(fv3="@[target]",modules="@[modules.nems]",md5="@[md5sum]",
MAKE_OPTS="\'CCPP=Y STATIC=Y SUITES=FV3_GFS_2017\'")
MAKE_OPTS="\'CCPP=Y SUITES=FV3_GFS_2017\'")
}

build fv3_32bit.exe {
Expand Down Expand Up @@ -1422,6 +1422,19 @@ test fv3_wrtGauss_netcdf: fv3.exe {
}
}

test fv3_wrtGlatlon_netcdf: fv3.exe {
use fv3_wrtGauss_netcdf

TEST_DESCR="Compare FV3 global latlon grid netcdf output results with previous trunk version"
CNTL_NAME="fv3_wrtGlatlon_netcdf"

OUTPUT_GRID="'global_latlon'"

COM="@[plat%COMrt]/@[TEST_NAME]" # Test result area
RUNDIR="@[plat%TMPrt]/@[TEST_NAME]" # Test work area
CNTL="@[plat%BASELINE]/@[CNTL_NAME]" # Control baseline area
}

########################################################################

test fv3_satmedmf: fv3.exe {
Expand All @@ -1432,6 +1445,7 @@ test fv3_satmedmf: fv3.exe {

SATMEDMF='.true.'
HYBEDMF='.false.'
DT_ATMOS=1200
OUTPUT_GRID="'gaussian_grid'"
OUTPUT_FILE="'nemsio'"
WRITE_NEMSIOFLIP='.true.'
Expand Down Expand Up @@ -3211,6 +3225,7 @@ test fv3_csawmg: fv3.exe {
RUNDIR="@[plat%TMPrt]/@[TEST_NAME]" # Test work area
CNTL="@[plat%BASELINE]/@[CNTL_NAME]" # Control baseline area
FV3_input_data="@[plat%INPUTS]/FV3_input_data"
FV3_input_iccn="@[plat%INPUTS]/FV3_input_data_INCCN_aeroclim"

# The build variable is the fv3.exe or fv3_appbuild.fv3, which
# provides the path to the build target, md5 sum, and modulefile.
Expand All @@ -3227,6 +3242,7 @@ test fv3_csawmg: fv3.exe {
'model_configure' <=atparse= "@[PARMnems]/model_configure.IN"
'aerosol.dat' <=copyfrom= "@[FV3_input_data]/INPUT"
'co2historicaldata_201*.txt' <=copyfrom= "@[FV3_input_data]/INPUT"
'cam5*.nc' <=copyfrom= "@[FV3_input_iccn]/mg2_IN_CCN"
'sfc_emissivity_idx.txt' <=copyfrom= "@[FV3_input_data]/INPUT"
'solarconstant_noaa_an.txt' <=copyfrom= "@[FV3_input_data]/INPUT"
'*grb' <=copyfrom= "@[FV3_input_data]"
Expand Down
4 changes: 2 additions & 2 deletions compsets/hera.input
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ platform hera.intel {
# INPUTS is the input directory, which should contain fix and parm
# files, plus any restarts or other inputs.

BASELINE="/scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20200317/INTEL"
BASELINE_TEMPLATE="/scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20200317/INTEL"
BASELINE="/scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20200424/INTEL"
BASELINE_TEMPLATE="/scratch1/NCEPDEV/nems/emc.nemspara/RT/NEMSfv3gfs/develop-20200424/INTEL"
INPUTS="@[BASELINE]"

default_resources={
Expand Down
16 changes: 8 additions & 8 deletions compsets/wcoss.input
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ platform wcoss.phase2 {
LONG_TEST_QUEUE='&LONGQ;'
BUILD_QUEUE='&BUILDQ;'
MACHINE_ID='wcoss.phase2'
BASELINE="/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200317"
BASELINE_TEMPLATE="/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200317"
BASELINE="/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200424"
BASELINE_TEMPLATE="/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200424"

default_resources={
TASKS=156
Expand Down Expand Up @@ -126,8 +126,8 @@ platform wcoss.phase1 {
C768_THRD=4

MACHINE_ID='wcoss.phase1'
BASELINE="/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200317"
BASELINE_TEMPLATE="/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200317"
BASELINE="/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200424"
BASELINE_TEMPLATE="/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200424"

# WCOSS Phase 2 has been slow of late.
DEFAULT_TEST_WALLTIME=2700
Expand Down Expand Up @@ -213,8 +213,8 @@ platform wcoss_dell_p3 {
LONG_TEST_QUEUE='&LONGQ;'
BUILD_QUEUE='&BUILDQ;'

BASELINE="/gpfs/dell2/emc/modeling/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200317/"
BASELINE_TEMPLATE="/gpfs/dell2/emc/modeling/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200317/"
BASELINE="/gpfs/dell2/emc/modeling/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200424/"
BASELINE_TEMPLATE="/gpfs/dell2/emc/modeling/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200424/"

default_resources={
TASKS=156
Expand Down Expand Up @@ -314,8 +314,8 @@ platform wcoss.cray {
BUILD_WALLTIME="3600"
DEFAULT_TEST_WALLTIME=1800

BASELINE="/gpfs/hps3/emc/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200317"
BASELINE_TEMPLATE="/gpfs/hps3/emc/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200317"
BASELINE="/gpfs/hps3/emc/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200424"
BASELINE_TEMPLATE="/gpfs/hps3/emc/nems/noscrub/emc.nemspara/RT/NEMSfv3gfs/develop-20200424"

execution_time_modules=[[[
module load alps
Expand Down
7 changes: 0 additions & 7 deletions conf/before_components.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@

CHOSEN_MODULE=$(BUILD_TARGET)/fv3

ifneq (,$(findstring INTEL16=Y,$(FV3_MAKEOPT)))
ifeq ($(CHOSEN_MODULE),gaea.intel/fv3)
override CHOSEN_MODULE=$(BUILD_TARGET)/fv3.intel-16.0.3.210
$(warning Overriding CHOSEN_MODULE with $(CHOSEN_MODULE) as requested per MAKEOPT)
endif
endif

CONFIGURE_NEMS_FILE=configure.fv3.$(BUILD_TARGET)

# ----------------------------------------------------------------------
Expand Down
6 changes: 0 additions & 6 deletions conf/configure.fv3.cheyenne.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ OPENMP = Y
AVX2 = Y
HYDRO = N
CCPP = N
STATIC = N
SION = N

include $(ESMFMKFILE)
Expand Down Expand Up @@ -183,12 +182,7 @@ ifeq ($(CCPP),Y)
CPPDEFS += -DCCPP
CFLAGS += -I$(PATH_CCPP)/include
FFLAGS += -I$(PATH_CCPP)/include
ifeq ($(STATIC),Y)
CPPDEFS += -DSTATIC
LDFLAGS += -L$(PATH_CCPP)/lib -lccppphys -lccpp $(NCEPLIBS) -lxml2
else
LDFLAGS += -L$(PATH_CCPP)/lib -lccpp
endif
endif

ifeq ($(SION),Y)
Expand Down
6 changes: 0 additions & 6 deletions conf/configure.fv3.cheyenne.intel
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ OPENMP = Y
AVX2 = Y
HYDRO = N
CCPP = N
STATIC = N
SION = N

include $(ESMFMKFILE)
Expand Down Expand Up @@ -192,12 +191,7 @@ ifeq ($(CCPP),Y)
CPPDEFS += -DCCPP
CFLAGS += -I$(PATH_CCPP)/include
FFLAGS += -I$(PATH_CCPP)/include
ifeq ($(STATIC),Y)
CPPDEFS += -DSTATIC
LDFLAGS += -L$(PATH_CCPP)/lib -lccppphys -lccpp $(NCEPLIBS) -lxml2
else
LDFLAGS += -L$(PATH_CCPP)/lib -lccpp
endif
endif

ifeq ($(SION),Y)
Expand Down
6 changes: 0 additions & 6 deletions conf/configure.fv3.cheyenne.intel-impi
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ OPENMP = Y
AVX2 = Y
HYDRO = N
CCPP = N
STATIC = N
SION = N

include $(ESMFMKFILE)
Expand Down Expand Up @@ -188,12 +187,7 @@ ifeq ($(CCPP),Y)
CPPDEFS += -DCCPP
CFLAGS += -I$(PATH_CCPP)/include
FFLAGS += -I$(PATH_CCPP)/include
ifeq ($(STATIC),Y)
CPPDEFS += -DSTATIC
LDFLAGS += -L$(PATH_CCPP)/lib -lccppphys -lccpp $(NCEPLIBS) -lxml2
else
LDFLAGS += -L$(PATH_CCPP)/lib -lccpp
endif
endif

ifeq ($(SION),Y)
Expand Down
6 changes: 0 additions & 6 deletions conf/configure.fv3.cheyenne.pgi
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ OPENMP = Y
AVX2 = Y
HYDRO = N
CCPP = N
STATIC = N

include $(ESMFMKFILE)
ESMF_INC = $(ESMF_F90COMPILEPATHS)
Expand Down Expand Up @@ -183,12 +182,7 @@ ifeq ($(CCPP),Y)
CPPDEFS += -DCCPP
CFLAGS += -I$(PATH_CCPP)/include
FFLAGS += -I$(PATH_CCPP)/include
ifeq ($(STATIC),Y)
CPPDEFS += -DSTATIC
LDFLAGS += -L$(PATH_CCPP)/lib -lccppphys -lccpp $(NCEPLIBS) -lxml2
else
LDFLAGS += -L$(PATH_CCPP)/lib -lccpp
endif
endif

LDFLAGS += $(LIBS)
Expand Down
6 changes: 0 additions & 6 deletions conf/configure.fv3.endeavor.intel
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ OPENMP = Y
AVX2 = Y
HYDRO = N
CCPP = N
STATIC = N
SION = N

include $(ESMFMKFILE)
Expand Down Expand Up @@ -188,12 +187,7 @@ ifeq ($(CCPP),Y)
CPPDEFS += -DCCPP
CFLAGS += -I$(PATH_CCPP)/include
FFLAGS += -I$(PATH_CCPP)/include
ifeq ($(STATIC),Y)
CPPDEFS += -DSTATIC
LDFLAGS += -L$(PATH_CCPP)/lib -lccppphys -lccpp $(NCEPLIBS) -lxml2
else
LDFLAGS += -L$(PATH_CCPP)/lib -lccpp
endif
endif

ifeq ($(SION),Y)
Expand Down
11 changes: 0 additions & 11 deletions conf/configure.fv3.gaea.intel
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ OPENMP = Y
AVX2 = Y
HYDRO = N
CCPP = N
STATIC = N
INTEL16 = N

include $(ESMFMKFILE)
ESMF_INC = $(ESMF_F90COMPILEPATHS)
Expand Down Expand Up @@ -99,11 +97,7 @@ CPPDEFS += -DMULTI_GASES
endif

FFLAGS_OPT = -O2 -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3
ifeq ($(INTEL16),Y)
FFLAGS_REPRO = -O2 -debug minimal -fp-model strict -qoverride-limits -g -traceback
else
FFLAGS_REPRO = -O2 -debug minimal -fp-model consistent -qoverride-limits -g -traceback
endif
FFLAGS_DEBUG = -g -O0 -check all -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -traceback -ftrapuv

TRANSCENDENTALS := -fast-transcendentals
Expand Down Expand Up @@ -166,12 +160,7 @@ ifeq ($(CCPP),Y)
CPPDEFS += -DCCPP
CFLAGS += -I$(PATH_CCPP)/include
FFLAGS += -I$(PATH_CCPP)/include
ifeq ($(STATIC),Y)
CPPDEFS += -DSTATIC
LDFLAGS += -L$(PATH_CCPP)/lib -lccppphys -lccpp $(NCEPLIBS) -lxml2
else
LDFLAGS += -L$(PATH_CCPP)/lib -lccpp
endif
endif

ifneq ($(findstring netcdf/4,$(LOADEDMODULES)),)
Expand Down
Loading

0 comments on commit 0c986cd

Please sign in to comment.