Commit 87d96843 authored by Don Morton's avatar Don Morton
Browse files

Minor changes in grib2nc4 for FPv9.3.1.

See Ticket #150
parent 496c6079
......@@ -7,11 +7,13 @@ FC = gfortran
FLEXPART_SRC = ..
GRIBAPI = /opt/grib-api
HDF5 = /opt/hdf5-1.8.16
NETCDFF = /opt/netcdf-fortran-4.4.3
NETCDF = /opt/netcdf-c-4.4.0
BINARY = grib2nc4
OBJS = processmetfields.o
FPMODOBJS = par_mod.o com_mod.o class_vtable_mod.o cmapf_mod.o conv_mod.o
......@@ -31,8 +33,14 @@ FFLAGS = -mcmodel=medium
INCLUDES_NETCDF = -I${NETCDFF}/include
INCLUDES = -I${GRIBAPI}/include ${INCLUDES_NETCDF}
LDFLAGS_NETCDF = -L${NETCDFF}/lib -lnetcdff -L${NETCDF}/lib -lnetcdf
LDFLAGS = -L${GRIBAPI}/lib -lgrib_api_f90 -lgrib_api ${LDFLAGS_NETCDF}
### NetCDF link flags - use the first one for dynamic libs, the second
### one for static libs
#LDFLAGS_NETCDF = -L${NETCDFF}/lib -lnetcdff -L${NETCDF}/lib -lnetcdf
LDFLAGS_NETCDF=-static -L${NETCDFF}/lib -lnetcdff -L${NETCDF}/lib -lnetcdf -lnetcdf -L${HDF5}/lib -lhdf5_fortran -lhdf5_hl -lhdf5hl_fortran -lhdf5 -ldl -lz
LDFLAGS = -L${GRIBAPI}/lib -lgrib_api_f90 -lgrib_api ${LDFLAGS_NETCDF} -ljasper
#------------ Creating the binary ------------------
......@@ -49,7 +57,7 @@ fp2nc4io_mod.mod : ${FPMODOBJS}
#----------- Entries for testing ----------------
test : clean_test test/${BINARY}_test
mv ${BINARY}_test test/
(cd test; export LD_LIBRARY_PATH=${NETCDFF}/lib:${NETCDF}/lib:${LD_LIBRARY_PATH}; ./${BINARY}_test EL14091912 testout.nc4 w q)
(cd test; export LD_LIBRARY_PATH=${NETCDFF}/lib:${NETCDF}/lib:${GRIBAPI}/lib:${LD_LIBRARY_PATH}; ./${BINARY}_test EL14091912 testout.nc4 w q)
test/${BINARY}_test : ${BINARY}_test.o fp2nc4io_mod.o ${FLXPRTOBJS} ${FPMODOBJS} ${OBJS}
${FC} -o ${BINARY}_test ${BINARY}_test.o fp2nc4io_mod.o ${FLXPRTOBJS} ${FPMODOBJS} ${OBJS} ${LDFLAGS}
......
......@@ -25,7 +25,9 @@ MODULE fp2nc4io_mod
PRIVATE DEFAULT_DEFLATE_LEVEL
! These are valid variable names for the user of this module to reference
CHARACTER, DIMENSION(*), PARAMETER :: VALID_VARS = &
!!! DJM - 2016-06-13 -- added specific value in DIMENSION statement.
!!! can't be "*" in some Fortran versions
CHARACTER, DIMENSION(10), PARAMETER :: VALID_VARS = &
& (/ 't', 'u', 'v', 'w', 'q', &
& 'T', 'U', 'V', 'W', 'Q' /)
PRIVATE VALID_VARS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment