Parking Lot test issue - slope problems

37 views
Skip to first unread message

Xiaojie Li

unread,
Jul 31, 2025, 5:28:48 PMJul 31
to ParFlow
Dear All,
I am a new learner of the ParFlow model. To check whether the slope files I generated from a DEM are correct, I attempted to run the Parking Lot Test Example script. However, the simulation failed to converge. According to the .out.kinsol.log file, the KINSol return value is 8 (please see the log excerpt below). 

I am using the Docker JupyterLab environment. I followed the instructions from the github PriorityFlow Tool by Dr. Laura Condon to compute slope_x and slope_y (and also tried multiple options using DEM only, DEM+basin mask, DEM+basin mask+river network). For the solver settings, I used the same parameters from the Little Washita Parking Lot Test Example (please see the provided details below). I also tried adjusting some of the solver setting parameters, but all of these attempts failed.

At this point, I have no idea whether the issue is from my slope data or from the solver settings. Therefor, I would like to ask: 
1. Has anyone experienced a similar convergence issue?
2. How can I troubleshoot and resolve this problem?
3. If the slope data is the cause, what is recommended approach to ensure correct slope data/files generation?

I would greatly appreciate any advice or suggestions. Thank you very much for your help. 

.out.kinsol.log :
KINSOL starting step for time 1.000000
scsteptol used:        1e-15
fnormtol  used:        1e-06
KINSolInit nni=    0  fnorm=            112002.51514165  nfe=     1
KINSol return value 8
---KINSOL_KRYLOV_FAILURE

--------------------------------------------------
                    Iteration             Total
Nonlin. Its.:               1                 1
Lin. Its.:                210               210
Func. Evals.:               1                 1
PC Evals.:                  1                 1
PC Solves:                210               210
Lin. Conv. Fails:           1                 1
Beta Cond. Fails:           0                 0
Backtracks:                 0                 0
-------------------------------------------------- 

solver settings: 
model.Solver = "Richards"
model.Solver.TerrainFollowingGrid = True
#model.Solver.Nonlinear.VariableDz = False
model.Solver.TerrainFollowingGrid.SlopeUpwindFormulation = "Upwind"
model.Solver.Linear.Preconditioner = "PFMG"  
model.Solver.Linear.Preconditioner.PCMatrixType = "FullJacobian" 

model.KnownSolution = "NoKnownSolution"

model.Solver.MaxIter = 25000  
model.Solver.Drop = 1e-20  
model.Solver.AbsTol = 1e-8  

model.Solver.MaxConvergenceFailures = 8  
model.Solver.Nonlinear.MaxIter = 80  
model.Solver.Nonlinear.ResidualTol = 1e-6  
model.Solver.Nonlinear.EtaChoice =  "EtaConstant"
model.Solver.Nonlinear.EtaValue = 0.001
model.Solver.Nonlinear.UseJacobian = True
model.Solver.Nonlinear.DerivativeEpsilon = 1e-16 
model.Solver.Nonlinear.StepTol = 1e-15  
model.Solver.Nonlinear.Globalization = "LineSearch"

model.Solver.Linear.KrylovDimension = 70  
model.Solver.Linear.MaxRestarts = 2


Best regards,
Xiaojie Li

Chen Yang

unread,
Aug 1, 2025, 12:46:28 AMAug 1
to Xiaojie Li, ParFlow
Hi Xiaojie,

Most of the time, it is not a solver thing. I guess there may be some issues in your input files. I encountered the same problem as i didn't have a correct solid file. I suggest you double check your inputs (dimension and values etc.) to see if the problem is still there. If the problem persists, we may take a look your script and inputs as the next step.

Chen


From: par...@googlegroups.com <par...@googlegroups.com> on behalf of Xiaojie Li <lixiao...@gmail.com>
Sent: Friday, August 1, 2025 2:49:18 AM
To: ParFlow <par...@googlegroups.com>
Subject: Parking Lot test issue - slope problems
 
--
You received this message because you are subscribed to the Google Groups "ParFlow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parflow+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/parflow/0dd355f9-0687-4897-b48d-f4793ff8cb90n%40googlegroups.com.

Xiaojie Li

unread,
Aug 1, 2025, 10:34:53 AMAug 1
to Chen Yang, ParFlow
Hi Chen,

