Page 1 of 1

Please, help

Posted: Wed Apr 03, 2019 6:11 am
by sankee82
I am also facing similar issue. The value of my stock i.e., Soil Moisture is increasing rapidly and it has reached unimaginable values. And the model is showing a Floating point error after Timestep 64 for the flow Deep Percolation. I am unable to figure out why is this happening. I am attaching my model. Please help me.

Thanks and Regards,
Sankeerthana

Re: Please, help

Posted: Wed Apr 03, 2019 8:21 am
by Administrator
You've got some levels going negative which is what is causing the problems.

For example, change
irrigation application rate = 1045/180
to
irrigation application rate = MIN ( Water Available For Irrigation / TIME STEP , 1045/180 )

This is the same as
irrigation application rate = IF THEN ELSE ( Water Available For Irrigation > 1045/180 , 1045/180 , Water Available For Irrigation / time step)

This makes sure that you do not remove more from the stock than is in the stock.

You need to do this for all stocks in your model. "Surface water storage", "water available for irrigation" and "groundwater storage" are easy, but "soil moisture will take a little more thinking about as you have four flows out of the stock.

Re: Please, help

Posted: Wed Apr 03, 2019 1:09 pm
by tomfid
Also, as a general practice, you should not bury numbers that have dimensions in your equations. Each item (1045, 180) should be made a separate named variable with units.