Skip to content

Commit

Permalink
merge the latest master branch from the authoritative repo
Browse files Browse the repository at this point in the history
  • Loading branch information
guoqing-noaa committed May 19, 2021
2 parents 0552149 + 1162d92 commit aa4f372
Show file tree
Hide file tree
Showing 886 changed files with 34,259 additions and 68,969 deletions.
45 changes: 20 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,14 @@ project(GSI)
endif(BUILD_REG_TESTING)

cmake_policy(SET CMP0009 NEW)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0074 NEW)
find_package(OpenMP)
message("found openmp with flag ${OPENMP_Fortran_FLAGS}")

# Set Host specific flags and options
setHOST()

if(FIND_HDF5_HL)
find_package(HDF5 COMPONENTS C HL Fortran_HL )
elseif(FIND_HDF5)
find_package(HDF5)
endif()

MESSAGE(${CMAKE_CURRENT_SOURCE_DIR})
# make sure that the default is a RELEASE
if (NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -172,25 +168,18 @@ project(GSI)
if( USE_BASELIBS )
find_package(Baselibs REQUIRED)
else()
find_package( NetCDF REQUIRED)
if(NETCDF4)
if(CMAKE_MAJOR_VERSION GREATER 2)
find_package( ZLIB )
endif()
find_package( CURL )
endif()
find_package( NetCDF COMPONENTS C Fortran REQUIRED)
endif()
if(( NOT HOST-WCOSS_D ) AND ( NOT HOST-WCOSS_C ) AND ( NOT HOST-Gaea ) )
message(" trying to find lapack, ${host}")
find_package( LAPACK )
endif()
# build the WRF I/O libraries
if(DEFINED ENV{GSIWRF_LIB})
set(wrflib "$ENV{GSIWRF_LIB}" CACHE INTERNAL "WRFIO library" )
if(DEFINED ENV{GSIWRFIO_LIB})
set(wrflib "$ENV{GSIWRFIO_LIB}" CACHE INTERNAL "WRFIO library" )
elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libsrc/wrflib)
add_subdirectory(libsrc/wrflib)
else()
message("libsrc/wrflib not pulled from git, looking for WRF dependencies locally")
message("libsrc/wrflib not pulled from git, looking for WRF dependencies locally")
find_package( WRF )
endif()
Expand All @@ -204,7 +193,7 @@ project(GSI)
# FFLAGS depend on the compiler
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
set(CFLAGS "-I. -DFortranByte=char -DFortranInt=int -DFortranLlong='long long' -O3 -Dfunder")
set (CMAKE_Fortran_INC_FLAGS "-I ./ -I ${CORE_INCS} -I ${NETCDF_INCLUDES} ")
set (CMAKE_Fortran_INC_FLAGS "-I ./ -I ${CORE_INCS} -I ${NETCDF_INCLUDE_DIRS} ")
set (CFLAGS_N "-I. -DFortranByte=char -DFortranInt=int -DFortranLlong='long long' -O3 -Dfunder")


Expand Down Expand Up @@ -271,12 +260,18 @@ project(GSI)
endif(BUILD_ENKF)
if(BUILD_UTIL)
add_subdirectory(util/EnKF/gfs/src)
add_subdirectory(util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd)
add_subdirectory(util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared.v3.0.0/sorc/verf_radang.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared.v3.0.0/sorc/verf_radbcoef.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared.v3.0.0/sorc/verf_radbcor.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared.v3.0.0/sorc/verf_radtime.fd)
add_subdirectory(util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd)
add_subdirectory(util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared/sorc/verf_radang.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared/sorc/verf_radbcoef.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared/sorc/verf_radbcor.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared/sorc/verf_radtime.fd)
add_subdirectory(util/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_lev.fd)
add_subdirectory(util/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_mandlev.fd)
add_subdirectory(util/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sfc.fd)
add_subdirectory(util/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sfctime.fd)
add_subdirectory(util/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sig.fd)
add_subdirectory(util/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_time.fd)
endif(BUILD_UTIL)
find_package( NDATE )
if( NOT NDATE )
Expand Down Expand Up @@ -309,10 +304,10 @@ project(GSI)
if(USE_WRF)
file(WRITE "${PROJECT_BINARY_DIR}/regression_var.out" "${CMAKE_SOURCE_DIR}/regression/regression_var.sh ${host} ${CMAKE_SOURCE_DIR}/.. ${PROJECT_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GSIEXEC} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${ENKFEXEC} ${GSICONTROL} ${ENKFCONTROL} ${BASELINE_FLAG} ")
set( REG_TEST_NAMES "global_T62;global_T62_ozonly;global_4dvar_T62;global_4denvar_T126;global_fv3_4denvar_T126;;global_fv3_4denvar_C192;global_lanczos_T62;arw_netcdf;
arw_binary;nmm_binary;nmm_netcdf;nmmb_nems_4denvar;hwrf_nmm_d2;hwrf_nmm_d3;rtma;global_enkf_T62;netcdf_fv3_regional;global_C96_fv3aero")
arw_binary;nmm_binary;nmm_netcdf;nmmb_nems_4denvar;hwrf_nmm_d2;hwrf_nmm_d3;rtma;global_enkf_T62;netcdf_fv3_regional;global_C96_fv3aero;global_C96_fv3aerorad")
else()
file(WRITE "${PROJECT_BINARY_DIR}/regression_var.out" "${CMAKE_SOURCE_DIR}/regression/regression_var.sh ${host} ${CMAKE_SOURCE_DIR}/.. ${PROJECT_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GSIEXEC} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${ENKFEXEC} ${GSICONTROL} ${ENKFCONTROL} ${BASELINE_FLAG} ")
set( REG_TEST_NAMES "global_T62;global_T62_ozonly;global_4dvar_T62;global_lanczos_T62;global_nemsio_T62;global_C96_fv3aero")
set( REG_TEST_NAMES "global_T62;global_T62_ozonly;global_4dvar_T62;global_lanczos_T62;global_nemsio_T62;global_C96_fv3aero;global_C96_fv3aerorad")
endif()
foreach( REG_TEST ${REG_TEST_NAMES} )
add_test(NAME ${REG_TEST} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/regression COMMAND regression_driver.sh ${REG_TEST} ${PROJECT_BINARY_DIR})
Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/FindBUFR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ endif()

set( NO_DEFAULT_PATH )
if(NOT BUILD_BUFR )
if(DEFINED ENV{BUFR_LIBd} )
set(BUFR_LIBRARY $ENV{BUFR_LIBd} )
if(DEFINED ENV{BUFR_LIBd_DA} )
set(BUFR_LIBRARY $ENV{BUFR_LIBd_DA} )
message("BUFR library ${BUFR_LIBRARY} set via Environment variable")
else()
find_library( BUFR_LIBRARY
Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/FindCORELIBS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ else()
set( w3nco "w3nco${libsuffix}")
endif()
if(NOT BUILD_BUFR )
if(DEFINED ENV{BUFR_LIBd} )
set(BUFR_LIBRARY $ENV{BUFR_LIBd} )
if(DEFINED ENV{BUFR_LIBd_DA} )
set(BUFR_LIBRARY $ENV{BUFR_LIBd_DA} )
else()
find_library( BUFR_LIBRARY
NAMES libbufr.a libbufr_d_64.a libbufr_i4r8.a libbufr_v${BUFR_VER}_d_64.a
Expand Down
Loading

0 comments on commit aa4f372

Please sign in to comment.