December 12, 2018, 07:57:39 AM

News:

Due to SPAM attacks, new members must be approved before posting.  Please email jclough@warrenpinnacle.com when registering and your account will be approved.


Command Line Option of SLAMM

Started by Jonathan S. Clough, November 05, 2009, 10:41:19 AM

previous topic - next topic
Go Down

Jonathan S. Clough

Pat wrote:
QuoteHi Jonathan!

I am starting a SLAMM project and want to construct a model in ArcMap
to at least output the ascii grids but hopefully more, like slope
conversion and the data join to the NWI.

Are there command line switches for setting parameters for the SLAMM
executable?

Cheers!

pat


My response:

Hello Pat:

There is a command line switch option for setting up SLAMM.  It is a new
feature and you need a new executable (attached)  Please see the
specifications including the URL below.

Also, a sample batch file is attached.

A reminder, version 6 will be available at the end of this month and
this version will have several new features as well as be fully
open-source.  Keep your eye on the SLAMM FORUM for more information.

Good Luck -- Jonathan

      Hello to all.

      Attached please find a version of SLAMM that works with a
      command-line input of a driving file.  An example of a "driving
      file" (infile_test.txt) and blank template (infile.txt) are also
      attached.

      Please use this URL:

      http://warrenpinnacle.com/prof/SLAMM/Slamm5.0.4.zip

      Some features and specifications:

            All GUI options on the main screen and GIS options screen
            that may be modified by the user may be modified in this
            input file.

            The name of the input file must be passed as a parameter to
            the slamm software (e.g. "SLAMM5.0.4.exe infile.txt")
            If there is a parse error, the software will raise an error
            pointing to the errant line

            If "Debug Mode" is set as true, the software will start up
            showing the user the selected options on the GUI screen.
            This allows the user to see that the parse is working as
            expected prior to executing the model.

            Otherwise the software will immediately execute the model
            with the options selected (without prompting) and the
            software .

            Procedural messages such as "your simulation is completed"
            have been suppressed.

            "Fatal" error messages are not suppressed so the user can
            see what went wrong.  These could potentially be written to
            a log file to avoid an iterative procedure from jamming up
            completely in a future version.  Hopefully, though, no fatal
            errors will be encountered in your use of the model.

      Also, I'm attaching a version of a site file that includes several
      new and optional parameters (such as max fetch threshold and
      overwash parameters).  See several emails copied below for more
      information on this.

      While I have tested the new capabilities several times, this
      version probably could benefit from more testing cycles; please
      let me know immediately if you notice any strange behavior from
      these new model capabilities.

      -- Jonathan Clough

Dean

November 23, 2009, 12:35:50 PM #1 Last Edit: November 23, 2009, 01:15:40 PM by Dean
This is great. Is this going to be available in slamm 6?

I'm relatively new to the command line, but am trying to learn more. Is there a way to have it run successive models, ie for multiple sights successively? I have a large geographic region I'm modeling with 3m lidar data, so I am running into memory limitations. I have 19 sites over a contiguous area and would love to be able to set up a command line input that would run each site successively, instead of having to be here to start each run manually every 4-10 hours?  I know this is somewhat outside of slamm topics, but any help or direction to sites that may be helpful would be greatly appreciated!

thanks,
dean

UPDATE: I think I just figured out how to do this using a batch file.

Dean

Is it possible to use relative paths for the infile in the Input Data File and Output Directory paths?

Thanks,
Dean

Jonathan S. Clough

In my tests, relative paths seem to work, relative to the directory in which the program resides:  For example

../inputfile.txt moves to the directory in which the SLAMM subdirectory is located
subdirectory/inputfile.txt moves to "subdirectory" off of the SLAMM directory.

-- JC


Jonathan S. Clough

As you should know, SLAMM 6 is now publicly available including open-source code:

http://warrenpinnacle.com/SLAMMFORUM/index.php?topic=55.0

As of the time of its initial release the "Command Line" option hadn't been fully integrated yet into the model and it now has.  The file structure is dramatically different in SLAMM 6 and there is a new mechanism for invoking the command line option:

