How to apply calibrated parameters

137 views
Skip to first unread message

Saeed Golian

unread,
Sep 5, 2024, 2:37:44 PMSep 5
to SWAT+ Toolbox
Hi all,

I have a question: After model calibration how one can replace the original values with calibrated parameters? Is there any straightforward way to do so?

Thanks in advance,

Kind regards

Saeed

Celray James

unread,
Sep 5, 2024, 7:34:51 PMSep 5
to SWAT+ Toolbox
After calibration, the parameters are applied to the calibration scenario automatically. If you want to export them back to SWAT+ Editor, you can use the export function

Saeed Golian

unread,
Sep 12, 2024, 12:25:31 AMSep 12
to SWAT+ Toolbox
Hi Celray,

Thanks for your response. Can I ask what should one do to apply the calibrated parameters to the default model (and not the calibration scenario)? I mean after model calibration, how one can assure that the calibrated parameters are now applied to his/her model for the rest of their project, e.g. if they wanna apply future climate data to the calibrated model.  

Thanks 
Saeed

Saeed Golian

unread,
Nov 11, 2024, 12:25:45 PMNov 11
to SWAT+ Toolbox
Hi all,

I am still didn't get any way to apply the calibrated parameters (from Auto-Calibration) to the default model, e.g. the cn2 is now should be -30% less, how we can apply this to the original cn2 values? Is there any way we can do it?

Kind regards

Saeed

Saeed Golian

unread,
Nov 12, 2024, 6:40:38 AMNov 12
to Celray James, SWAT+ Toolbox
Hi,

Thanks for getting back to me and your response. But I still have lots of understanding issues and confusion on how the calibrated parameters can be applied (e.g. be replaced) to the original model and the results be seen in QSWAT+? I still cannot understand how the choice of different names and folders on the Run page of SWAT+Toolbox can be used later to see the results of a model run using, for example, the calibrated parameters? When I open QSWAT+, there is no way to visualise the calibrated model results as there is only one option to select (Default) (Please see the following figures). 

I'd really appreciate it so much if you can make it clear to me and also many others on how the model with calibrated parameters can be read, run and its outputs be visualized in QSWAT+ and SWAT+Editor (In SWAT+Editor, I am interested to run the model using calibrated params from SWAT+Toolbox and run the 'SWAT+ Output Check' to see hydrology cycle and other components after model calibration).

Thank you so much in advance for your help.

Kind regards

Saeed



image.png




image.png

--
You received this message because you are subscribed to the Google Groups "SWAT+ Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sptoolbox+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sptoolbox/077eb11a-da20-4516-b210-05a94c3e1ccdn%40googlegroups.com.

Andreé Hidalgo Ravelo

unread,
Nov 19, 2024, 4:18:19 PMNov 19
to Saeed Golian, Celray James, SWAT+ Toolbox
You can create scenarios in both Swat+ Editor and Toolbox. 
The Swat Editor's way is within QSWAT+ Documentation. 
The other (Toolbox) is simply filling a name in New Scenario name, and then clicking Create Scenario to clone the selected one (Calibrated or Default scenario).

You can change Calibration Scenario by Default (original project) in Selected Scenario Tab, if you do so, probably your export model would be your original model.
But I've not proven the export model option yet.

Regards.



Saeed Golian

unread,
Nov 20, 2024, 4:38:46 AMNov 20
to Andreé Hidalgo Ravelo, Celray James, SWAT+ Toolbox
Hi Andree,

Thanks for your response. I know we can create different scenarios etc, but my question is how the created scenario can be read/used in QSWAT+ under the 'Visualization' tab. 

My other question is that when the model is calibrated, how can it be used for another application (I mean with calibrated parameters)?  where and how a calibrated model in SWAT+Toolbox can be called/opened in SWAT+Editor?

I would really appreciate it if you can help.

Kind regards

Saeed

Chris George

unread,
Nov 20, 2024, 8:09:46 AMNov 20
to Saeed Golian, Andreé Hidalgo Ravelo, Celray James, SWAT+ Toolbox
I can answer the first question. Provided the new scenario is a folder
within the Scenarios folder it will appear as an option under choose
scenario in the visualisation form. It needs to contain a folder
Results containing a number of shapefiles and a results database called
swatplus_output.sqlite.

Chris

