You are here

Flow Variables in W2 Code

Hi I am working to couple CEQUALW2 model with MODFLOW groundwater model and I would really appreciate it if anyone can answer the following questions: 1) In CE-QUAL-W2's code which variables store the flow values, and how do the elements of that array correspond to the river segments in the input files e.g. is element 1 of the array the flow value of the first segment of the river? In other words, when the model outputs the flow rates for each segment to the output file, what array variable(s) is it getting the numbers from? 2) Models are often picky about how variables can be changed while they are running -- can I modify some of the flow-related array variables while the model is running... as in to add or remove flow to the model at every timestep? Basically, when the model is running in a coupled modeling environment, other models will send data to it, such as flow values, that need to be added to the model as it is running - so I'll need to add those flow values to the flow variables in the model code and it'd be extremely helpful to know if the model can accommodate that. Thank you so much. Best, Ravi
Forums: 

Ravi, QC(i) is the model variable that contains the flow through the downstream edge of a segment ('i' is segment number) If you're looking at adding or removing water at every time step, I'd suggest working with the flow source/sink variable QSS(k,i), where i is segment number and k is segment number. If you look at 'Task 2.1: Hydrodynamic sources/sinks' in the source code (located in file hydroinout.f90) you'll be able to see how tributaries, withdrawals, structures, etc. are coded using QSS. chris