skip to main content
Reservoir Account Gain Loss
The following Rio Grande-specific Account Gain Loss methods are available on the Reservoirs. The primary purpose of methods in this category is to set the Gain Loss slots on reservoir accounts. They also set values on additional slots as described within each method description.
* Abiquiu, Cochiti, and Jemez Gain Loss
Abiquiu, Cochiti, and Jemez reservoirs each have their own Reservoir Account Gain Loss method; however, all three methods function the same as described below.
These methods are currently configured to function correctly for 1 Day and 1 Month timesteps only. For these methods to solve for account Gain Loss, values such as Surface Area, Evaporation and Precipitation Volume must be known (solved for by simulation); therefore, the execution time must be set to After Simulation.
These methods calculate the total San Juan losses as the difference between the Present Condition Loss and the Hypothetical Condition Loss. The Hypothetical Condition represents the state of the reservoir assuming only Rio Grande water is present, with no San Juan water. The total San Juan loss is then distributed to all San Juan accounts proportional to the storage in each account at the end of the previous timestep. This allows the San Juan Storages to solve at the current timestep.
    
    
All other loss goes to the Rio Grande accounts. The temporary total Rio Grande loss is calculated as the difference between the Hypothetical Condition Loss and the Pre-Reservoir Condition Loss. If the reservoir has RioGrande “Conservation accounts,” that is any account of Water Type RioGrande that is not the “RioGrande” account, and the accounts have non-zero storage, then they are given a fraction of the loss equal to its percentage of total Rio Grande water in the reservoir. All remaining loss goes to the RioGrande account.
    
    
This total gain loss is distributed to the accounts based on estimated storage compared to the total conservation storage. This allows the conservation accounts to solve. In general, the Gain Loss for the RioGrande account can be calculated.
    
Slots Specific to These Methods
 Carryover Content
Type: Series Slot
Units: Volume
Description: The volume designated as Carryover storage
Information: This value will only be non-zero if the Locked In slot has a value of 1 (reservoir is locked in). Values in this series slot are the same as the values in the Rio Grande Pools slot, Carryover Content column. If the initial timestep value on this slot is not known, but the value on the Rio Grande Pools slot Carryover Content column t is known, the table series slot value is copied to the series slot at the initial timestep and set as an input.
I/O: Initial value Input, run timesteps are Output
 Conservation Gain Switch
Type: Series Slot
Units: None
Description: A binary switch indicating whether any gains at the timestep can be allocated to the Rio Grande conservation accounts. This only affects gain (positive account Gain Loss). It does not affect losses.
Information: This slot value must be either 1 (gains can be allocated to Rio Grande conservation accounts) or 0 (no gains allocated to RioGrande conservation). If this value is not input or set by a rule, it defaults to zero
I/O: Optional Input
 Control and PreRes Areas
Type: Table Slot
Units: Area, Area, Area, Area, Area, Area
Description: The table contains a one row and six columns, one for each of the following: Control Area, Pre-Res Barren Area, Pre-Res Irrigated Area, Pre-Res Meadow Area, Pre-Res River Area, Pre-Res Lake Area
Information: The areas in this table are used for calculating losses for prereservoir conditions.
I/O: Required Input
 Effective Precip
Type: Series Slot
Units: Volume
Description: The effective precipitation calculated for the given timestep.
Information: The total accumulated precipitation depth for the month is used to calculate the accumulated effective precipitation for the current day and the previous day. The difference is the Effective Precip for the current day. For a 1 Month timestep, the effective precipitation is calculated from the total precipitation for the current timestep.
I/O: Output
 Effective Precipitation Table
Type: Table Slot
Units: Length, Fraction, Length
Description: The relationship between total accumulated precipitation depth for the month and the amount considered effective precipitation.
Information: The first column gives a depth of monthly precipitation. The second column gives the fraction of that precipitation depth that is considered effective precipitation. The third column contains the accumulated effective precipitation value corresponding to the precipitation in the first column. Linear interpolation is used to calculate the effective precipitation depth based on the total precipitation depth for the month. Only the first and third columns are actually used in the interpolation. The second column is only for reference.
I/O: Required Input
 Hold Pool
Type: Series Slot
Units: Volume
Description: The sum of the total San Juan storages, Carryover Content, Accumulated Permanent Sediment, and Rio Grande Conservation storage.
Information: This value is calculated at the end of the accounting method after all account storage values are known.
I/O: Output
 Hypothetical Lake Elev River Area Table
Type: Table Slot
Units: Length, Area
Description: Relationship of Hypothetical River Area to Hypothetical Lake Elevation
Information: This table is used to calculate river area for hypothetical conditions
I/O: Required Input
 Incidental Content
Type: Series Slot
Units: Volume
Description: All Rio Grande storage that is not designated as carryover storage or conservation storage.
I/O: Output
 Locked In
Type: Series Slot
Units: None
Description: A binary switch indicating if the reservoir can have water designated for Carryover Content
Information: This slot value must be either 1 (Locked In, can have Carryover storage) or 0 (no Carryover storage)
I/O: Required Input
 Net Loss Adjustment
Type: Series Slot
Units: Volume
Description: The difference between the Physical Model Net Loss and the losses calculated by the accounting method
Information: If this value is positive the physical model loss was greater than the accounting method loss
I/O: Output
 Physical Model Net Loss
Type: Series Slot
Units: Volume
Description: The net loss from the simulation methods (Evaporation - Precipitation).
Information: A positive value represents a net loss
I/O: Output
 PreRes Irrigated Area Loss Rate
Type: Series Slot with Periodic Input
Units: Velocity
Description: The loss rate over irrigated area before the reservoir existed
Information: This value is used for calculating losses for prereservoir conditions.
I/O: Required Input
 PreRes Meadow Area Loss Rate
