Skip to content

Commit

Permalink
Merge branch 'working' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-a-potts committed Dec 13, 2019
2 parents 5147e32 + d28afa0 commit 6f17d4f
Show file tree
Hide file tree
Showing 17 changed files with 420 additions and 16 deletions.
65 changes: 65 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
cmake_minimum_required(VERSION 2.6)
project(ufs_util)
set(VERSION v1.1.1)
enable_language (Fortran)
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RELEASE CACHE STRING
"Choose the type of build, options are: PRODUCTION Debug Release."
FORCE)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message("setting intel true")
set(IntelComp true )
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU*")
set(GNUComp true )
elseif(CMAKE_CXX_COMPILER_ID MATCHES "pgc*")
set(PGIComp true )
endif()
MESSAGE(${CMAKE_CURRENT_SOURCE_DIR})
STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} "RelWithDebInfo" BUILD_RELEASE)
if(NOT BUILD_RELEASE )
STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} "RELEASE" BUILD_RELEASE)
endif()
STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} "PRODUCTION" BUILD_PRODUCTION)
STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} "DEGUG" BUILD_DEBUG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
if(POLICY CMP0012)
cmake_policy(SET CMP0012 NEW)
endif()
find_package( NetCDF )
find_package( OpenMP )
message("openmp flags is ${OpenMP_Fortran_FLAGS}")
find_package( MPI )
find_package( LAPACK )
find_package( LANDSFCUTIL )
find_package( Jasper )
find_package( PNG )
find_package( SFCIO )
find_package( ZLIB )
find_package( W3NCO )
#find_package( G2 )
find_package( BACIO )
find_package( NEMSIO )
#find_package( NEMSIOGFS )
find_package( SIGIO )
#find_package( IP )
find_package( SP )
find_package( HDF5 COMPONENTS C HL Fortran_HL )
find_package( ESMF )

add_subdirectory(sorc/chgres_cube.fd)
#add_subdirectory(sorc/emcsfc_ice_blend.fd)
#add_subdirectory(sorc/emcsfc_snow2mdl.fd)
#add_subdirectory(sorc/fre-nctools.fd)
#add_subdirectory(sorc/global_chgres.fd)
#add_subdirectory(sorc/global_cycle.fd)
#add_subdirectory(sorc/nemsio_chgdate.fd)
#add_subdirectory(sorc/nemsio_get.fd)
#add_subdirectory(sorc/nemsio_read.fd)
#add_subdirectory(sorc/nst_tf_chg.fd)
#add_subdirectory(sorc/orog.fd)
#add_subdirectory(sorc/sfc_climo_gen.fd)
1 change: 1 addition & 0 deletions cmake
Submodule cmake added at 255ab8
32 changes: 19 additions & 13 deletions modulefiles/chgres_cube.hera
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,26 @@

module load intel/18.0.5.274
module load impi/2018.0.4
#module use -a $MOD_PATH
module use -a /contrib/da/spack/share/spack/modules/linux-centos7-skylake_avx512
module load cmake/3.15.3-intel-19.0.4.243
module load w3nco/v2.0.6-intel-19.0.4.243-impi
module load nemsio/v2.2.3-intel-19.0.4.243-impi
module load nemsiogfs/v2.2.1-intel-19.0.4.243-impi
module load ip/v3.0.0-intel-19.0.4.243
module load g2/v3.1.0-intel-19.0.4.243
module load landsfcutil/v2.1.0-intel-19.0.4.243
module load bacio/v2.1.0-intel-19.0.4.243
module load sp/v2.0.2-intel-19.0.4.243
module load sfcio//v1.1.0-intel-19.0.4.243
module load sigio/v2.1.0-intel-19.0.4.243-impi
module load esmf/8.0.0b-intel-19.0.4.243-impi

module use -a $MOD_PATH
module load w3nco/2.0.6
module load nemsio/2.2.3
module load bacio/2.0.2
module load sp/2.0.2
module load sfcio/1.1.0
module load sigio/2.1.0
#export NCEPLIBS=/scratch1/NCEPDEV/global/gwv/l819/lib
#module use -a $NCEPLIBS/modulefiles
#module load esmflocal/8_0_48b.netcdf47

export NCEPLIBS=/scratch1/NCEPDEV/global/gwv/l819/lib
module use -a $NCEPLIBS/modulefiles
module load esmflocal/8_0_48b.netcdf47

export FCOMP=mpiifort
export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"
#export FCOMP=mpiifort
#export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"
# for debugging
#export FFLAGS="-O0 -g -traceback -r8 -i4 -qopenmp -convert big_endian -check bounds -warn unused -assume byterecl"
23 changes: 23 additions & 0 deletions modulefiles/chgres_cube.theia
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#%Module#####################################################
## chgres build module for Theia
#############################################################

module load intel/15.1.133
module load impi/5.1.1.109
module load netcdf/4.3.0

module use /scratch4/NCEPDEV/nems/noscrub/emc.nemspara/soft/modulefiles
module load esmf/8.0.0bs20