On 11/20/2024 9:38 AM, Saeed Golian wrote:
> Hi Andree, Thanks for your response. I know we can create different
> scenarios etc, but my question is how the created scenario can be read/
> used in QSWAT+ under the 'Visualization' tab. My other question is that
> when the model is calibrated,
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
> ZjQcmQRYFpfptBannerEnd
> Hi Andree,
>
> Thanks for your response. I know we can create different scenarios etc,
> but my question is how the created scenario can be read/used in QSWAT+
> under the 'Visualization' tab.
>
> My other question is that when the model is calibrated, how can it be
> used for another application (I mean with calibrated parameters)?  where
> and how a calibrated model in SWAT+Toolbox can be called/opened in
> SWAT+Editor?
>
> I would really appreciate it if you can help.
>
> Kind regards
>
> Saeed
>
> On Tue, Nov 19, 2024 at 9:18 PM Andreé Hidalgo Ravelo
> <taki...@gmail.com <mailto:taki...@gmail.com>> wrote:
>
> You can create scenarios in both Swat+ Editor and Toolbox.
> The Swat Editor's way is within QSWAT+ Documentation.
> The other (Toolbox) is simply filling a name in New Scenario name,
> and then clicking Create Scenario to clone the selected one
> (Calibrated or Default scenario).
>
> You can change Calibration Scenario by Default (original project) in
> Selected Scenario Tab, if you do so, probably your export model
> would be your original model.
> But I've not proven the export model option yet.
>
> Regards.
>
>
>
> El mar, 12 nov 2024 a la(s) 12:40 p.m., Saeed Golian
> (saeed....@gmail.com <mailto:saeed....@gmail.com>) escribió:
>
> Hi,
>
> Thanks for getting back to me and your response. But I still
> have lots of understanding issues and confusion on how the
> calibrated parameters can be applied (e.g. be replaced) to the
> original model and the results be seen in QSWAT+? I still cannot
> understand how the choice of different names and folders on the
> Run page of SWAT+Toolbox can be used later to see the results of
> a model run using, for example, the calibrated parameters? When
> I open QSWAT+, there is no way to visualise the calibrated model
> results as there is only one option to select (Default) (Please
> see the following figures).
>
> I'd really appreciate it so much if you can make it clear to me
> and also many others on how the model with calibrated parameters
> can be read, run and its outputs be visualized in QSWAT+ and
> SWAT+Editor (In SWAT+Editor, I am interested to run the model
> using calibrated params from SWAT+Toolbox and run the
> 'SWAT+ Output Check' to see hydrology cycle and other
> components after model calibration).
>
> Thank you so much in advance for your help.
>
> Kind regards
>
> Saeed
>
>
>
> image.png
>
>
>
>
> image.png
>
> On Fri, Sep 6, 2024 at 12:34 AM Celray James
> <celray....@gmail.com <mailto:celray....@gmail.com>>
> wrote:
>
> After calibration, the parameters are applied to the
> calibration scenario automatically. If you want to export
> them back to SWAT+ Editor, you can use the export function
>
> On Thursday 5 September 2024 at 13:37:44 UTC-5
> saeed....@gmail.com <mailto:saeed....@gmail.com> wrote:
>
> Hi all,
>
> I have a question: After model calibration how one can
> replace the original values with calibrated parameters?
> Is there any straightforward way to do so?
>
> Thanks in advance,
>
> Kind regards
>
> Saeed
>
> --
> You received this message because you are subscribed to the
> Google Groups "SWAT+ Toolbox" group.
> To unsubscribe from this group and stop receiving emails
> from it, send an email to
> sptoolbox+...@googlegroups.com
> <mailto:sptoolbox+...@googlegroups.com>.
> To view this discussion on the web, visit https://
> groups.google.com/d/msgid/sptoolbox/077eb11a-da20-4516-
> b210-05a94c3e1ccdn%40googlegroups.com <https://
> urldefense.com/v3/__https://groups.google.com/d/msgid/
> sptoolbox/077eb11a-da20-4516-
> b210-05a94c3e1ccdn*40googlegroups.com?
> utm_medium=email&utm_source=footer__;JQ!!KwNVnqRv!EBSF-
> YGOSyuf99KYWr78TT0WxIBdR6ZIjLv0Q3dooHrQ48n7HDiR3dP1WckEBCNBAPr4l1cSvUMmvUxiqrHQ_bc$>.
>
> --
> You received this message because you are subscribed to the
> Google Groups "SWAT+ Toolbox" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to sptoolbox+...@googlegroups.com
> <mailto:sptoolbox+...@googlegroups.com>.
> To view this discussion, visit https://groups.google.com/d/
> msgid/sptoolbox/CAPxL8eOxReHcO5p%3Du4UBo-
> m_fYmAA%3DWN%3DJV2aNejaxu%3D9kFqFg%40mail.gmail.com <https://
> urldefense.com/v3/__https://groups.google.com/d/msgid/sptoolbox/
> CAPxL8eOxReHcO5p*3Du4UBo-
> m_fYmAA*3DWN*3DJV2aNejaxu*3D9kFqFg*40mail.gmail.com?
> utm_medium=email&utm_source=footer__;JSUlJSU!!KwNVnqRv!EBSF-
> YGOSyuf99KYWr78TT0WxIBdR6ZIjLv0Q3dooHrQ48n7HDiR3dP1WckEBCNBAPr4l1cSvUMmvUxihUFca40$>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "SWAT+ Toolbox" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sptoolbox+...@googlegroups.com
> <mailto:sptoolbox+...@googlegroups.com>.
> To view this discussion, visit https://groups.google.com/d/msgid/
> sptoolbox/
> CAPxL8eMUnX%3DsTQZen1k7a3pQzEZvAdV5zk%3D7Jfjs7ZV7CyC67g%40mail.gmail.com
> <https://urldefense.com/v3/__https://groups.google.com/d/msgid/
> sptoolbox/
> CAPxL8eMUnX*3DsTQZen1k7a3pQzEZvAdV5zk*3D7Jfjs7ZV7CyC67g*40mail.gmail.com?utm_medium=email&utm_source=footer__;JSUl!!KwNVnqRv!EBSF-YGOSyuf99KYWr78TT0WxIBdR6ZIjLv0Q3dooHrQ48n7HDiR3dP1WckEBCNBAPr4l1cSvUMmvUxia26oA0c$>.

