The problem with running the SeaDAS gpt command.

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
ynrs
Posts: 3
Joined: Sun Mar 12, 2023 11:34 pm America/New_York
Answers: 0

The problem with running the SeaDAS gpt command.

by ynrs » Wed Jun 26, 2024 9:50 am America/New_York

My SeaDAS version is 9.0.1. While most functions run normally, I found that I cannot run gpt from the command line. Do I need to install anything additional?

Filters:

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 723
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Endorsed: 10 times

Re: The problem with running the SeaDAS gpt command.

by OB SeaDAS - xuanyang02 » Thu Jun 27, 2024 3:57 pm America/New_York

gpt in SeaDAS 9.0.1 should work. Please share with us the error message you got.

Here is the gpt tutorial page -- https://seadas.gsfc.nasa.gov/help-9.0.0/GptCookbook/gptTutorial.html

There is a know bug that you need to use the full path for files and commands.

treble
Posts: 63
Joined: Thu Jan 24, 2008 1:33 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: The problem with running the SeaDAS gpt command.

by treble » Wed Oct 23, 2024 5:26 pm America/New_York

With the linux version I always have to fix the path to java in the gpt file before it works (removing "Contents/Home/" near the end of the file).

Code: Select all

diff gpt gpt_orig
448c448
< exec "$app_home/jdk-11.0.19+7-jre/bin/java" -Dexe4j.moduleName="$prg_dir/$progname" -Djava.library.path=$LD_LIBRARY_PATH "-Dsnap.mainClass=org.esa.snap.core.gpf.main.GPT" "-Dsnap.home=$app_home" "-Djava.awt.headless=true" -classpath "$local_classpath" org.esa.snap.runtime.Launcher  "$@"
---
> exec "$app_home/jdk-11.0.19+7-jre/Contents/Home/bin/java" -Dexe4j.moduleName="$prg_dir/$progname" -Djava.library.path=$LD_LIBRARY_PATH "-Dsnap.mainClass=org.esa.snap.core.gpf.main.GPT" "-Dsnap.home=$app_home" "-Djava.awt.headless=true" -classpath "$local_classpath" org.esa.snap.runtime.Launcher  "$@"

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 723
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Endorsed: 10 times

Re: The problem with running the SeaDAS gpt command.

by OB SeaDAS - xuanyang02 » Wed Oct 23, 2024 5:41 pm America/New_York

Thanks for letting us know! We'll fix our code accordingly.

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

Re: The problem with running the SeaDAS gpt command.

by zhigang » Thu Sep 04, 2025 11:28 am America/New_York

Yes, the gpt command still include /Contents/Home so that it failed.
I fixed the gpt file as treble suggested, and it works well.

treble
Posts: 63
Joined: Thu Jan 24, 2008 1:33 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: The problem with running the SeaDAS gpt command.

by treble » Mon Jan 05, 2026 2:55 pm America/New_York

For the seadas_10.0.0_mac_aarch64 version gpt is not working (I haven't tested the linux version yet). It can't find the .install4j directory. I can only get it to work by copying an older version of gpt (I used the one from seadas 8.4.1) and adjust the java path again as described earlier in this thread.

The last line now reads:
exec "$app_home/jdk-21.0.8+9-jre/Contents/Home/bin/java" - ...

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 723
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Endorsed: 10 times

Re: The problem with running the SeaDAS gpt command.

by OB SeaDAS - xuanyang02 » Mon Jan 05, 2026 5:06 pm America/New_York

Unfortunately, gpt still does not work in SeaDAS 10

treble
Posts: 63
Joined: Thu Jan 24, 2008 1:33 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: The problem with running the SeaDAS gpt command.

by treble » Tue Jan 06, 2026 1:55 pm America/New_York

That is too bad. It does seem to work though with 10.0.0 using the tweaks I posted earlier. At least I can Mosaic with gpt, haven't tried much else.

Post Reply