module use -a /scratch3/NCEPDEV/nwprod/lib/modulefiles
module load w3nco
module load nemsio/v2.2.3
module load bacio/v2.0.1
module load sp/v2.0.2
module load sfcio/v1.0.0
module load sigio/v2.0.1

export FCOMP=mpiifort
export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"
# for debugging
#export FFLAGS="-O0 -g -traceback -r8 -i4 -qopenmp -convert big_endian -check bounds -warn unused -assume byterecl"
7 changes: 7 additions & 0 deletions modulefiles/fv3gfs/fre-nctools.theia
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%Module#####################################################
## Module file for fre-nctools
#############################################################
module load intel/14.0.2
module load impi/4.1.3.048
module load netcdf/4.3.0
module load hdf5/1.8.14
31 changes: 31 additions & 0 deletions modulefiles/fv3gfs/global_chgres.theia
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#%Module#####################################################
## global_chgres component - theia
#############################################################

# Loading Intel Compiler Suite
module load intel/14.0.2
module load impi/5.1.2.150

# Loding nceplibs modules
module use -a $MOD_PATH
module load sigio/v2.0.1
module load w3nco/v2.0.6
module load w3emc/v2.2.0
module load sp/v2.0.2
module load bacio/v2.0.2
module load nemsio/v2.2.3
module load nemsiogfs/v2.0.1
export NEMSIOGFS_INC=/scratch4/NCEPDEV/global/save/glopara/svn/nceplibs/branches/nemsiogfsv2.0.1/include/nemsiogfs
export NEMSIOGFS_LIB=/scratch4/NCEPDEV/global/save/glopara/svn/nceplibs/branches/nemsiogfsv2.0.1/libnemsiogfs.a

module load ip/v3.0.0
module load sfcio/v1.0.0
module load gfsio/v1.1.0
module load landsfcutil/v2.1.0
module load netcdf/4.3.0
module load hdf5/1.8.14

export NETCDF_INCLUDE="-I${NETCDF}/include"
export NETCDF_LDFLAGS_F="-L${NETCDF}/lib -lnetcdf -lnetcdff -L${HDF5}/lib -lhdf5 -lhdf5_fortran"

set FCMP ifort
20 changes: 20 additions & 0 deletions modulefiles/fv3gfs/global_cycle.theia
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#%Module#####################################################
## global_cycle component - theia
#############################################################

# Loading Intel Compiler Suite
module load intel/16.1.150
module load impi

# Loding nceplibs modules
module use -a /scratch3/NCEPDEV/nwprod/lib/modulefiles
module load w3nco/v2.0.6
module load sp/v2.0.2
module load bacio/v2.0.1
module load ip/v3.0.0
module load netcdf/4.3.0
module load hdf5/1.8.14
export NETCDF_INCLUDE="-I${NETCDF}/include"
export NETCDF_LDFLAGS_F="-L${NETCDF}/lib -lnetcdf -lnetcdff -L${HDF5}/lib -lhdf5 -lhdf5_fortran"

export FCMP=mpiifort
21 changes: 21 additions & 0 deletions modulefiles/fv3gfs/nst_tf_chg.theia
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#%Module#####################################################
## gaussian_sfcanl build module for Theia
#############################################################

# Loading Intel Compiler Suite
module load intel/15.1.133

# Loding nceplibs modules
module use -a /scratch3/NCEPDEV/nwprod/lib/modulefiles
module load w3nco/v2.0.6
module load bacio/v2.0.2
module load nemsio/v2.2.3
module load netcdf/4.3.0
module load hdf5/1.8.14
export NETCDF_INCLUDE="-I${NETCDF}/include"
export NETCDF_LDFLAGS_F="-L${NETCDF}/lib -lnetcdf -lnetcdff -L${HDF5}/lib -lhdf5 -lhdf5_fortran"

export FCOMP=ifort
export FFLAGS="-O3 -fp-model precise -g -r8 -i4"
# for debugging
#export FFLAGS="-g -r8 -i4 -warn unused -check bounds"
16 changes: 16 additions & 0 deletions modulefiles/fv3gfs/orog.theia
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#%Module#####################################################
## Module file for orog
#############################################################
# Loading Intel Compiler Suite
module unload intel
module load intel/16.1.150

module load netcdf/4.3.0

# Loding nceplibs modules
module use -a $MOD_PATH
module load ip/v2.0.0
module load sp/v2.0.2
module load w3emc/v2.2.0
module load w3nco/v2.0.6
module load bacio/v2.0.2
89 changes: 89 additions & 0 deletions modulefiles/module-setup.csh.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
set __ms_shell=csh

eval "if ( -d / ) set __ms_shell=tcsh"

