Cannot Reproject L1 Browse files using gpt

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
alakes
Posts: 23
Joined: Fri Aug 26, 2016 7:46 am America/New_York

Cannot Reproject L1 Browse files using gpt

by alakes » Wed Mar 08, 2017 6:55 am America/New_York

Hi,
I was trying to batch process MODISA files from L1 to L3. When I tried to reproject or Mosaic the Local Area Coverage L1 browse files using gpt (Reproject & Mosaic operator) it is showing the following error.

java.lang.NullPointerException
  at gov.nasa.gsfc.seadas.dataio.SeadasFileReader.<init>(SeadasFileReader.java:94)
  at gov.nasa.gsfc.seadas.dataio.BrowseProductReader.<init>(BrowseProductReader.java:44)
  at gov.nasa.gsfc.seadas.dataio.SeadasProductReader.readProductNodesImpl(SeadasProductReader.java:140)
  at org.esa.beam.framework.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:173)
  at org.esa.beam.gpf.operators.standard.ReadOp.initialize(ReadOp.java:77)
  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.initNodeContext(GraphContext.java:178)
  at org.esa.beam.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
  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: java.lang.NullPointerException

But the brs file is opening in SeaDAS7.4 GUI and there I was able to reproject or mosaic these files.

Brs file is generated using the following command:
$SeaDASPath/run/bin/linux_64/l1brsgen ifile=$L1BFile ofile=$BrsFile geofile=$GEOFile atmocor=1 oformat=hdf4 oformat_depth=24bit subsamp=1 sline=1 \
eline=-999 spixl=1 epixl=-999 >$LogFile3

Gpt Command used for reprojection:
gpt.sh -e Reproject.xml -Ssource=$infile -PopReprojectFN=$ReprojOP

used xml file:(Reproject.xml)
--------------------------------------------------------------------------------------------------------------------------------------------------------------
graph id="Reproject">
  <version>1.0</version>
  <node id="Reprojection">
    <operator>Reproject</operator>
      <sources>
        <source>${source}</source>
      </sources>
    <parameters>
    <crs>GEOGCS["WGS84(DD)",
      DATUM["WGS84",
        SPHEROID["WGS84", 6378137.0, 298.257223563]],
      PRIMEM["Greenwich", 0.0],
      UNIT["degree", 0.017453292519943295],
      AXIS["Geodetic longitude", EAST],
      AXIS["Geodetic latitude", NORTH]]</crs>
    <resampling>Nearest</resampling>
    <orthorectify>false</orthorectify>
    <noDataValue>NaN</noDataValue>
    <includeTiePointGrids>true</includeTiePointGrids>
    <addDeltaBands>false</addDeltaBands>
   </parameters>
  </node>
  <node id="writeNode">
    <operator>Write</operator>
    <sources>
      <source>Reprojection</source>
    </sources>
    <parameters>
      <file>${opReprojectFN}</file>
      <formatName>NetCDF4-CF</formatName>
      <writeEntireTileRows>true</writeEntireTileRows>
      <clearCacheAfterRowWrite>false</clearCacheAfterRowWrite>
      <deleteOutputOnFailure>true</deleteOutputOnFailure>
    </parameters>
  </node>
</graph>
-------------------------------------------------------------------------------------------------------------------------------------------------------------

These commands and graph files were working fine before installing SeaDAS 7.4 but Now SeaDAS GUI can do the job but GPT can't.

** Tried with increasing gpt memory, seadas memory upto 16 Gb.

Is it a problem of l1brsgen or GPT ?

Any suggestion is welcome.

Tags:

OB SeaDAS - aynur
Subject Matter Expert
Subject Matter Expert
Posts: 40
Joined: Tue Dec 20, 2011 12:28 pm America/New_York

Cannot Reproject L1 Browse files using gpt

by OB SeaDAS - aynur » Wed Mar 08, 2017 2:29 pm America/New_York

Thank you for reporting this problem. We have identified a bug that affected gpt operators and have fixed it. Please update the "NASA OBPG Ocean Color Product Reader" module of SeaDAS 7.4.

From SeaDAS application window, go to "Tools" -> "Module Manager ..." -> and click on the "Module Updates" tab. It should display the new module. Select the new module and ensure it is updated.

Aynur

alakes
Posts: 23
Joined: Fri Aug 26, 2016 7:46 am America/New_York

Cannot Reproject L1 Browse files using gpt

by alakes » Tue Mar 14, 2017 10:11 am America/New_York

Thanks for the help..

cheers,

oo_processing
Posts: 240
Joined: Wed Apr 06, 2005 12:11 pm America/New_York

Cannot Reproject L1 Browse files using gpt

by oo_processing » Tue May 30, 2017 10:06 am America/New_York

I have been trying to resolve this issue as well. When I follow the directions and click on the update module tab, it ends up freezing.
The JRE is defined in the seadas script as follows:
INSTALL4J_JAVA_HOME_OVERRIDE=/usr/java/jdk1.8.0_77/jre
See image attached.
Brock

gnwiii
Posts: 665
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2

Cannot Reproject L1 Browse files using gpt

by gnwiii » Tue May 30, 2017 11:00 am America/New_York

For me, Module Manager takes a very long time to scan.  The progress bar often stalls, but usually starts to move again.  If it realy fails, you should get an error popup.

Since you know you want the seadas-reader-1.7.2 module, it is faster to update manually.  Some hints are given Module Manager Help.  This points you to preferences to get the Module Repository.  The "Note" at the bottom tells you how to install and remove modules manually.

oo_processing
Posts: 240
Joined: Wed Apr 06, 2005 12:11 pm America/New_York

Cannot Reproject L1 Browse files using gpt

by oo_processing » Tue May 30, 2017 12:59 pm America/New_York

Disregard the previous post. It appears that if you leave it long enough, it actually does finish scanning.
B

oo_processing
Posts: 240
Joined: Wed Apr 06, 2005 12:11 pm America/New_York

Cannot Reproject L1 Browse files using gpt

by oo_processing » Tue May 30, 2017 1:07 pm America/New_York

Thanks, the manual d/l and install was perfect!
B

Post Reply