Ocean Color Forum - Not logged in
Forum Ocean Color Home Help Search Login
Previous Next Up Topic SeaDAS / SeaDAS 6.x - General Questions / -E- l1_hmodis_hdf.c line 1312: Could not read SDS, Mirror side. (locked) (3070 hits)
By dasilva Date 2012-03-12 12:05
I was wondering if someone could help me with a problem I am having running a script to produce true color images using SeaDAS6.3 on UBUNTU 11.04 (32 bits). I have been running the same script on SeaDAS6.2 without any problem. When I tried this script on SeaDAS6.3, after changing the commands from _____.csh to ____.py, I got the following error message:

Loading polarization file /sw/SeaDAS/6.3/run/data/modisa/cal/polcor_modisa_2010b_1640.hdf
Loading polarization file /sw/SeaDAS/6.3/run/data/modisa/cal/polcor_modisa_2010b_2130.hdf

Using  869.0 nm channel for cloud flagging over water.
Using  412.0 nm channel for cloud flagging over land.

.....................................................................-E- l1_hmodis_hdf.c line 1312: Could not read SDS, Mirror side.
-E- l1_hmodis_hdf.c line 1313: Could not read SDS, T_inst2ECR.
-E- l1_hmodis_hdf.c line 1323: Could not read SDS, EV start time.
-E- l1_hmodis_hdf.c line 1347: Could not read SDS, Longitude.
-E- l1_hmodis_hdf.c line 1348: Could not read SDS, Latitude.
-E- l1_hmodis_hdf.c line 1350: Could not read SDS, Height.
-E- l1_hmodis_hdf.c line 1351: Could not read SDS, SolarZenith.
-E- l1_hmodis_hdf.c line 1352: Could not read SDS, SolarAzimuth.
.
.
.
.
-E- l1_hmodis_hdf.c line 1351: Could not read SDS, SolarZenith.
-E- l1_hmodis_hdf.c line 1352: Could not read SDS, SolarAzimuth.
-E- l1_hmodis_hdf.c line 1353: Could not read SDS, SensorZenith.
-E- l1_hmodis_hdf.c line 1354: Could not read SDS, SensorAzimuth.

l1mapgen Error: outmode of 2 not valid.
convert: Improper image header `A2006335035500.ppm' @ pnm.c/ReadPNMImage/297.
convert: missing an image filename `A2006335035500.png' @ convert.c/ConvertImageCommand/2800.
Detected MODIS_GDAAC ftype.
Loading Level-1B HDF file product: EV_250_Aggr1km_RefSB_645_01
% HDF_SD_GETDATA: Unable to read the specified HDF-SD slice.
[MAIN]: Error executing the command: load,ifile,gfile=gfile

The bit of the code I am using to produce the true color image, which has some IDL commands and is executed by 'seadas -em -b rgb_geotiff_gen.batch', is presented below:

;*****************************************************************
; The region will be defined by the two last letters of the file name
; This script will create mapped true color images from a L1B image.
; And output them as geotiff file.
;
files=file_search('*.L1B_LAC',count=n)
i=n-1
print,'File to be processed for true color image:', files(i)
ifile = files(i)
base_fname = FILE_BASENAME(files(i), '.L1B_LAC')
base=base_fname
gfile = base_fname + '.GEO'
ppmfile = base_fname + '.ppm'
pngfile = base_fname + '.png'
tiffile = base_fname + '.tif'
print, 'Base name for true colour:', base
print, ifile
;Setting limits for L1A extraction based on the whole GBR
SWLON=142.3
SWLAT=-27
NELON=154
NELAT=-10.5
;
NELATname = STRTRIM(NELAT,2)
SWLATname = STRTRIM(SWLAT,2)
NELONname = STRTRIM(NELON,2)
SWLONname = STRTRIM(SWLON,2)
cmd1 = 'l1mapgen ifile=' + ifile + ' geofile=' + gfile + ' ofile=' + ppmfile + ' resolution=500 threshold=0.01 width=3000 north=' + NELATname + ' south=' + SWLATname + ' west=' + SWLONname + ' east=' + NELONname + ' atmocor=1 outmode=2 subsamp=1 rgb=645,555,469'
spawn,[cmd1]
cmd2='convert ' + ppmfile + '  ' + pngfile
spawn,[cmd2]
load,ifile,gfile=gfile
mapimg,band=[1],/CYLIN,LIMIT=[SWLAT,SWLON,NELAT,NELON], P0LAT=0.0, xsize=1221, ysize=1827
display,band_no=2,fbuf=1
load, pngfile,ftype='png'
display,band_no=3,fbuf=2
mband_cmd, cmd_array=['result = b3'],navband=2
display,band_no = 4, fbuf=3
out,tiffile,ftype='tiff'
clear_up

