Ocean Color Forum - Not logged in
Forum Ocean Color Home Help Search Login
Previous Next Up Topic SeaDAS / SeaDAS 6.x Virtual Appliance for Windows / Seadas outputs (locked) (8632 hits)
- By martinssequeira Date 2010-03-14 23:19
Hi,

Thanks for help Sean in the other post - I could not reply as it was locked.
So I decided to start a new one, with a different topic now.

My question now is related to Seadas outputs.
When, from a SeaWiFS image I output (Output Setup in Seadas) an image data from type HDF SD and double format which information does this image contain?
Does it include geographical coordinates in Plate Carre system? And chla values per pixel in mg/m3 (or any other unit?)?

Again, thank you for your help.
Ana
Parent - By martinssequeira Date 2010-03-14 23:44
Sorry, me again!

I was thinking and maybe it is just easier to ask the question differently:

I need to have the chla values in just a few points (stations) in the Indian Ocean - for several days / weeks and seasons (then need to calculate averages and SD in each point).
I have the coordinates for those points (whether in arcgis, or xls, or txt or csv or I can put them in a different format if needed).

How can I get the values for chla using SeaWiFS imagery?

Thank you.
Ana
Parent - By martinssequeira Date 2010-03-15 00:31
Again with another way of asking the same question:

To be able to use the Seadas outputs in ArcGIS I was using the following the steps below - in Seadas V5.3:

Create an hdf file in a "seadas_shared" folder :
      a) Changed the working directory in Seadas to that folder (Main Menu: Utilities -> Session Defaults -> Change default working directory)
      b) Go to Main Menu: Display -> navigate to seadas_shared -> load the unzipped files
      c) Band List Selection: Display
      d) On the diplayed image: Functions -> Output -> Display -> (select the type) Image Data -> (select the file type) HDF SD -> Go

I could then use the output form Seadas directly in ArcGIS as a raster (with the defined projection: Plate Carre).

Could somebody let me know where shall I change these steps now to be able to do exactly the same in Seadas V6?
The output image data now (followin these steps) seems not to contain any spatial information - at least ready to use. Any clues on how I can read this information from the image data created?

