Java long array index out of bounds exception -1

Hello friends, what is the reason for this error and how it is fixed when it occurs when using soil moisture SMOS data.

java long array index out of bounds exception -1

Hello,
we need more information than this. Which kind of SMOS data have you used and what is the complete exception text? Please have a look here: Read This Before Posting


Hello. I use soil moisture images and level 2. I first cut the area, then I want to do this tool, I get this error.

This happens because the latitude and longitude bands do not provide a continues grid of values. As you can see here in the image where I reproduced the ArrayIndexOutOfBoundsException.

This case should be handled more gracefully by SNAP and I’ve created a ticket for it: [SNAP-1504] Attaching pixel-based Geo-Coding to SMOS data results in exception - JIRA (atlassian.net)

However, you don’t need to attach this pixel Geo-Coding. The data is georeferenced on the WGS84 CRS.

Hello. Thank you

I want to bring soil moisture into the Arc map environment. How do I do that?

The best way to make SMOS data usable for other tools is to convert it to NetCDF.
This can be done from the desktop application:

Or the command line can be used. Here are two options available. gpt can be used or the stand-alone Format Conversion Tool.
You’ll find the download link on the SNAP Download page. There is also a user manual which explains both command line options.

Hello. Thank you. But even by converting it, it is not possible to open the Arc map because it does not know its latitude and longitude.

There seems to be something wrong with the export.
Alternatively, you can try to export by using the common NetCDF export function.

The export takes some time, and the file size is bigger, but it might work better with ArcMap.

I’ve created a ticket for the issue:
[SMOSTBX-26] SMUDP2 EarthExplorer product exported to NetCDF cannot be opened in SNAP and QGIS - JIRA (atlassian.net)

1 Like

Thank you. This is a great method and there is no problem anymore. To reduce the volume, it is better to cut the area first.