SNAP mosaic problem?

Hi, I would like to mosaic several (similar in format) files in one folder to one output file.

I run this command:

/snap/bin/gpt /path/mosaic_sst.xml /pathin/*.nc        -t /pathout/output_mapped.nc      -f netCDF4-CF

and worked without error. However, the problem is with the output. It considered only the first file that appear in the list of files, so no mosaic with other files

It does not take into account the other files.

I tried SNAP interface using the same files and it worked fine, and the output looks like it should.

I think you need to add the products at the end of the call

You mean like this?:

  /snap/bin/gpt  /path/mosaic_sst.xml  -t /pathout/output_mapped.nc      -f netCDF4-CF 
 /pathin/*.nc

It did not work neither!

Yes. I’m not sure if the * will work. I’m not on unix.
As it said in the usage text:

The sample xml graph fomrat from gpt Mosaic -h has:

  <sources>
    <updateProduct>${updateProduct}</updateProduct>
    <sourceProducts>${sourceProducts}</sourceProducts>
  </sources>

Your mosaic_sst.xml has:

 <sources>
  <sourceProduct>${sourceProduct}</sourceProduct>
</sources>

Try adding the s's.

2 Likes

Thanks. I haven’t seen this before.