Thank you for your reply. Currently I am not using a solid file. Instead, I defined the Geometries as a "Box" domain. The X, Y, and Z grid numbers are 323, 223, and 5, with variable dZ values (please see the scripts below). Based on your suggestion, do you think I should try using a solid file to see if it will improve the results? Or, since I am using a "Box" domain, is it more likely that the issue is related to my slope files? If the slope files are the cause, I wonder how I can generate the correct slope files, as I actually followed the slope generation instructions from the PriorityFlow Tool.

Thank you very much for your guidance and help!

# setup the computational grid
model.Process.Topology.P = 1
model.Process.Topology.Q = 1
model.Process.Topology.R = 1

model.ComputationalGrid.Lower.X = 0.0
model.ComputationalGrid.Lower.Y = 0.0
model.ComputationalGrid.Lower.Z = 0.0

model.ComputationalGrid.DX = 1000.0
model.ComputationalGrid.DY = 1000.0
model.ComputationalGrid.DZ = 1.0

model.ComputationalGrid.NX = 323 
model.ComputationalGrid.NY = 223
model.ComputationalGrid.NZ = 5

# Geometries
model.GeomInput.Names = "domain_input"  

model.GeomInput.domain_input.InputType = 'Box'
model.GeomInput.domain_input.GeomName  = 'domain'

model.Geom.domain.Lower.X = 0.0
model.Geom.domain.Lower.Y = 0.0
model.Geom.domain.Lower.Z = 0.0

model.Geom.domain.Upper.X = 323000.0  
model.Geom.domain.Upper.Y = 223000.0  
model.Geom.domain.Upper.Z = 5.0 

model.Domain.GeomName = "domain"
model.Geom.domain.Patches = "top bottom side"

# Variable dZ
model.Solver.Nonlinear.VariableDz = True
model.dzScale.GeomNames = "domain"
model.dzScale.Type = "nzList"
model.dzScale.nzListNumber = 5

model.Cell._0.dzScale.Value = 150
model.Cell._1.dzScale.Value = 1
model.Cell._2.dzScale.Value = 0.6
model.Cell._3.dzScale.Value = 0.3
model.Cell._4.dzScale.Value = 0.1

# Initial conditions: water pressure
model.ICPressure.Type = "HydroStaticPatch"
model.ICPressure.GeomNames = "domain"
model.Geom.domain.ICPressure.Value = 1.005  
model.Geom.domain.ICPressure.RefGeom = "domain"
model.Geom.domain.ICPressure.RefPatch = "bottom" 


Best regards,
Xiaojie Li


Chen Yang <chen...@princeton.edu> 于2025年7月31日周四 23:46写道:


--
李晓婕
中国科学院地理科学与资源研究所
地址:北京市朝阳区大屯路甲11号,100101
手机:13141005067
邮箱:lixi...@igsnrr.ac.cn
          lixiao...@gmail.com
------------------------------------------

Li, Xiaojie
Institute of Geographic Sciences and Natural Resources Research

Chinese Academy of Sciences
11A, Datun Road, Chaoyang District, Beijing, 100101, China
Tel.: +8613141005067
Email: lixi...@igsnrr.ac.cn

           lixiao...@gmail.com

alanl...@gmail.com

unread,
Aug 1, 2025, 12:37:18 PMAug 1
to ParFlow
Xiaojie,

Are you getting any pressure outputs at all before the solver fails? PriorityFlow does a good job, but it is not perfect. I once had a case where a cell near the outlet boundary was collecting water and had to be manually rotated to point out of the domain. If you have any outputs at all, you might check them to verify that the slopes are in order. 

Alan

Chen Yang

unread,
Aug 1, 2025, 1:28:53 PMAug 1
to alanl...@gmail.com, ParFlow
Xiaojie, You can change your slope as a small constant value to see if it works. I always do this for trouble shooting. If a domain constant value works, there may be problems in your slope files. Otherwise, slopes are not the reason. The same way for further trouble shooting. 
Chen
From: par...@googlegroups.com <par...@googlegroups.com> on behalf of alanl...@gmail.com <alanl...@gmail.com>
Sent: Saturday, August 2, 2025 12:37:18 AM
To: ParFlow <par...@googlegroups.com>
Subject: Re: Parking Lot test issue - slope problems
 

