MODFLOW-USGS / mfusg

Public repository for MODFLOW-USG
https://water.usgs.gov/ogw/mfusg/
7 stars 4 forks source link

Possible bug in zonbudusg #13

Closed langevin-usgs closed 7 years ago

langevin-usgs commented 8 years ago

Hugh McCreadie HMcCreadie@piteau.com Attachments4:16 PM (16 hours ago)

to me Hi Chris,

I’m not sure if you’re the guy who looks after zonbudusg but wanted to mention this issue I stumbled on today. The attached model has zero wells specified for SP3, which resulted in zonbudusg misinterpreting the recharge in SP3 as well inflow (illustrated in screen capture of csv2 output below).

Regards, Hugh

image

HUGH MCCREADIE, P.ENG. Associate, Senior Hydrogeologist Email: hmccreadie@piteau.com Direct: +1.604.998.3404 Tel: +1.604.986.8551 – Ext. 231 Fax: +1.604.985.7286

PITEAU ASSOCIATES Suite 300 – 788 Copping Street North Vancouver, BC Canada V7M 3G6 www.piteau.com

CR_Trans_Run4.zip

langevin-usgs commented 8 years ago

So it does look like there is an issue here. The number of wells in stress period 3 is zero, and so no well record is written to the budget file. At first glance it appears like zonbudusg is getting confused. Need to look deeper.

langevin-usgs commented 8 years ago

Nope. Doesn't look like a bug in zonbudusg. The output file produced by zonbudusg is okay, as shown below. The problem appears to be in whatever program he is using to make the CSV file.

ZONBUDUSG ANALYSIS

 Flow Budget for Zone  1 at Time Step  10 of Stress Period   2
 -------------------------------------------------------------

                   Budget Term     Flow (L**3/T)
                   -----------------------------

         IN:
         ---
                       STORAGE =    467.23    
                 CONSTANT HEAD =    4784.4    
                         WELLS =    0.0000    
                      RECHARGE =    22452.    

                      Total IN =    27703.    

         OUT:
         ----
                       STORAGE =   0.31558E-02
                 CONSTANT HEAD =    27236.    
                         WELLS =    467.23    
                      RECHARGE =    0.0000    

                     Total OUT =    27703.    

                      IN - OUT =  -0.40056E-03

           Percent Discrepancy =               -0.00

1 ZONBUDUSG ANALYSIS

 Flow Budget for Zone  1 at Time Step   1 of Stress Period   3
 -------------------------------------------------------------

                   Budget Term     Flow (L**3/T)
                   -----------------------------

         IN:
         ---
                       STORAGE =    38.257    
                 CONSTANT HEAD =    4784.4    
                      RECHARGE =    22452.    

                      Total IN =    27274.    

         OUT:
         ----
                       STORAGE =    38.257    
                 CONSTANT HEAD =    27236.    
                      RECHARGE =    0.0000    

                     Total OUT =    27274.    

                      IN - OUT =  -0.40767E-03

           Percent Discrepancy =               -0.00
langevin-usgs commented 8 years ago

Well it turns out that this may be a bug in zonbudget after all (probably in both structured and unstructured). It only occurs for NON-COMPACT BUDGET files. Zone budget can write a CSV file, and it looks like it gets confused when a boundary package has no boundaries for stress periods greater than 1.