Type: Series Slot with Periodic Input
Units: Velocity
Description: The loss rate over meadow area before the reservoir existed
This value is used for calculating losses for prereservoir conditions.
I/O: Required Input
 Present Lake Elev River Area Table
Type: Table Slot
Units: Length, Area
Description: Relationship of River Area to Pool Elevation
Information: This table is used to calculate river area for present conditions
I/O: Required Input
 Rio Grande Hold Pool
Type: Series Slot
Units: Volume
Description: This contains the portion of the Hold Pool that is Rio Grande water. It is the sum of the Rio Grande Carry Over and Rio Grande Conservation storage. Any accounts on the object that have the RioGrande Water Type that are not the “RioGrande” account are considered to be Rio Grande Conservation accounts.
Information: This value is calculated at the end of the accounting method after all account storage values are known.
I/O: Output
 San Juan Hold Pool
Type: Series Slot
Units: Volume
Description: This contains the portion of the Hold Pool that is San Juan water. It is the sum of the total San Juan storage (any account on the reservoir with the SanJuan Water Type) and Accumulated Permanent Sediment
Information: This value is calculated at the end of the accounting method after all account storage values are known.
I/O: Output
 Volume Added to Carryover Storage
Type: Series Slot
Units: Volume
Description: This volume is added to the Carryover Content at the timestep.
Information: If this value is not input or set by a rule, it defaults to zero.
I/O: Optional Input
Table Series Slots Set by These Methods
Each table represents a table series slot. The row names represent the column headers in the table series slots.
Method Details  
All three methods—Abiquiu, Cochiti, and Jemez Gain Loss—carry out the following steps.
1. Check for previous Storage and Accrual on all accounts.
2. Call the selected Sediment Transport method to calculate Accumulated Perm Sediment.
Note:  See Sediment Transport for a description of the Sediment Transport methods.
3. Get lists of each type of account slot by water type.
4. Register account Inflow and Outflow slots as dependencies.
Calculate Effective Precipitation
For a 1 Month timestep, this can be done based on the Precipitation Volume for the month, which was set in simulation. The Precipitation Volume calculation will already account for Ice Coverage if applicable. For a 1 Day timestep, Effective Precipitation must be calculated using the cumulative sum of Precipitation Rate from the beginning of the month to the current day, and Ice Coverage is included explicitly. At a 1 Month timestep the average surface area is used, whereas the current (end of timestep) surface area is used for a 1 Day timestep.
IF isMonthly
ELSE
END IF
Calculate the evaporation depth and effective precipitation depth to use in loss calculations
For all following calculations, Area values for a 1 Day timestep are current (end of timestep) areas. For a 1 Month timestep, Area values are averages of the end of the previous timestep and end of the current timestep values, similarly for Ice Coverage. If Ice Coverage is not applicable based on the selected evaporation method, it is zero in the calculations below.
    
    
If the Surface Area is zero, then evapDepth and effecitvePrecipDepth are zero, and if Ice Coverage is one, then effectivePrecipDepth is zero.
Calculate the individual components of the PreReservoir Condition Loss and the total PreRes Condition Loss
Each of these values is positive for a loss. The PreRes areas are contained in the Control and PreRes Areas table slot. The results of these calculations are set in the PreReservoir Condition table series slot.
    
    
    
    
    
Calculate the individual components of the Present Condition Loss and the total Present Condition Loss
Each of these values is positive for a loss. The results of these calculations are set in the Present Condition table series slot.
    
    
    
    
    
The netInflowVolume will be negative if there is unidentified loss. If netInflowVolume is positive, then unidentified loss is zero. The Storage Adjustment from Elev Vol Table Change component is only included if the Time Varying Elevation Volume method is selected for the Sediment category.
    
    unidentifiedLoss will be positive for a loss.
    
Sum the Rio Grande and San Juan previous storages and Rio Grande Transfers to use in loss calculations
    
    
    
    
RioGrandeStorages, SanJuanStorages, and SanJuanPassThruStorages are lists of storage slots on all accounts with the specified water type.
    
    
RioGrandeTransfersIn and RioGrandeTransersOut are lists of Transfer slots on all accounts with the RioGrande water type.
Set the Seed Value for Rio Grande Storage Iterative Loop
    
Carry out the Rio Grande Storage iterative loop until the Rio Grande storage converges
    
To carry out the Rio Grande Storage iterative loop until the Rio Grande storage converges, the method does the following in the order indicated:
1. Calculate the Hypothetical Condition Loss. See Calculate the Hypothetical Condition Loss.
2. Distribute San Juan gains/losses. See Distribute San Juan Gains and Losses.
3. Test for convergence. See Test for convergence.
Calculate the Hypothetical Condition Loss
This is the loss assuming only Rio Grande water in the reservoir, no San Juan water. These results are set in the Hypothetical Condition table series slot. Losses here are positive values.
    
    
    
    
    
    
    
Distribute San Juan Gains and Losses
The total Gain/Loss allocated to San Juan storage accounts is the difference between the Present Condition Loss and the Hypothetical Condition Loss. A positive value for each of these components represents a loss. In the Gain Loss slot on each account, a positive value represents a gain, and a negative value represents a loss. Thus the negative of the difference is taken before distributing the loss to the Gain Loss slot. The loss is distributed based on the contributing percentage of the total storage at the end of the previous timestep. If the total San Juan storage at the end of the previous timestep was zero, then the Gain Loss is zero for all accounts.
    
    
for all San Juan accounts
This allows the San Juan accounts to solve for Storage. The sum of all San Juan storages can then be used to calculate the total Rio Grande storage.
    
    
The AccumPermSediment is calculated by the selected method in the Sediment Transport category, and the value is set in the Est Sed Deposition table series slot.
Test for convergence
    