;************************************************************************

Any suggestion is very welcome.
Thanks
Eduardo
By WhiteG Date 2012-03-12 12:38
You have:

l1mapgen Error: outmode of 2 not valid.


The problem is in cmd1:

cmd1 = 'l1mapgen ifile=' + ifile + ' geofile=' + gfile + ' ofile=' + ppmfile + ' resolution=500 threshold=0.01 width=3000 north=' + NELATname + ' south=' + SWLATname + ' west=' + SWLONname + ' east=' + NELONname + ' atmocor=1 outmode=2 subsamp=1 rgb=645,555,469'
spawn,[cmd1]


l1mapgen outmode should be 0 (default, for ppm) or 1 (for png), not 2. 

Also,

cmd2='convert ' + ppmfile + '  ' + pngfile
spawn,[cmd2]


If you set outmode=1 you don't need to convert ppm to png, so 'cmd2' could be removed and ppmfile replaced by pngfile in cmd1.
By @sean Date 2012-03-12 13:43
Also, the GEO file seems to be buggered.  Try recreating it.

As a teaser, the next version of l1mapgen (and l2mapgen) we release will output GeoTIFF directly.

Sean
By dasilva Date 2012-03-13 04:15
Thanks for your help, WhiteG. Changing outmode from 2 to 0 solved the problem.
Cheers
Eduardo
By dasilva Date 2012-03-13 04:16
Thanks for call my attention for the buggered GEO file. I will recreate it.
Cheers
Eduardo
By dasilva Date 2012-03-15 22:42
G'Day Sean:
I have tried to fix GEO file but I did not succeed using my script, so I try to run SeaDAS on GUI and I got the following error messages when executing the L2 File Generating Program:

Executing: $SEADAS/run/scripts/getanc.py /home/jc138358/L0/A2006335035500.L1B
Traceback (most recent call last):
  File "/sw/SeaDAS/6.3/run/scripts/getanc.py", line 150, in <module>
    g.locate()
  File "/sw/SeaDAS/6.3/run/scripts/modules/anc_utils.py", line 444, in locate
    uncompress=True)
  File "/sw/SeaDAS/6.3/run/scripts/modules/ProcUtils.py", line 36, in httpdl
    os.makedirs(localpath)
  File "/usr/lib64/python2.6/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/sw/SeaDAS/6.3/run/var/anc/2006'

And also I got on the pop-up window:
The following error was encountered: OPENR: Error opening file. Unit: 100
File: /home/jc138358/L0/A2006335035500.L1B.anc  Please consult the supplier of the application.

I am also trying to install SeaDAS6.2 on a Mac OX Lion (just because my script was working fine before on SeaDAS6.2 on UBUNTU), and I could not find .bashrc to add the source command for the SeaDAS location. I guess that may explain why I cannot run SeaDAS by typing seadas -em. I have to go to SeaDAs directory, source SeaDAS (source config/seadas -em), and then I can run it.
However, I could not produce L2 products. I got the following error:

No brightness temperature conversion provided for this sensor.
Error loading  brightness temperature table.

exit_status=
GENERIC_FILE)TYPE detected an HDF file.
No SDSs in file : /Users/edu_mac/Documents/L0/A2006335035500.L2

Could you please give me some help on these error? And it will be great having GeoTIFF directly from l1mapgen.
Thank you in advance.
Eduardo
By dasilva Date 2012-03-16 07:39
I am having some troubles to run SeaDAS 6.2 on  MAC OS X Lion. The problem happens on the generation of true colour images. Apparently it is not possible to find the brightness temperature conversion even though the file (bt_modisa.hdf) is in /Users/edu_mac/seadas6.2/run/data/modisa/cal. The message I get runn SeaDAS is:

