Encountering problem with filedimdef

From: Andy Barrett <apbarret_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 28 2010 - 18:00:13 MST


I'm getting an error that I don't understand when trying to define a
netCDF file.

"fatal:Execute: Error occurred at or near line 928 in file

The problem is occuring when I try to define file dimensions using

If I define dim_names, dim_sizes and dimUnlim using the following I get
the error message above.

dim_names = new( ndim, string )
dim_sizes = new( ndim, integer, -1 )
dimUnlim = new( ndim, logical )
do id = 0, ndim-1
        dim_names(id) = some_name(id)
        dim_sizes(id) = some_size(id)
        dimUnlim(id) = False
end do
filedimdef( ncf, dim_names, dim_sizes, dimUnlim )

However, if I define dim_names etc explicitely I don't get an error. E.g.

  dim_names = (/ "lon", "lat", "lev", "time" /)
  dim_sizes = (/ nlon , nlat , nlev , ntim /)
  dimUnlim = (/ False , False, False , True /)
  filedimdef( ncf, dim_names, dim_sizes, dimUnlim )

Am I missing something or am I trying to do something that can't be done?

I'd like to use the former method because I don't want to hardcode the
number of dimensions into the code.


Andy Barrett
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue Dec 28 18:00:19 2010

This archive was generated by hypermail 2.1.8 : Tue Jan 04 2011 - 09:16:52 MST