If totalRioGrandeStorage is zero, then prevTotalRioGrandeStorage is used in the denominator. If both are zero, then epsilon is zero. The iterative loop repeats until the absolute value of epsilon is less than the specified tolerance in the Convergence Percentage slot or the maximum number of iterations is reached.
Calculate the Physical Model Net Loss and the Net Loss Adjustment
Note:  These values are used for reporting only. They are not used in later calculations.
    
    
A positive value for Physical Model Net Loss represents a loss.
    
A negative value for totalSanJuanGainLoss represents a loss.
    
A positive value for totalRioGrandeLossTemp represents a loss.
    
Calculate actual Rio Grande losses
Any accounts on the object that have a Water Type RioGrande that are not the “RioGrande” account are considered the Rio Grande Conservation accounts. Prior to RiverWare 8.2, there was only one “RioGrandeConservation” account allowed. Starting in 8.2, you can have as many conservation accounts as you’d like. The Rio Grande Losses are divided between the RioGrande account and the conservation account using the steps below. If there are no conservation accounts, then all Cons values in the steps below are zero.
For all accounts that have the Water Type RioGrande but are not the “RioGrande” account:
    
    
    
    
    IF , then .
    
If the reservoir is Locked In (indicated by a value of 1 in the Locked In slot), a percentage of the Rio Grande loss is allocated to the Carryover Content, proportional to the percent contribution to total Rio Grande storage. If the reservoir is not locked in, all Carryover values are zero.
Note:  Carryover Content is not a slot on the accounts but is a separate slot Carryover Content on the reservoir object.
IF
ELSE
IF
ELSE
END IF
END IF
All other Rio Grande losses and storage go to the Incidental pool.
    
    
Adjust the temporary loss values, if necessary, according to the logic below before setting final slot values
If totalRioGrandeLossTemp is negative, representing a gain, then the gain is either divided proportionally between the Conservation and Incidental pools (if the Conservation Gain Switch is “On”), or the entire gain goes to the Incidental Pool.
IF
IF AND
IF
ELSE
END IF
ELSE
END IF
ELSE
For the remaining cases, totalRioGrandeLossTemp is positive (a loss). The temporary loss can be adjusted based on which pools have water.
IFANDAND
ELSE IF AND
AND
ELSE IF AND
AND
ELSE IF AND
AND
ELSE IF AND
AND
ELSE IF AND AND
ELSE IF AND AND
ELSE (all are positive)
END IF
END IF
    
If it is the first timestep locked in, then Carryover gets all of the storage and the Incidental pool gets all of the loss.
IF
IF
ELSE (not the first day locked in)
END IF
ELSE (The reservoir is not locked in)
END IF
Set the Gain Loss slots for the Rio Grande and Rio Grande Conservation accounts
Compute RioGrande.Gain Loss. Note, include a term for transfers into and out of RioGrande conservation accounts, otherwise it would be included twice (TransfersOutSum/TransfersInSum and RGConsStorageSumFinal):
    
Next, loop over all conservation accounts. For each one, compute the estimated storage, RGConsAccount.TempStorage, as the previous storage plus inflow, slot inflow, transfers in and minus outflows and transfers out. Then compute the fraction of the temp storage for each account compared to the total conservation storage.
IF ()
(There is no conservation storage, gain loss will be zero)
ELSE
Compute the fraction of this account’s estimated storage compared to the total conservation storage.
END
Finally, set each conservation account’s gain loss according to its storage fraction:
Note:  It is not anticipated that any of the conservation accounts will have negative storage. If that were to happen, and the RGConsLossFinal was positive, the RGConsAccount.Gain Loss for that account would become a positive number, a gain, causing the negative storage to become less negative.
Set the remaining slots associated with the method
    
    
    
    
    
Set summary values in table series slots
Each table represents a table series slot. The row names represent the column headers in the table series slots.
 
Table A.1  Preliminary Data
Column
Value
Elevation
Reservoir.Pool Elevation
Content
Reservoir.Storage
Area
Reservoir.Surface Area
Evaporation
Reservoir.Evaporation
Precipitation
Reservoir.Precipitation Volume
Unidentified Loss
Outflow (cfs)
Reservoir.Outflow
Outflow (af/d)
Reservoir.Outflow
Inflow (cfs)
Reservoir.Evaporation
Inflow (af/d)
Reservoir.Evaporation
 
Table A.2  PreReservoir Condition
Column
Value
River Channel Area
Control and PreRes Areas(Pre-Res River Area)
Barren Area
Control and PreRes Areas(Pre-Res Barren Area)
Meadow and Town Area
Control and PreRes Areas(Pre-Res Meadow Area)
River Area Loss
Barren Area Loss
Irrigated Area Loss
Meadow and Town Area Loss
PreRes Condition Loss
 
Table A.3  Present Condition
Column
Value
Water Surface Elev
Pool Elevation
Lake Surface Area
Surface Area
River Channel Area
presRiverArea
Barren Area
presBarrenArea
Total Area
Control and PreRes Areas(Control Area)
Water Surface Area Loss
Barren Area Loss
Present Condition Loss
PreRes Condition Loss
Net RG Plus SJ-C Loss
 
Table A.4  Hypothetical Condition
Column
Value
Total Content
Reservoir.Storage
SJ-C Content
totalSanJuanStorageSum
RG Content
totalRioGrandeStorage
Lake Surface Area
hypotheticalSurfaceArea
River Channel Area
hypotheticalRiverArea
Barren Area
hypotheticalBarrenArea
Water Surface Area Loss
Barren Area Loss
Hypo. Condition Loss
PreRes Condition Loss
Net RG Condition Loss
totalRioGrandeLossTemp
Net RG Plus SJ-C Loss
Net SJ-C Loss
, for all accounts with SanJuan water type
 
