Page 1 of 1

How to reproduce SeaDAS6 batch workflow in SeaDAS7?

Posted: Wed Aug 30, 2017 1:04 pm America/New_York
by blesht
I need to reproduce a workflow that was developed under SeaDAS6.4 that no longer works with SeaWiFS L2 HDF files generated with the current version of l2gen (seems to work with MODIS files).  In short, the idea is to read an L2 file, map it using a custom projection, overlay some defined ROIs, and output ascii files with the data from the L2 file extracted by ROI.  I am very comfortable with IDL so it was easy for me to put the SeaDAS commands into an IDL PRO that took care of all the file definitions, etc.  The SeaDAS command I was using are (in an IDL loop - index i):

load, fFName, ftype='SeaWiFS', prod_name=['chlor_a']
mapimg, bands=[1], map_pfile=mpFile
display, band_no=2
load_graph, blFile, merge=1, dtype=1, dims=[ncols,nrows]

[nested loop - index j]
  out_ascii, outName, fbuf=1, vars=[2], blotch_col=j+1, format='(f10.2)',rep_factor=8, titles=""

I haven't a clue as to how to accomplish this in SeaDAS7 and would appreciate any suggestions about how to start.

Thanks.

How to reproduce SeaDAS6 batch workflow in SeaDAS7?

Posted: Thu Aug 31, 2017 7:50 am America/New_York
by gnwiii
Look for GPF Tutorials here and on ESA's SNAP site.

SeaDAS 7 provides the Graph Processing Framework (GPF) from ESA BEAM.  Some SeaDAS 7 GUI tools use  the GPF, but there is a command-line "Graph Processing Tool (GPT).    There have been many posts in this forum related to GPF.  GPF will seem strange to people used to the procedural approach to programming, but if you have been around long enough to remember the AVS Network Editor then GPF might make more sense (ESA SNAP actually has a visual editor for GPF graphs). 

ESA has stopped development and support for BEAM in favor of SNAP.   SNAP GPF has many new operators, and the NASA OBPG reader is included in SNAP (but has some bugs, so may not work with all OBPG files).  An (almost working) example along the lines of your IDL workflow  was posted to the ESA STEP forum.   Another option is to convert the ROI masks to shapefiles for use with GPF StatisticsOP.   Another post related to your workflow may be helpful.

Users here have been migrating workflows to SNAP GPF from SeaDAS 7, but some workflows have had issues with the OBPG reader in SNAP.

GPF is written in Java, which means it runs on Windows as well as unixy platforms.  I have seen 1000x differences in run times for the same graph on different systems.  If things seen slow you need to pay attention to the Java memory settings and the ___location of temporary files.   SNAP 7 GPT adds some tunning options not available in the SeaDAS 7 version.

For fun, I'm attaching the list of operators for SNAP 6 (prerelease).  Many are specific to ESA sensors, but there are general purpose tools not provided in the SeaDAS 7 version.
attachment 1

How to reproduce SeaDAS6 batch workflow in SeaDAS7?

Posted: Thu Aug 31, 2017 8:43 pm America/New_York
by blesht
One of these days George, I'm going to back through all the forum posts and count how many times you have been right there to help this old guy "across the street."  I do appreciate it.   I have been around a long time (having coded in PL/I and ALGOL back in the day) but am not familiar with the AVS network editor.  I will take a look at the GPF tutorials you point to.  I did look at the NASA tutorial yesterday but really didn't get that much out of it.  SNAP looks interesting too, but I think I'll make an effort to do what I need in GPF before taking on yet another learning project.  Another option given my schedule for this project is to just use MODIS and stick with my existing scripts.  It would be nice to include the SeaWIFS observations as well, but probably not really necessary.

Thanks again and best regards, Barry