Skip to content
Closed
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
8 changes: 4 additions & 4 deletions arch/Config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@

{ $_ =~ s/CONFIGURE_WRFIO_PHDF5/wrfio_phdf5/g ;
$_ =~ s:CONFIGURE_PHDF5_FLAG:-DPHDF5: ;
$_ =~ s:CONFIGURE_PHDF5_LIB_PATH:-L\$\(WRF_SRC_ROOT_DIR\)/external/io_phdf5 -lwrfio_phdf5 -L$sw_phdf5_path/lib -lhdf5_fortran -lhdf5 -lm -lz -L$sw_phdf5_path/lib -lsz: ;
$_ =~ s:CONFIGURE_PHDF5_LIB_PATH:-L\$\(WRF_SRC_ROOT_DIR\)/external/io_phdf5 -lwrfio_phdf5 -L$sw_phdf5_path/lib -lhdf5_hl -lhdf5 -lm -lz -L$sw_phdf5_path/lib -lsz: ;
}
else
{ $_ =~ s/CONFIGURE_WRFIO_PHDF5//g ;
Expand Down Expand Up @@ -604,9 +604,9 @@
$_ .= " \$\(NETCDF4_IO_OPTS\)\n" ;
}
if (/^LIB.*=/)
{ $_ =~ s/\r|\n//g ;
$_ .=" \$\(NETCDF4_DEP_LIB\)\n" ;
}
{
$_ =~ s/(\\?)[\r\n]/ \$\(NETCDF4_DEP_LIB\)\1\n/g ;
}
}
}

Expand Down
64 changes: 61 additions & 3 deletions arch/configure.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ CC_TOOLS = $(SCC)
###########################################################
#ARCH CYGWIN_NT i686, PGI compiler on Windows # serial smpar dmpar dm+sm
#
DESCRIPTION = PGI ($SFC/$SCC): Windows
DESCRIPTION = PGI ($SFC/$SCC): Windows native
DMPARALLEL = # 1
OMPCPP = # -D_OPENMP
OMP = # -mp -Minfo=mp
Expand Down Expand Up @@ -1597,8 +1597,7 @@ RLFLAGS =
CC_TOOLS = $(SCC)

LIB_EXTERNAL = \
../external/io_netcdf/libwrfio_nf.a CONFIGURE_NETCDF_PATH/lib/libnetcdf.lib \
../external/wavelet/libWavelet.a ../external/wavelet/lib_wavelet.a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find any way to generate an external/wavelet/libWavelet.a, so I removed that link here and did not add it for the Cygwin link line. If that archive was moved somewhere rather than removed, I should change these to point to the new location.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wavelet library looks to be part of the data assimilation. It is located in var/external.

../external/io_netcdf/libwrfio_nf.a CONFIGURE_NETCDF_PATH/lib/libnetcdf.lib
ESMF_IO_LIB = ../external/esmf_time_f90/libesmf_time.a
LIB_BUNDLED = \
../external/fftpack/fftpack5/libfftpack.a \
Expand Down Expand Up @@ -1916,6 +1915,65 @@ RANLIB = ranlib
RLFLAGS =
CC_TOOLS = $(SCC)

###########################################################
#ARCH CYGWIN_NT i686 x86_64, gfortran compiler with gcc #serial smpar dmpar dm+sm
#
DESCRIPTION = GNU ($SFC/$SCC)
DMPARALLEL = # 1
OMPCPP = # -D_OPENMP
OMP = # -fopenmp
OMPCC = # -fopenmp
SFC = gfortran
SCC = gcc
CCOMP = gcc
DM_FC = mpif90 -f90=$(SFC)
DM_CC = mpicc -cc=$(SCC)
FC = CONFIGURE_FC
CC = CONFIGURE_CC
LD = $(FC)
RWORDSIZE = CONFIGURE_RWORDSIZE
PROMOTION = #-fdefault-real-8
ARCH_LOCAL = -DNONSTANDARD_SYSTEM_SUBR -DWRF_USE_CLM
CFLAGS_LOCAL = -w -O3 -c
LDFLAGS_LOCAL =
CPLUSPLUSLIB =
ESMF_LDFLAG = $(CPLUSPLUSLIB)
FCOPTIM = -O2 -ftree-vectorize -funroll-loops
FCREDUCEDOPT = $(FCOPTIM)
FCNOOPT = -O0
FCDEBUG = # -g $(FCNOOPT) # -ggdb -fbacktrace
FORMAT_FIXED = -ffixed-form
FORMAT_FREE = -ffree-form -ffree-line-length-none
FCSUFFIX =
BYTESWAPIO = -fconvert=big-endian -frecord-marker=4
FCBASEOPTS_NO_G = -w $(FORMAT_FREE) $(BYTESWAPIO)
FCBASEOPTS = $(FCBASEOPTS_NO_G) $(FCDEBUG)
MODULE_SRCH_FLAG =
TRADFLAG = -traditional
CPP = /lib/cpp -P
AR = ar
ARFLAGS = ru
M4 = m4 -G
RANLIB = ranlib
RLFLAGS =
CC_TOOLS = $(SCC)

