Steve Markstrom: Hi.
I’m going to give a quick demonstration of how to use some of the features in the
PRMS GUI, the package that comes with the PRMS distribution.
I showed a little bit of this in the ‘Quickstart’ video and I’ll go into a little more detail
here.
Here you can see I’m using the same ACF project folder that I used in that previous
video and I’m going to start the GUI once again here.
Just by double-clicking on this batch file.
So here you can see, if it doesn’t actually work for you, if this GUI doesn’t start
up when you double-click on the batch file.
This is the line right here that you need to work on.
And the main thing here is this program runs in Java so you have to have Java.
The current version of Java, right now at the time of this video, its 1.7 something.
You need to have that installed.
You’ll probably have to get your system administrator to help you out with that if
you don’t have the correct or the necessary permissions to install that.
Then, if you start reordering folders around to other places, you may have to come in here
and edit some of these paths.
So this is where the GUI jar is.
This is the path to your control file.
So if any of these…
These are expressed as relative paths here.
If any of these paths change, or you don’t have Java installed, or whatever, you may
have to come in here and work on this a little bit.
But it’s just this one line and all of this stuff is pretty straight forward.
Basically, we’ll just go through this.
Here’s where you can specify a data file, the parameter file and a control file.
A lot of times what people will do is they may load a different control file from the
command line.
The control file has paths for both the data file and the parameter file specified inside
of it.
So usually what people do is they may change their control file and make sure the control
file has these paths specified correctly.
One thing I want to show here is that, a little feature called ‘ParamTool’.
And this is ParamTool.
What it is basically a GUI editor for the parameter file.
And again, the way I got it was to click on Edit and then chose this first thing ‘Edit
Parameters & Dimensions’.
And you can see the ParamTool that came up.
All right, so we’ve talked about dimensions.
And we know that the dimensions are specified in the parameter file.
So if you want to change any of the dimension sizes in the parameter file, you can edit
them here.
One of the things you might want to do is edit the size of the dimensions.
And basically, you can edit these cells, type in a number.
And what that will do is that will change the dimension specification at the top of
the parameter file and likewise, it will also resize all of the arrays that have that dimension,
associated with that dimension.
So, if I change the number of HRUs, all of the parameters that are dimensioned by HRU
will have their arrays resized.
So be a little bit careful if you do that.
OK, another thing we can do with the ParamTool is click on this leaf here and what we see
are ‘Parameter Values by Dimension’.
OK, say I want to look at all of the parameters that are dimensioned by HRU.
Click on that leaf in the tree.
Make this a little bigger.
You see the name of the parameter at the top.
And this is just a table of all of those parameters that are dimensioned by NHRU in alphabetical
order.
If we scroll down, you can see the number of HRUs is 258, so on that previous dimension
page, if I would have resized the dimensions, you’d see a different number down here.
So, some of the things we can do is click on a cell, you can edit… just change the
number in the cell.
You can select a block and then come up here to these…
if you click on ‘Copy’ and then it’ll say ‘Input a Value’, say five.
The values that were in that block have been changed to five.
I can choose that again.
Say ‘Multiply’ by 10.
OK, so some basic spreadsheet type functionality.
There is a ‘Cut and Paste’ function enabled so that you can cut and paste values between
this tool and excel.
However, that option does not always work for everybody and on some systems it works
and on some systems it doesn’t and we really haven’t been able to figure out why.
Hopefully, if that’s a function that you want to do, then it will work for you.
A couple of these other buttons up here, so if I pick a cell and I say ‘Columns’ then
it will select that, the column that I’ve selected.
Likewise the row, it will select that row.
This next button ‘Fixit’, sometimes a particular parameter file can get out of sync
with PRMS.
Either there’s a new version of PRMS or you’re using an old version of a parameter
file.
A parameter file that was made for a previous version of the executable.
Or you may change the modules that you’re using to simulate a particular process and
then the parameters could change based on that different selection.
This button ‘Fixit’, what this will do is in a programmatic way, it will make you
parameter file compatible with the module selection and the current version of the executable
that you are running.
The version of the executable you are running.
And what it will do is chop out parameters, it’ll add parameters, it’ll resize things,
it will reset values so they are within the correct range, the specified parameter range.
This is not a subtle thing.
Very often if you take a parameter file that you’ve done a lot of work on -- estimating
parameter values, using external data sources, computing things in GIS or excel and then
pasting values in – if you run ‘Fixit’, a lot of times you could lose all of the work
you’ve done.
So if you’re going to run this ‘Fixit’, I would definitely suggest running it very
early in the process of setting up the parameter file for your basin.
I’m not going to show that here, but that’s what the ‘Fixit’ button does.
‘Report’, if you click on ‘Report’, basically what this does is it just gives
you a little summary of what’s in your parameter file.
Here you can see the name of the parameter file that I’m using.
The dimension sizes and then it just lists all the parameters that are in the file, the
size, how many array values there are, and then mean, min, max.
Sometimes this is helpful for identifying bad values.
One thing you can do is to compare two parameter files to each other.
In this case what I’ll do is to choose the parameter file from the Merced because I know
that will be very different.
OK, so this is a ‘Difference’ report.
When I compare those parameter files, you can see file one is from the ACF and file
two is from the Merced.
You can see that there are some dimensions that are in one file that are not in the other
file.
There are some dimensions that have different sizes.
Which is totally what we would expect.
And then basically you can see parameters have different values.
So this isn’t maybe that useful example, comparing an ACF file to a Merced file, but
if you’d been working with PRMS for a while, you’ll definitely end up with multiple versions
of a parameter file and as you get better and better estimates of parameters, you’ll
have multiple copies of the same file.
It’s not uncommon that at some point, after you’ve been making changes, some change
you made breaks the file.
Maybe what you want to do is compare your latest version of a parameter file to the
previous version to see what you did to break it or how the files actually differ.
You’re getting very different model output and you can’t remember exactly what you
did to the file.
You can run this difference report and you’ll see what the differences are pretty quickly.
‘Compare to Defaults’ basically what this does is runs a difference report against the
defaults.
‘Describe’ basically whatever is highlighted in the table will be described.
OK, say you make all of these changes or make some changes to your parameter file.
You can come in here and none of these changes actually take effect until you actually save
the values to a file.
So if you want to overwrite the current file that you’re working on, click ‘Save’.
If you want to make a new version of the file, click ‘Save As’.
OK, now I’m going to demonstrate the model running.
And I’m not going to save what I just did to this file because the model probably won’t
run.
So I’m just going to exit ParamTool without saving and at that point, nothing I did has
been saved.
The next thing I want to show is the run tool – run control window.
We’re going to start here with the time info window.
You can see the column that says data start and data end.
The data in the data file starts in 1949 and ends in 2009.
And then these columns here, model start and model end, this dictates the period that we’re
actually going to run the model.
The next thing to look at are these run time graphs.
When you start the model running, these are the graphs that actually popup and plot out
values while the model is running.
What I can do is look at the variables that are selected for graph number one.
So, runoff 36, this is the 36th column of runoff from the data file, basically observed
streamflow information in the 36th column and I’m comparing it to the outflow in segment
130 in my model.
This list over here is every variable that’s declared in any module.
And what I can do is pick a variable, so if I click on that and then choose – albedo
is an index -- the number of HRUs.
If I choose HRU number 5, then I’ve just added that variable to this plot.
It’s not going to make much sense to plot albedo with measured and simulated streamflow,
so I’m going to remove it.
And that’s how you remove it, just click on it in this list and it will go away.
If there’s something over here and you don’t know what it is, you can click on the value
and then click describe.
It’ll tell you what that variable is.
“Basin area weighted average actual ET.”
So that’s what this is.
That’s plot number one.
Then I can look at plot number two.
“GW flow, surface runoff, subsurface flow”.
This is components of flow.
Another nice plot to have.
I’ll cancel that one.
So I’m set up right now for two plots.
I’ll click on this and now I’ve got three plots.
Three run time graphs.
Because I just added this plot, it’s empty.
So what I’m going to do is plot actual ET and potential ET.
Area weighted averaged over the basin area.
I just added those two variables to the plot.
When I run it now you’ll see that I have three plots come up with those variables in
them.
‘Variable init’ and ‘Variable save’, unless you know why or what you’re doing,
leave those off.
You can read about this in the manual.
The statvar file – here’s where you can change that.
You’ve got another selector very much like the run time graphs.
And you can basically choose variables to basically output as time series in the statvar
file.
And here we’ve got four of them, ‘basin_cfs’, basin potential ET, solar radiation and runoff.
That goes to the output file.
The statvar output file.
There’s another option here, the animation file, you can look at that.
That’s enough talk here.
I’m going to start it.
So I clicked the ‘Start’ button and then what you see here is a command line, the GUI
actually generated this command line and dumped it out in this window.
You could copy that command line and then just run it yourself on the command line and
run PRMS without any of the GUI.
Something you could do.
That’s actually kind of a useful thing to do if you want to write some scripts.
Scripting with PRMS.
Here you can see, these are the three run time graphs that we said we wanted.
The top one is observed and simulated runoff.
Second one are the components of flow – baseflow, surface runoff, and subsurface flow.
Those are in this plot.
These three sum together to give the simulated outflow, seg_outflow above.
And then this last plot we added, actual and potential ET for the basin is down here.
That’s just added.
This is going to run, you can see years.
As the model is running it’s putting up, adding the daily time step values to the plot.
This is going to run through 7-14-1994, kind of weird dates, but that’s what we’ve
got.
It’s just about done here.
So I’ll just let this keep running.
You can see what this looks like when it’s done.
OK.
So there.
So we hit that final date in the file.
There’s the output.
These run time plots, if you click with your left button, you can zoom in to a period.
All the graphs zoom in.
So I can zoom in down here.
You see now we’ve zoomed into the point where we can see individual days.
You can zoom back out by right-clicking, come to auto-range, say both axes.
That’s the main kind of control.
Typically what we might do is save one of these plots, make this run, then go back into
the parameter tool, change some parameters, make the run again.
Then you can compare this plot to the previous one that you generated.
To see what the effect of changing a parameter is, for instance.
That would be a typical thing you could do.
I think that’s all I’m going to show about the GUI right now.
This has gotten long enough.
So that concludes this PRMS training video.