ModelBuilder NetCDF "Select by Dimensions" Issue

117
0
08-03-2021 03:53 AM
Labels (1)
HeatherPapworth
New Contributor

Hi everyone!

I have a problem when working with NetCDF files in ModelBuilder. I’m trying to extract one of the twelve ‘time’ layers in a NetCDF file that contains Chlorophyll data, so that I can run a conditional statement in the Raster Calculator to create another layer where all Chlorophyll values between a certain range are represented as 1s and the rest are 0s. Unfortunately, I cannot seem to get this process to work (see attached Model_File). For information, the conditional statement I am using to create the binary layer using “Raster Calculator” is as follows:

 

Con (("%CHL_Layer (2):CHL_Layer%" >=1.8) & ("%CHL_Layer (2):CHL_Layer%"<=2.5),1,0)

 

I have used “Select by Dimension” to try and reduce the number of time dimensions to one, which appears to run but then creates a layer file with 3 bands in it (all of which seem to have the same values). My first thought is whether this is causing the problem (although it could be my code!). The error message I get in the report after the model has run (see attached Error_Message) suggests that I'm using an invalid field (when I look up the error code), although I am using the raster layers as listed in the Raster Calculator. 

If anyone has any suggestions as to how I might get around this issue, that would be great! Many thanks in advance.

0 Kudos
0 Replies