By daz
Date 2012-04-14 17:01
the run-time enviroment interface of seadas6.3 has changed (see attachment) since i started using seadas command-line on a new machine few days ago,
although i'm not sure whether using seadas command-line on the machines causes the problem of changing interface, it results in seadas crashes and X11 quits when i was trying to
scroll the display windows.
Also, seadas command "display" didn't work when i was runing the script but other commands after it like 'bl2map' and 'out' worked properly, Im not sure if these two things are related or not.
By daz
Date 2012-04-17 16:16
Edited 2012-04-17 17:10
Thank you George
I sorted it out by changing the name of the home directory (it was called 'admin' and seadas dont like this name),
However, command 'display' still didn't work (no display window brings up) and loaded band wasn't projected by mapimg, im not sure whether something missed out, below is my code:
for i=0, N_ELEMENTS(filenames)-1 do begin & $
load, filenames, FTYPE='MODIS', PROD_NAME=['flh','l2_flags'] & $
mapimg, bands=[1],iproj=8,xsize=800,ysize=800,p0lat=LAT,p0lon=LON,scale=escala,ISOTROPIC=1 & $
loadpal, paleta_chl, /file_idl & $
loadgp, color=5, red=landcolor, green=landcolor, blue=landcolor & $
display, BAND_NO=1, FBUF=1, smax=0.8, smin=-0.01, STYPE='LIN' & $ ; LIN or LOG
landmask, FBUF=1, COLOR=5 & $ ; overlay landmask
coast, /rivers, /coasts, COLOR=6 & $
grid, latdel=1, londel=1, grdcol=6, lblcol=6, glinestyle=1, fonttype=-1, charsize=1,latalign=0.0, lonalign=0.0 & $
cbar, FBUF=1, orient='v', fonttype=-1, charsize=2 & $
out, L2DIR+'flh.png' , FTYPE='png' , FBUF=1, /CBAR, bk_cbar=0 & $ ; black background
clear_up & $
endfor
Thank you
Dan
By WhiteG
Date 2012-04-18 11:58
I doubt SeaDAS would be affected by the name of the "home" directory, so it is more likely that there was some problem with file permissions that was solved by the renaming.
I can't run your script here as it refers to variables that have not been defined, but the "load, filenames" doesn't look right as filenames is an array. Do you have a version of the script that worked with a previous version of SeaDAS? To find the problem, start with a minimal script such as:
filenames=['benchmarks/A2006167181000.L2', 'benchmarks/A2006167181000.L2_test']
for ifile=0, N_ELEMENTS(filenames)-1 do begin & $
print, filenames[ifile] & $
load, filenames[ifile], FTYPE='MODIS', PROD_NAME=['flh','l2_flags'] & $
clear_up & $
endfor
When I run this I get:
$ seadas -em -b t3.script
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.
SeaDAS Version 6.3 (pid = 94304)
benchmarks/A2006167181000.L2
grp_name=Geophysical Data
Getting - "flh" data from HDF file...
Getting - "l2_flags" data from HDF file...
benchmarks/A2006167181000.L2_test
grp_name=Geophysical Data
Getting - "l2_flags" data from HDF file..
(note that the second file lacks flh). Just keep adding lines from your original script and fixing problems as you find them.
By daz
Date 2012-04-19 15:27
Edited 2012-04-19 16:25
Thank you, very much appreciated.
I think command 'display' is not meant to bring up any windows presenting loaded band. But now I have other problems which I hope you can help me with.
The first problems is 'coast' command, it does work properly on projected bands, no coastline was shown up by using 'coastal, /coasts' see attachment, but projected imagery can give coastline in seadas GUI.
The second problem is colour tables, I modified a standard colour table and save it as my own, but when I load it for one band next time in seadas GUI, the seadas got frozen after using 'Function' of 'Load Colour LUT' to make any changes when using 'Apply lut' to any loaded band, i've also tried to save LUT both in ASCII and hdf format, but it has the same problem, error message shown as below
% Attempt to subscript LUTFILES (SDSXLOADCT_COM) with LUTINDEX
(SDSXLOADCT_COM) is out of range.
% Execution halted at: SDSXLOADCT_EVENT 489
/Users/daz/seadas6.3/idl_lib/sdsxloadct.pro
% WIDGET_PROCESS_EVENTS
% $MAIN$
my code:
L2DIR='/MODIS_Data/GOM_2005/20041213/'
filenames = findfile(L2DIR+'A*.L2')
PRINT,filenames
SLAT=24.0
NLAT=27.0
WLON=-83.5
ELON=-81
paleta_flh = '/MODIS_Data/GOM_2005/flh_2'
for i=0, N_ELEMENTS(filenames)-1 do begin & $
load, filenames
, FTYPE='MODIS', PROD_NAME=['flh','l2_flags','chl_oc3'] & $
mband_cmd,cmd_array=['result = b1*10'], navband=1, bandname='10*flh', unit='W/m^2 um^-1 sr^-1' & $
mapimg, bands=[3,4],xsize=670,ysize=800,LIMIT=[SLAT,WLON,NLAT,ELON],ISOTROPIC=1, /CYLIN & $ ;, p0lat=LAT,p0lon=LON
loadpal, paleta_chl, /file_idl & $
loadgp, color=5, red=landcolor, green=landcolor, blue=landcolor & $
display,BAND_NO=5,FBUF=1,smax=7, smin=0.05, STYPE='LOG' & $
;landmask, FBUF=1, COLOR=5 & $ ; overlay landmask
coast, FBUF=1, /rivers, /coasts, COLOR=7, /HIRES & $
grid, latdel=1, londel=1, grdcol=6, lblcol=6, glinestyle=1, fonttype=-1, charsize=1,charthick=1.5, latalign=0.5, lonalign=0.5 & $
cbar, FBUF=1, orient='v', fonttype=-1, charsize=1.5,charthick=1.5 & $
;load_graph,5,FBUF=1,ftype='BAND',range=[0.05,7], color=[7],merge=2, /GEO, /inverse & $
display, BAND_NO=6, FBUF=2, smax=0.8, smin=-0.09, STYPE='LIN' & $ ; LIN or LOG
load_graph,6,FBUF=2,ftype='BAND',range=[-0.09,0.8], color=[7], merge=2, /GEO, /inverse & $
landmask, FBUF=2, COLOR=5 & $ ; overlay landmask
coast, FBUF=2, /rivers, /coasts, COLOR=6, /HIRES & $
grid, latdel=1, londel=1, grdcol=6, lblcol=6, glinestyle=1, fonttype=-1, charsize=1,charthick=1.5, latalign=0.5, lonalign=0.5 & $
cbar, FBUF=2, orient='v', fonttype=-1, charsize=1.5,charthick=1.5 & $
out, L2DIR+'chl_oc3.png' , FTYPE='png' , FBUF=1, /CBAR, bk_cbar=1 & $ ; white background
out, L2DIR+'flh.png' , FTYPE='png' , FBUF=2, /CBAR, bk_cbar=1 & $ ; white background
out,L2DIR+'mapped_chl_oc3.HDF', /data, band=5, ftype='MAPPED',SD='chl_oc3_mapped',/GEO & $
out,L2DIR+'mapped_chl_oc3.HDF', /data, band=6, ftype='MAPPED',SD='FLH*10_mapped',/GEO ,/append & $
clear_up & $
endfor