Save an existing SLAMM6 file as "txt" rather than the "SLAMM6" file-type.  (If you look at that file you will see hundreds of parameters, hopefully labeled in a relatively self-evident manner.)  You can load that text file and all of your parameters will be loaded into the model.  You can pass that file-name as a parameter to the executable and the file will be loaded upon startup or the simulation will be run.  To run the simulation automatically and terminate the application on completion you must change the very last line of that file to "ExecuteImmediately: True".

The command-line capability will soon be integrated into the main release of SLAMM6 but currently you must use this link to download the latest version with command-line capabilities.

http://warrenpinnacle.com/prof/SLAMM6/SLAMM6_Command_Line.zip

Dean

Hmm, any ideas why I might get an output from the command line version of slamm 6 that looks like that below (upper right)?  The lower left is the same area, but run w slamm 5.0.4.  I checked the input files, and they seem fine.

Thanks,
Dean

ps. In case you're wondering, they're misaligned b/c I haven't projected them yet, so ArcMap just drew them on the screen.

Jonathan S. Clough

Looks weird. 

Is it the command line that's producing this problem or just that version of the model? 
Does it look like this on the screen or is this just the ASCII output produced by the software?
When I've seen this type of distortion in the past there has been a mismatch in the number of columns specified and the actual number of columns in the ascii file...

Dean

This was run with the command line. I haven't tried running it with that version (assuming the command line is a diff. ver. than the original v/6 release).  The release executable from the 1st ran everything fine with a 10m resolution.  I didn't run the maps, so I don't know the answer to that.  This is the ascii from the output. I'll check the columns, but the same set of input ascii files run fine this way in 5.0.4.

-Dean

Jonathan S. Clough

OK, I'll check the output.  I haven't looked at ascii output from SLAMM6 recently.   OK, now I have from our last several projects and there was no problem I could see with any of the ASCII outputs that I created.  If you want to send me the input files zipped up I'll be happy to help you debug...  -- Jonathan

Jonathan S. Clough

Hi Dean:  I brought your files into SLAMM6 and ran in the command line and ran through 2025 and the GIS output looked fine in MapWindow.  This could be a function of MapWindow being less "finicky" about ASCII input rasters than ESRI products, I'm not sure... 

I didn't run thorugh 2100 because I need my processor back.  Did you see this problem in all rasters output by your version or just those at a particular date?  Can you send me one of the "corrupted" rasters?  (From e3 in particular?)

Dean

I'm checking the rasters for all years now, but having to import them from the ASCII format. I'll let you know how it checks out. So far, 2 of 19 sites were normal (including e3) for year 2100, but the others were all corrupted. I'll send you some of a corrupted site later.  Thanks for your help again!

-Dean

Dean

Does the current version of SLAMM 6.0.1 have a command line option?

Thanks,
Dean

Jonathan S. Clough

Yes it still follows the instructions posted above:


  • Save an existing SLAMM6 file as "txt" rather than the "SLAMM6" file-type.  (If you look at that file you will see hundreds of parameters, hopefully labeled in a relatively self-evident manner.)
  •  
  • You can load that text file and all of your parameters will be loaded into the model.  You can pass that file-name as a parameter to the executable and the file will be loaded upon startup or the simulation will be run.

  • To run the simulation automatically and terminate the application on completion you must change the very last line of that file to "ExecuteImmediately: True".




Also see "command line option" in the latest tech doc. 

Cheers -- J

katerinapyl

Hi,

I am having a problem running the SLAMM from the command.

I saved the slamm fle as txt and load it from the command. Although the simulation runs the results are not the same to the ones from the manually simulation. Could you please help me on that?

Thank you,
Katerina

Jonathan S. Clough

Please provide us with more details.  How are the results different?  What version of SLAMM are you using.  If you'd like to provide us with the SLAMM files we can try to reproduce the problem here.   I'm not aware of any problems with the command line version, but I also haven't used it for years.  Thanks-- Jonathan

Go Up