File was generated from L1A extract of size 2250 x 3520
  Pixels 131 - 2380
  Lines  1 - 3520
Allocated 3082512 bytes in L1 record.
N: -10.500000 S: -27.000000 E: 154.000000 W:142.300003
Using r,g,b = 645, 555, 469
.
No brightness temperature conversion provided for this sensor.
Error loading brightness temperature table.
convert: improper image header `A2006335035500.ppm' @ error/pnm.c/ReadPNMImage/293.
convert: missing an image filename `A2006335035500.png' @ error/convert.c/ConvertImageCommand/3017.
Detected MODIS_GDAAC ftype.
Loading Level-1B HDF file product: EV_250_Aggr1km_RefSB_645_01
SeaDAS Projection -          128 out of         1827 lines processed
SeaDAS Projection -          256 out of         1827 lines processed
SeaDAS Projection -          384 out of         1827 lines processed

I would appreciate any help on this.
Thanks in advance
Eduardo
By @sean Date 2012-03-18 14:40
Eduardo,

Mac Lion isn't currently supported.  That said, your previous post indicated a permision problem:

> ... Permission denied: '/sw/SeaDAS/6.3/run/var/anc/2006


The path here suggests you have 6.3 installed.  Perhaps you are having a mix bag problem, with
6.2 and 6.3 both loaded? 

The permission problem may also be causing issues, as the program may not be able to read the
files, even though they exist on the system.

I'd suggest checking the permissions and make sure that your environment is free of any previous
versions of SeaDAS - you don't have to remove them, just make sure the environment variables
don't point to them.

Sean
By dasilva Date 2012-03-19 05:02
Thanks for your reply, Sean.
In order to guarantee that the Mac environment is free form any SeaDAS version, I have formatted the computer and install again SeaDAS6.3.
When I executed ./config/seadas_setup -em, that is what I got:

Python version acceptable
IDL Version 7.0, Mac OS X (darwin i386 m32). (c) 2007, ITT Visual Information Solutions

% Embedded IDL: NASA GSFC SeaDAS Development, SeaDAS.
% Embedded IDL: NASA GSFC SeaDAS Development, SeaDAS.
% XMANAGER: Caught unexpected error from client application. Message follows...
% STRTRIM: Variable is undefined: AQUA_REFL_LUT.
% Execution halted at:  SDS_ENV_NEXT_EVENT
%                       XMANAGER_EVLOOP_STANDARD
%                       XMANAGER       
%                       SDS_ENV        
%                       MAIN           
%                       IDLRTMAIN      
%                       $MAIN$         

and SeaDAS did not go further, even the 'Environment Setup' window did not close down after I have pressed 'Okay'.
Does that mean that I will not be able to run SeaDAS6.3 on Mac OS X Lion?
If I install SeaDAS6.2 on Mac OS X Lion, does this will solve the problem? I know that the Mac is 64 bits,
this could be a problem for SeaDAS6.2?
Thank you in advance.
Eduardo
By @sean Date 2012-03-19 17:27
Are you sure you have a clean 6.3 install?  The AQUA_REFL_LUT variable was removed from use in 6.3

I just watched my officemate install 6.3 on Lion and all worked as expected...

Sean
By dasilva Date 2012-03-19 21:17
Well, I will format my computer and get fresh SeaDAS files for a new attempt.
I am glad to know it is possible to have SeaDAS6.3 running on a Lion. Thanks, Sean.

Eduardo
By @sean Date 2012-03-20 12:24
Eduardo,

You should never have to reformat your computer to install SeaDAS.
Just make sure you have a clean environment before installing
SeaDAS - remove any references to SeaDAS that may be in your
.bashrc (or .cshrc, .profile, .login, etc) files.  Be sure to install only the
files for one version.

Sean
By dasilva Date 2012-03-20 22:05
Thank you, Sean.
Actually it was a new computer which has only SeaDAS installed.
Cheers
Eduardo
Previous Next Up Topic SeaDAS / SeaDAS 6.x - General Questions / -E- l1_hmodis_hdf.c line 1312: Could not read SDS, Mirror side. (locked) (3070 hits)



Responsible NASA Official: Gene C. Feldman
Curator: OceanColor Webmaster
Authorized by: Gene C. Feldman
Updated: 27 November 2007
Privacy Policy and Important Notices NASA logo