-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial research #5
Comments
In order to generate routed streamflow, RVIC has to be run twice. The first run is the "parameters" run - it looks at the watershed uphill from the point you care about and calculates how long it takes rain that falls on each grid square to reach the one you care about. The second run is the "convolution" run - it starts with the equations created in the parameters run, and applies them to rainfall data to calculate the amount of water passing through the grid cell you're asking about at each time point. You could probably make those two runs separate processes. The parameter process usually takes about ten seconds. The convolution process usually takes 10-20 minutes (it can be stopped and restarted, but I've never done that and don't know a huge amount about it). So splitting them up doesn't divide the work evenly. RVIC takes a large number of arguments in the form of a configuration file. (There's a separate one for each of the two processes). You could also have a process to generate the configuration files, or a separate process to generate each one. RVIC theoretically can be called from a python script and passed a dictionary of values, instead of gettng all its arguments from config files, but this isn't well documented and we've never done it here at PCIC. Might be the most convenient approach for this project, though. |
What does the |
Thanks for that rundown @corviday!
Is there ever a time where you would only want to run just one of these processes? Or is it always one then the other to produce the ouptut you want? If the latter is the case I think it would make more sense to have it a single process (at least to start).
This seems like a pretty good idea. Is there code in
You are right in saying that this is probably the best approach for the project. I think taking in a collection of |
I think it converts data from some other format into a format that can be used by RVIC. I don't know much about it, I've never needed to use it.
It would be from scratch. The config files are just a list of
Every convolution run to output routed streamflow data needs a parameter run. I think if you want to generate routed streamflow for the same point, but different climate model outputs - to compare CanESM2 and ACCESS1-0 or something - they could use the same parameter run. The elevations and soil types and all those things that go into the parameter run don't change over time or between different climate models. (On the other hand, it is pretty quick to run parameter, I don't know that there's really a good case for saving its results.) |
It looks like we do not necessarily have to write a process to write a So, we can write a process that allows users to input both:
|
I believe this issue has not been resolved in the most recent version of RVIC. This might be problematic in our future processes. Correct me if I am wrong. |
You are correct; that issue has not been resolved, as far as I know. A fix I used is here. |
Also, I got this error:
I had to change this line from .ix[i, 'names'] to .loc[i, 'names]:
|
@sum1lim Where'd you get that config file? It's not in |
After doing some reading, I think the
I would suggest we create an issue/process for each of these items. Each of these components are called with a There looks to be lots of I have yet to test out the scripts, but that is my next step. Once we have all had the chance to successfully run them I think we can get to work. |
Just my thought from running rvic. I think it would be a lot nicer if we make our own input checking process. For example, if a user mixes up between the input files such as
Since RVIC uses many input files, it is so confusing and easy to mix up between the input files. Therefore, a message that directs users to try another attempt with the inputs in the right order could help them reduce time on running this program. For example, if |
@sum1lim I got that same |
@nikola-rados I can surely do that! |
When I view the sample pour_points csv files through GitHub, it shows proper ERROR:gen_uh_init>> Pour Points File must include variables (lons, lats) or (x, y) when trying to run ['version https://git-lfs.github.com/spec/v1']
['oid sha256:ce13e2314839c6c2a560db0381b32df6e09300f35a0f4591dc256e0690f9610e']
['size 518'] rather than what's shown in GitHub. These were the commands I ran: >>> import csv
>>> with open('samples/pour_points/columbia_sample_pour_points.csv') as csv_file:
... csv_reader = csv.reader(csv_file, delimiter=',')
... for row in csv_reader:
... print(row)
... Does anyone know why the output would be different? |
Hmmm, I'm not sure. @corviday do you have any ideas? |
@sum1lim and @eyvorchuk I have assigned issues to each of you. Once we clear up some of the running issues I will close this issue and you can begin working on the processes. |
@eyvorchuk yeah, I have the same problem. The csv file is corrupted somehow. You probably want to just copy and paste the content you see in gitHub and make a new csv file. |
I think it'd be good to put |
Unfortunately, I have found out that the ability to pass dictionary into RVIC has not been applied to the latest version 1.1.0.post1. We will probably have to wait until version 1.1.1 is released. Currently, we only can pass config files at the moment.
Also, my PR is still pending yet. |
That's fine we can add that in later once they get around to it. Maybe you can @ the lead developer over there to get their attention. It looks like the repo hasn't been touched in a while so they may not have seen your request. |
We need to figure out how to break down the
RVIC
tool into usablewps
processes. Explore the code and try to come to up with a few pathways for us to follow. Once we have sorted some of our ideas out we can create new issues and begin work.Please post any notes/thoughts/discussion in this issue thread.
The text was updated successfully, but these errors were encountered: