[R-sig-Geo] weird ncdf4 output 9.969210e+36

Jianhua Huang jh.eco.cas at gmail.com
Tue Oct 21 21:47:47 CEST 2014


Thanks so much, Pascal. It solve the problem by adding the argument  missval = NA to the ncvar_def function when writing the nc file. 

-----Original Message-----
From: skalp.oettli at gmail.com [mailto:skalp.oettli at gmail.com] On Behalf Of Pascal Oettli
Sent: Monday, October 20, 2014 11:46 PM
To: Jianhua Huang
Cc: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] weird ncdf4 output 9.969210e+36

Hi,

This is the number for missing value in most of NetCDF files.
http://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html#Missing%20Data%20Values

This means you missed to provide/utilize the missing value attribute when you read your file.

Regards,
Pascal

On Tue, Oct 21, 2014 at 3:40 PM, Jianhua Huang <jh.eco.cas at gmail.com> wrote:
> Hi All:
>
>
>
> I am trying to create a 3 dimensional (200*200*8760) netCdf file using 
> the
> ncdf4 package. Everything goes fine, except some unexpected outputs. 
> Here is tail of the result in one grid cell. I cbind the original 
> values and the output read from the nc file.
>
>
>
>         Original   ncdf4
>
> [8755,] 70.47247 7.047247e+01
>
> [8756,] 47.10336 4.710336e+01
>
> [8757,] 38.70509 3.870509e+01
>
> [8758,] 32.86281 3.286281e+01
>
> [8759,] 21.90854 9.969210e+36
>
> [8760,] 10.95427 9.969210e+36
>
>
>
> Most ncdf4 data matches with the original data, except the last two values.
> There are extremely large values: 9.969210e+36
>
>
>
> I have no idea where these huge values come from, and can't figure out 
> where is wrong at all.
>
> Any one met the same problem before? Thanks for any suggestion, and I 
> really appreciate any help.
>
>
>
> Thanks
>
>
>
> Jianhua
>
>
>
>
>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



--
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan



More information about the R-sig-Geo mailing list