Francis Oussou

unread,
Aug 1, 2025, 1:49:06 PMAug 1
to Chen Yang, alanl...@gmail.com, ParFlow
Hi Chen,

Adding to above suggestions, you can also decrease significantly your time step from 1 to something like 1e-3 or lower at the beginning (ex., KINSOL starting step for time =1e-3). Write out the pressure output accordingly. 

Then increase time step progressively later on.


Best,
Francis

Chen Yang

unread,
Aug 1, 2025, 1:53:55 PMAug 1
to Francis Oussou, alanl...@gmail.com, ParFlow
Hi Francis, thanks for your suggestion. based on her kinsol log, i don't think it is a solver or timestep issue. Chen
From: Francis Oussou <franci...@gmail.com>
Sent: Saturday, August 2, 2025 1:48:50 AM
To: Chen Yang <chen...@princeton.edu>
Cc: alanl...@gmail.com <alanl...@gmail.com>; ParFlow <par...@googlegroups.com>

Xiaojie Li

unread,
Aug 1, 2025, 4:29:21 PMAug 1
to Chen Yang, Francis Oussou, alanl...@gmail.com, ParFlow
Hi Chen, Alan, and Francis,

Thank you so much for all your responses and suggestions.

Hi Chen, I tried using a constant slope value (slope_x = -0.1, slope_y = 0.0) for troubleshooting, but it still failed (Please see the attached Word document for all my settings). I also changed variable dz to False, but that failed as well. However, I noticed that the fnorm value changed from 112002 ( constant slope value + variable dz) to 1669 (constant slope value + variable dz set to False). I am not sure if this change is meaningful (please see the .out.kinsol.log below).

Hi Alan, I only got the out.press.0000.pfb file, even though I set the stop time to 20. I checked the press.0000.pfb file, and found that the pressure values are constant across all grid cells, regardless of whether I used a rectangular slope input or a basin-masked slope input. One thing I noticed is: when using a constant slope value (or slope pfb files) + variable dz, the pressure in layer 0 is -74, and in layer 4 is -150; but when using a constant slope value + variable dz set to False, the pressure in layer 0 is -0.5, and in layer 4 is -3.5. I wonder if these information provide any useful clue.

Hi Francis, I might try your suggestion next and see what difference it makes.

# .out.kinsol.log (constant slope value + variable dz)
KINSOL starting step for time 1.000000
scsteptol used:        1e-15
fnormtol  used:        1e-06
KINSolInit nni=    0  fnorm=          112002.5176056325  nfe=     1
KINSol return value 8
---KINSOL_KRYLOV_FAILURE

--------------------------------------------------
                    Iteration             Total
Nonlin. Its.:               1                 1
Lin. Its.:                210               210
Func. Evals.:               1                 1
PC Evals.:                  1                 1
PC Solves:                210               210
Lin. Conv. Fails:           1                 1
Beta Cond. Fails:           0                 0
Backtracks:                 0                 0
-------------------------------------------------- 

# .out.kinsol.log (constant slope value + False variable dz)
KINSOL starting step for time 1.000000
scsteptol used:        1e-15
fnormtol  used:        1e-06
KINSolInit nni=    0  fnorm=          1669.581663168839  nfe=     1
KINSol return value 8
---KINSOL_KRYLOV_FAILURE

--------------------------------------------------
                    Iteration             Total
Nonlin. Its.:               1                 1
Lin. Its.:                210               210
Func. Evals.:               1                 1
PC Evals.:                  1                 1
PC Solves:                210               210
Lin. Conv. Fails:           1                 1
Beta Cond. Fails:           0                 0
Backtracks:                 0                 0
--------------------------------------------------

Best regards,
Xiaojie

'Chen Yang' via ParFlow <par...@googlegroups.com> 于2025年8月1日周五 12:53写道:
You received this message because you are subscribed to a topic in the Google Groups "ParFlow" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/parflow/rX1ASlso-dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to parflow+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/parflow/BL0PR04MB496263DCA20042E9A53DC47A9826A%40BL0PR04MB4962.namprd04.prod.outlook.com.
parflow_constant_slope_setting.docx
Reply all
Reply to author
Forward
0 new messages