Ocean Color Forum - Not logged in
Forum Ocean Color Home Help Search Login
Previous Next Up Topic SeaDAS / SeaDAS 6.x - General Questions / geofile creation error on seadas62 (locked) (2488 hits)
By ajis Date 2011-07-15 15:09
Hi,

I have just installed seadas62 on fedora 11 with the components
seadas_linux.tar.gz                            seadas_idl_rt.tar.gz
seadas_processing_linux.tar.gz        seadas_processing_common.tar.gz
seadas_modist.tar.gz                        seadas_modisa.tar.gz
seadas_dem_modis.tar.gz                seadas_meris.tar.gz
seadas_seawifs_soa.tar.gz               seadas_seawifs.tar.gz
seadas_source.tar.gz

When I tried to run my script (attached) to create GEO file from MODIS L1A, the following error messages returned.

================
inputdata=A20100418040000.L1A_LAC.x.hdf    
IDL Version 7.0 (linux x86 m32). (c) 2007, ITT Visual Information Solutions

% Embedded IDL: NASA GSFC SeaDAS Development, SeaDAS.
% Embedded IDL: NASA GSFC SeaDAS Development, SeaDAS.
SeaDAS Version 6.2 Update 2b (pid = 29561)          
unix cmd =                                          
$SEADAS/run/scripts/modis_GEO.csh /media/HD-PSU2/sendai2/l1a/A20100418040000.L1A_LAC.x.hdf -o /media/HD-PSU2/sendai2/l1a/A20100418040000.GEO               
*** /home/ajis/seadas62/run/bin3/ncdump: ncopen failed on /media/HD-PSU2/sendai2/l1a/A20100418040000.L1A_LAC.x.hdf����i                                     
modis_GEO.csh: ERROR: Unable to determine start time from L1A file.          

exit_status=            1
===============

I have never had such an error when I used seadas61.

Any problem with my seadas62 installation?
I have already updated utcpole.dat and leapsec.dat.
Do I need to install any updates also? or any seadas62 component missing?

Thank you so much.

Ajis

Attachment: geoscript.csh (0.4k)
By gwyn Date 2011-07-15 15:26 Edited 2011-07-15 15:28
We've seen this problem before, but haven't figured out the cause:
http://oceancolor.gsfc.nasa.gov/forum/oceancolor/topic_show.pl?pid=17136;hl=%2065533#pid17136

It seems to be related to the length of the file path.

In your script, since you're already in $dir, you don't need to specify $dir in your call to geogen_modis.
For that matter, you don't need to go through the seadas IDL environment to process at all.  You can run on the command line:

cd $dir
foreach l1afile (A20*L1A_LA*)
  set geofile = `echo $l1afile | cut -c 1-15`.GEO
  $SEADAS/run/scripts/modis_GEO.csh $l1afile -o $geofile >&! $geofile.runlog
end
By ajis Date 2011-07-18 15:07
Gwyn,

Thank you for your suggestions.
But I am not sure how to run the command you suggested.
Typing directly 'foreach l1afile (A20*L1A_LA*)' on linux prompt only resulted error like :
bash: syntax error near unexpected token `('

So I tried to modified became like this & named as geogenscript.csh.

#!/bin/csh -f
set dir=/media/HD-PSU2/sendai2/l1aunex/
cd $dir
foreach l1afile (A20*L1A_LA*)
  set geofile = `echo $l1afile | cut -c 1-14`.GEO
  $SEADAS/run/scripts/modis_GEO.csh $l1afile -o $geofile >&! $geofile.runlog
end

but when executing the script following error returned:
bash: geogenscript.csh: command not found

Before executing the script I did the following command: chmod a+x geogenscript.csh

But, if I process L1A file one-by-one from the prompt for example as
$SEADAS/run/scripts/modis_GEO.csh A2011072035500.L1A_LAC -o A2011072035500.GEO
GEO file could be created successfully.

I also tried another geofile generation script (named as geogenscript2.csh) I have got from the forum as below:

#!/bin/sh

for FILE in *L1A_LAC.x.hdf
do
  # The line below assumes an extension, and creates a base name without that extension
  BASE=`echo $FILE |awk -F. '{ print $1 }'`
  GEOFILE=${BASE}.GEO
  # process the L1A file to GEO
  modis_GEO.csh $FILE -o $GEOFILE
done

But again after typing chmod a+x geogenscript2.csh and then geogenscript2.csh in the console prompt,
the same error messages as bash: geogenscript2.csh: command not found also returned.

Am I facing seadas installation problems? or it was on the scripts?

Thank you.

Ajis
By gwyn Date 2011-07-18 15:28
Ajis -

The commands I posted were indeed csh, so it was appropriate to put them in a csh script.  But there's another issue - it seems that bash is your default shell, and I'm not sure the bash environment variables set by seadas.env would carry over into the csh environment.

The commands in geogenscript2.csh look good.  I'd recommend renaming the file to geogenscript.sh to better reflect the shell language.  Naked commands in the current directory are often not allowed for security reasons; instead, specify the cwd as "./":

./geogenscript.sh

You may want to do a web search for "bash scripting tutorial" for more information.
By ajis Date 2011-07-20 14:03
You're right, by specifying "./" my scripts can be executed.

Thank you.
Previous Next Up Topic SeaDAS / SeaDAS 6.x - General Questions / geofile creation error on seadas62 (locked) (2488 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