it has been a long time because I have been on the sea. actually, I still have the problem.
this is my program.
there are a lot of files in the directory "/home/seadas/data/meris/"
the program will stop after each 24 files has been processed.
and it has the information "All available logical units are currently in use? "
pro test1
filenames=findfile('/home/seadas/data/meris/*.N1')
for i=0,n_elements(filenames) do begin
filename=filenames(i)
base=strmid(filename,0,53)
;base=strmid(filename,0,52)
hdffile=base+'.hdf'
l2gen,ifile=filename,ofile1=hdffile,l2prod1="l2_flags,Rrs_443,Rrs_560,Rrs_681,nLw_413,nLw_443,nLw_560",slat=68,elat=73,slon=-140,elon=-120,metsearch=1,ozonesearch=1,$
sstsearch=1,aer_opt=-3,albedo=0.05
;l2gen,ifile=filename,ofile1=hdffile,l2prod1="chlor_a,Rrs_443,Rrs_560,Rrs_681",slat=68,elat=73,slon=-140,elon=-120,metsearch=1,ozonesearch=1,$
;sstsearch=1,aer_opt=-10
clear_up
endfor
end
Have you checked that the host (Windows) filesystem has adequate free space?
This error often means that files are being opened (e.g., open.. ,/get_lun) without the corresponding free_lun.
Somes a program that normally behaves well will miss the free_lun if there is some error, so you should
examine the log files carefully for signs of some problem.
Linux has an "lsof" utility that will show which files are open in a given directory, but you have to install it:
$ sudo apt-get install lsof
As a practical matter, it often works better when processing large numbers of files to break jobs up
into smaller batches because many programs don't free up resources when run in a loop. Also, for
l2gen, a shell script can accomplish the same task with less overhead.
By church
Date 2009-12-04 04:46
Hi George,
Thanks so much.
Actually, both of my Windows OS and Vitual machine have adequate free space.
I have tried to use Unix shell script and the porblem has been solved. thanks again for your help.
As George mentioned, for processing, Unix shell scripts are a better approach.. here's an example that would avoid using IDL and therefore avoid the logical units problem. To create the script paste the text below into a Unix text file, and then make the file executable: c_h_m_o_d u+x script_file (take out the underscores). The script can then be run directly on the Unix command line by typing "./script_file" in the directory where the script and data reside. (Normally you would put all your scripts in a directory such as ~/bin/ and add this directory to your path.)
#!/bin/sh
slat=68
elat=73
slon=-140
elon=-120
for FILE in *.N1
do
# remove the underscore in e_c_h_o below
BASE=`e_c_h_o $FILE |awk -F. '{ print $1 }'`
hdffile=${BASE}.hdf
# determine start/end pixels/lines since the l2gen Unix command can't calculate lat/lon's
lonlat2pixline $FILE $slon $slat $elon $elat >tmp.txt
spixl=`grep spixl= tmp.txt |cut -c7-`
epixl=`grep epixl= tmp.txt |cut -c7-`
sline=`grep sline= tmp.txt |cut -c7-`
eline=`grep eline= tmp.txt |cut -c7-`
# determine ancillary data separately since the l2gen Unix command can't do this
ms_met.csh $FILE
ms_ozone.csh $FILE
ms_oisst.csh $FILE
# the three above commands create three files in the l2gen par file format:
# FILE.met_list, FILE.ozone_list, FILE.sst_list
l2gen ifile=$FILE ofile1=$hdffile l2prod1='l2_flags,Rrs_443,Rrs_560,Rrs_681,nLw_413,nLw_443,nLw_560' \
spixl=$spixl epixl=$epixl sline=$sline eline=$eline aer_opt=-3 albedo=0.05 \
par=${FILE}.met_list \
par=${FILE}.ozone_list \
par=${FILE}.sst_list >$BASE.log
done
By church
Date 2009-12-04 04:50
Edited 2009-12-04 04:58
Hi Mike,
I was not familiar with Unix shell before. Your program is useful for me. So clear explaination. Thank you.
I have processed my data these two days using you program and get my result now.
Thank you very much for your help
By mike
Date 2009-12-04 16:28
Great to hear.. for SeaDAS data processing, Unix scripts (shell scripts, python scripts, perl scripts, etc) are the most efficient method. Also, for some of the Unix processing binaries, calling them directly will also give you access to command options that aren't available in the SeaDAS GUI or IDL command-line.