LIB_EXTERNAL = \
$(WRF_SRC_ROOT_DIR)/external/io_netcdf/libwrfio_nf.a CONFIGURE_NETCDF_PATH/lib/libnetcdf.dll.a \
-L CONFIGURE_NETCDF_PATH -lnetcdff -lnetcdf -lnetcdf -ltirpc -lhdf5_hl -lhdf5 -lm -lz \
$(WRF_SRC_ROOT_DIR)/external/io_grib2/libio_grib2.a
ESMF_IO_LIB = $(WRF_SRC_ROOT_DIR)/external/esmf_time_f90/libesmf_time.a
LIB_BUNDLED = \
$(WRF_SRC_ROOT_DIR)/external/fftpack/fftpack5/libfftpack.a \
$(WRF_SRC_ROOT_DIR)/external/io_grib1/libio_grib1.a \
$(WRF_SRC_ROOT_DIR)/external/io_grib2/libio_grib2.a \
$(WRF_SRC_ROOT_DIR)/external/io_grib_share/libio_grib_share.a \
$(WRF_SRC_ROOT_DIR)/external/io_int/libwrfio_int.a \
$(ESMF_IO_LIB) \
CONFIGURE_COMMS_LIB \
$(WRF_SRC_ROOT_DIR)/frame/module_internal_header_util.o \
$(WRF_SRC_ROOT_DIR)/frame/pack_utils.o

#insert new stanza here

###########################################################
Expand Down
13 changes: 0 additions & 13 deletions arch/postamble
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,6 @@ INCLUDE_MODULES = $(MODULE_SRCH_FLAG) \
REGISTRY = Registry
CC_TOOLS_CFLAGS = CONFIGURE_NMM_CORE

#NOWIN LIB_BUNDLED = \
#NOWIN $(WRF_SRC_ROOT_DIR)/external/fftpack/fftpack5/libfftpack.a \
#NOWIN $(WRF_SRC_ROOT_DIR)/external/io_grib1/libio_grib1.a \
#NOWIN $(WRF_SRC_ROOT_DIR)/external/io_grib_share/libio_grib_share.a \
#NOWIN $(WRF_SRC_ROOT_DIR)/external/io_int/libwrfio_int.a \
#NOWIN $(ESMF_IO_LIB) \
#NOWIN CONFIGURE_COMMS_LIB \
#NOWIN $(WRF_SRC_ROOT_DIR)/frame/module_internal_header_util.o \
#NOWIN $(WRF_SRC_ROOT_DIR)/frame/pack_utils.o

#NOWIN LIB_EXTERNAL = \
#NOWIN CONFIGURE_NETCDF_LIB_PATH CONFIGURE_PNETCDF_LIB_PATH CONFIGURE_GRIB2_LIB CONFIGURE_ATMOCN_LIB CONFIGURE_HDF5_LIB_PATH

LIB = $(LIB_BUNDLED) $(LIB_EXTERNAL) $(LIB_LOCAL) $(LIB_WRF_HYDRO)
LDFLAGS = $(OMP) $(FCFLAGS) $(LDFLAGS_LOCAL) CONFIGURE_LDFLAGS
ENVCOMPDEFS = CONFIGURE_COMPILEFLAGS
Expand Down
13 changes: 13 additions & 0 deletions arch/preamble
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ NETCDF4_DEP_LIB = $(DEP_LIB_PATH) $(HDF5) $(ZLIB) $(GPFS) $(CURL)

LIBWRFLIB = libwrflib.a

