[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: large netCDF data sets



>To: address@hidden
>From: "Tom Black" <address@hidden>
>Subject: Re: 20040824: large netCDF data sets
>Organization: NOAA
>Keywords: 200408241744.i7OHiDXn015989

Hi Tom,

> Ed pointed me at a new version of netCDF3.6.0 but he wasn't too 
> optimistic about it.  I'm running the big WRF SI job with it right now.  
> In the meantime I'd like to try the test program you mentioned last 
> week.  I grabbed it (wrf_test.f) but I need to know what all it 
> requires.  It needs a netcdf.inc file to compile.  What else do I need 
> to run it to repeat what you did?

Here's how I compiled and ran it on a Solaris platform:

  $ f90 -g -w -I/home/russ/work/include wrf_test.f -o wrf_test 
-L/home/russ/work/lib -lnetcdf

The "-I/home/russ/work/include" tells where to look for the netcdf.inc
file, and that's just where I installed it by using the "make install"
command.  As an example, if you install from

  /usr/local/netcdf-3_6_0-beta3/src/

by running the usual configure, make all, make test, and then make
install with no additional arguments about where to install, then the
netcdf.inc file will be put in
/usr/local/netcdf-3_6_0-beta3/include/netcdf.inc and you'll use the
compile flag "-I/usr/local/netcdf-3_6_0-beta3/include".  Similarly, to
find the library you use the -L flag, which in this example case would
be "-L/usr/local/netcdf-3_6_0-beta3/lib".

The program wrf_test.f is self contained, so you shouldn't need
anything else besides the netcdf.inc include file and the libnetcdf.a
library file.

I don't know enough about AIX's Fortran environment to know whether
you'll need additional flags to make sure it's compiled in a way
consistent with how the library is compiled.  If AIX supports the
"getconf" command, you might try running the command

 getconf XBS5_LP64_OFF64

to find out whether the ILP64_OFF64 model (64-bit pointers, 64-bit
offsets) is supported (in which case the above command will print
"1"), and if so, then you could run the commands:

 getconf XBS5_LP64_OFF64_CFLAGS
 getconf XBS5_LP64_OFF64_LDFLAGS
 getconf XBS5_LP64_OFF64_LIBS

to get the C compiler, linker, and library flags for the ILP64_OFF64
model (for our AIX 5.1 system, the above commands return "-q64",
"-b64", and "-lc -lpthread -lm", respectively).  But it might be
better just to try using xlf90 (or xlf95) without additional flags and
see if it links OK, or consult the documentation.

There are other compile models than LP64_OFF64 for which you could try
the same thing, including LPBIG_OFFBIG or ILP32_OFFBIG.  The latter
returns the different flags "-q32 -D_LARGE_FILES -qlonglong", "-b32",
and "-lc -lpthread -lm" respectively on our AIX 5.1 system, which
would be used on a system with 32-bit pointers but 64-bit file offsets.

--Russ