How to create a TrueColor image?

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
ebradbury
Posts: 5
Joined: Thu Mar 10, 2022 8:48 am America/New_York
Answers: 0

How to create a TrueColor image?

by ebradbury » Mon Apr 11, 2022 10:26 am America/New_York

Hello,

I'm a new user trying to learn how to use SeaDAS and the command line tools create a highest possible resolution TrueColor image (and later an animation) such as this one: https://oceancolor.gsfc.nasa.gov/gallery/feature/images/A2014270171500.GulfOfMaine.jpg.

It seems like reproducing a TrueColor image from raw (modis level1?) data might be a good way to learn how to access and process data. I would like to do the same with SST.

Some questions I have...
- Most of the products seem to be at 4km max resolution... can we get higher resolution by processing ourselves?
- Are there tools for removing clouds from generated images?
- How do you georeference the images?
- Are there NASA tools for producing animations or is this up to the end user?

Thanks for the help!

Filters:

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

Re: How to create a TrueColor image?

by OB SeaDAS - xuanyang02 » Mon Apr 11, 2022 2:34 pm America/New_York

You can use mapgen to create a true color image with --use_rgb option -- https://seadas.gsfc.nasa.gov/help-8.2.0/processors/ProcessMapgen.html#cl

Code: Select all

mapgen --ifile A2010283180500.L1B_LAC --geofile A2010283180500.GEO --use_rgb
The generated true color image has cloud already removed.

Modis L2 files have resolution at 1km and they are already geo-referenced.

SeaDAS does not have tools to produce animations.

ebradbury
Posts: 5
Joined: Thu Mar 10, 2022 8:48 am America/New_York
Answers: 0

Re: How to create a TrueColor image?

by ebradbury » Wed Apr 13, 2022 12:31 pm America/New_York

Thank you for your reply.

I'm running `mapgen` and got an error: "Unrecognized HDF-EOS file A2013208173500.L1A_LAC"

I downloaded the input file from here: https://oceancolor.gsfc.nasa.gov/cgi/browse.pl?sub=level1or2&per=CU&day=19095&prm=TC&set=10&mon=19052&sen=amod@tmod@vrsn@vrj1&rad=0&frc=1&rgn=GeorgesBank&id=1649864421.1882237&cn=42.88&cs=39.64&cw=-69.05&ce=-65.34&dnm=D&file=A2013208173500.L1B_LAC_BRS_BRS&ndx=15483&wid=170&hgt=254

Then extracted it using `bzip2` and ran `mapgen --ifile A2013208173500.L1A_LAC --geofile A2013208173500.GEO --use_rgb`.

I noticed that your example uses a `.L1B_LAC`... could that be the issue?

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

Re: How to create a TrueColor image?

by OB SeaDAS - xuanyang02 » Wed Apr 13, 2022 1:28 pm America/New_York

Yes, mapgen with --use_rgb option needs L1B + GEO files as input

You can create an L1B file with modis_L1B --https://seadas.gsfc.nasa.gov/help-8.2.0/processors/ProcessModis_L1B.html#cl

Code: Select all

modis_L1B A2010283180500.L1A_LAC  A2010283180500.GEO

ebradbury
Posts: 5
Joined: Thu Mar 10, 2022 8:48 am America/New_York
Answers: 0

Re: How to create a TrueColor image?

by ebradbury » Mon Apr 18, 2022 9:43 am America/New_York

Thank you - I was able to generate a TC image using these commands...

`modis_GEO A2013208173500.L1A_LAC`
`mapgen --ifile A2013208173500.L1B_LAC --geofile A2013208173500.GEO --use_rgb --oformat tiff --resolution 1km --projection mercator`

Am I correct that this command will generate the highest possible resolution?
How can I achieve cloud removal?

Thank you

(Attached file is for reference... I had to downscale it to meet the upload size limit)
Attachments
A2013208173500.L1B_LAC.MAP copy.jpg

fbecker23
Posts: 24
Joined: Tue Oct 25, 2022 11:16 am America/New_York
Answers: 0
Endorsed: 1 time

Re: How to create a TrueColor image?

by fbecker23 » Wed Nov 20, 2024 1:45 pm America/New_York

Hi everyone!
I'm reopening this topic because I've tried to make a TC image and I get and error.
I downloaded the image from MODIS "A2024300194500.L1A_LAC". My first step was create .geo file with this comand