Table A.5  Rio Grande Pools
Column
Value
Content Change
Total Loss
Carryover Loss
RGCarryOverLossFinal
Incidental Loss
RGIncidentalLossFinal
Conservation Loss
RGConsLossFinal
Release From Storage
Total RG Content
Carryover Content
RGCarryOver
Incidental Content
RGIncidental
Conservation Content
RGConsStorageSumFinal
 
Table A.6  Daily Reservoir Computations
Column
Value
Water Surface Elev
Reservoir.Pool Elevation
Total Content
Reservoir.Storage
Change in Content
RG Release (cfs)
, for all accounts with RioGrande water type
RG Release (af/d)
, for all accounts with RioGrande water type
SJ-C Release (cfs)
, for all accounts with SanJuan water type
SJ-C Release (af/d)
, for all accounts with SanJuan water type
Evap
Reservoir.Evaporation
Precip
Reservoir.Precipitation Volume
RG Inflow (cfs)
, for all accounts with RioGrande water type
RG Inflow (af/d)
, for all accounts with RioGrande water type
SJ-C Inflow (cfs)
, for all accounts with SanJuan water type
SJ-C Inflow (af/d)
, for all accounts with SanJuan water type
 
Table A.7  Reservoir Summary
Column
Value
Total Drawdown
RG Loss
totalRioGrandeLossTemp
SJ-C Loss
, for all accounts with SanJuan water type
Total Loss
SJ-C Loss + totalRioGrandeLossTemp
RG Release From Storage
SJC Release From Storage
RG Content
totalRioGrandeStorage
SJ-C Content
totalSanJuanStorageSum
Total Content
Reservoir.Storage
* Elephant Butte and El Vado Gain Loss
Elephant Butte and El Vado reservoirs each have their own Gain Loss Calculation method. Both methods function the same, with a few small exceptions, as described below.
These methods are currently configured to function correctly for 1 Day and 1 Month timestep sizes only. In order for these methods to solve for Account Gain Loss, values such as Surface Area, Evaporation and Precipitation Volume must be know (solved for by simulation); therefore, the execution time must be set to After Simulation.
These methods calculate the total San Juan losses as the difference between the Present Condition Loss and the Hypothetical Condition Loss. The Hypothetical Condition represents the state of the reservoir assuming only Rio Grande water is present, with no San Juan water. The total San Juan loss is then distributed to all San Juan accounts proportional to the storage in each account at the end of the previous timestep. This allows the San Juan Storages to solve at the current timestep.
    
    , for all San Juan accounts
All other loss goes to the Rio Grande accounts. The total Rio Grande loss is then distributed to all Rio Grande accounts proportional to the storage in each account at the end of the previous timestep.
    
    , for all Rio Grande accounts
Slots Specific to These Methods
 Control and PreRes Areas
Type: Table Slot
Units: Area, Area, Area, Area, Area, Area
Description: The table contains a one row and six columns, one for each of the following: Control Area, Pre-Res Barren Area, Pre-Res Irrigated Area, Pre-Res Meadow Area, Pre-Res River Area, Pre-Res Lake Area
Information: The areas in this table are used for calculating losses for prereservoir conditions.
I/O: Required Input
 Effective Precip
Type: Series Slot
Units: Volume
Description: The effective precipitation calculated for the given timestep.
Information: The total accumulated precipitation depth for the month is used to calculate the accumulated effective precipitation for the current day and the previous day. The difference is the Effective Precip for the current day. For a 1 Month timestep, the effective precipitation is calculated from the total precipitation for the current timestep.
I/O: Output
 Effective Precipitation Table
Type: Table Slot
Units: Length, Fraction, Length
Description: The relationship between total accumulated precipitation depth for the month and the amount considered effective precipitation.
Information: The first column gives a depth of monthly precipitation. The second column gives the fraction of that precipitation depth that is considered effective precipitation. The third column contains the accumulated effective precipitation value corresponding to the precipitation in the first column. Linear interpolation is used to calculate the effective precipitation depth based on the total precipitation depth for the month. Only the first and third columns are actually used in the interpolation. The second column is only for reference.
I/O: Required Input
 Hypothetical Lake Elev River Area Table
Type: Table Slot
Units: Length, Area
Description: Relationship of Hypothetical River Area to Hypothetical Lake Elevation
Information: This table is used to calculate river area for hypothetical conditions
I/O: Required Input
 Net Loss Adjustment
Type: Series Slot
Units: Volume
Description: The difference between the Physical Model Net Loss and the losses calculated by the accounting method
Information: If this value is positive the physical model loss was greater than the accounting method loss
I/O: Output
 Physical Model Net Loss
Type: Series Slot
Units: Volume
Description: The net loss from the simulation methods (Evaporation - Precipitation).
Information: A positive value represents a net loss
I/O: Output
 PreRes Irrigated Area Loss Rate
Type: Series Slot with Periodic Input
Units: Velocity
Description: The loss rate over irrigated area before the reservoir existed
Information: This value is used for calculating losses for prereservoir conditions.
I/O: Required Input
 PreRes Meadow Area Loss Rate
Type: Series Slot with Periodic Input
Units: Velocity
Description: The loss rate over meadow area before the reservoir existed
Information: This value is used for calculating losses for prereservoir conditions.
I/O: Required Input
 Present Lake Elev River Area Table
