Jump to content
GMS, SMS, and WMS User Forum
Jonas

PEST, SVD and SVD-assist

Recommended Posts

I often experience problems when running a PEST parameter estimation model with SVD-assist. I find it quite arbitrary when it work and when it does not work. For some occasions it seems to work just by moving the modelling files to another computer and run the model on that workstation. For my current model, SVD works but SVD-assist does not. To reach reasonable results with NSMC is even more problematic, in particular for transient models. I run the latest nightly build and NWT as solver. 

Someone with similar experiences or suggestions to a more streamlined and stable model procedure? 

Share this post


Link to post
Share on other sites

This is what typically happens when running with SVD-assist. As can be seen from the blue marked line, PEST is able to reduce the error to 98.885 from the initial error of 155.76. But, then something goes wrong since this solution never comes up as a iteration before the parameter estimation is finished.

SM13t7.PNG

Share this post


Link to post
Share on other sites

Hello Jonas,

from my humble opinion it looks like PEST is doing its job well. It decreases Phi to 63.5% and finish optimisation after one iteration since NOPTMAX is set to 1.Which is probably correct if you try to do NSMC analysis.

The reason it does not load solution into GMS may be a GMS glitch. What I think is happening, when PEST is run using svd-assisted inversion it does not carry the final model run using the best parameter values. As is described in the manual to PEST, it is encouraged for the user to do it him/herself using the PARREP utility and setting NOPTMAX to 0 in the PEST control file. So I am guesing that GMS does not do this for you. It would be best if someone from the GMS devs looked into it.

Kind Regards

Michal

Share this post


Link to post
Share on other sites

Thanks for your quick reply Michal, 

I agree on that it seems like PEST is doing its job but GMS does not read in the result properly. But I can't find the reason for this since the same modelling procedure has worked for other models. Quite frustrating.

How do use the PARREP utility? Should I use it outside of GMS interface?

Kind regards,

Jonas

Share this post


Link to post
Share on other sites

Hi Jonas.

I’ve experienced similar unusual responses when using PEST within GMS, with and without SVD and SVD Assist.  Sometimes PEST will reduce my error nicely; other times it gets nowhere.  Yet, when it goes nowhere I can manually adjust parameters myself and reduce the error.  I’m not sure of the reasons, but it may be related to GMS and it writing the MODFLOW files from pilot points.  I’ve had particular problems using kriging interpolation, so much so that I have now switched to IDW interpolation. While I now have less problems, I still experience unusual PEST behaviour.

It’s a problem I’ve experience on and off for several years now.  I’d be interested to see if others have had any similar problems.  My models are with Aquaveo support, but the problem can’t be consistently repeated, so it is difficult to fix.

Have you tried importing the optimal parameters from the PEST run into another forward run?  Perhaps PEST is writing the new *.par file o.k., but GMS is not updating the screen with the final result (I note GMS’ printing of the *.rec file shows a mixed up version of the actual *.rec file).  Try importing the *.par file and running a forward run (saving as a new model name in case something goes weird) then see how the new result looks.

Regards,

Julian

Share this post


Link to post
Share on other sites
On 14. 6. 2017 at 2:54 PM, Jonas said:

Thanks for your quick reply Michal, 

I agree on that it seems like PEST is doing its job but GMS does not read in the result properly. But I can't find the reason for this since the same modelling procedure has worked for other models. Quite frustrating.

How do use the PARREP utility? Should I use it outside of GMS interface?

Kind regards,

Jonas

If it is the case, that there is a bug in gms, so that it does not perform the final model run with the best parameter values stored in the case.bpa you would probably have to move the entire analysis out of GMS. I would suggest you to look at http://www.pesthomepage.org/. There you will find some guidelines on how to formulate the problem for the NSMC analysis to get the desired results.

The usage of parrep utility is prety simple, it is command line utility, so since it is in your environment PATH variable you can run it from CMD:

parrep parfile.bpa case_orig.pst case_new.pst

The common framework for any NSMC analysis would be to manualy generate random parameter sets with the randpar utility then to project these sets into the solution space using pnulpar. Then runing PEST for each projected parameter set with 1 or 2 optimisation iteration to account for model nonlinearities and colect the best parameter values (.bpa files). Finaly you may run the model with these parameter sets to collect the predictions of interest.

Edited by Michal

Share this post


Link to post
Share on other sites

Thanks Michal and Julian for your replies. Eventually I might end up running PEST outside of GMS if it does not work.

I managed to get a parameter estimation run with svd-assist to work. I also managed to get a PEST NSMC run to work. But, when I want to repeat the procedure with fixed pilot points I get a message: "Cannot find sm20s20000_random_nul1.par". I cannot find the corresponding file in the folder of the model file neither. As I wrote in my first post I find it quite arbitrary when PEST works together with GMS. I would be happy with a response from someone from GMS's developing team on this issue. 

Share this post


Link to post
Share on other sites

 The exact error message while running PEST with NSMC is "cannot open parameter value file m20s20000_random_nul1.par". If someone has an idea on this error message it would be very appreciated. 

Share this post


Link to post
Share on other sites

Now I try to run the RANDPAR utility in the command prompt but get the error message "Cannot open covariance matrix file hk_12.matrix." 

Share this post


Link to post
Share on other sites

Hi Jonas,

If you try to generate random parameter values with this utility you have to decide how to describe the variability in the generated values. If you choose, that random values should obey (log)normal distribution you must specify its properties for each ajustable parameter (e.g. uncertainty of that parameter). This is done by specifing uncertainty file (see section 2.5 in PEST manual part II). Within this file uncertainties can be supplied on a parameter-by-parameter basis; alternatively one or a number of parameter covariance matrices can be supplied. If you want to avoid all this, try selecting (log)uniform distribution for the random values. Then you should be able to generate the uniformly distributed values without any problems.

 

Hope it makes sense :)

Edited by Michal

Share this post


Link to post
Share on other sites

Thank you again Michal. Now I was able to follow your suggested procedure with a fixed pilot point in the NSMC tutorial and it worked out quite good. Please refer to my other thread on this matter.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×