gpt.sh reprojection issue

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
junzhao
Posts: 28
Joined: Fri Oct 07, 2011 11:21 am America/New_York
Answers: 0

gpt.sh reprojection issue

by junzhao » Thu Jul 30, 2020 7:13 am America/New_York

Hi there,
I tried to use the gpt tool for reprojection and followed the cookbook. The executed command was
gpt.sh reproj.xml -p reproj.par -Ssource=./tmp/A2009190055500.L2_LAC.nc -t test.nc

But I got the following error:
java.lang.IllegalArgumentException: Variable size in bytes 4922639944996268 may not exceed 4294967292
        at ucar.nc2.NetcdfFileWriteable.addVariable(NetcdfFileWriteable.java:455)
        at ucar.nc2.NetcdfFileWriteable.addVariable(NetcdfFileWriteable.java:420)
        at org.esa.beam.dataio.netcdf.nc.N3FileWriteable.addVariable(N3FileWriteable.java:69)
        at org.esa.beam.dataio.netcdf.metadata.profiles.cf.CfBandPart.defineRasterDataNodes(CfBandPart.java:215)
        at org.esa.beam.dataio.netcdf.metadata.profiles.cf.CfBandPart.preEncode(CfBandPart.java:144)
        at org.esa.beam.dataio.netcdf.NetCdfWriteProfile.writeProduct(NetCdfWriteProfile.java:48)
        at org.esa.beam.dataio.netcdf.DefaultNetCdfWriter.writeProductNodesImpl(DefaultNetCdfWriter.java:62)
        at org.esa.beam.framework.dataio.AbstractProductWriter.writeProductNodes(AbstractProductWriter.java:113)
        at org.esa.beam.gpf.operators.standard.WriteOp.initialize(WriteOp.java:245)
        at org.esa.beam.framework.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:457)
        at org.esa.beam.framework.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:236)
        at org.esa.beam.framework.gpf.Operator.getTargetProduct(Operator.java:323)
        at org.esa.beam.framework.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:74)
        at org.esa.beam.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195)
        at org.esa.beam.framework.gpf.graph.GraphContext.initOutput(GraphContext.java:162)
        at org.esa.beam.framework.gpf.graph.GraphContext.<init>(GraphContext.java:91)
        at org.esa.beam.framework.gpf.graph.GraphContext.<init>(GraphContext.java:64)
        at org.esa.beam.framework.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:124)
        at org.esa.beam.framework.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:84)
        at org.esa.beam.framework.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:508)
        at org.esa.beam.framework.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:356)
        at org.esa.beam.framework.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:249)
        at org.esa.beam.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:150)
        at org.esa.beam.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:122)
        at org.esa.beam.framework.gpf.main.GPT.run(GPT.java:54)
        at org.esa.beam.framework.gpf.main.GPT.main(GPT.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.bc.ceres.launcher.Launcher.launch(Launcher.java:154)
        at com.bc.ceres.launcher.Launcher.main(Launcher.java:56)

Error: Variable size in bytes 4922639944996268 may not exceed 4294967292

The xml and par files are attached.

But if lines 33 and 34 in the xml file are removed, everything works well. The two lines are for setting pixel size.

Any suggestions are greatly appreciated.

Jun
attachment 1

attachment 2

Tags:

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 259
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Been thanked: 2 times

gpt.sh reprojection issue

by OB SeaDAS - dshea » Thu Jul 30, 2020 9:13 am America/New_York

Your XML file looks like you are asking for 9 millimeter wide pixels.  That would be too many pixels, which you do not have enough memory to store.  You are trying to allocate about 5 PetaBytes of memory.

don

junzhao
Posts: 28
Joined: Fri Oct 07, 2011 11:21 am America/New_York
Answers: 0

gpt.sh reprojection issue

by junzhao » Fri Jul 31, 2020 10:56 am America/New_York

Dear Don,

Thanks for your prompt reply. I changed the pixel size to 250. The code works now. But there was another issue.

My study area covers an area defined by 21.5-23 N and 113-115 E. The l1mapgen command generated a RGB map with a size of 220x165 (1km resolution). However, the code using the gpt tool mentioned in my previous post resulted in product maps with a size of 224x168 for Terra, Aqua, and VIIRS-SNPP and of 222x168 for VIIRS-JPSS1. The size of the product maps should be the same as that of the RGB map, i.e. 220x165.

BTW, what I did was (1) reprojection and (2) subset using the gpt tool.

Any solution?

Jun

zhigang
Posts: 74
Joined: Tue Nov 10, 2020 8:03 pm America/New_York
Answers: 0

gpt.sh reprojection issue

by zhigang » Wed Aug 05, 2020 2:26 pm America/New_York

Hi Jun,

You may try to use the Mosaic tool via gpt.sh, it is able to generate images with the same sizes. A GPT Cookbook including Mosaic can be found in SeaDAS help document.

Regards,
Zhigang

Post Reply