Type: Table Slot
Units: Length, Area
Description: Relationship of River Area to Pool Elevation
Information: This table is used to calculate river area for present conditions
I/O: Required Input
Table Series Slots Set by This Method
Each table represents a table series slot. The row names represent the column headers in the table series slots.
Method Details 
The Elephant Butte and El Vado Gain Loss method carries out the following steps.
1. Check for previous Storage and Accrual on all accounts.
2. Call the selected Sediment Transport method to calculate Accumulated Perm Sediment.
3. Get lists of each type of account slot by water type.
4. Register account Inflow and Outflow slots as dependencies.
Calculate Effective Precipitation
For a 1 Month timestep, this can be done based on the Precipitation Volume for the month, which will have been set in simulation. The Precipitation Volume calculation will already account for Ice Coverage if applicable. For a 1 Day timestep, Effective Precipitation must be calculated using the cumulative sum of Precipitation Rate from the beginning of the month to the current day, and Ice Coverage is included explicitly. At a 1 Month timestep the average surface area is used, whereas the current (end of timestep) surface area is used for a 1 Day timestep.
IF isMonthly
ELSE
END IF
Calculate the evaporation depth and effective precipitation depth to use in loss calculations
For all following calculations, Area values for a 1 Day timestep are current (end of timestep) areas. For a 1 Month timestep, Area values are averages of the end of the previous timestep and end of the current timestep values, similarly for Ice Coverage. If Ice Coverage is not applicable based on the selected evaporation method, it is zero in the calculations below.
    
    
If the Surface Area is zero, then evapDepth and effecitvePrecipDepth are zero, and if Ice Coverage is one, then effectivePrecipDepth is zero.
Calculate the individual components of the PreReservoir Condition Loss and the total PreRes Condition Loss
Each of these values is positive for a loss. The PreRes areas are contained in the Control and PreRes Areas table slot. The results of these calculations are set in the PreReservoir Condition table series slot.
    
    
    
    
    
• Calculate the individual components of the Present Condition Loss and the total Present Condition Loss.
Each of these values is positive for a loss. The results of these calculations are set in the Present Condition table series slot.
    
    
    
    
    
The netInflowVolume will be negative if there is unidentified loss. If netInflowVolume is positive, then unidentified loss is zero. The Storage Adjustment from Elev Vol Table Change component is only included if the Time Varying Elevation Volume method is selected for the Sediment category.
    
unidentifiedLoss will be positive for a loss.
IF Reservoir = Elephant Butte
ELSE
END IF
Sum the Rio Grande and San Juan previous storages and Rio Grande Transfers to use in loss calculations
For El Vado Gain Loss method:
    
For Elephant Butte Gain Loss method, two previous storage values are computed:
1. The RioGrande water type accounts with positive storage are summed:
    
2. The RioGrande water type accounts with positive storage AND the Rio Grande storage (if negative) are summed:
IF ElephantButte^RioGrande.Storage[t-1] < 0m3
The storage is negative and not included in the positive sum, so it is included here:
    
    ELSE
    The RioGrande.Storage[t-1] is positive so it is already included, the previous storage sum is:
    
Then, for both methods:
    
    
    
RioGrandeStorages, SanJuanStorages and SanJuanPassThruStorages are lists of storage slots on all accounts with the specified water type.
    
    
RioGrandeTransfersIn and RioGrandeTransersOut are lists of Transfer slots on all accounts with the RioGrande water type.
Set the seed value for the RioGrande Storage iterative loop
    
Carry out the RioGrande Storage iterative loop until the Rio Grande storage converges
    
To carry out the RioGrande Storage iterative loop until the Rio Grande storage converges, you must do the following in the order indicated:
Calculate the Hypothetical Condition Loss
This is the loss assuming only Rio Grande water in the reservoir, no San Juan water. These results are set in the Hypothetical Condition table series slot. Losses here are positive values.
    
    
    
    
    
    
    
Calculate and distribute San Juan gains/losses
The total Gain/Loss allocated to San Juan storage accounts is the difference between the Present Condition Loss and the Hypothetical Condition Loss. A positive value for each of these components represents a loss. In the Gain Loss slot on each account, a positive value represents a gain, and a negative value represents a loss. Thus the negative of the difference is taken before distributing the loss to the Gain Loss slot. The loss is distributed based on the contributing percentage of the total storage at the end of the previous timestep. If the total San Juan storage at the end of the previous timestep was zero, then the Gain Loss is zero for all accounts.
    
    
for all San Juan accounts
This allows the San Juan accounts to solve for Storage. The sum of all San Juan storages can then be used to calculate the total Rio Grande storage.
    
    
Test for convergence
    
If totalRioGrandeStorage is zero, then prevTotalRioGrandeStorage is used in the denominator. If both are zero, then epsilon is zero. The iterative loop repeats until the absolute value of epsilon is less than the specified tolerance in the Convergence Percentage slot or the maximum number of iterations (Max Iterations slot) is reached.
Calculate the Rio Grande gains/losses
Calculate the total Rio Grande Gain (+):
    
The Storage Adjustment from Elev Vol Table Change is applicable only if the Time Varying Elevation Volume method is selected for the Sediment category. It is removed at this point in the calculation because all loss from the Elevation-Volume change will be allocated later to the RioGrande account.
Distribute the Rio Grande gains/losses for Elephant Butte
For the Elephant Butte Gain Loss method, the remaining evaporation and precipitation are charged to all accounts with water type Rio Grande that had a positive previous storage. Any Rio Grande accounts with negative storage do not get any of the remaining evaporation and precipitation. Then any other losses due to seepage or reconciliation of the reservoir charged to the single RioGrande account, whether the previous storage was positive or negative.
The computations are as follows:
First compute the remaining evaporation and precipitation loss:
The evaporation/precipitation loss is distributed based on the contributing percentage of the total storage at the end of the previous timestep.
For all Rio Grande accounts with :
,
All other Rio Grande accounts, Account.GainLoss = 0.
This will distribute the remaining evaporation and precipitation to the positive Rio Grande accounts. The RioGrande account’s RioGrande.GainLoss slot will either get a gain if positive previous storage or zero gain if negative previous. If all accounts with the RioGrande water type have zero or negative storage at the previous timestep, then all of the gain/loss goes to the RioGrande account.
Next, compute the remaining gain that includes seepage and any other gain necessary to reconcile the reservoir:
This remaining gain is then added to the Rio Grande account’s Gain Loss:
With this approach, the Elephant Butte.Storage = SanJuanStorages + RioGrande.Storage (whether this is positive or negative) + other RioGrande account storage only if positive (that is, positive credit accounts)
Distribute the Rio Grande gains/losses for El Vado
The positive gain (or negative loss) is distributed based on the contributing percentage of the total storage at the end of the previous timestep. The gain is only distributed to accounts with positive storage, where the negative previous storage is included in base value when computing the percentage. The negative RioGrande water is considered part of the reservoir reconciliation. If all accounts with the RioGrande water type have zero or negative storage at the previous timestep, then all of the gain/loss goes to the RioGrande account.
For all Rio Grande accounts with :
IF
END IF
END IF
Allocate the Storage Adjustment from Elev Vol Table Change to the RioGrande account.
This value will be negative for a loss.
    