Sorry for asking so many times the same, but I still could not get, nor underwstand, what I need :-(
If you have any suggestion on material to read on seadas V6 or on how to do these type of analysis, please let me know.

Thanks,
Ana
Parent - By @sean Date 2010-03-15 14:10
Ana,

I'll answer your questions in reverse order:

The steps you outlined for producing an HDF file are identical between SeaDAS 5.3 and 6.1
and will produce identical results.  Neither will append the navigation information to the HDF
file.  You can, however, append the Latitude and Longitude SDSs using
Functions -> Output -> Navigation - enter the filename from the first export to HDF, and select
'Append'  from the "Output Mode" pull down menu.

If you have lat/lon points of interest you can use the Shiptrack function to load these data points
into SeaDAS and export the associated satellite data.

Outputting a loaded SeaDAS band as an HDF SD will create an HDF file with a single data set
(selecting double precision will create a double precision floating point data set)
It does not contain navigation information (see above).
For Chlorophyll, this will be in units of mg/m^3.

Sean
Parent - By martinssequeira Date 2010-03-25 04:39
Thanks Sean.

i try to use the Ship Track option and got the following error:
"Loop limit expression too large for loop variable type <LONG (      33802)>"

Then I tried to output ascii files for the chla L3m images and I could use them. So, and because I will need to output values for about 400 images, I would like to write a batch file to be able to do it quicker.

I was trying to adapt one of the examples found here to be able to write asc files to the seadas_shared folder.

But I had troubles at the very beginning, even trying to understand in which terminal window to use :-(
I am very sorry but I have never even used inux before, so it looks a bit confusig to me right now.

When I open seadas inside VMware there is a terminal window that opens first (Konsole) - when I write in this window nothig happens at all. When I open a new terminal window I can navigate to the shared folder and open the folder where all my downloaded and unzipped files are. I strat writing the little script below and I get an error right in the first line:
"bash: syntax error near unexpected token (' "
So I could not even get any further than this :-(

Do you think you can give me a help on this? (I am sending my first trial script below)

Thank you in advance.
With best regards,
Ana

files=file_search('*.L3m',count=n)
;print,'No. of files to process:', n

for i=0, n-1 do begin                                             & $
   ifile = files(i)                                                     & $
   base_fname = FILE_BASENAME(ifile, '.L3_m')           & $
   load,ifile,ftype='seawifs',prod_name=['chlor_a']        & $

   outfile = base_fname + '.asc'                                & $
   out, /data, outfile, ftype='asc'                              & $

   clear_up                                                           & $
endfor
Parent - By @sean Date 2010-03-25 17:37
Ana,

I thnk that the "Loop limit.." error with ship track occurred because the file you tried to read in
had more records than long integer (32767)  - that's a lot of points!  If you reduced the number
of records, it should work.

The VA loads SeaDAS in GUI mode when you start it, it uses one terminal window (one that you'll
not be able to type in - it is there only to show any errors from SeaDAS).  

As for running a script in the VA, you will need to put the script in a file (say, mybatchscript.txt)
then call seadas in batch mode.  From a terminal (i.e. Konsole), type:
       seadas -em -b mybatchscript.txt

You may want to exit out of  the GUI SeaDAS first.

This post answers a question very similar to your own:
http://oceancolor.gsfc.nasa.gov/forum/oceancolor/topic_show.pl?pid=13097

Hope this helps,
Sean
Parent - By martinssequeira Date 2010-03-25 23:35 Edited 2010-03-26 06:18
Hi Sean!

I can get the asc files now :-) Thank you!
(after doing some changes to the batch- see below)

Just to check: I specified band=1 and format F10.3, as that is what I was doing to output one ascii file from Seadas using Band List selection. Is this the correct format to use?

Also, I would like to change the headings of the ascii file created to something like:
ncols 4320
nrows 2160

I can get these headings - instead of "chlorophyll raw" that appears by default - but I could not get them in 2 separate lines (i.e. write nrows in another line).
Is there a command for a line break in seadas? If yes, Where shall I insert it in the code below  - in order to get:

"ncols 4320" in the 1st line
"nrows 2160" in the 2nd line
and the data starting in the 3rd line)?

I tried to insert commands:
\n
\r
\r\n
\x0D\x0A
\x0A
\x0D
echo
...
none worked... but maybe I was not inserting them in the right place within the code (?)

Do you think you could help me with this?

Thank you very much for all the help!
Ana

Script:

files=file_search('*.hdf',count=n)
print,'No. of files to process:', n
; print, FILE_BASENAME(files)

for i=0, n-1 do begin                                 & $
   ifile = files(i)                                   & $
   base_fname = FILE_BASENAME(ifile, '.L3_m')         & $
   load,ifile,ftype='SeaWiFS',prod_name=chlor_a       & $
; print, i

;  Output the data in generic ascii format

   ascii = base_fname + '.asc'                        & $
   out_ascii, band=1,format='(F10.3)', titles=['ncols 4320    &$
  nrows 2160'], ascii                                   & $          
  clear_up                                            & $

endfor
Parent - By @sean Date 2010-03-26 13:30
Ana,

The format F10.3 means floating point, 10 elements, 3 after the decimal.
If that's the significant figures you're comfortable with, should do fine.

The titles keyword allows the user to specify the column titles.
You only have one column (chlorophyll), so can only have one column
title.  As you found, you can change the title to any string. 
Since in IDL byte arrays that are converted into strings get converted
to the ASCII-characters represented by the bytes,  to add a new line
(carriage return/line feed), you could do this:

crlf = string([13b,10b]) & $                                                   
title = 'ncols 4320'+crlf+'nrows 2160' & $

Then, use titles=[title] in your call to out_ascii.

Sean
Parent - By martinssequeira Date 2010-03-28 23:03 Edited 2010-03-29 00:04
Hi Sean,

Thanks!
Guess this solved my problem :-)

Thank you very much for all the time spent trying to help me!
With best regards,
Ana
Parent - By martinssequeira Date 2010-04-22 07:24
Hi again,

Just a quick question:

When treating the all chla data gathered from the satellite composites, I was deleting the higher value - as before (with the log setup) it was always 64... , but now as you explained me, the images from the new setup (linear) have different maximum values and so I have several higher values in my final data table.

So would just like to ask which value shall be used as a real maximum for chla?

Thank you.
Best,
Ana
Parent - By @sean Date 2010-04-22 18:03
We set a warning for chlorophyll values exceeding 100 mg/m3.

Sean
Parent - By martinssequeira Date 2010-04-28 00:20
Hi Sean,

Thanks for your answer.
But I think my question was not clear, I am sorry.
I did not mean the maximum obtained by the satellite, I meant which values shall be considered the maximum chlorophyll value with biological meaning, i.e. I am using chla values obtained in the Indian Ocean, so I suppose I can not have areas with 50 mg m3 of chlorophyll, is this correct?

In the legend of the image composites here in the website, I think the maximum you use is about 15 mg m3 (ramp of colours in a log scale).
Shall I delete all the pixels with values higher than this threshold in each image, to be bale to do my analysis?

Again, thank you for your attention.
With best regards,
Ana
Parent By @sean Date 2010-04-28 13:17
Ana,

The dataset used for developing the chlorophyll algorithm included
in situ measured chlorophyll as high as 100 mg/m3.  While not typical, it
is possible to have such  concentrations.  I would not suggest
throwing out data above a threshold, as to do so is likely to bias your
results.  It is better to try to understand the conditions that result in
these high retrievals - it may  be that they are erroneous, but it is equally likely
these values  reflect true conditions.  

The scale applied to the images displayed on our L3 browser was not
set because values above 15 mg/m3 are suspect, rather it was chosen
to make a pretty picture - MOST of the global ocean is below this
value - the scale choice was set to reflect this.

Sean
Previous Next Up Topic SeaDAS / SeaDAS 6.x Virtual Appliance for Windows / Seadas outputs (locked) (8632 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