How do I convert a .nc file with multiple layers into a file readible in ENVI in R

Multi tool use
up vote
0
down vote
favorite
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.
r envi
add a comment |
up vote
0
down vote
favorite
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.
r envi
Can you please point to a specific file? I would usebrick(filename)
, but your first linestack
should also work. To write to ENVI format you need to usename.envi
inwriteRaster. But I assume ENVI can also read other formats such as
tif` ?
– Robert Hijmans
Nov 12 at 6:23
The name of the file is A2018012210500.L2_LAC_OC.nc and the URL is oceancolor.gsfc.nasa.gov/cgi/browse.pl
– brittbarreto
Nov 16 at 0:15
Can you provide a link to the file though?
– Robert Hijmans
Nov 17 at 4:17
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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.
r envi
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.
r envi
r envi
edited Nov 11 at 4:36


mickey
581114
581114
asked Nov 11 at 3:04
brittbarreto
1
1
Can you please point to a specific file? I would usebrick(filename)
, but your first linestack
should also work. To write to ENVI format you need to usename.envi
inwriteRaster. But I assume ENVI can also read other formats such as
tif` ?
– Robert Hijmans
Nov 12 at 6:23
The name of the file is A2018012210500.L2_LAC_OC.nc and the URL is oceancolor.gsfc.nasa.gov/cgi/browse.pl
– brittbarreto
Nov 16 at 0:15
Can you provide a link to the file though?
– Robert Hijmans
Nov 17 at 4:17
add a comment |
Can you please point to a specific file? I would usebrick(filename)
, but your first linestack
should also work. To write to ENVI format you need to usename.envi
inwriteRaster. But I assume ENVI can also read other formats such as
tif` ?
– Robert Hijmans
Nov 12 at 6:23
The name of the file is A2018012210500.L2_LAC_OC.nc and the URL is oceancolor.gsfc.nasa.gov/cgi/browse.pl
– brittbarreto
Nov 16 at 0:15
Can you provide a link to the file though?
– Robert Hijmans
Nov 17 at 4:17
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 at 6:23
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 at 6:23
The name of the file is A2018012210500.L2_LAC_OC.nc and the URL is oceancolor.gsfc.nasa.gov/cgi/browse.pl
– brittbarreto
Nov 16 at 0:15
The name of the file is A2018012210500.L2_LAC_OC.nc and the URL is oceancolor.gsfc.nasa.gov/cgi/browse.pl
– brittbarreto
Nov 16 at 0:15
Can you provide a link to the file though?
– Robert Hijmans
Nov 17 at 4:17
Can you provide a link to the file though?
– Robert Hijmans
Nov 17 at 4:17
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245494%2fhow-do-i-convert-a-nc-file-with-multiple-layers-into-a-file-readible-in-envi-in%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
r ZbmmzqYocq,P7awxxhWQ,eWbnuZZtw5JDr327SA1Q5f,BajgxKZ3gAtFYK,stAFfBCEIc1 0mNjj,bLl6hSFzt,8E,5,8oFy
Can you please point to a specific file? I would use
brick(filename)
, but your first linestack
should also work. To write to ENVI format you need to usename.envi
inwriteRaster. But I assume ENVI can also read other formats such as
tif` ?– Robert Hijmans
Nov 12 at 6:23
The name of the file is A2018012210500.L2_LAC_OC.nc and the URL is oceancolor.gsfc.nasa.gov/cgi/browse.pl
– brittbarreto
Nov 16 at 0:15
Can you provide a link to the file though?
– Robert Hijmans
Nov 17 at 4:17