Calculate the Physical Model Net Loss and the Net Loss Adjustment
Note:  These values are used for reporting only. They are not used in later calculations.
    
    
A positive value for Physical Model Net Loss represents a loss.
    
A negative value for totalSanJuanGainLoss represents a loss.
    
A positive value for totalRioGrandeLossTemp represents a loss.
    
Set summary values in table series slots
The Elephant Butte and El Vado Gain Loss sets the following table series slots.
Each table represents a table series slot. The row names represent the column headers in the table series slots.
 
Table A.8  Preliminary Data
Column
Value
Elevation
Reservoir.Pool Elevation
Content
Reservoir.Storage
Area
Reservoir.Surface Area
Evaporation
Reservoir.Evaporation
Precipitation
Reservoir.Precipitation Volume
Unidentified Loss
Outflow (cfs)
Reservoir.Outflow
Outflow (af/d)
Reservoir.Outflow
Inflow (cfs)
Reservoir.Evaporation
Inflow (af/d)
Reservoir.Evaporation
 
Table A.9  PreReservoir Condition
Column
Value
River Channel Area
Control and PreRes Areas(Pre-Res River Area)
Barren Area
Control and PreRes Areas(Pre-Res Barren Area)
Meadow and Town Area
Control and PreRes Areas(Pre-Res Meadow Area)
River Area Loss
Barren Area Loss
Irrigated Area Loss
Meadow and Town Area Loss
PreRes Condition Loss
 
Table A.10  Present Condition
Column
Value
Water Surface Elev
Pool Elevation
Lake Surface Area
Surface Area
River Channel Area
presRiverArea
Barren Area
presBarrenArea
Total Area
Control and PreRes Areas(Control Area)
Water Surface Area Loss
Barren Area Loss
Present Condition Loss
PreRes Condition Loss
Net RG Plus SJ-C Loss
 
Table A.11  Hypothetical Condition
Column
Value
Total Content
Reservoir.Storage
SJ-C Content
totalSanJuanStorageSum
RG Content
totalRioGrandeStorage
Lake Surface Area
hypotheticalSurfaceArea
River Channel Area
hypotheticalRiverArea
Barren Area
hypotheticalBarrenArea
Water Surface Area Loss
Barren Area Loss
Hypo. Condition Loss
PreRes Condition Loss
Net RG Condition Loss
totalRioGrandeLossTemp
Net RG Plus SJ-C Loss
Net SJ-C Loss
, for all accounts with SanJuan water type
 
Table A.12  Daily Reservoir Computations
Column
Value
Water Surface Elev
Reservoir.Pool Elevation
Total Content
Reservoir.Storage
Change in Content
RG Release (cfs)
, for all accounts with RioGrande water type
RG Release (af/d)
, for all accounts with RioGrande water type
SJ-C Release (cfs)
, for all accounts with SanJuan water type
SJ-C Release (af/d)
, for all accounts with SanJuan water type
Evap
Reservoir.Evaporation
Precip
Reservoir.Precipitation Volume
RG Inflow (cfs)
, for all accounts with RioGrande water type
RG Inflow (af/d)
, for all accounts with RioGrande water type
SJ-C Inflow (cfs)
, for all accounts with SanJuan water type
SJ-C Inflow (af/d)
, for all accounts with SanJuan water type
Total Inflow (cfs)
Reservoir.Inflow
Total Inflow (af/d)
Reservoir.Inflow
 
Table A.13  Reservoir Summary
Column
Value
Total Drawdown
RG Loss
totalRioGrandeLossTemp
SJ-C Loss
, for all accounts with SanJuan water type
Total Loss
SJ-C Loss + totalRioGrandeLossTemp
RG Release From Storage
SJC Release From Storage
RG Content
totalRioGrandeStorage
SJ-C Content
totalSanJuanStorageSum
Total Content
Reservoir.Storage
* Nambe Falls Gain Loss
This method calculates the total San Juan losses as the difference between the Present Condition Loss and the PreReservoir Condition Loss. The total San Juan loss is then distributed to all San Juan accounts proportional to the storage in each account at the end of the previous timestep. This allows the San Juan Storages to solve at the current timestep.
    
    
The method also calculates the Net Loss Adjustment, Operational Release and Irrigation Release.This method does not set the Gain Loss for the Rio Grande accounts.
Slots Specific to This Method
 Augmented Release Switch
Type: Series Slot
Units: None
Description: Specifies whether drawdown should go toward Operational Release or Irrigation Release
Information: The value in this slot must be 0 or 1. If the value is 1, any drawdown is counted as Operational Release. If the value is 0, any drawdown is counted as Irrigation Release.
I/O: Required Input
 Control and PreRes Areas
Type: Table Slot
Units: Area, Area, Area, Area, Area, Area
Description: The table contains a one row and six columns, one for each of the following: Control Area, Pre-Res Barren Area, Pre-Res Irrigated Area, Pre-Res Meadow Area, Pre-Res River Area, Pre-Res Lake Area
Information: The areas in this table are used for calculating losses for prereservoir conditions.
I/O: Required Input
 Effective Precip
