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
  • 139 views

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

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

View original
Did this help you find an answer to your question?

2 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • 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+6
  • Author
  • Contributor
  • December 15, 2023
takashi wrote:

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings