Skip to main content
Solved

How do I convert a multiband raster to a NetCDF file with a time variable?

  • December 13, 2023
  • 2 replies
  • 206 views

dean.mcgowan
Contributor
Forum|alt.badge.img+8

The netcdf format is new to me. I have created a multiband raster with 50 bands. Each band contains values for 1 day. My workflow looks like this:

 

imageThe sampler to the left is for testing only and lets 7 bands go through. The listbuilder creates a list of values for the 'days_since' variable. I want to use these values in the writer for the 'netcdf_band{}.coordinate_variable{}' port.

imageHow do I apply this as a list? At the moment I have to apply them individually day for day in the attribute manager before the writer.

imageThis works but is obviously not scalable. Any help in this matter would be much appreciated - I have thousands of bands to include! :)

Best answer by takashi

Hi @dean.mcgowan​ ,

I think you can create the list attribute "netcdf_band{}.coordinate_variable{0}" with the RasterBandCombiner, if you rename "_day" to "coordinate_variable{0}" with AttributeRenmaer or AttributeManager before combining the raster bands.

rasterbandcombiner_parameters

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • Best Answer
  • December 14, 2023

Hi @dean.mcgowan​ ,

I think you can create the list attribute "netcdf_band{}.coordinate_variable{0}" with the RasterBandCombiner, if you rename "_day" to "coordinate_variable{0}" with AttributeRenmaer or AttributeManager before combining the raster bands.

rasterbandcombiner_parameters


dean.mcgowan
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • December 15, 2023

Hi @dean.mcgowan​ ,

I think you can create the list attribute "netcdf_band{}.coordinate_variable{0}" with the RasterBandCombiner, if you rename "_day" to "coordinate_variable{0}" with AttributeRenmaer or AttributeManager before combining the raster bands.

rasterbandcombiner_parameters

Cheers, That sorted the issue out for me!