0

I have downloaded data from https://oceancolor.gsfc.nasa.gov/ that is formatted into a .nc file but I want to be able to use it in ENVI.

I have done

x <- stack("C:\\Users\\blopezbarreto\\Downloads\\A2018012210500.L2_LAC_IOP.nc")

This only has it for one layer so when converted

writeRaster(x, filename= "name", overwrite = T)

the ENVI file was not formatted correctly and

xs <- raster("C:\\Users\\blopezbarreto/\\Downloads\\A2018012210500.L0_LAC")

had the same results.

Not sure what more I can do from here, but simply I am trying to convert .nc files from specifically Ocean color Data in order to work with the chlorophyll data in ENVI.

mickey
  • 2,168
  • 2
  • 11
  • 20
  • Can you please point to a specific file? I would use `brick(filename)`, but your first line `stack` should also work. To write to ENVI format you need to use `name.envi` in `writeRaster. But I assume ENVI can also read other formats such as `tif` ? – Robert Hijmans Nov 12 '18 at 06:23
  • The name of the file is A2018012210500.L2_LAC_OC.nc and the URL is https://oceancolor.gsfc.nasa.gov/cgi/browse.pl – brittbarreto Nov 16 '18 at 00:15
  • Can you provide a link to the file though? – Robert Hijmans Nov 17 '18 at 04:17

0 Answers0