Menu Close

katie-birchard

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • in reply to: Removing scenario ID number (?) #23212
    katie-birchardkatie-birchard
    Keymaster

    Hi Randy,

    Currently, there is no way to do this from the Library Explorer panel. However, you can remove the Scenario IDs and timestamps from the maps and charts by deselecting them in the chart/map Options:

    Remove Scenario ID from Chart

    Cheers,
    Katie

    katie-birchardkatie-birchard
    Keymaster

    Hi Katrina,

    How have you set up the data for the Transition Pathways > States and Transition Pathways > Transitions datasheets? (If you are working in R or python rather than the User Interface, the internal names for these datasheets are “stsim_DeterministicTransition” and “stsim_Transition”)

    This error can occur if the pathway is going to a state class that has not been defined in the Transition Pathways > States (“stsim_DeterministicTransition”) datasheet for the stratum you are working on. Even if you are not using the “To Primary Stratum” column, you can still get this error as SyncroSim sets the “To Primary Stratum” value to be the same as the “From Primary Stratum” value by default.

    Are you using R or python to build your models? In the User Interface, if you try to add state classes to the Transition Pathways > Transitions (“stsim_Transition”) datasheet that don’t have valid stratum values in the Transition Pathways > States (“stsim_DeterministicTransition”) datasheet, you will get an error while you are inputting your data. However, you don’t get the same validation if you are building your models using R or python.

    Cheers,
    Katie

    in reply to: Pysyncrosim giving R error #22535
    katie-birchardkatie-birchard
    Keymaster

    Thanks! We will go through and make sure all code is up to date for the next documentation release.

    in reply to: Pysyncrosim giving R error #22530
    katie-birchardkatie-birchard
    Keymaster

    Hi Katrina,

    Although you are running SyncroSim from python, the helloworldTime SyncroSim Package is built using an R script and requires the R package rsyncrosim to be installed. I realize that having to install an R package to run the pysyncrosim tutorial is a bit strange. We will update the tutorial in the next week, but in the meantime you can get the scenario to run by first installing the rsyncrosim package in R using: install.packages("rsyncrosim").

    Cheers,
    Katie

    in reply to: Error running Syncrosim with multiprocessing #21947
    katie-birchardkatie-birchard
    Keymaster

    Are you using the latest version of ST-Sim (v3.3.13)?

    You could try moving the library to your C: drive and see if that fixes things.

    Another thing you could try is reactivating your license file from Help > About SyncroSim.

    in reply to: Error running Syncrosim with multiprocessing #21945
    katie-birchardkatie-birchard
    Keymaster

    What ST-Sim version are you using?

    Is SyncroSim installed in the I:\ drive as well?

    This is a strange error that we have never encountered before and cannot recreate on our end. We will try to identify possible solutions and get back to you.

    in reply to: Error running Syncrosim with multiprocessing #21943
    katie-birchardkatie-birchard
    Keymaster

    Looking at your run log, the folder that stores the temporary data doesn’t seem quite right. The part of the path “BlackHills20230517temp” should look like “[library name].ssim.temp”, but it looks almost like a date has been inserted in the folder name. What is the name of your library (i.e. the “.ssim” file)? Have you specified a custom temp folder in the Library Properties > Folders datasheet?

    Also, are you running the library from a network drive? Is it possible to put the library on your C:\ drive and try running from there?

    in reply to: Error running Syncrosim with multiprocessing #21941
    katie-birchardkatie-birchard
    Keymaster

    To help us solve the problem, could you provide the following information:

    1. How did you obtain and install SyncroSim? Were there any email attachments involved (this uses Base64)?
    2. Have you tried anything to fix the issue (e.g. reinstalling SyncroSim)?
    3. What library are you using? Can you run multiprocessing with the most generic ST-Sim template library (Spatial Example)?

    It would also be helpful to provide the run log that contains the error message. Thanks!

    katie-birchardkatie-birchard
    Keymaster

    Unfortunately, the rsyncrosim and pysyncrosim packages do not have built-in folder functions yet. However, being able to create, modify, and access folders in SyncroSim using rsyncrosim and pysyncrosim will become available in an upcoming release. In the meantime, you can use the SyncroSim console commands from R to retrieve a dataframe of existing folder IDs and other folder data.

    Here is a function that uses the SyncroSim console commands to retrieve folder data that you can implement in your script. Note that you will need rsyncrosim loaded to use this function.

    
    library(rsyncrosim)
    
    retrieveFolderData <- function(libpath){
      args <- list(list = NULL, folders = NULL, lib = libpath, csv=NULL)
      tt <- command(args)
      con <- textConnection(tt)
      out <- read.csv(con)
      
      return(out) 
    }
    
    retrieveFolderData("path/to/my/library.ssim")
    

    Similarly, in python you can add this function to your script to retrieve folder data. Note that you will need to import the pysyncrosim and io python packages to use this function.

    
    import pysyncrosim as ps
    import io
    
    def retrieve_folder_data(libpath):
        my_session = ps.Session()
        args = ["--list", "--folders", "--lib=%s" % libpath]
        tt = my_session._Session__call_console(args, decode=True, csv=True)
        out =  pd.read_csv(io.StringIO(tt))
    
        return out
    
    retrieve_folder_data("path/to/my/library.ssim")
    
    • This reply was modified 11 months, 2 weeks ago by katie-birchardkatie-birchard. Reason: Added python example
    in reply to: Defining historic fire distribution from rsyncrosim #21916
    katie-birchardkatie-birchard
    Keymaster

    No problem! We also have a number of tutorials on using rsyncrosim available on the github.io page that are a great resource for getting started in rsyncrosim. If you haven’t found them already, you can access them here: https://syncrosim.github.io/rsyncrosim/articles/a01_rsyncrosim_vignette_basic.html

    in reply to: Defining historic fire distribution from rsyncrosim #21913
    katie-birchardkatie-birchard
    Keymaster

    The “Distributions” datasheet is a SyncroSim Core datasheet rather than a datasheet specific to ST-Sim, so does not appear by default when you run datasheet(myProject) to get the list of available datasheets. To access the list of core datasheets, you can add the summary argument with value “CORE” when running the datasheet() function, e.g. datasheet(myProject, summary="CORE").

    You should see that the Distributions datasheet can be accessed using its internal name “corestime_DistributionType”.

    Another way to find all possible values for a datasheet that has project-scoped validation, such as this one, is to use the levels() function in R. The DistributionTypeID column from the stsim_DistributionValue datasheet is a factor under the hood, so you can see all the values it will accept by calling levels(myDatasheet$DistributionTypeID).

    in reply to: Age Distributions #21842
    katie-birchardkatie-birchard
    Keymaster

    Yes, it is possible for a user to define the age distribution at the start of a run. A few notes about age distributions:

    1. If the age distribution is not set by the user, then the age of each cell is automatically randomized between the starting and ending age of its corresponding state class. For state classes with no ending age, the initial age is set to the starting age.

    2. The user can define the age distributions of a ST-Sim simulation by adding rows with specific age ranges to the Initial Conditions Distribution datasheet. To access these datasheets, select the Scenario Properties from the Library Explorer pane, and navigate to the Initial Conditions tab. Within this tab, there are options to set initial conditions for both Non-Spatial and Spatial simulations.

    3. For Non-Spatial simulations, you can customize the age distributions by accessing the Non Spatial property within the Initial Conditions tab. If you right-click in the Distribution table, a context menu will appear, and you can choose to add the Age Min and Age Max columns to your table. You can then set your desired age distributions for desired combinations of state class and strata. Note that records for the same stratum and state class can be repeated to refine the starting age distribution. Cells in the landscape are assigned to this distribution according to the relative amount column. Once assigned to a specific record, the age of the cell is randomized using a uniform distribution between the Age Min and Age Max values for that record. See an example below:

    4. For Spatial simulations, select the Spatial datasheet within the Initial Conditions tab. In this datasheet, under the Age column, you can select a raster file to set the initial ages for each cell in your landscape:

    in reply to: Run Scheduler #21758
    katie-birchardkatie-birchard
    Keymaster

    Hi Christopher,

    We have fixed the bug in the Run Scheduler in SyncroSim version 2.4.24. You can download the new release from here.

    Cheers,
    Katie

    in reply to: Run Scheduler #21747
    katie-birchardkatie-birchard
    Keymaster

    Hi Christopher,

    It appears there is a bug in the Run Scheduler when used in combination with the Multiprocessing feature. We will work on fixing this for the next release of SyncroSim and notify you when the fixed version is available for download.

    Cheers,
    Katie

    in reply to: Errors running the Omniscape example #21541
    katie-birchardkatie-birchard
    Keymaster

    Hi David,

    Thanks for your perseverance with this issue. It is definitely a strange one!

    First, how did you look at your PATH variable? When viewing the PATH variable from the Windows Control Panel or printing out the results of running “path” in the command prompt, the “.” (dots) are not visible. They are only visible when calling os.environ[“PATH”] from a Python interpreter.

    Second, you were able to import rasterio and pysyncrosim no problem from the Python interpreter because the issue only arises when running omniscape from the SyncroSim User Interface. This is because rasterio is looking for a GDAL DLL in all paths specified from running os.environ[“PATH”] in Python, and when running from the SyncroSim UI, the current directory (i.e., “.”) also contains a GDAL DLL. On import, rasterio enters all paths that contain a GDAL DLL into the os.add_dll_directory() function, including the “.”, which is invalid and results in the error you see here. When running from the Python interpreter, the current directory (i.e., “.”) does not contain a GDAL DLL, so all works as expected.

    Cheers,
    Katie

Viewing 15 posts - 1 through 15 (of 23 total)