Skip to content

Commit

Permalink
GitHub Issue NOAA-EMC/GSI#44. netCDF interface with V16 updates for H…
Browse files Browse the repository at this point in the history
…WRF.
  • Loading branch information
lbi2018 committed Jul 31, 2020
1 parent 13366a1 commit 2fb4b6b
Show file tree
Hide file tree
Showing 37 changed files with 295 additions and 65 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ project(GSI)
setHOST()

if(FIND_HDF5_HL)
find_package(HDF5 COMPONENTS C HL Fortran_HL )
find_package(HDF5 COMPONENTS C HL)
elseif(FIND_HDF5)
find_package(HDF5)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/setIntelFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function(set_GSI_ENKF_Intel)
endfunction(set_GSI_ENKF_Intel)

function (set_GSI_ENKF_Debug_Intel)
set(GSI_Fortran_FLAGS "-DPOUND_FOR_STRINGIFY -O0 -fp-model source -convert big_endian -assume byterecl -implicitnone -mcmodel medium -shared-intel -g -traceback -debug -ftrapuv -check all,noarg_temp_created -fp-stack-check -fstack-protector -warn all,nointerfaces -convert big_endian -implicitnone -D_REAL8_ ${OpenMP_Fortran_FLAGS} ${MPI_Fortran_COMPILE_FLAGS} ${GSDCLOUDOPT}" CACHE INTERNAL "")
set(GSI_Fortran_FLAGS "-DPOUND_FOR_STRINGIFY -O0 -fp-model source -convert big_endian -assume byterecl -implicitnone -g -traceback -debug -ftrapuv -check all,noarg_temp_created -fp-stack-check -fstack-protector -warn all,nointerfaces -convert big_endian -implicitnone -D_REAL8_ ${OpenMP_Fortran_FLAGS} ${MPI_Fortran_COMPILE_FLAGS} ${GSDCLOUDOPT}" CACHE INTERNAL "")
set(ENKF_Fortran_FLAGS "-O0 ${HOST_FLAG} -warn all -implicitnone -traceback -g -debug all -check all,noarg_temp_created -fp-model strict -convert big_endian -assume byterecl -D_REAL8_ ${OpenMP_Fortran_FLAGS} ${GSDCLOUDOPT}" CACHE INTERNAL "")
set(GSDCLOUD_Fortran_FLAGS "-DPOUND_FOR_STRINGIFY -O3 -convert big_endian" CACHE INTERNAL "")
#Common debug flags
Expand Down
23 changes: 9 additions & 14 deletions modulefiles/modulefile.ProdGSI.jet
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@
#module-whatis " GDAS_ENKF whatis description"
#
#
module load newdefaults
module load intel/2016.2.181
module load impi/5.1.1.109

module load intel/18.0.5.274
module load impi
#
module load szip/2.1
module load szip/2.1
module load hdf5/1.8.9
module load netcdf4/4.2.1.1

export COREPATH=/lfs3/projects/hfv3gfs/nwprod/lib
export COREPATH=/mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib
export COREPATH=/lfs4/HFIP/hfv3gfs/gwv/l0530/lib
export NCEPLIBS=$COREPATH
module use $NCEPLIBS/modulefiles

export FFLAGS="-openmp"
export LDFLAGS="-openmp"
export FFLAGS="-qopenmp"
export LDFLAGS="-qopenmp"
module load bacio-intel-sandybridge/2.0.2
module load crtm-intel-sandybridge/2.2.5
module load bufr-intel-sandybridge/11.1.0
Expand All @@ -35,10 +33,7 @@ module load w3emc-intel-sandybridge/2.2.0
module load w3nco-intel-sandybridge/2.0.6
module load sigio-intel-sandybridge/2.0.1
module load sfcio-intel-sandybridge/1.0.0
module load ip-intel-sandybridge/3.0.0

module use /home/George.Vandenberghe/t1/l1025/lib/modulefiles
module load hdf5
module load netcdf

export NETCDF=${NETCDF4}
export NETCDF_DIR=${NETCDF4}
module load netcdfp/4.7.4
7 changes: 4 additions & 3 deletions modulefiles/modulefile.ProdGSI.wcoss_c
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@ module unload intel/15.0.3.187
module load intel/18.1.163

# Loading pe environment
module load craype-sandybridge
module load cray-mpich/7.2.0
module load craype-haswell

module use /usrx/local/dev/modulefiles
module load cmake/3.6.2
module unuse /usrx/local/dev/modulefiles

# Loading netcdf modules
module load cray-netcdf/4.3.2
module load cray-hdf5/1.8.14
module use /usrx/local/dev/modulefiles
module load NetCDF-intel-sandybridge/4.7.4
module load HDF5-parallel-intel-sandybridge/1.10.6

