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

Use nceplibs-ncio for enkf_chgres_recenter_nc utility #839

Merged
merged 1 commit into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions modulefiles/fv3gfs/enkf_chgres_recenter_nc.wcoss2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ load(pathJoin("netcdf", os.getenv("netcdf_ver")))

load(pathJoin("bacio", os.getenv("bacio_ver")))
load(pathJoin("w3nco", os.getenv("w3nco_ver")))
load(pathJoin("ncio", os.getenv("ncio_ver")))
load(pathJoin("ip", os.getenv("ip_ver")))
load(pathJoin("sp", os.getenv("sp_ver")))

Expand Down
12 changes: 2 additions & 10 deletions sorc/build_enkf_chgres_recenter_nc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ set -eux
source ./machine-setup.sh > /dev/null 2>&1
cwd=`pwd`

set +x
module use ${cwd}/../modulefiles/fv3gfs
module load enkf_chgres_recenter_nc.$target
module list
set -x

# Check final exec folder exists
if [ ! -d "../exec" ]; then
Expand All @@ -16,16 +18,6 @@ fi
cd ${cwd}/enkf_chgres_recenter_nc.fd

export FFLAGS="-O3 -qopenmp -g -traceback -fp-model precise"
export FV3GFS_NCIO_LIB="${cwd}/gsi.fd/build/lib/libfv3gfs_ncio.a"
export FV3GFS_NCIO_INC="${cwd}/gsi.fd/build/include"

if [ ! -f $FV3GFS_NCIO_LIB ]; then
echo "BUILD ERROR: missing GSI library file"
echo "Missing file: $FV3GFS_NCIO_LIB"
echo "Please build the GSI first (build_gsi.sh)"
echo "EXITING..."
exit 1
fi

make clean
make
Expand Down
2 changes: 1 addition & 1 deletion sorc/enkf_chgres_recenter_nc.fd/input_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module input_data

use utils
use setup
use module_fv3gfs_ncio
use module_ncio

implicit none

Expand Down
14 changes: 7 additions & 7 deletions sorc/enkf_chgres_recenter_nc.fd/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL= /bin/sh

LIBS= $(FV3GFS_NCIO_LIB) $(BACIO_LIB4) $(W3NCO_LIB4) $(IP_LIB4) $(SP_LIB4) -L$(NETCDF)/lib -lnetcdff -lnetcdf -L${HDF5_LIBRARIES} -lhdf5_hl -lhdf5 -lz
LIBS= $(NCIO_LIB) $(BACIO_LIB4) $(W3NCO_LIB4) $(IP_LIB4) $(SP_LIB4) -L$(NETCDF)/lib -lnetcdff -lnetcdf -L${HDF5_LIBRARIES} -lhdf5_hl -lhdf5 -lz

CMD= enkf_chgres_recenter_nc.x

Expand All @@ -10,17 +10,17 @@ $(CMD): $(OBJS)
$(FC) $(FFLAGS) -o $(CMD) $(OBJS) $(LIBS)

driver.o: setup.o output_data.o interp.o input_data.o driver.f90
$(FC) $(FFLAGS) -I$(FV3GFS_NCIO_INC) -I$(NETCDF)/include -c driver.f90
$(FC) $(FFLAGS) -I$(NCIO_INC) -I$(NETCDF)/include -c driver.f90
interp.o: setup.o utils.o output_data.o input_data.o interp.f90
$(FC) $(FFLAGS) -I$(FV3GFS_NCIO_INC) -I$(NETCDF)/include -c interp.f90
$(FC) $(FFLAGS) -I$(NCIO_INC) -I$(NETCDF)/include -c interp.f90
input_data.o: setup.o utils.o input_data.f90
$(FC) $(FFLAGS) -I$(FV3GFS_NCIO_INC) -I$(NETCDF)/include -c input_data.f90
$(FC) $(FFLAGS) -I$(NCIO_INC) -I$(NETCDF)/include -c input_data.f90
output_data.o: setup.o utils.o input_data.o output_data.f90
$(FC) $(FFLAGS) -I$(FV3GFS_NCIO_INC) -I$(NETCDF)/include -c output_data.f90
$(FC) $(FFLAGS) -I$(NCIO_INC) -I$(NETCDF)/include -c output_data.f90
setup.o: setup.f90
$(FC) $(FFLAGS) -I$(FV3GFS_NCIO_INC) -I$(NETCDF)/include -c setup.f90
$(FC) $(FFLAGS) -I$(NCIO_INC) -I$(NETCDF)/include -c setup.f90
utils.o: utils.f90
$(FC) $(FFLAGS) -I$(FV3GFS_NCIO_INC) -I$(NETCDF)/include -c utils.f90
$(FC) $(FFLAGS) -I$(NCIO_INC) -I$(NETCDF)/include -c utils.f90
clean:
rm -f *.o *.mod ${CMD}
install:
Expand Down
2 changes: 1 addition & 1 deletion sorc/enkf_chgres_recenter_nc.fd/output_data.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module output_data

use module_fv3gfs_ncio
use module_ncio

implicit none

Expand Down
1 change: 1 addition & 0 deletions versions/build.ver
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ export ip_ver=3.3.3
export wrf_io_ver=1.1.1
export gfsio_ver=1.4.1
export sfcio_ver=1.4.1
export ncio_ver=1.0.0

export upp_ver=8.1.0