Guide for updating to Pastas 1.0 (Arrabiata) and dealing with older pastastores. #83
dbrakenhoff
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Pastas 1.0 (Arrabiata) is now available (Feb 6th, 2023), and this version introduces some breaking changes to loading models created with older pastas versions. This guide is for people who want to upgrade pastas to the latest version but who have databases created with older versions of pastas.
Updating pastastore
First of all, update pastastore to version 1.0. This newest version of Pastastore supports all recent versions of pastas (and the last three versions, 0.22.0, 0.23.1 and 1.0.0 are actively tested), so you can do this without having to worry about anything breaking.
Check your pastas and pas-file versions
My pas-file version is 0.22 or lower.
There are two options to update to pastas 1.0. The first option is the easiest and is recommended, but does require you to rerun the scripts that built the models. If this is not an option, then go to option 2.
Option 1: re-run scripts to build models (recommended)
Re-run the script to build the models. Prior to that, is probably advisable to re-run the scripts to load time series into the pastastore as well. You will probably run into some errors related to pastas 1.0 that will need to be solved. The following list will give you some ideas of the things that can go wrong, but the error messages you get should also be helpful in solving any issues you run into.
pastas.validate_oseries(oseries)
andpastas.validate_stresses(stress)
should provide helpful info on how to pre-process your time series so that they can be used to create pastas models. These checks are also used by pastastore, so adding time series to your database will tell you if your time series need to be pre-processed.rfunc=ps.Exponential()
, andsolver=ps.LmfitSolve()
(note the brackets).pastas.TimeSeries
object is now an internal pastas object and should not be used. Passpandas.Series
to stressmodels instead.pastas.read
module is deprecated, usehydropandas
instead.Once you've added the time series to the pastastore and re-run the model building script, you're good to go!
Option 2: let pastas update the pas-files
pastas.validate_oseries(oseries)
andpastas.validate_stresses(stress)
should provide helpful info on how to pre-process your time series so that they can be used to create pastas models. These checks are also used by pastastore, so adding time series to your database will tell you if your time series need to be pre-processed.My pas-file version is 0.23.X
These files can be loaded by pastas 1.0, so the steps are simple.
Beta Was this translation helpful? Give feedback.
All reactions