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

Re: 20050817: Question about 'ncvgt'



Unidata Support <address@hidden> writes:

> ------- Forwarded Message
>
>>To: address@hidden
>>From: Hui Du <address@hidden>
>>Subject: Question about 'ncvgt'
>>Organization: UC Davis
>>Keywords: 200508172351.j7HNpTjo016472 netCDF Fortran
>
> Dear Sir/Mam:
>   I am using netcdf in fortran to read some data out from the netcdf 
> file.  In my netcdf file, my data type is short.  So in my fortran 
> program, I set the 'integer' type and use the function 'ncvgt' to read 
> the data I want.
>   I do  not know why the output is much much biger than the real values. 
> In other words, I can not output the correct data.
> Can you give me some hint?
>   Thanks a lot
>

What makes you think the program is not working?

You can read short data (2-byte) as integer data (4-byte), and you
will double the size of your data, but that's OK. Is this what you are
seeing?

If you do an ncdump on the file, do you see the data you expect?

Have you used ncgen to create a fortran program to read this file? Try
that, and compare it to your program.

If none of this helps, you need to send some more information.

Good luck!

Ed
-- 
Ed Hartnett  -- address@hidden