#NOWIN LIB_BUNDLED = \
#NOWIN $(WRF_SRC_ROOT_DIR)/external/fftpack/fftpack5/libfftpack.a \
#NOWIN $(WRF_SRC_ROOT_DIR)/external/io_grib1/libio_grib1.a \
#NOWIN $(WRF_SRC_ROOT_DIR)/external/io_grib_share/libio_grib_share.a \
#NOWIN $(WRF_SRC_ROOT_DIR)/external/io_int/libwrfio_int.a \
#NOWIN $(ESMF_IO_LIB) \
#NOWIN CONFIGURE_COMMS_LIB \
#NOWIN $(WRF_SRC_ROOT_DIR)/frame/module_internal_header_util.o \
#NOWIN $(WRF_SRC_ROOT_DIR)/frame/pack_utils.o

#NOWIN LIB_EXTERNAL = \
#NOWIN CONFIGURE_NETCDF_LIB_PATH CONFIGURE_PNETCDF_LIB_PATH CONFIGURE_GRIB2_LIB CONFIGURE_ATMOCN_LIB CONFIGURE_HDF5_LIB_PATH


#### Architecture specific settings ####

6 changes: 3 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ USENETCDF=""
if [ -n "$NETCDF" ] ; then
echo "Will use NETCDF in dir: $NETCDF"
# Oh UNIDATA, why make it so hard ...
if [ -f "$NETCDF/lib/libnetcdff.a" -o -f "$NETCDF/lib/libnetcdff.so" ] ; then
if [ -f "$NETCDF/lib/libnetcdff.a" -o -f "$NETCDF/lib/libnetcdff.so" -o -f "${NETCDF}/lib/libnetcdff.dll.a" ] ; then
USENETCDFF="-lnetcdff"
else
USENETCDFF=" "
fi
if [ -f "$NETCDF/lib/libnetcdf.a" -o -f "$NETCDF/lib/libnetcdf.so" ] ; then
if [ -f "$NETCDF/lib/libnetcdf.a" -o -f "$NETCDF/lib/libnetcdf.so" -o -f "${NETCDF}/lib/libnetcdf.dll.a" ] ; then
USENETCDF="-lnetcdf"
else
USENETCDF=" "
Expand All @@ -204,7 +204,7 @@ fi

# If the user asked for classic netcdf, acquiesce to the request.

if [ "`uname`" = "Linux" ] ; then
if [ "`uname`" = "Linux" -o "`uname -o`" = "Cygwin" ] ; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is uname -o correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uname gives result CYGWIN_NT-10.0. I could change that, but I'm not sure when the "10.0" part changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -o option trims the "10.0" and changes the string from "CYGWIN_NT" to "Cygwin"?

ans="`whereis nf-config`"
elif [ "`uname`" = "Darwin" ] ; then
ans="`which nf-config`"
Expand Down
2 changes: 1 addition & 1 deletion external/io_netcdf/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ diffwrf: diffwrf.F90
$(FC) -c $(FFLAGS) diffwrf.f
@if [ \( -f ../../frame/wrf_debug.o \) -a \( -f ../../frame/module_wrf_error.o \) -a \( -f $(ESMF_MOD_DEPENDENCE) \) -a \( -f ../../frame/clog.o \) ] ; then \
echo "diffwrf io_netcdf is being built now. " ; \
if [ \( -f $(NETCDFPATH)/lib/libnetcdff.a -o -f $(NETCDFPATH)/lib/libnetcdff.so \) ] ; then \
if [ \( -f $(NETCDFPATH)/lib/libnetcdff.a -o -f $(NETCDFPATH)/lib/libnetcdff.dll.a -o -f $(NETCDFPATH)/lib/libnetcdff.so \) ] ; then \
$(FC) $(FFLAGS) $(LDFLAGS) -o diffwrf diffwrf.o $(OBJSL) ../../frame/wrf_debug.o ../../frame/module_wrf_error.o ../../frame/clog.o $(ESMF_IO_LIB_EXT) $(LIBFFS) ;\
else \
$(FC) $(FFLAGS) $(LDFLAGS) -o diffwrf diffwrf.o $(OBJSL) ../../frame/wrf_debug.o ../../frame/module_wrf_error.o ../../frame/clog.o $(ESMF_IO_LIB_EXT) $(LIBS) ;\
Expand Down
1 change: 1 addition & 0 deletions tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ OBJ = registry.o my_strtok.o reg_parse.o data.o type.o misc.o \

registry : $(OBJ) standard.exe
$(CC_TOOLS) -o registry $(DEBUG) $(LDFLAGS) $(OBJ)
if [ -x /usr/bin/peflags.exe ] ; then /usr/bin/peflags.exe --stack-reserve=33554432 registry; fi

standard.exe : standard.o
$(CC_TOOLS) -o standard.exe $(DEBUG) $(LDFLAGS) standard.o
Expand Down