Type: Series Slot
Units: Volume
Description: The effective precipitation calculated for the given timestep.
Information: The total accumulated precipitation depth for the month is used to calculate the accumulated effective precipitation for the current day and the previous day. The difference is the Effective Precip for the current day. For a 1 Month timestep, the effective precipitation is calculated from the total precipitation for the current timestep.
I/O: Output
 Effective Precipitation Table
Type: Table Slot
Units: Length, Fraction, Length
Description: The relationship between total accumulated precipitation depth for the month and the amount considered effective precipitation.
Information: The first column gives a depth of monthly precipitation. The second column gives the fraction of that precipitation depth that is considered effective precipitation. The third column contains the accumulated effective precipitation value corresponding to the precipitation in the first column. Linear interpolation is used to calculate the effective precipitation depth based on the total precipitation depth for the month. Only the first and third columns are actually used in the interpolation. The second column is only for reference.
I/O: Required Input
 Hypothetical Lake Elev River Area Table
Type: Table Slot
Units: Length, Area
Description: Relationship of Hypothetical River Area to Hypothetical Lake Elevation
Information: This table is used to calculate river area for hypothetical conditions
I/O: Required Input
 Net Loss Adjustment
Type: Series Slot
Units: Volume
Description: The difference between the Physical Model Net Loss and the losses calculated by the accounting method
Information: If this value is positive the physical model loss was greater than the accounting method loss
I/O: Output
 Physical Model Net Loss
Type: Series Slot
Units: Volume
Description: The net loss from the simulation methods (Evaporation - Precipitation).
Information: A positive value represents a net loss
I/O: Output
 PreRes Irrigated Area Loss Rate
Type: Series Slot with Periodic Input
Units: Velocity
Description: The loss rate over irrigated area before the reservoir existed
Information: This value is used for calculating losses for prereservoir conditions.
I/O: Required Input
 PreRes Meadow Area Loss Rate
Type: Series Slot with Periodic Input
Units: Velocity
Description: The loss rate over meadow area before the reservoir existed
Information: This value is used for calculating losses for prereservoir conditions.
I/O: Required Input
 Present Lake Elev River Area Table
Type: Table Slot
Units: Length, Area
Description: Relationship of River Area to Pool Elevation
Information: This table is used to calculate river area for present conditions
I/O: Required Input
Table Series Slots Set by This Method
Each table represents a table series slot. The row names represent the column headers in the table series slots.
Method Details 
The Nambe Falls Gain Loss method carries out the following steps.
1. Check for previous Storage and Accrual on all accounts.
2. Get lists of each type of San Juan account slot.
Calculate effective precipitation
For a 1 Month timestep, this can be done based on the Precipitation Volume for the month, which will have been set in simulation. The Precipitation Volume calculation will already account for Ice Coverage if applicable. For a 1 Day timestep, Effective Precipitation must be calculated using the cumulative sum of Precipitation Rate from the beginning of the month to the current day, and Ice Coverage is included explicitly. At a 1 Month timestep the average surface area is used, whereas the current (end of timestep) surface area is used for a 1 Day timestep.
IF isMonthly
ELSE
END IF
Calculate the evaporation depth and effective precipitation depth to use in loss calculations
For all following calculations, Area values for a 1 Day timestep are current (end of timestep) areas. For a 1 Month timestep, Area values are averages of the end of the previous timestep and end of the current timestep values, similarly for Ice Coverage. If Ice Coverage is not applicable based on the selected evaporation method, it is zero in the calculations below.
    
    
If the Surface Area is zero, then evapDepth and effecitvePrecipDepth are zero, and if Ice Coverage is one, then effectivePrecipDepth is zero.
Calculate the individual components of the PreReservoir Condition Loss and the total PreRes Condition Loss
Each of these values is positive for a loss. The PreRes areas are contained in the Control and PreRes Areas table slot. The results of these calculations are set in the PreReservoir Condition table series slot.
    
    
    
    
    
Calculate the individual components of the Present Condition Loss and the total Present Condition Loss
Each of these values is positive for a loss. The results of these calculations are set in the Present Condition table series slot.
    
    
    
    
    
The netInflowVolume will be negative if there is unidentified loss. If netInflowVolume is positive, then unidentified loss is zero. The Storage Adjustment from Elev Vol Table Change component is only included if the Time Varying Elevation Volume method is selected for the Sediment category.
    
unidentifiedLoss will be positive for a loss.
    
Distribute San Juan gains/losses
The total Gain/Loss allocated to San Juan storage accounts is the difference between the Present Condition Loss and the PreReservoir Condition Loss. A positive value for each of these components represents a loss. In the Gain Loss slot on each account, a positive value represents a gain, and a negative value represents a loss. Thus the negative of the difference is taken before distributing the loss to the Gain Loss slot. The loss is distributed based on the contributing percentage of the total storage at the end of the previous timestep. If the total San Juan storage at the end of the previous timestep was zero, then the Gain Loss is zero for all accounts.
    
    
SanJuanStorages and SanJuanPassThruStorages are lists of storage slots on all accounts with the San Juan water type.
    
    
This will allow the San Juan accounts to solve for storage.
Calculate the Physical Model Net Loss and the Net Loss Adjustment
    
    
A positive value for Physical Model Net Loss represents a loss. A negative value for totalSanJuanLosses represents a loss.
    
Calculate the Operational Release, Irrigation Release and Storage Replacement
If the reservoir elevation was increasing or if the reservoir was spilling, the change in storage is counted as risingChangeStorage otherwise it is droppingChangeStorage.
Note:  For these calculations, if the reservoir changes conditions within the month (rising to dropping or dropping to rising) the results at a 1 Month timestep will not necessarily match the monthly aggregate of results from a 1 Day timestep.
    IF OR
