Jump to content

 
Photo

NetCDF to Raster (arcgis)

- - - - -

  • Please log in to reply
11 replies to this topic

#1
spesseh

spesseh

    Key Contributor

  • Validated Member
  • PipPipPip
  • 62 posts
  • Norway

Hi all,

I have a global dataset of temperatures where the temporal dimension covers 1901-2006.
What i want to do is to export each of the yearly grids from the netcdf file to separate raster layers.
After some playing around i discovered that in Arcgis 9.3.1 i could just drag and drop the netcdf file into my table of contents.
From there i select the properties of the layer and try to change the time dimension. This makes arcgis crash.
I assume that this is because i enter a wrong time/date/year info. I can not choose from a drop down menu which time layer i want to visualize.
The data i try to use is the CRU-TS3 data located here: http://badc.nerc.ac....e/badc/cru/data (registration required).

Does anyone have any experience with netcdf and arcgis?
Any idea what i should do to get my separate raster layers?

Thanks!
Andreas

Visit my Blog: http://www.gisintersect.com

#2
spesseh

spesseh

    Key Contributor

  • Validated Member
  • PipPipPip
  • 62 posts
  • Norway

Btw, i also have FME through my university.
If this can be accomplished through FME, that is also an option.
Andreas

Visit my Blog: http://www.gisintersect.com

#3
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,891 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

Btw, i also have FME through my university.
If this can be accomplished through FME, that is also an option.


Well, theoretically, this ought to work. I'm not familiar with NetCDF myself but FME offers some options to tear a raster apart by bands and process them seperately. If you can send me a small sample dataset I'd be happy to give it a try.
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#4
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,312 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

I only know that I have had problems with NetCDF and ArcGIS. Have you tried to export and manipulate it in ArcCatalog, using the Multidimension toolbox? Do you have the Interoperability extension?

I have to say that I don't really see the point with NetCDF, it always creates problem for me, and it is hard to overview the data easily...
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#5
spesseh

spesseh

    Key Contributor

  • Validated Member
  • PipPipPip
  • 62 posts
  • Norway

I only know that I have had problems with NetCDF and ArcGIS. Have you tried to export and manipulate it in ArcCatalog, using the Multidimension toolbox? Do you have the Interoperability extension?

I have to say that I don't really see the point with NetCDF, it always creates problem for me, and it is hard to overview the data easily...



I have the extension, but arcgis does not manage to find more than one time dimension entry, when it shall be many many more.
If i use FME i can split each of the Netcdf time entries into separate rasterfiles. The problem is that the filename of the outputs does not indicate which time/date/year the file is. It just outputs the files as 1,2,3,4,5,6.....
If i could get FME to write the date to the filename, it would be a lot easier to process them afterwards.
Any ideas?
Andreas

Visit my Blog: http://www.gisintersect.com

#6
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,891 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

I have the extension, but arcgis does not manage to find more than one time dimension entry, when it shall be many many more.
If i use FME i can split each of the Netcdf time entries into separate rasterfiles. The problem is that the filename of the outputs does not indicate which time/date/year the file is. It just outputs the files as 1,2,3,4,5,6.....
If i could get FME to write the date to the filename, it would be a lot easier to process them afterwards.
Any ideas?


Fanout
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#7
spesseh

spesseh

    Key Contributor

  • Validated Member
  • PipPipPip
  • 62 posts
  • Norway

Thank you, that did some of the trick.
I still cannot get the fanout to write the time dimension to the filename, but it is still better than what arcgis can provide.
FME splits the 1901-2006 into 1272 files. One for each month, twelve for each year.
These files are named layer_1, layer_2, layer_... where 1-12 is the first year, 13-25 second year.
What i want to do is to aggregate the data into annual data. How can i do this in arcgis?
Then i want to calculate the "normal" temperature for the whole period and then calculate the deviation from the normal for each year.

Any ideas?
Andreas

Visit my Blog: http://www.gisintersect.com

#8
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,891 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

Thank you, that did some of the trick.
I still cannot get the fanout to write the time dimension to the filename, but it is still better than what arcgis can provide.
FME splits the 1901-2006 into 1272 files. One for each month, twelve for each year.
These files are named layer_1, layer_2, layer_... where 1-12 is the first year, 13-25 second year.
What i want to do is to aggregate the data into annual data. How can i do this in arcgis?


If you want I can help you set up a FME workbench to do this. It will be possible to write out the month/year to the filename, you just have to calculate it.
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#9
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,312 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Calculating monthly averages in ArcGIS would be very easy. I would set up a model to do this, do it from the command-line or through pythong. Or actually - what I would do for this is to use ArcInfo workstation - this is where it shines...
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#10
spesseh

spesseh

    Key Contributor

  • Validated Member
  • PipPipPip
  • 62 posts
  • Norway

Hans:
It would be very nice if you could provide some help on how to do this. I could do this in ArcGis, but it would take a lot of time to set up a model like this in Arc. Since there is 1272 files that has to be put togheter 12 by 12 i am unsure if there is a way to do this without manually setting this up in modelbuilder.

Are there any way to do this in FME so i dont need to do all the 1272 files manually?

Frax: How would you do this in Arc? What would be the most efficient way of setting this up?

Thanks for your help ppl!
Andreas

Visit my Blog: http://www.gisintersect.com

#11
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,312 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

For someone that knows AML and ArcInfo workstation it would be very trivial:
One loop of the years, and then a simple command that calculates the average (month1 + month2 + monthN)/12. You could also easily prepare these map calculations in a text editor (106 lines) and then just paste them into the ArcMap commandline using the SingleOutputMapAlgebra command.

It is slightly more work to set it up in Python, but only marginally, with the same principle: loop and average.
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#12
spesseh

spesseh

    Key Contributor

  • Validated Member
  • PipPipPip
  • 62 posts
  • Norway

For someone that knows AML and ArcInfo workstation it would be very trivial:
One loop of the years, and then a simple command that calculates the average (month1 + month2 + monthN)/12. You could also easily prepare these map calculations in a text editor (106 lines) and then just paste them into the ArcMap commandline using the SingleOutputMapAlgebra command.

It is slightly more work to set it up in Python, but only marginally, with the same principle: loop and average.



Thanks. That was what i was thinking of as well. Using the SingleOutput in MapAlgebra.

Thank you all for your help.
Andreas

Visit my Blog: http://www.gisintersect.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->