Skip to content
Prev 23958 / 29559 Next

raster pkg: overwriting the dimensions detected by netcdf4 (PERSIANN-CDR)

On 3 February 2016 at 12:56, Michael Sumner <mdsumner at gmail.com> wrote:
Thanks your very much Michael and Chris for your comments.

In fact, reading the file with gdal_translate I got a warning message
about the dimensions:

Checking gdal_installation...
Scanning for GDAL installations...
Checking Sys.which...
GDAL version 1.11.2
GDAL command being used: "/usr/bin/gdal_translate" -of "GTiff" -b "1"
"NETCDF:PERSIANN-CDR_v01r01_20090101_c20140523.nc:precipitation"
"PERSIANN-CDR_v01r01_20090101_c20140523.nc.tif"
Warning 1: dimension #2 (lat) is not a Longitude/X dimension.
Warning 1: dimension #1 (lon) is not a Latitude/Y dimension.


also, 'ncview' indicates that the Y variable corresponds to longitude,
going from 0.125 to 359.875, while the X variable corresponds to
latitude, with values going from 59.75 to -59.875.

However, 'ncdump -h ' shows that the attributes are correctly stored
within the file (but with no extent):

netcdf PERSIANN-CDR_v01r01_20090101_c20140523 {
dimensions:
time = 1 ;
lat = 480 ;
lon = 1440 ;
nv = 2 ;
variables:
int time(time) ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:units = "days since 1979-01-01 0:0:0" ;
float lat(lat) ;
lat:standard_name = "latitude" ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
lat:valid_max = 60.f ;
lat:valid_min = -60.f ;
lat:bounds = "lat_bnds" ;
float lon(lon) ;
lon:standard_name = "longitude" ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
lon:valid_max = 360.f ;
lon:valid_min = 0.f ;
lon:bounds = "lon_bnds" ;
Thanks for that comment (and the fortunes citation). In the end, I'll
continue rotating the file with 't' knowing that the contnet of the
file is actually rotated.

Kind regards,


Mauricio


=====================================
Dept. of Civil Engineering
Faculty of Engineering and Sciences
Universidad de La Frontera
PO Box 54-D, Temuco, Chile
http://ingenieriacivil.ufro.cl/
=====================================
mailto     : mauricio.zambrano at ufrontera.cl
work-phone : +56 45 259 2812
=====================================
"In the end, it's not the years in your life that count.
 It's the life in your years". (Abraham Lincoln)
=====================================
Linux user #454569 -- Linux Mint user