ELSE
END IF
If the reservoir was not spilling at the end of the timestep but was spilling at the start, then these values need to be modified.
IF AND
END IF
IF Augmented Release Switch = 1
ELSE
END IF
Set summary values in table series slots
The Nambe Falls Gain/Loss method sets the following table series slots.
Each table represents a table series slot. The row names represent the column headers in the table series slots.
 
Table A.14  Preliminary Data
Column
Value
Elevation
Reservoir.Pool Elevation
Content
Reservoir.Storage
Area
Reservoir.Surface Area
Evaporation
Reservoir.Evaporation
Precipitation
Reservoir.Precipitation Volume
Unidentified Loss
Outflow (cfs)
Reservoir.Outflow
Outflow (af/d)
Reservoir.Outflow
Inflow (cfs)
Reservoir.Evaporation
Inflow (af/d)
Reservoir.Evaporation
 
Table A.15  PreReservoir Condition
Column
Value
River Channel Area
Control and PreRes Areas(Pre-Res River Area)
Barren Area
Control and PreRes Areas(Pre-Res Barren Area)
Meadow and Town Area
Control and PreRes Areas(Pre-Res Meadow Area)
River Area Loss
Barren Area Loss
Irrigated Area Loss
Meadow and Town Area Loss
PreRes Condition Loss
 
Table A.16  Present Condition
Column
Value
Water Surface Elev
Reservoir.Pool Elevation
Lake Surface Area
Reservoir.Surface Area
River Channel Area
presRiverArea
Barren Area
presBarrenArea
Total Area
Control and PreRes Areas(Control Area)
Water Surface Area Loss
Barren Area Loss
Present Condition Loss
PreRes Condition Loss
Net RG Plus SJ-C Loss
totalSanJuanLosses
 
Table A.17  Nambe Daily Reservoir Comps
Column
Value
Water Surface Elev
Reservoir.Pool Elevation
Total Content
Reservoir.Storage
Change in Content
Storage Replacement
storageReplacemet
Total Release (cfs)
Reservoir.Outflow
Total Release (af/d)
Reservoir.Outflow
Operational Release
operationalRelease
Irrigation Release
irrigationRelease
Net Loss
totalSanJuanLosses
Replacement Loss
replacementLoss
Total Inflow (cfs)
Total Inflow (af/d)
Storage + Loss Replmt.
* Heron Gain Loss
This method calculates the Gain Loss for accounts on the Heron Reservoir. The method is currently configured to function correctly for 1 Day and 1 Month timestep sizes only.
This method requires simulation to have solved for Storage, Evaporation and Precipitation Volume; therefore, the execution time must be set to After Simulation.
The Gain Loss for the RioGrande account is set equal to seepage.
    
This allows the RioGrande account to solve for storage. All other gains/losses go to the FederalSanJuan account. The Gain Loss for all other accounts with the SanJuan water type is set to zero.
    
    
SanJuanStorages and SanJuanOutflows lists of the Outflow and Storage slots on all accounts with the San Juan water type.
    
    , for all other San Juan accounts.
Slots Specific to This Method
 Net Loss Adjustment
Type: Series Slot
Units: Volume
Description: The difference between the Physical Model Net Loss and the losses calculated by the accounting method
Information: If this value is positive the physical model loss was greater than the accounting method loss
I/O: Output
 Physical Model Net Loss
Type: Series Slot
Units: Volume
Description: The net loss from the simulation methods (Evaporation - Precipitation).
Information: A positive value represents a net loss
I/O: Output
Table Series Slots Set by This Method
Each table represents a table series slot. The row names represent the column headers in the table series slots.
Method Details  
    
    
Physical Model Net Loss is positive for a loss. The account Gain Loss slot values are negative for a loss.
The Heron Gain Loss method sets the following table series slots.
 
Table A.18  Preliminary Data
Column
Value
Elevation
Reservoir.Pool Elevation
Content
Reservoir.Storage
Area
Reservoir.Surface Area
Evaporation
Reservoir.Evaporation
Precipitation
Reservoir.Precipitation Volume
Unidentified Loss
Outflow (cfs)
Reservoir.Outflow
Outflow (af/d)
Reservoir.Outflow
Inflow (cfs)
Reservoir.Evaporation
Inflow (af/d)
Reservoir.Evaporation
 
Table A.19  Daily Reservoir Computations
Column
Value
Water Surface Elev
Reservoir.Pool Elevation
Total Content
Reservoir.Storage
Change in Content
RG Release (cfs)
, for all accounts with RioGrande water type
RG Release (af/d)
, for all accounts with RioGrande water type
SJ-C Release (cfs)
, for all accounts with SanJuan water type
SJ-C Release (af/d)
, for all accounts with SanJuan water type
Evap
Reservoir.Evaporation
Precip
Reservoir.Precipitation Volume
RG Inflow (cfs)
, for all accounts with RioGrande water type
RG Inflow (af/d)
, for all accounts with RioGrande water type
SJ-C Inflow (cfs)
, for all accounts with SanJuan water type
SJ-C Inflow (af/d)
, for all accounts with SanJuan water type
Total Inflow (cfs)
Reservoir.Inflow
Total Inflow (af/d)
Reservoir.Inflow
 
Table A.20  Reservoir Summary
Column
Value
Total Drawdown
RG Loss
0
SJ-C Loss
, for all accounts with SanJuan water type
Total Loss
SJ-C Loss
RG Release From Storage
SJC Release From Storage
RG Content
RioGrande.Storage
SJ-C Content
totalSanJuanStorageSum
Total Content
Reservoir.Storage
For a 1 Day timestep, values are set in the following additional table series slots. These slots contain the monthly totals of their corresponding table series slots. The monthly sums are set at the last timestep for each month. All other cells display “NaN.” For a 1 Month timestep, no values are set in these slots.
• Preliminary Data Totals
• Daily Reservoir Totals
• Reservoir Summary Totals
Revised: 07/05/2022