if ( { test -d /lfs3 } ) then
if ( ! { module help >& /dev/null } ) then
source /apps/lmod/lmod/init/$__ms_shell
endif
module purge
else if ( { test -d /scratch3 } ) then
# We are on NOAA Theia
if ( ! { module help >& /dev/null } ) then
source /apps/lmod/lmod/init/$__ms_shell
endif
module purge
else if ( { test -d /gpfs/hps -a -e /etc/SuSE-release } ) then
# We are on NOAA Luna or Surge
if ( ! { module help >& /dev/null } ) then
source /opt/modules/default/init/$__ms_shell
endif
module purge
module purge
unset _LMFILES_
unset LOADEDMODULES
module use /opt/modulefiles
module use /opt/cray/ari/modulefiles
module use /opt/cray/craype/default/alt-modulefiles
module use /opt/cray/alt-modulefiles
module use /gpfs/hps/nco/ops/nwprod/modulefiles
module use /gpfs/hps/nco/ops/nwprod/lib/modulefiles
module use /usrx/local/prod/modulefiles
else if ( { test -d /dcom -a -d /hwrf } ) then
# We are on NOAA Tide or Gyre
if ( ! { module help >& /dev/null } ) then
source /usrx/local/Modules/default/init/$__ms_shell
endif
module purge
else if ( { test -L /usrx && sh -c "readlink /usrx 2> /dev/null | grep dell" } ) then
# We are on WCOSS Mars or Venus
if ( ! { module help >& /dev/null } ) then
source /usrx/local/prod/lmod/lmod/init/$__ms_shell
endif
module purge
else if ( { test -d /glade } ) then
# We are on NCAR Yellowstone
if ( ! { module help >& /dev/null } ) then
source /usr/share/Modules/init/$__ms_shell
endif
module purge
else if ( { test -d /lustre -a -d /ncrc } ) then
# We are on GAEA.
if ( ! { module help >& /dev/null } ) then
# We cannot simply load the module command. The GAEA
# /etc/csh.login modifies a number of module-related variables
# before loading the module command. Without those variables,
# the module command fails. Hence we actually have to source
# /etc/csh.login here.
source /etc/csh.login
set __ms_source_etc_csh_login=yes
else
set __ms_source_etc_csh_login=no
endif
module purge
unsetenv _LMFILES_
unsetenv _LMFILES_000
unsetenv _LMFILES_001
unsetenv LOADEDMODULES
module load modules
if ( { test -d /opt/cray/ari/modulefiles } ) then
module use -a /opt/cray/ari/modulefiles
endif
if ( { test -d /opt/cray/pe/ari/modulefiles } ) then
module use -a /opt/cray/pe/ari/modulefiles
endif
if ( { test -d /opt/cray/pe/craype/default/modulefiles } ) then
module use -a /opt/cray/pe/craype/default/modulefiles
endif
setenv NCEPLIBS /lustre/f1/pdata/ncep_shared/NCEPLIBS/lib
if ( { test -d /lustre/f1/pdata/ncep_shared/NCEPLIBS/lib } ) then
module use $NCEPLIBS/modulefiles
endif
if ( "$__ms_source_etc_csh_login" == yes ) then
source /etc/csh.login
unset __ms_source_etc_csh_login
endif
else
# Workaround for csh limitation. Use sh to print to stderr.
sh -c 'echo WARNING: UNKNOWN PLATFORM 1>&2'
endif
10 changes: 7 additions & 3 deletions modulefiles/module_base.hera
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
##
## FV3GFS prerequisites
##

setenv CC icc
setenv CXX icpc
setenv FC ifort
module use -a /contrib/da/spack/share/spack/modules/linux-centos7-skylake_avx512
module load intel/18.0.5.274
module load impi/2018.0.4
module load hpss/hpss
module load netcdf/4.7.0
module load netcdf/4.6.2-intel-19.0.4.243-impi
module load netcdf-fortran/4.4.5-intel-19.0.4.243-impi
module load nco/4.7.0
module load hdf5/1.10.5
module load hdf5/1.10.5-intel-19.0.4.243-impi
19 changes: 19 additions & 0 deletions modulefiles/module_base.theia
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#%Module######################################################################
##
## FV3GFS prerequisites
##

module load intel/16.1.150
module load impi/5.1.2.150
module load wgrib2
module load hpss
module load netcdf
module load nco
module load hdf5/1.8.14
module load gempak/6.7.0

module use /scratch3/NCEPDEV/nwprod/lib/modulefiles
module load EnvVars/v1.0.2

module use /scratch4/NCEPDEV/nems/noscrub/emc.nemspara/soft/modulefiles
module load prod_util
15 changes: 15 additions & 0 deletions modulefiles/module_nemsutil.theia
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#%Module#####################################################
## Module file for nemsutil
#############################################################

# Loading Intel Compiler Suite
module load intel/14.0.2
module load impi/5.1.2.150

# Loding nceplibs modules
module use -a $MOD_PATH
module load w3nco/v2.0.6
module load bacio/v2.0.1
module load nemsio/v2.2.1

export FCMP=ifort
17 changes: 17 additions & 0 deletions modulefiles/modulefile.global_emcsfc_ice_blend.theia
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#%Module#####################################################
## emcsfc_ice_blend build module for Theia
#############################################################

module load intel/14.0.2
export FCOMP=ifort
export FFLAGS="-O0 -i4"

# load ncep library modules

module use -a /scratch3/NCEPDEV/nwprod/lib/modulefiles
module load w3nco/v2.0.6
module load bacio/v2.0.1
module load jasper
module load z
module load png
module load g2/v2.5.0
Loading

0 comments on commit 6f17d4f

Please sign in to comment.