SWAT+ Toolbox

unread,
Nov 20, 2024, 3:41:15 PM (14 days ago) Nov 20
to SWAT+ Toolbox
Hi Andree,

It is important to understand how parameters work in SWAT+ compared to SWAT2012.

there are parameters that are for specific objects but are linked in other files one-to-one while some parameters are references to common values (many-to-one). Here is how that works: let us say you want to know the ESCO, PERCO, and CN2 for HRU 1. The first two are straight forward because there is a relationship of 1-to-1 link between the file hru-data.hru (column hydro) and hydrology.hyd where you can see all the default parameter including ESCO and PERCO. However, if you want to find CN2, you check the lu_mgt column in hru-data.hru, and then check the landuse management name in landuse.lum file in column cn2. Even then you get a pointer name to file cntable.lum and based on soil hydrologic group, you get your default cn2 value for that HRU which is also shared by other HRUs that have similar land use (and soil hydrologic group).

You can now see that parameters are spread in many files, but what makes SWAT+ different is that you can manage all parameters from one file called calibration.cal. when you calibrate, SWAT+ reads the default parameters from all those places and then checks the existence of calibration.cal. If the file exists, SWAT+ reads it and adapts the default parameters accordingly. for example if CN2 has pctchg of -10% for HRU1 in the calibration.cal it will read the corresponding value and then apply the 10% decrease and the final calculated parameter will be used in the simulation. Thus, the difference between a calibrated model and a non-calibrated model could be as simple as removing the calibration.cal file from a calibrated model. In essence, the parameters in your calibration.cal file are your calibrated parameters and your 'final' parameters for each object are calculated on-the-fly as the model runs.

When it comes to parameters in scenarios, the parameters that are used are the calibrated ones from which you create a new scenario. In the 'run section', you can clone your calibration scenario and use that to run another period in the future or use different management. if you run the model as long as you do not remove the parameters in the parameters section, you are using the calibrated parameters. And if you want to run your scenarios in SWAT+ Editor, you can use the export feature to export the parameters to your Editor project database.

Keep in mind that you can export Raster maps in SWAT+ Toolbox and you can export time series too for making plots in excel.

With kind Regards,
Celray James CHAWANDA

Saeed Golian

unread,
Nov 21, 2024, 6:33:45 AM (13 days ago) Nov 21
to SWAT+ Toolbox
Hi Celray,

Thanks for clarification. Can I ask how I can export the calibrated model in a way that I can open it in SWAT+Editor? As shown in this figure, when I choose Export Paramaters, it will add a table to the sqLite database (which I am not sure how the calibrated exported parameters can be called in future model run in SWAT+Editor). The other option is to export the Project which creates a file with sptp extension, which again I am not sure how it can be opened (if possible) in SWAT+Editor.

Also for CN2, suppose the optimized percentile change is -30%, how this exported params/project of the calibrated model will exert this on original CN values? 

I'd appreciate it so much if you can clarify this as well.

Kind regards

Saeed


image.png

Saeed Golian

unread,
Nov 22, 2024, 7:26:02 AM (12 days ago) Nov 22
to SWAT+ Toolbox
Hi Celray,

Just a quick update based on your instructions. I tried to copy/paste the files calibration.cal and cal_parms.cal to the original Default folder where SWAT+Editor project is reading the TxtInOut files, but the outputs are the same before and after adding these two files to the project directory. Would you please advise if I am missing something here?

Thank you so much in advance,

Kind regards

Saeed

On Wed, Nov 20, 2024 at 8:41 PM SWAT+ Toolbox <spto...@googlegroups.com> wrote:

Celray James

unread,
Nov 22, 2024, 8:47:42 AM (12 days ago) Nov 22
to SWAT+ Toolbox
Yes, you missed this part: "...And if you want to run your scenarios in SWAT+ Editor, you can use the export feature to export the parameters to your Editor project database".

in case you want to use copy/paste as you did, then you should uncheck the "Write Files" before "Run SWAT+".

Sent from my Galaxy
Reply all
Reply to author
Forward
0 new messages