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

950808: netCDF on CRAY



Doug,

>Date: Mon, 7 Aug 95 16:39:14 -0600 
>From: Doug Cripe <address@hidden>
>Organization: Colorado State University
>Subject: Re: 950807: netCDF on CRAY 
>Keywords: 199508071638.AA16186

In the above message you wrote:

> Thanks for your comments.  In response, I have written the simplest  
> "bare bones" program just to read out the base and offset times  
> from an ARM file that I'm working with to ensure that I don't have  
> any bugs.  This program runs and does what I want it to on our NeXT  
> and HP machines, but doesn't on shavano (it has the same problem as  
> before).
> 
> Here's the program; would you mind taking a look at it and/or  
> running it?   I'll ftp you the ARM file it accesses if you'll tell  
> me where to send it.
> 
> Thanks,
> Doug
> 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
>       program offset_time
> 
>       implicit none
> 
>       include '/usr/local/include/netcdf.inc'
> 
>       integer cdfid, rcode, times, ndims, k
>       parameter(ndims=1, times=24)
>       integer start(ndims), count(ndims), idbase, idoff, basetime
> 
>       character filename*33
> 
>       double precision offset(times)
> 
>       data start /1/
>       data count /times/
> 
>       filename = 'sgp30ebbrE13.a1.941025.000000.cdf'
> 
>       cdfid = ncopn(filename, ncnowrit, rcode)
>         if(rcode.ne.0) print*, 'Error opening file'
> 
>       idbase = ncvid(cdfid, 'base_time', rcode)
>       idoff = ncvid(cdfid, 'time_offset', rcode)
> 
>       call ncvgt(cdfid, idbase, start, count, basetime, rcode)
>         if(rcode.ne.0) print*, 'Error reading basetime'
> 
>       call ncvgt(cdfid, idoff, start, count, offset, rcode)
>         if(rcode.ne.0) print*, 'Error reading offset time hyperslab'
> 
>       print*,'Basetime:',basetime
>       print*
>       print*,'Offset time:'
> 
>       write(*,201) (idint(offset(k)),k=1,times)
> 
>   201 format(i9)
> 
>       end
>  

I've found the problem.  Change the type of `offset' from `double
precision' to `real' (you'll also have to change the `idint()' calls to
just `int()').

I'm not sure if this is a problem with the netCDF FORTRAN interface or
not.

--------
Steve Emmerson   <address@hidden>