This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> cant figure this out > i am using the latest version of netcdf3 on a opensuse machine 64bit > > I used a program called cdf35fortran.f90 that generates fortran 90 code > to read my netcdf archive (i used it many times before). it opens the > archive with status 0 then when it tries to inquire the variable on > the following line: > > !---------------------------------------------------- > ! Retrieve data for Variable 'time' > status=nf_inq_var(ncid, 1,dummy,xtype,ndim,dimids,natts) > if ( status/=nf_noerr ) write (*,*) nf_strerror(status) > > i get a segmentation fault. > > when i used ncdump -h i was able to retrieve this data: > > dimensions: > time = UNLIMITED ; // (361 currently) > z = 30 ; > y = 76 ; > x = 140 ; > variables: > float time(time) ; > time:long_name = "time" ; > time:units = "days since 2000-01-01 00:00:00 +00:00" ; > > and when i used ncdump -c i was able to see the values for the time > variable > > any ideas of what goes wrong? > > thank in advance > yair > -- > Yair Suari > Geva Carmel, Israel 30855 > Phone-0528-524520, 04-9840943 > > Howdy Yair! This could be caused by your dimids array being too short. It has to have enough space for all the dimensions. Good luck! Ed Ticket Details =================== Ticket ID: PDU-209279 Department: Support netCDF Priority: High Status: Closed