# Loading nceplibs modules
module use /gpfs/hps/nco/ops/nwprod/lib/modulefiles
Expand Down
2 changes: 2 additions & 0 deletions regression/regression_var.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ case $machine in
export noscrub="/gpfs/hps3/emc/global/noscrub/$LOGNAME"
elif [ -d /gpfs/hps3/emc/da/noscrub/$LOGNAME ]; then
export noscrub="/gpfs/hps3/emc/da/noscrub/$LOGNAME"
elif [ -d /gpfs/hps3/emc/hwrf/noscrub/$LOGNAME ]; then
export noscrub="/gpfs/hps3/emc/hwrf/noscrub/$LOGNAME"
fi
if [[ "$cmaketest" = "false" ]]; then
export basedir="/gpfs/hps3/emc/global/noscrub/$LOGNAME/svn/gsi"
Expand Down
2 changes: 1 addition & 1 deletion src/enkf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if(BUILD_ENKF)
set(ENKFEXEC "${ENKF_BASE}${debug_suffix}${GSISUFFIX}" CACHE INTERNAL "ENKF Executable name")
add_executable(${ENKFEXEC} enkf_main.f90)
target_link_libraries(${ENKFEXEC} enkflib enkfdeplib ${GSILIB} ${GSISHAREDLIB} ${CORE_LIBRARIES}
${MPI_Fortran_LIBRARIES} ${LAPACK_LIBRARIES} ${NETCDF_LIBRARIES_F90} ${NETCDF_LIBRARIES} ${HDF5_Fortran_HL_LIBRARIES}
${MPI_Fortran_LIBRARIES} ${LAPACK_LIBRARIES} ${NETCDF_LIBRARIES_F90} ${NETCDF_LIBRARIES} ${HDF5_HL_LIBRARIES}
${EXTRA_LINKER_FLAGS} ${HDF5_LIBRARIES} ${CURL_LIBRARIES} ${GSI_LDFLAGS} ${CORE_BUILT} ${CORE_LIBRARIES} ${CORE_BUILT} ${NCDIAG_LIBRARIES} ${FV3GFS_NCIO_LIBRARIES})
install(TARGETS ${ENKFEXEC} enkfdeplib enkflib
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
Expand Down
7 changes: 5 additions & 2 deletions src/enkf/gridio_wrf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ module gridio
! Define all public subroutines within this module
private
public :: readgriddata, readgriddata_pnc
public :: writegriddata, writegriddata_pnc, WRITEINCREMENT, WRITEINCREMENT_PNC
public :: writegriddata, writegriddata_pnc
public :: writeincrement, writeincrement_pnc

!-------------------------------------------------------------------------

Expand Down Expand Up @@ -74,6 +75,7 @@ subroutine readgriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,ntimes,f

end subroutine readgriddata


!========================================================================
! readgriddata_arw.f90: read WRF-ARW state or control vector
!-------------------------------------------------------------------------
Expand Down Expand Up @@ -730,7 +732,7 @@ subroutine writegriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,vargrid

!----------------------------------------------------------------------
if (nbackgrounds > 1) then
write(6,*)'gridio/writegriddata: writing multiple backgrounds not yet supported'
write(6,*)'gridio/writegriddata_wrf: writing multiple backgrounds not yet supported'
call stop2(23)
endif

Expand Down Expand Up @@ -1036,6 +1038,7 @@ subroutine writegriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,vargrid

end subroutine writegriddata


!======================================================================
! readwrfvar.f90: This subroutine reads a varname variable from WRF
! ARW or NMM netcdf file and returns the variable interpolated to
Expand Down
2 changes: 1 addition & 1 deletion src/gsi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ cmake_minimum_required(VERSION 2.8)
endif()
# Specify all the libraries to be linked into the executable
target_link_libraries(${GSIEXEC} ${GSISHAREDLIB} ${GSILIB} ${GSISHAREDLIB} ${WRF_LIBRARIES}
${NETCDF_LIBRARIES_F90} ${NETCDF_LIBRARIES} ${HDF5_Fortran_HL_LIBRARIES} ${MPI_Fortran_LIBRARIES}
${NETCDF_LIBRARIES_F90} ${NETCDF_LIBRARIES} ${HDF5_HL_LIBRARIES} ${MPI_Fortran_LIBRARIES}
${LAPACK_LIBRARIES} -L./ ${EXTRA_LINKER_FLAGS} ${HDF5_LIBRARIES} ${CURL_LIBRARIES} ${CORE_LIBRARIES} ${CORE_BUILT}
${GSI_LDFLAGS} ${NCDIAG_LIBRARIES} ${GSDCLOUD_LIBRARY} ${ZLIB_LIBRARIES} ${wrflib} ${EXTRA_LINKER_FLAGS} ${FV3GFS_NCIO_LIBRARIES})
install(TARGETS ${GSIEXEC}
Expand Down
3 changes: 3 additions & 0 deletions src/gsi/gesinfo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ subroutine gesinfo
jcap=gfshead%jcap, ntrac=gfshead%ntrac, idvc=gfshead%idvc, &
idsl=gfshead%idsl, ncldt=gfshead%ncldt, iret=iret2)

! FV3GFS write component does not include JCAP, infer from DIMY-2
!if (gfshead%jcap<0) gfshead%jcap=gfshead%latb-2

if ( iret2 /= 0 .or. TRIM(filetype) /= 'NEMSIO' ) then
write(6,*)' GESINFO: UNKNOWN FORMAT FOR GFSATM file = ', &
trim(filename),' Status = ',iret2
Expand Down
Loading

0 comments on commit 2fb4b6b

Please sign in to comment.