modis_GEO path/A2024300194500.L1A_LAC

after this command, I got the file path/AQUA_MODIS.20241026T194500.GEO.hdf, with an extention ".hdf", is it ok?
Then when I've tried to make the L1B file, I got an error. I execute the command line:

modis_L1B path/A2024300194500.L1A_LAC path/AQUA_MODIS.20241026T194500.GEO.hdf

the error said:
MODIS Aqua L1B version 6.2.1_obpg, built Nov 28 2022 12:23:25
ERROR: MODIS L1B processing failed.
Please examine the LogStatus and LogUser files for more information.

and the LogStatus and LogUser files said:
LogStatus
#################
#################

****************************************
BEGIN_PGE: Wed Nov 20 15:14:29 2024
MSG_TAG: 11
FILE: /home/fernando/Escritorio/Imagenes_MODIS/prueba/LogStatus.AQUA_MODIS.20241026T194500.L1B.hdf
LOGGING: status message logging enabled
TRACE_LEVEL: tracing disabled
PID_LOGGING: disabled
DISABLED_LEVELS: none
DISABLED_SEEDS: none
DISABLED_CODES: none
THREAD-SAFE MODE: disabled
TOOLKIT_VERSION: SCF TK5.2.20
****************************************

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! W A R N I N G !!
!! The Toolkit version found in the PCF does not !!
!! match the current Toolkit version. The PCF in use !!
!! should be replaced with a PCF constructed from the !!
!! template PCF delivered with THIS version of the !!
!! Toolkit (see TOOLKIT_VERSION in banner, above). !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

TDLUT_ReadPiecewiseLinearFunction():MODIS_F_NOK:295817224
LUT associated with "m1" has times out of order.


Read_L1B_SDS_LUT():MODIS_F_NOK:295817224
Call to TDLUT_ReadPiecewiseLinearFunction() failed.


Read_LUT_Tables():MODIS_F_NOK:295817224
Call to Read_L1B_SDS_LUT() failed.
File LUN: 700050
File type: Reflective_Lookup_Tables_file


:MODIS_F_NOK:295817224
Fatal error(NOK) running...MOD_PR02. TIME:Wed Nov 20 15:14:29 2024
Operator Actions:
Contact MCST.
#################
#################



LogUser
#################
#################

****************************************
BEGIN_PGE: Wed Nov 20 15:25:44 2024
MSG_TAG: 11
FILE: /home/fernando/Escritorio/Imagenes_MODIS/prueba/LogUser.AQUA_MODIS.20241026T194500.L1B.hdf
LOGGING: status message logging enabled
TRACE_LEVEL: tracing disabled
PID_LOGGING: disabled
DISABLED_LEVELS: none
DISABLED_SEEDS: none
DISABLED_CODES: none
THREAD-SAFE MODE: disabled
TOOLKIT_VERSION: SCF TK5.2.20
****************************************

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! W A R N I N G !!
!! The Toolkit version found in the PCF does not !!
!! match the current Toolkit version. The PCF in use !!
!! should be replaced with a PCF constructed from the !!
!! template PCF delivered with THIS version of the !!
!! Toolkit (see TOOLKIT_VERSION in banner, above). !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

#################
#################

edwardcennis
Posts: 1
Joined: Thu Feb 05, 2026 11:48 am America/New_York
Answers: 0

Re: How to create a TrueColor image?

by edwardcennis » Thu Feb 05, 2026 11:50 am America/New_York

That error usually points to a bad/out-of-sync MODIS L1B LUT/PCF setup, not your .GEO.hdf filename. The “Toolkit version found in the PCF does not match…” warning plus LUT associated with "m1" has times out of order is classic “old processors with newer LUTs (or vice versa) / stale LUT cache”.

What I’d try:

Update your OCSSW tag and re-pull LUTs (cleanly), then rerun modis_L1B:
re-run install_ocssw with --update and make sure --luts --modisa are included
if you have old MODIS LUT dirs lying around, remove/rename them so it can’t keep using stale files
If you can’t update everything, explicitly point modis_L1B at the correct LUT directory/version using -d / -l (see modis_L1B -h).
Unrelated, if you’re attaching outputs/screenshots and they end up as WebP (some systems do that now), converting to JPG first avoids forum upload issues - [URL]="https://webptojpghero.com"]webptojpghero.com[/URL] does quick WebP-to-JPG.

Post Reply