gpt reprojection issue with 7.5

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 reprojection issue with 7.5

by junzhao » Mon Jun 25, 2018 3:24 am America/New_York

Hi there,
I tried to crop an image through gpt.sh in ubuntu 16.04. The level 2 file was generated with seadas 7.5 and then reprojected. I followed the seadas online help and ran a subset operation using the following command:
gpt.sh subset.xml -Ssource=A2009190055500.L2_reproj.h5 -t A2009190055500.L2_subset.h5

The ROI was bounded by 17-25 N and 108-121 E.

The output hdf5 file is a bit weird. The north bound of the output data is 23.xxx that is smaller than 25. The reprojected L2 file was produced with a Equidistant cylindrical method. But if the reprojection method was changed to Geographic Lat/Lon (WGS 84), everything is okay when I repeated the steps above.

Another question is that cropping of the reprojected L2 file is not doable from the GUI. Whatever values were set for the south and east bounds through "Geo Coordinates", the output file still contains data for regions with the same south and east bounds as the uncropped data. Although ROI can be chosen through adjusting the borders in the preview window, it is very difficult to get the exact ROI that I want.

Waiting for your responses.

Thanks.

Jun

Tags:

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 255
Joined: Mon Apr 07, 2008 4:40 pm America/New_York
Answers: 0

gpt reprojection issue with 7.5

by OB SeaDAS - knowles » Mon Jun 25, 2018 9:36 am America/New_York

Hi Jun,

You have an input file A2009190055500.L2_reproj.h5 : explain exactly how you generated this file (and whether via GUI or GPT) and does it need to be hdf5 format?  If you used gpt then show the graph xml file you used.

You have a graph xml file subset.xml : show the contents of this file.

I tested your file (A2009190055500.L2_LAC_OC.nc) quickly within the GUI and attached is my image using Equidistant cylindrical projection and cropped to your parameters.  I did not observe any problem.  I displayed the min and max (lat/lon) on the cropped image.

Note: I did not reproject to hdf5 format (the GUI doesn't support reprojecting to this format).  If you instead use .nc or .dim format when reprojecting this may resolve your problem.

Danny

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

gpt reprojection issue with 7.5

by junzhao » Tue Jun 26, 2018 3:43 am America/New_York

Hi Danny,

Thanks for your reply. The content of the subset graph file is attached below:

<graph id="SubsetGraph">
   <version>1.0</version>
   <node id="subsetNode">
      <operator>Subset</operator>
      <sources>
         <source>${source}</source>
      </sources>
      <parameters>
         <geoRegion>POLYGON((108.0 25.0, 121.0 25.0, 121.0 17.0, 108.0 17.0, 108.0 25.0))</geoRegion>
      </parameters>
   </node>
</graph>

The reprojected file was generated via GUI. I reprojected the data to hdf5 format because I have codes to deal with hdf5 files for plotting and other usage.

I am using 7.5. The GUI does support saving the reprojected data to hdf5. See the attached screenshot.

Following your suggestions, the .nc format was used instead. Things look okay now. It seems that the hdf5 format is not fully supported.

Anyway, the problem was solved through (1) reproject to nc format and (2) subset and save data to hdf5 format.

Thanks.

Jun

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 255
Joined: Mon Apr 07, 2008 4:40 pm America/New_York
Answers: 0

gpt reprojection issue with 7.5

by OB SeaDAS - knowles » Tue Jun 26, 2018 1:09 pm America/New_York

Jun,

You can do both the reproject step and the subset step in a single workflow using gpt.  In the following example both files get written out in hdf5 format.  Note: as a gpt workflow, you don't actually need to write out the intermediate step reprojected file. 

Command line:

gpt workflow.xml -Ssource=A2009190055500.L2_LAC_OC.nc -Pofile1=A2009190055500.L2_LAC_OC_reprojected.h5 -Pofile2=A2009190055500.L2_LAC_OC_reprojectedCropped.h5 -Poformat=HDF5


where workflow.xml:

<graph id="ReprojectSubsetWorkflowGraph">
  <version>1.0</version>

  <node id="ReprojectEquidistantNode">
    <operator>Reproject</operator>
    <sources>
        <source>${source}</source>
    </sources>

    <parameters>
        <crs>PROJCS["Equidistant_Cylindrical / World Geodetic System 1984",
          GEOGCS["World Geodetic System 1984",
            DATUM["World Geodetic System 1984",
              SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
              AUTHORITY["EPSG","6326"]],
            PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
            UNIT["degree", 0.017453292519943295],
            AXIS["Geodetic longitude", EAST],
            AXIS["Geodetic latitude", NORTH]],
          PROJECTION["Equidistant_Cylindrical"],
          PARAMETER["central_meridian", 0.0],
          PARAMETER["latitude_of_origin", 0.0],
          PARAMETER["standard_parallel_1", 0.0],
          PARAMETER["false_easting", 0.0],
          PARAMETER["false_northing", 0.0],
          UNIT["m", 1.0],
          AXIS["Easting", EAST],
          AXIS["Northing", NORTH]]</crs>
        <resampling>Nearest</resampling>
        <orthorectify>false</orthorectify>
        <noDataValue>NaN</noDataValue>
        <includeTiePointGrids>true</includeTiePointGrids>
        <addDeltaBands>false</addDeltaBands>
        <applyValidPixelExpression>true</applyValidPixelExpression>
        <transferValidPixelExpression>true</transferValidPixelExpression>
        <maskExpression/>
    </parameters>
  </node>

   <node id="subsetNode">
      <operator>Subset</operator>
      <sources>
         <source>ReprojectEquidistantNode</source>
      </sources>
      <parameters>
         <geoRegion>POLYGON((108.0 25.0, 121.0 25.0, 121.0 17.0, 108.0 17.0, 108.0 25.0))</geoRegion>
      </parameters>
   </node>

    <node id="WriteFile1Node">
      <operator>Write</operator>
      <sources>
        <source>ReprojectEquidistantNode</source>
      </sources>
      <parameters>
        <file>${ofile1}</file>
        <formatName>${oformat}</formatName>
      </parameters>
    </node>

    <node id="WriteFile2Node">
      <operator>Write</operator>
      <sources>
        <source>SubsetNode</source>
      </sources>
      <parameters>
        <file>${ofile2}</file>
        <formatName>${oformat}</formatName>
      </parameters>
    </node>

</graph>


See https://seadas.gsfc.nasa.gov/help/GptCookbook/gptCookbook.html for more on gpt

Danny

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

gpt reprojection issue with 7.5

by junzhao » Fri Jun 29, 2018 12:13 am America/New_York

Thank you very much.

Jun

Post Reply