Hi all,

I am trying to open a netCDF file (
ftp://globcolour_data:fgh678@ftp.acri.fr/GLOB_4KM/RAN/CHL1/MERGED/GSM/2007/DAILY/L3b_20070615__GLOB_4_GSM-MERMODSWF_CHL1_DAY_00.nc.gz
).

However, when I use the raster package to load it as a raster ...

library(raster)
test<-raster("D:\\temp\\testAQUATERRA\\rawtif\\L3b_20070615__GLOB_4_GSM-MERMODSWF_CHL1_DAY_00.nc",
varnam= "CHL1_mean")

Error in .rasterObjectFromCDF(x, type = objecttype, band = band, ...) :
  CHL1_mean only has a single dimension; I cannot make a RasterLayer from
this


Here is the structure of the file ...
Variable "CHL1_mean is linked to a bin, not XY coordinates

library(ncdf)
test<-open.ncdf("D:\\temp\\L3b_20070615__GLOB_4_GSM-MERMODSWF_CHL1_DAY_00.nc")
test

[1] "file D:\\temp\\L3b_20070615__GLOB_4_GSM-MERMODSWF_CHL1_DAY_00.nc has 2
dimensions:"
[1] "bin   Size: 3308394"
[1] "row   Size: 3121"
[1] "------------------------"
[1] "file D:\\temp\\L3b_20070615__GLOB_4_GSM-MERMODSWF_CHL1_DAY_00.nc has 8
variables:"
[1] "short col[bin]  Longname:Longitudinal index of the bins stored in the
product, zero based and beginning at west Missval:NA"
[1] "float center_lat[row]  Longname:Center latitude for each useful row
Missval:1e+30"
[1] "float center_lon[row]  Longname:Center longitude of the first left bin
(the first bin in the global ISIN grid, not the first valid bin) for each
useful row Missval:1e+30"
[1] "float lon_step[row]  Longname:Longitude step for each useful row
Missval:1e+30"
[1] "float CHL1_mean[bin]  Longname:Chlorophyll-a concentration. Case 1
water - Mean of the binned pixels Missval:1e+30"
[1] "short CHL1_count[bin]  Longname:Chlorophyll-a concentration. Case 1
water - Total number of binned pixels Missval:NA"
[1] "short CHL1_flags[bin]  Longname:Chlorophyll-a concentration. Case 1
water - Flags Missval:NA"
[1] "short CHL1_error[bin]  Longname:Chlorophyll-a concentration. Case 1
water - Error estimation Missval:NA"

Is there a simple way to open this file directly as a raster ?

Thanks

Arnaud

	[[alternative HTML version deleted]]

