Adding Vegetation zones to SNOW-17 - lookup table or vector?

Comments

4 comments

  • Avatar
    Lindsey Rotche

    I did just realize my issue with the selector is that I had to change the type to scalar, not vector

    0
    Comment actions Permalink
  • Avatar
    Jason

    Lindsey,

    Thanks for writing in our forum. I'm glad you found the issue. But I wonder if there is by chance, a better way than the Selector. Perhaps you could do this using a "vector constructor function". (for more information about vector and matrix constructors, go here: Defining Arrays in an Input Field Using Array Constructor Functions)

    I'm not sure this is exactly what you need but here is a way to get your melt factor from a vegetation table that also is based on elevation: 

    ...where Veg_Table is a Data vector:

    Melt_Factor_Table is:

    Finally, the Melt_Factor_V expression uses a vector constructor:  

    Note the key here is to use the keyword "row" that references each of the items of the vector, which in this case, correspond to each of the elevation zones. 

    Does that make sense?

    Please let me know if you have any other questions.

    -Jason

    0
    Comment actions Permalink
  • Avatar
    Lindsey Rotche

    Hi Jason,

    This is definitely helpful, but I'm still struggling.

    1. I have used the vector "zones" to create a table for elevation and to create a table for vegetation. Are those now connected in the mind of goldsim?

    2. I believe that vector constructor is doing the following. Please correct me if I'm wrong:

    We once again choose the vector "zones" which should be already connected to elevation and vegetation

    Then it's saying to create a vector based off Melt_Factor_Table, linking that to the veg table:

    So does the vector being created look like this?

     

    Index

    Result

    1

    0.99

    2

    0.85

    3

    0.7

    3. I am trying to edit this in the SNOW-17 python code and saw that I had to change that to a vector. This is what I have (Max_Melt_Factor is the same as Melt_Factor_V fyi)

    0
    Comment actions Permalink
  • Avatar
    Jason

    Lindsey,

    Yes your result should be as you suspected: [0.99, 0.85, 0.7]. However, in the case you show above, you actually don't need to do that vector constructor because the fact that you are using the "zones" array label set means that the vector of Melt_Factor_Table values is already set up by elevation zone. To your question, "Are those now connected in the mind of goldsim?" the answer is yes. This is because you've assigned each value to each zone in that original data vector. Does that help?

    0
    Comment actions Permalink

Please sign in to leave a comment.