Menu Close

Taylor Mutch

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: No data found in CSV file #4903
    Taylor MutchTaylor Mutch
    Participant

    Also I am using a somewhat older version (with plans to upgrade when funds allow us to do so)
    version = 1.0.24.0

    in reply to: 'Cannot find transformer' error #4223
    Taylor MutchTaylor Mutch
    Participant

    Hi Leonardo,
    “However, it is possible that if you installed a newer version and then tried going back, something may have gone wrong.”
    This was exactly the situation I was in, and #1 solved the issue. Didn’t realize there was a module sitting in my AppData. Blew that away, ran the installer successfully and I am up and running again!
    Cheers,
    Taylor

    in reply to: Python Libraries? #4009
    Taylor MutchTaylor Mutch
    Participant

    It would be awesome if we could avoid intermediate CSV files. I have planned for the time being to work around the file creation by having a temp file to export out to, read that file into a csv.DictReader object, do the changes in memory, write on top of the file with csv.DictWriter, import back in to the same sheet and then cleanup/remove the file. The trick will be doing that for a given set of users, and I haven’t been tried having SyncroSim run with multiple instances/jobs on Linux yet, but that is something I plan on trying to test out.

    I also updated the module with some changes (mainly internalizing the static functions I had into the classes by simplifying the code).

    in reply to: Python Libraries? #4007
    Taylor MutchTaylor Mutch
    Participant

    On such a note, I have thrown together what I have into a simple, one file module, available at https://github.com/TaylorMutch/stsimpy.

    in reply to: Python Libraries? #4006
    Taylor MutchTaylor Mutch
    Participant

    Hi Colin,

    That is excellent news! By nature of my question I am personally leaning Python (though R is also known to me), and I have begun to do the command-line calls using Python 3.5 and the subprocess module.

    One thing that we are really finding useful is the ability to set the initial conditions based on user input from our web interface. For example, we are allowing the user to adjust the percent cover of a given state class for a vegetation type, and we are planning to let the user have a scaler/slider that adjusts existing probabilistic transitions (e.x. fire, grazing) and run the model based on these new values to gather differences between different model runs. Currently this involves writing out to a .csv and then importing that as a sheet (e.x. importing into --import --sheet=STSim_InitialConditionsNonSpatialDistribution --file=path/to/myfile.csv --sid=123). While this isn’t an awful way to go at it by no means, it would be nice to have some sort of interface to say 1) grab each row, 2) list those values, and 3) update each value in that row at runtime. This could be treated as a python object that gets updated by the program and then applied back to the library, does some sanity checking to make sure that the vegetation and stateclass values are valid from the project definitions, and then executes the transaction change.

    Extracting out the transitional and deterministic pathways as a connected graph data structure would also be useful, since the visualization we are developing is attempting to illustrate the change from one state class to another within the vegetation type, since we can use the quantity transitioned specified in the transition-stateclass-summary report to symbolize the change from one to another along a given transition pathway (e.x. showing fire when a portion of the landscape transitions due to fire).

    These are just two things that come to mind directly.

    Thoughts on either of these?

    Cheers,
    Taylor

    Taylor MutchTaylor Mutch
    Participant

    Hi Leonardo,

    We actually are still having a couple issues with running the model spatially, and it most likely has to do with an improper install of GDAL (gdalinfo --version returns GDAL 1.10.1, released 2013/08/26, so that needs to be resolved per the system reqs for SyncroSim).

    We are working with the following:
    Mono JIT compiler version 4.4.1
    Ubuntu Linux VERSION="14.04.4 LTS"

    Mike or I will report back if we still have issues after upgrading GDAL (or burning and rebuilding our dev server, whichever comes first).

    Cheers,
    Taylor

    • This reply was modified 5 years, 2 months ago by Tom RoeAdminTom RoeAdmin.
    in reply to: Bug Using Linux Tools? #3983
    Taylor MutchTaylor Mutch
    Participant

    Hi All,

    Since the return code isn’t what I was looking for (it turns out), I am parsing the output of the model run and collecting the string that is passed back instead, grabbing the string as is and just using that value. Silly me!

    Thank you for the help.

    Cheers,
    Taylor

    in reply to: Bug Using Linux Tools? #3982
    Taylor MutchTaylor Mutch
    Participant

    Hi Alex,

    Thanks for the links, that does make more sense to use subprocess.

    When I use subprocess like this:

        
    import subprocess32 as sub_proc
    ...
    st_model_output_sid = str(sub_proc.call(st_exe + " " + st_run_model_command, shell=True))
    

    It returns a scenario id 256 less than the id corresponding to the results id. I.e. If the scenario id is 296, the above returns 40. So that answers the divide by 256, but not the subtraction of 256…

    Cheers,
    Taylor

Viewing 8 posts - 1 through 8 (of 8 total)