[ncl-install] Zero length dimension errors
Crooks, Cynthia J
cynthia.crooks at bp.com
Wed Apr 20 09:03:12 MDT 2016
Mary,
Thank you for looking at this. I will forward the information to the user.
It is strange, however, because “ncdump” will open the file and give output here. I had also done the file test_0001.nc and got the same results.
The CDL file has “ocean_time = UNLIMITED ; // (1 currently)”. I will see if I can find some help with the NCO folks.
Thanks again.
Cindy
From: Mary Haley [mailto:haley at ucar.edu]
Sent: Wednesday, April 20, 2016 9:41 AM
To: Crooks, Cynthia J
Cc: ncl-install at ucar.edu
Subject: Re: [ncl-install] Zero length dimension errors
Hi Cindy,
To answer your original question, yes, these kind of questions should normally be posted to ncl-talk, which has far more subscribers than this installation list, but I can answer here.
I tried to do an "ncdump" on the NetCDF file you attached, but it told me it was an unknown file format.
I then did a UNIX "file" on it and it said it was an HDF4 data file:
file test_0001.nc<http://test_0001.nc>
test_0001.nc<http://test_0001.nc>: Hierarchical Data Format (version 4) data
I then used an "ncl_filedump" trick to make it think it was opening an HDF file:
ncl_filedump test_0001.nc.hdf4
I got quite a bit of valid output, but the "ocean_time" dimension was 0, which is why you are seeing the error about a "zero length dimension"
I think the problem may be with ncgen and your CDL file, because when run ncgen on it, the ocean_time dimension gets set to zero. This is not allowed by NCL, to have 0-length dimensions, and hence the error.
Please note that "ncgen" is NOT part of the NCL software package. This is part of the NCO software suite developed by Charlie Zender at UC-Irvine.
I think you need to look at your CDL file and fix the problem with the 0-length time dimension.
--Mary
On Tue, Apr 19, 2016 at 1:00 PM, Crooks, Cynthia J <cynthia.crooks at bp.com<mailto:cynthia.crooks at bp.com>> wrote:
I just realized that I probably should have included the cdl file and the output nc file.
Cindy
From: ncl-install-bounces at ucar.edu<mailto:ncl-install-bounces at ucar.edu> [mailto:ncl-install-bounces at ucar.edu<mailto:ncl-install-bounces at ucar.edu>] On Behalf Of Crooks, Cynthia J
Sent: Tuesday, April 19, 2016 9:54 AM
To: ncl-install at ucar.edu<mailto:ncl-install at ucar.edu>
Subject: [ncl-install] Zero length dimension errors
I recently compiled ncl_ncarg-6.3.0 for one of our users. She has written the ncl script below:
; NCL script to time interpolate hycom to 1 hour time interval
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;load "/usr/lib/ncarg/nclscripts/csm/contributed.ncl"
setfileoption("nc","Format","LargeFile")
ii=2
fileno_in=sprintf("%04.0f",ii)
iii=ii-1
fileno_out=sprintf("%04.0f",iii)
file_out = "/lustre04/vol0/crookscj/ncl/reems/test_"+fileno_out+".nc"
file_in = "/lustre04/vol0/crookscj/ncl/reems/SV_tides_100m_his_"+fileno_in+".nc"
file_time = "/lustre04/vol0/crookscj/ncl/reems/SV_tides_500m_his_"+fileno_in+".nc"
fin = addfile(file_in,"r")
ftime = addfile(file_time,"r")
system("ncgen -o "+file_out+" SV_his.cdl")
out = addfile(file_out,"w")
The script appears to work until the last statement which generates the “Zero length dimension” errors. She has checked the file created by “ncgen” and feels it is correct. She has looked through the FAQ and did not find anything she felt was helpful.
We are wondering if I have missed something in the compile steps or setting up the user environment. I have attached a copy of the script, a log file with the error messages and a file with the steps I took to compile the software. I have also attached the lua module file which sets the environment.
I am trying to collect the data and rewrite the script so that everything would be contained in the current directory.
Please let me know if this should be more appropriately posted to ncl-talk.
Thanks for your help.
Cindy
_______________________________________________
ncl-install mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-install
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20160420/326a3c85/attachment-0001.html
More information about the ncl-install
mailing list