[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20000420: netCDF problem
- Subject: Re: 20000420: netCDF problem
- Date: Thu, 20 Apr 2000 14:25:56 -0600
>To: address@hidden
>From: "takaya namba" <address@hidden>
>Organization: .
>Keywords: 200004201422.IAA13831
Hi,
> in the case that netcdf-file is big(big.nc),
> if i do
> ncdump big.nc >big
> ncgen -f big >big.f
>
> the error says that we can not use so many data by data statement.
>
> How I can solve this problem?
The -f and -c options of ncgen are only useful for relatively small
CDL files, since all the data is included in variable initializations
in the generated program.
If you want to write a Fortran that will create a large netCDF file,
you can use ncgen -f to generate some of the code, but you will need
to get values into the data arrays in some way other than with DATA
statements. For example, the data might be generated from running a
model, read in from another file, or generated by an instrument.
If you want to manipulate the data in the big.nc file, perhaps what
you require is a Fortran program that will read the data, rather than
one that will write it. In this case, you might want to look at the
user-contributed program GENNET.F instead of ncgen:
GENNET.F: Barry Schwartz's program to generate a Fortran program to
read a netCDF file. It opens a specified netCDF file and generates
the necessary Fortran code to declare the corresponding Fortran
dimensions and variables and read all the data into the Fortran
variables.
The GENNET.F program is available from
http://www.unidata.ucar.edu/packages/netcdf/contrib.html
Also, it's recommended that you send netCDF questions to
address@hidden
rather than
address@hidden
because they will be dealt with more quickly that way.
--Russ
_____________________________________________________________________
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu