[R-sig-Geo] [raster] problem with large netCDF file

Tom Roche Tom_Roche at pobox.com
Mon Feb 11 18:31:26 CET 2013


Tom Roche Sun, 10 Feb 2013 14:40:05 -0500
>> $ ls -alh ./METCRO3D_080101
>> -r--r--r-- 1 me mygroup 5.3G Jan  8 11:32 ./METCRO3D_080101
>> # extension used below
>> $ ln -s ./METCRO3D_080101 ./METCRO3D_080101.nc
...
>> raster('./METCRO3D_080101.nc', varname='ZF')
...
>> Error in .local(.Object, ...) : 
>>   `[METCRO3D_080101]' not recognised as a supported file format.

Robert J. Hijmans Sun, 10 Feb 2013 13:53:56 -0800
> ncdf files are indeed recognized by their extension (".NC",".CDF",

I was able rename the above file and subsequently load it with
`raster`, but only after copying the above file to my homespace :-(
which is generally unfeasible due to size.

> I might add further checks that do not depend on the extension.

Or perhaps merely add a flag allowing the user to {assert, vouch for}
the file's netCDF-ness? Why I ask:

Files such as the above are generated by a production model of long
standing (~20 years), which moreover generates many other netCDF files
with the same naming convention ("<8 char description/>_<timestamp/>"
with no extension). Hence a request by me for a more appropriate
naming convention seems unlikely to be adopted, and would not help
work with many years of legacy output. Moreover these outputs are
usually quite large (i.e., tens of GB or more), and usually generated
to shared directories with restricted permissions. Hence it would be
quite desirable to enable current `raster` code to either

* respect the extension of a symlink

* take a runtime flag, e.g. 'format=CDF'

If there is somewhere to make a feature request, please let me know.

TIA, Tom Roche <Tom_Roche at pobox.com>



More information about the R-sig-Geo mailing list