25 This study introduces the California Food -Energy -Water System (CALFEWS) sim ulation model to 26 describe the integrated, multi -sector dynamics that emerge from the coordinated management of surface 27 and groundwater supplies throughout California ’s Central Valley . The CALFEWS simulation framework 28 links the operation of state-wide, interbasin transfer projects (i.e., State Water Project, Central Valley 29 Project) with coordinated water management strategies abstracted to the scale of irrigation /water districts . 30 This study contributes a historic baseline (October 1996 – September 2016 ) evaluation of the model ’s 31 performance against observations , including reservoir storage , inter-basin transfers , environmental 32 endpoints , and groundwater banking accounts . State -aware, rules -based repres entations of critical 33 component systems enable CALFEWS to simulate adaptive management response s to alternative climate, 34 infrastructure, and regulatory scenarios . Moreover, CALFEWS has been designed to maintain 35 interoperability with electric power dispatch and agricultural production models . As such, CALFEWS 36 provides a platform to evaluate internally consistent scenarios for the integrated management of water 37 supply, energy generati on, and food production. 38 Keywords: Adaptive management, water resources, groundwater recharge , interbasin transfers, dynamic 39 simulation 40 Name of Software: CALFEWS 41 2 Developers: H.B. Zeff ( zeff@live.unc.edu ), A.L. Hamilton, K. Malek, J.D. Herman, J. S. Cohen, with 42 contributions from G.W. Characklis, P.M. Reed, and J. Medellin -Azuara. 43 Software/Date Availability: All code and data for this project, including figure ge neration, are available 44 in a live repository (http://github.com/hbz5000/CALFEWS ) and a permanent archive 45 (https://doi.org/10.5281/zenodo.4091708) 46 Source Language: Python , Cython 47 License: MIT 48 49 3 Introduction: 50 Throughout the 20th century, large -scale water storage and conveyance projects were developed 51 to support urban growth and agricultural production in California. These projects have generated 52 significant economic benefits for the state , particularly within the Central Valley where water storage and 53 conveyance infrastructure support irrigation in four of the five most productive agricultural counties in the 54 United States (USDA, 2012). However, surface water deliveries from these projects are highly uncertain 55 due to complex in teractions between hydrologic variability, environmental regulations, and infrastructure 56 capacity constraints (CADWR, 2018) . Water users are often able to partially mitigate surfac e water 57 shortfalls by pumping groundwater but doing this repeatedly has resulted in substantial drawdowns of 58 Central Valley aquifers , particularly during recent droughts in 2007 -09 and 2012 -2016 (Xiao et al., 2017). 59 In the Tulare Basin, aquifers are managed through a network of groundwater recha rge basins, recovery 60 wells, and surface conveyance . Much of the capacity in this system has been developed through 61 groundwater banking institutions , in which excess surface water is recharged (‘banked’) via spreading 62 basins so that it can be subsequently r ecovered (‘withdrawn’) during wetter periods (Christian -Smith, 63 2013) . Recharge and recovery capacity have been developed jointly by local irrigators and 64 municipal /urban users from around the state (Wells Fargo, 2017; USBR, 2013) , operated through 65 cooperat ive agreements and exchanges between municipal and agricultural sectors . 66 The importance of the groundwater banking system to both agricultural and municipal contractors 67 underscores the need for simula tion mode ls that can capture multi -scale institutional response s to floods 68 and droughts, ranging from state and federal management of reservoirs and inter -basin transfer projects to 69 local irrigation and groundwater banking decisions. Existing surface water models for California, like 70 CalSIM (Drap er et al., 2004) , CalLite (Islam et al., 2011), and CALVIN (Draper et al., 2003) are 71 deterministic mathematical programming (M P) models that represent reservoir systems using prescriptive 72 optimization models to determine optimal water allocation s at the statewide scale. Individual water 73 suppliers like Metropolitan Water District (Groves et al., 2015) and the Inland Empire Utilities Agency 74 (Lempert and Groves, 2010) perform vulnerabil ity assessments with customized, regional WEAP models 75 (Yates et al., 2009) that use linear programming to solve constrained water allocation problems. Other MP 76 models are widely used for drought planning (Labadie and Larson, 2007; Zagona et al., 2001), and recent 77 work has shown how they can be coupled with non -linear groundwater models to better reconcile the 78 impact of surface/groundwater substitution on stream -aquifer interactions (D ogrul et al., 2016). Broadly, 79 this class of MP models are designed to determine optimal allocations of water given a set of welfare or 80 benefit fun ctions distributed through time. They do not typically capture critical interactions between the 81 institutional agreements that govern surface water rights, groundwater management, and regulatory 82 4 constraints on conveyance. These interactions are important fo r representing the water balance dynamics 83 as well as the institutional rules that govern the interdependent management of extreme flood and drought 84 events in California. Infrastructure and regulatory constraints impact operations at a daily time scale in 85 ways that are missed when aggregating operations to a monthly level, particularly with respect to high 86 flow periods during which water is most readily available for groundwater recharge. The simulation 87 framework used by CALFEWS links the operations of local irrigation and water storage districts with 88 statewide water import projects at a daily step to better capture the institutional relationships that drive 89 water distribution in the Central Valley . 90 The CALFEWS simulation -based approach is capable of representing California’s coordinated 91 water resources operations across institutionally complex systems by conditioning actions on shared state 92 variables that represent hydrologic and regulatory conditions (as recom mended by Haimes, 2018) . 93 Within CALFEWS, a set of common, dynamic state variables related to snowpack and streamflow are 94 used to toggle between operating rules when they have been explicitly defined by the relevant 95 stakeholders (e.g., SWRCB, 1990; USACE, 1970) and to evaluate adaptive decision rules when 96 operations are empirically derived from historical relationships. As a daily simulation, model state 97 variables and operations can be evaluated relative to historical observations (CDEC, 2020a) at a number 98 of critical locations throughout the Central Valley syste m, including storage at 12 major surface water 99 reservoirs, pumping rates through SWP and CVP facilities in the Sacramento -San Joaquin Delta (delta) 100 that bring water into Central and Southern Californ ia, estimates of delta salinity (which can limit 101 pumping) , and storage accounts in major groundwater banks (see Figure 1) . Simulation results can be 102 directly compared to these observations as a means of quantify ing how well decision rules simulate 103 observe d responses to the broad range of changing hydrologic (CDEC, 2020b), regulatory (NMFS, 2009; 104 Meade, 2013) and infrastructure (AECOM, 2016; USACE, 2017) conditions that have shaped system 105 dynamics surrounding California’s North -South interbasin water transfers from the delta to contractors 106 throughout Central and Southern California . This simulation framework specifically supports Monte 107 Carlo exploratory modelling results, particularly with respect to irrigati on deliveries and pumping 108 requirements that can be linked to state -of-the-art agricultural production (Howitt et al., 2012) and electric 109 power dispatch (Kern et al., 2020) models. Decision rules are spatially resolved at the scale of individual 110 irrigation and water districts, which have historically been the primary unit of organization for 111 consolidating water rights and financing water infrastructure in California, particularly in the Southern 112 San Joaquin and Tulare Basins (Hanak et al., 2011). By allocati ng water through individual district 113 turnouts on canals and natural channels, the decisions are able to better reflect the relationship between 114 water rights institutions and the ownership and operation of storage and conveyance infrastructure, which 115 is not possible using models that rely on broader regi onal aggregation of water supplies and demand s. 116 5 CALFEWS therefore operates at the spatial and temporal resolution required to link food, energy, and 117 water systems through consistent hydrologic scenarios, enab ling it to serve as a useful platform for 118 evaluating complex risks that can be transmitted between these systems (Bazilian et al., 2011; Liu, 2016 ; 119 Cai et al., 2018 ; Haimes, 2018). 120 Methods 121 The CALFEWS model simulates coupled water storage and conveyance networks in California’s 122 Central Valley (Figure 1) . Two large water transfer projects link the Sacramento, San Joaquin, and 123 Tulare Basins , first via SWP and CVP delta pumping facilities that convey water to San Luis Reservoir 124 and second through the Friant -Kern Canal. Complex environmental regulations constrain pumping based 125 on hydrologic conditions in the delta. State (SWP) and federal (CVP) agencies manage delta hydrologic 126 conditions and export pumping through coordinated releases from seven reservo irs in the Sacramento and 127 San Joaquin headwaters . Individual irrigation and water districts cont rol imports from San Luis and 128 Millerton Reservoirs through a shared network of canals connect ing districts to the California Aqueduct 129 and the Friant -Kern Canal . In wet years, districts recharge aquifers with excess surface water when 130 surface storage becomes insufficient . State and federal actions to manage flow, storage, and water 131 exports interact with local decisions made by institutional users, including irrigation and water storage 132 districts. CALFEWS simulates this dynamic by linking infrastructure operations to institutional decisions 133 tied to hydrologic and other water management states, such as snowpack observations and reservoir 134 storage. 135 The flow of information between observed states (e.g., snowpack, full -natural -flow) , distributed 136 decision -making (e.g. reservoir releases, groundwater recharge diversions) , and modelled state responses 137 (e.g. reservoir storage, groundwater bank accounts) during a singl e CALFEWS simulation step are 138 illustrated in Figure 2 . At the beginning of each time step, new hydrologic input data are used to update 139 observed states at storage, regulatory, and demand nodes throughout the Sacramento, San Joaquin, and 140 Tulare Basins. New observations, along with seasonal trends extracted from a historical record, are used 141 to inform a battery of distributed, heterogeneous decisions made by urban and agricultural water users, 142 reservoir operators, and local/imported water project managers. Modelled state variables, including 143 reservoir storage and groundwater account balances, are updated by aggregating the distributed decisions 144 through priority -based operational rules that determine infrastructure capacity utilization (Figure 1) . 145 6 146 Figure 1: CALFEWS flow network (natural channels and canals) with storage, regulatory, urban 147 turnout, irrigation district, and groundwater banking nodes. 148 149 7 150 Figure 2: CALFEWS model schematic for the development of state -aware decision rules and 151 infrastruct ure operations 152 Hydrologic preprocessing and reservoir decisions extend an initial study in the Sacramento 153 Valley by Cohen et al. (2020). The Methods section is organized into four parts, describing: (i) how 154 observed state variables are defined based on hy drologic data ; (ii) how metrics used to drive management 155 decisions are calculated from observed and modelled state variables ; (iii) how management decisions are 156 triggered through applying seasonal adaptive thresholds to the calculated metrics ; and (iv) how distributed 157 management decisions are aggregated to update modelled state variables . 158 Hydrologic Data and Observed State Variables 159 Daily hydrologic time series data obtained through the California Data Exchange Center (CDEC) 160 are used to update hydro logic states at storage nodes (reservoirs), regulatory nodes (flow gauge), and 161 demand nodes (irrigation/water districts, ground water banks, and urban withdrawal points ) at a daily time 162 step. Storage nodes are associated with CDEC full-natural -flow, reserv oir inflow, and snowpack CDEC 163 stations as listed in Table 1. Full -natural -flow and snowpack observations are state variables used for 164 8 distributed decisions and do not directly interact with CALFEWS infrastructure . Flow observations from 165 reservoir inflow nodes are used to make daily storage updates. Regulatory nodes use downstream flow 166 observations to generate incremental flows within a given reach based on the difference between CDEC 167 flow gauge data and upstream releases, such that: 168 𝑖𝑛𝑐 𝑟,𝑡=𝑑𝑜𝑤 𝑛𝑟,𝑡− ∑ 𝑅𝑤𝑢,𝑡 𝑤𝑢−∑𝑖𝑛𝑐 𝑟𝑢,𝑡 𝑟𝑢 (1) 169 where inc= incremental flows ( m3/s); down = flow at downstream gauge location ( m3/s); R = upstream 170 release (m3/s); r = regulatory node; wu = reservoirs upstream of regulatory node r; ru = regulatory nodes 171 upstream of regulatory node r; t = time step index . 172 Incremental flows aggregate the unobserved contribution of ‘uncontrolled’ tributaries, stream -aquifer 173 interactions, consumptive uses, and re turn flows that take place within reaches defined by the location of 174 reservoir outlets and control gauges, as shown in Figure 1. Table 1 also lists the CDEC flow stations and 175 upstream reference gauges used to develop incremental flows at each downstream lo cation. Data for 176 within -delta consumptive uses and the contribution of the ‘Eastside Streams’ are taken from the 177 California DWR’s DAYFLOW data set (CDEC, 2020c). Negative incremental flow values signify a 178 losing reach within the Sacramento -San Joaquin flo w network. Delta inflows are equal to the sum of 179 incremental flows at all regulatory nodes and releases at all reservoir nodes. Delta outflows are subject to 180 a water balance within the delta to account for consumptive and exported losses, such that: 181 𝑑𝑜𝑢𝑡 𝑡=𝑑𝑖𝑛 𝑡−𝐸𝑡− 𝑑𝑒𝑝𝑙𝑒𝑡𝑖𝑜𝑛𝑠 𝑡 (2) 182 where E = delta exports (transfers) to San Luis Reservoir (m3/s); dout = total delta outflow ( m3/s);din = 183 total delta inflow ( m3/s) depletions = consumptive use between delta inflow and delta outflow gages 184 (m3/s); and wd = reservoirs that drain to the delta 185 Pumping in the delta is highly regulated and recent changes aimed at improving ecological functions have 186 reduced SWP and CVP project yields, presenting challenges to large water providers w ho are reliant on 187 imports (MWD, 2016). Regulatory constraints reflect rules outlined in State Water Control Board 188 Decision 1641 (SWRCB, 1990) and National Marine and Fisheries Services Biological Opinions (NMFS, 189 2009), governing minimum outflow requirem ents, inflow/export ratios, seasonal limits on pumping rates , 190 and salinity targets . CALFEWS uses the relationship between delta outflows and the ‘X2’ salinity line 191 (Jassby et al., 1995) to apply salinity constraints to model operations. Delta outflows impact the salinity 192 within the transitional area between the Sacramento -San Joaquin Delta and the San Francisco Bay. The 193 delta X2 line measures the point, relative to the Golden Gate Brid ge, where salinity one meter from the 194 bottom of the delta bed is equal to 2 parts per thousand . The X2 relationship is calculated according to 195 9 Mueller -Solger (2012), updating the value of X2 in each time step based on the previous time step delta 196 outflow, such that: 197 𝑋2𝑡=10.16+0.945 𝑋2𝑡−1−1.487 log 10𝑑𝑜𝑢𝑡 𝑡−1 (3) 198 where X2 = delta ‘X2’ salinity line (km) 199 Table 1: Watershed name and outflow/downstream flow gauge for each of the 12 major reservoirs 200 modelled in CALFEWS. Stations correspond to IDs on California Data Exchange Center. 201 Reservoir Name Watershed Name Outflow CDEC gauge Downstream CDEC gauge Delta inflow gauge Snowpack stations Shasta Upper Sacramento SHA WLK RIO SLT; STM; CDP Oroville Feather \ ORO GRL RIO KTL; GRZ; PLP New Bullards Yuba YRS MRY RIO KTL; GRZ; PLP Folsom American FOL N/A RIO CAP; SIL; HYS New Melones Stanislaus NML OBB VER DDM; GNL; REL; SLM; BLD Don Pedro Tuolumne DNP LGN VER DAN; TUM; HRS; PDS Exchequer Merced EXC CRS VER STR; TNY Millerton San Joaquin MIL N/A N/A VLC; AGP; CHM; HNT Pine Flat Kings PNF N/A N/A BSH; BCB; UBC Kaweah Kaweah TRM N/A N/A FRW; GNF Success Tule SCC N/A N/A FRW; GNF Isabella Kern ISB N/A N/A CBT 202 The Tulare Basin component does not contain downstream regulatory nodes. Instead, reservoirs 203 are connected to demand nodes by canals or river channels. Reservoir operations are determined based 204 on state -aware decisions that simulate requests for water us e at individual demand nodes. Irrigation and 205 water districts use management metrics derived from hydrologic states to transition between non -linear 206 rules used to request deliveries under normal, flood and drought conditions. Deliveries are requested as a 207 function of water demand at each node, explicitly simulated based on land cover and historic withdrawals 208 at municipal diversion points ( CADWR, 2018; ID4, 20 18). Land cover data is determined based on crop 209 types described in historic pesticide permitting d ata (Mall and Herman, 2019) or listed in agricultural 210 10 water management plans, aggregated by irrigation district. Daily consumptive demands are calculated by 211 applying expected seasonal ET requirements (ITRC, 2003) to the total crop acreage, by district, su ch that: 212 𝑑𝑒𝑚𝑎𝑛𝑑 𝑑,𝑡=𝑀𝐷𝐷 𝑑,𝑡+ ∑ 𝑘𝑙𝑜𝑠𝑠 ∗𝐸𝑇𝑐𝑟𝑜𝑝 ,𝑑𝑜𝑤𝑦 ,𝑒∗𝐴𝑑,𝑐𝑟𝑜𝑝 ,𝑦 𝑐𝑟𝑜𝑝 (4) 213 where demand = maximum node demand (m3/s); MDD = daily municipal demand (m3/s); ET = daily crop 214 evapotranspiration (m ); A = acres of crop cover within ir rigation district service area (m2); dowy = day of 215 the water year (1, 2, 3…., 365); y = year; d = irrigation district; crop = crop type; e = environmental index 216 based hydrologic conditions; and kloss =loss factor for seepage and eva poration during conveyance 217 Relating Observ ed States to Management -Relevant Metrics 218 Daily hydrologic states provide CALFEWS with a snapshot of flow, snowpack, and water 219 demand conditions at nodes throughout the Central Valley (Figure 1) . However, management decisions 220 that incorporate estimates of future hydrologic conditions can make mor e efficient use of limited 221 infrastructure capacity (including reservoir storage, delta pumps, spreading basins, extraction wells, and 222 canal conveyance). To this end, CALFEWS uses a training data series to relate snowpack and full - 223 natural -flow to seasonal hydrologic conditions, including estimates of total ‘snowmelt season’ (April – 224 July) flows and future flows at one -month intervals. The historical training series covers the period 225 October 1996 – September 2016, for which CDEC contains daily data for all m odel hydrologic states. A 226 series of daily linear regressions developed from the training series are used to relate the hydrologic state 227 on a given day of the water year to future water availability aggregated over management -relevant 228 periods. First, esti mates from snowpack stations in each watershed are related to reservoir inflow stations 229 as listed in Table 1. The total inflow to each reservoir during the snowmelt season (April 1 – July 31) can 230 be expressed as a function of the total snowpack accumulati on at the associated sites through a given day 231 of the water year. New snowpack observations can be used to produce an estimate of the subsequent 232 snowmelt season inflows to a reservoir using unique linear coefficients for each day, as in Cohen et al. 233 (2020 ), such that: 234 𝑆𝑀𝐼∗𝑤,𝑡=𝑚𝑠𝑛𝑜𝑤 𝑤,𝑑𝑜𝑤𝑦 ∗𝑆𝑃𝑤,𝑡+ 𝑏𝑠𝑛𝑜𝑤 𝑤,𝑑𝑜𝑤𝑦 (5) 235 where SMI* = estimated reservoir inflow during the snow melt season (April – July) (m3); dowy = day of the 236 water year, SP = aggregated index of snow water equivalent (SWE) depth ( m); msnow = linear regression 237 coefficient (m2); bsnow = linear regression constant (m3), w = watershed 238 Using the 20 -year historical training period, regression coefficients can be estimated for each day of the 239 water year such that t he sum of squared errors between the estimates produced in equation (5) and the 240 eventual snowmelt season inflow observations are minimized, such that: 241 11 𝑚𝑠𝑛𝑜𝑤 𝑤,𝑑𝑜𝑤𝑦 ̂ ,𝑏𝑠𝑛𝑜𝑤 𝑤,𝑑𝑜𝑤𝑦̂ =argmin ∑ (𝑆𝑀𝐼∗𝑤,𝑑𝑜𝑤𝑦 ,𝑦−∑ 𝑄𝑤,𝑑𝑎,𝑦304 𝑑𝑎=181 )22016 𝑦=1997 (6) 242 Where Q = reservoir inflow (m3/s) 243 The 20 -year historical training period provides 20 unique snowpack accumulation observations to infor m 244 each daily regression . The daily linear relationships between snowpack observations and the subsequent 245 total snowmelt -season inflow at selected reservoir s are shown in Figure 3 , column 1, with colored lines 246 corresponding to the line of best fit for snowpack observations occurring every day from Oct 1st – April 247 1st. Individual observations from every year of the historical record are shown for three specific days, 248 October 1st (blue points), January 1st (green points), and April 1st (beige points) to illustrate seasonal 249 changes in the fit of this data to this linear relationship . Although th e relationship is noisy, the linear fit 250 for all reservoirs/watersheds improves over the course of the water year as more information about the 251 total snowpack accumulation becomes available. A statistical summary of goodness -of-fit metrics can be 252 found in S upplement A. 253 254 Figure 3: Historical period observations and time -dynamic log -scale relationships between 255 CALFEWS observed states and select decision -relevant metrics in four key watersheds 256 12 Snowpack observations send strong signals about water availability during the snowmelt seas on, 257 when most irrigation demand takes place. However, shorter -term (monthly) estimates of future water 258 availability can also inform infrastructure operations with respect to managing reservoir flood control 259 pools or maintaining adequate supplies for seaso nal environmental releases . At each time step in the 260 training period, the previous 30 days of full-natural -flow observations can be linearly related to future 261 reservoir in flow observations, aggregated into 12 unique , consecutive periods of 30 days. Using 12 sets of 262 linear coefficients for each day of the water year , the next 360 days of flow, in 30 day increments, can be 263 estimated at each timestep based on the trailing, 30 -day moving average full-natural -flow, such that: 264 𝑄∗ 𝑤,𝑖𝑛𝑡,𝑡=𝑏𝑓𝑙𝑜𝑤 𝑤,𝑑𝑜𝑤𝑦,𝑖𝑛𝑡+ 𝑚𝑓𝑙𝑜𝑤 𝑤,𝑑𝑜𝑤𝑦 ,𝑖𝑛𝑡∗∑𝐹𝑁𝐹 𝑑𝑎,𝑤 30𝑡 𝑑𝑎=𝑡−30 (7) 265 where Q* = estimated reservoir inflow in time interval int (m3); int = future flow interval (0, 1, 2, …., 11); 266 bflow = linear regression coefficient (m3); mflow = linear regression constant; FNF = full -natural -flow 267 (m3/s) 268 As in equation (6), the 20 -year historical training period is used to estimate regression coefficients for 269 each day of the water year such that the su m of squared errors between the estimates produced in equation 270 (7) and the observed reservoir inflow observations are minimized for every future interval , such that: 271 𝑚𝑓𝑙𝑜𝑤 𝑤,𝑑𝑜𝑤𝑦 ,𝑖𝑛𝑡̂ ,𝑏𝑓𝑙𝑜𝑤 𝑤,𝑑𝑜𝑤𝑦 ,𝑖𝑛𝑡̂ =argmin ∑ (𝑄∗ 𝑤,𝑖𝑛𝑡,𝑑𝑜𝑤𝑦 ,𝑦−∑ 𝑄𝑤,𝑑𝑎,𝑦𝑑𝑜𝑤𝑦 +30∗𝑖𝑛𝑡 𝑑𝑎=𝑑𝑜𝑤𝑦)22016 𝑦=1997 (8) 272 where Q = total reservoir inflow (m3/s); bflow = linear regression coefficient; mflow = linear regression 273 constant; FNF = full -natural -flow (m3/s); int = interval index (0, 1, 2, … 11); 274 The last two columns of Figure 3 show daily linear relationship s between the trailing, 30 -day moving 275 average full -natural -flow and the expected reservoir inflow aggregated over future periods of 30 and 120 276 days. As in t he snowpack accumulation column, observations from every October 1st, January 1st, and 277 April 1st in the historical training period are shown to illustrate data fit to the daily linear relationships . 278 The relationships are unique to each watershed and change over the course of the water year to reflect 279 seasonal flow patterns. As the aggregation period gets longer and includes observations further into the 280 future, the linear relationship becomes noisier, as shown in the difference between the 30 - and 120 -day 281 aggregation periods. 282 In addition to estimating flow into reservoirs, management -related metrics also take advantage of 283 estimates of future incremental flows , inc* at each gauge location r. Substitu ting incremental flows , as 284 calculated in equation (1), for reservoir inflow, Q in equation (8), linear c oefficients can be generated to 285 estimate inc* using the trailing, 30 -day moving average full -natural -flow in equation (7). Full-natural - 286 13 flow estimators can be aggregated to reflect the drainage area of each incremental flow station, as in 287 Table 1. 288 In addition to the hydrologic indicators outlined in equations (5 -8), Tulare Basin management 289 metrics also incorporate estimates of the future demand at eac h demand node through the end of a given 290 water year. Future demands are estimated as a combination of municipal and irrigation demands. As in 291 equation (4), irrigation demands are calculated based on land cover and municipal demands are calculated 292 using ob servations f rom historical record s. Municipal demands are estimated through the end of a given 293 water year based on the current allocation of municipal supplies, such that: 294 𝑀𝐷𝐷∗𝑑,𝑡=𝑏𝑢𝑟𝑏 𝑑,𝑑𝑜𝑤𝑦 +𝑚𝑢𝑟𝑏 𝑑,𝑑𝑜𝑤𝑦 ∗∑ 𝑎𝑙𝑙𝑜𝑐 𝑑,𝑐𝑜𝑛𝑡𝑟𝑎𝑐𝑡 ,𝑦 𝑐𝑜𝑛𝑡𝑟𝑎𝑐𝑡 (9) 295 where MDD* = expected municipal demand (m3/s); burb = linear regression constant for municipal 296 demand; murb = linear regression coefficient for municipal demand; alloc = tota l water contract 297 allocation (m3); contract =contract type; y = year; d = water district 298 Irrigation demands are estimated through the end of a given water year based on crop acreages within the 299 service area of an irrigation district and expected crop evapotranspiration (ITRC, 2003) , such that: 300 𝐼𝑅𝐷∗𝑑,𝑡= ∑ ∑ 𝑘𝑙𝑜𝑠𝑠 ∗𝐸𝑇𝑐𝑟𝑜𝑝 ,𝑑𝑎,𝑒∗𝐴𝑑,𝑐𝑟𝑜𝑝 ,𝑦 𝑐𝑟𝑜𝑝365 𝑑𝑎=𝑑𝑜𝑤𝑦 (10) 301 where IRD* = irrigation demand (m3/s); ET = daily crop evapotranspiration ( m); A = acres of crop cover 302 within irrigation distr ict service area (m2); y = year; d = irrigation district; crop = crop type; and kloss =loss 303 factor for seepage and evaporation during conveyance 304 The management -relevant metrics calculated in equations (5 -10) are updated at each node 305 illustrated in Figure 1 with daily hydrologic observations. Together, these metrics serve as the building 306 blocks for adaptive rules used to inform institutional decisions and operate shared infrastructure. 307 Multi -scale Adaptive Decision -Making Rules 308 CALFEWS abstracts various decision -making institutions as sets of decision rules that can be 309 triggered using the management – relevant metrics calculated in equations (5 -10). In this section, we 310 explain the rules that describe the actions of reservoir operators, water contract man agers, and 311 irrigation /water districts, the three institutional groups that jointly determine CALFEWS infrastructure 312 operations. Transitions between rule formulations, driven by changes to metrics updated with new 313 hydrologic observations, enable the adaptive operation of infrastructur e illustrated in Figure 1 . 314 315 14 Reservoir Operators 316 Reservoir operations are implemented using independent rules governing minimum 317 environmental releases and flood control pools at each reservoir. Rules change seasonally as a function 318 of environmental indices that are calculated from hydrologic observations and management metrics from 319 equations (5 -10). Environmental release rules at each reservoir constrain releases to meet seasonal 320 minimum flows at three locations: immed iately below the dam outlet , at the reservoir -specific 321 downstream gages described in equation (1), and at the delta inflow gauges described in equation (2), 322 such that: 323 𝑚𝑖𝑛𝑠𝑡𝑟 𝑤,𝑡=max (𝑒_𝑟𝑙𝑤,𝑚,𝑒 ,𝑒_𝑑𝑛𝑤,𝑚,𝑒−𝑖𝑛𝑐 𝑟𝑤,𝑡 𝑘𝑑𝑖 𝑤∗[ 𝑒_𝑖𝑛𝑏,𝑚,𝑒−∑ 𝑖𝑛𝑐 𝑟𝑏,𝑡 𝑟𝑏]) (11) 324 where minstr = minimum release at reservoir to meet instream flow requirement (m3/s); e_rl = 325 environmental m inimum flow at dam outlet (m3/s); e_dn = environmental minimum flow at downstream 326 gauge (m3/s);e_in = environmental minimum flow at delta inflow gauge; m = month; e = environmental 327 index; kdi = delta inflow requirement sharing coefficient; b = delta inflow drainage basin; rw= 328 incremental reach downstream of reservoir w ; rb= incremental reaches associated with delta inflow gage 329 b (Rio Vista, Vernalis) 330 In addition to instream flow requirements, managers in Sacramento River Basin reservoirs 331 maintain responsibility for meeting inflow and outflow regulations in the Sacramento -San Joaquin delta, 332 including the location of the ‘X2’ line used to measure salinity, described in equation (3). As with 333 instream flow requirements, the delta rules change seasonally as a function of environmental indices 334 calculated from equations (5 -8). If downstream incremental flows are insufficient to maintain minimum 335 delta outflows after meeting consumptive uses within the delta, additional delta outflow releases must be 336 made from the Sacramento River Basin reservoirs , such that: 337 𝑚𝑖𝑛𝑜𝑢𝑡 𝑤,𝑡=𝑐𝑟𝑙 𝑤∗𝑚𝑎𝑥 ([𝑑𝑚𝑖𝑛 𝑚,𝑒,𝑑𝑥2𝑡]+𝑑𝑒𝑝𝑙𝑒𝑡𝑖𝑜𝑛𝑠 𝑡−∑𝑖𝑛𝑐 𝑟,𝑡 𝑟 ,0) (12) 338 where minout = minimum release for delta outflow (m3/s); crl = Article 6 SWP/CVP sharing fraction for 339 in-basin releases; dmin = minimum delta outf low (m3/s); dx2 = minimum outflow to meet X2 (salinity) 340 requirements (m3/s); depletions = within -delta consumptive use (m3/s); inc = incremental flows (m3/s); 341 minstream = minimum release for instream flow requirements (m3/s); minflood = minimum release for 342 flood control (m3/s); r = incremental flow nodes and wd = reservoirs nodes that drain to the delta 343 The minimum delta outflow that is required to meet X2 location requirements is calculated each day by 344 rearranging equation (3) used to calculate the X2 location (Mueller -Solger, 2012) , such that: 345 15 𝑑𝑥2𝑡=1010.16+0.945 𝑋2𝑡−1− 𝑋2𝑚𝑎𝑥 𝑑𝑜𝑤𝑦 ,𝑒1.487⁄ (13) 346 where dx2 = minimum delta outflow required to maintain X2 location salinity requirements (m3/s); X2max 347 = X2 regulatory l ine (km); X2 = simulated X2 value (km) 348 When minout is positive, CALFEWS distributes responsibility for making releases to individual 349 reservoirs based on the SWP/CVP Coordinated Operations Agreement (USBR, 2018), that states, ‘when 350 water must be withdrawn from reservoir storage to meet in -basin uses , 75% of the responsibi lity is borne 351 by the CVP and 25% is borne by the SWP’. In CALFEWS, the SWP portion of this responsibility is 352 applied to calculations of available water stored at Oroville Reservo ir, and the CVP portion of this 353 responsibility is released from Shasta Reservoir, such that crl in equation (11) is equal to 0.75 at Shasta, 354 0.25 at Oroville, and 0.0 everywhere else. 355 A complete schedule of instream flow requirements, delta outflow re quirements, and index 356 thresholds, reflecting State Water Resources Control Board decisions, National Marine and Fisheries 357 Services Biological Opinions, and other streamflow agreements (CADWR, 1967; FERC, 2015; FERC, 358 2016; FERC, 2019; NMFS, 2009; Sacramento Water Forum, 2015; SWRCB, 1990; SWRCB, 2000; 359 YCWA, 2007) can be found Supplemental Section A. 360 CALFEWS also simulates the flood control decisions made by reservoir operators. Flood control 361 rules are formulated as seasonal flood pool requirements used by the Army Corps of Engineers to provide 362 a cushion of unused storage for flood control. Effective capacity in each reservoir is determined using 363 indices from the reservoir -specific Army Corps Flood Control Manuals (USACE, 1970; USACE, 1977; 364 USACE, 1980; US ACE, 1981; USACE, 1987; USACE, 2004; MID and TID, 2011). The f lood control 365 pool is designed to prevent storage from reaching the maximum design capacity, beyond which 366 uncontrolled flows spill from the reservoir risking downstream flooding and potentially threatening the 367 integrity of the dam itself. If storage encroaches into the flood control pool, reservoir operators must 368 release water to clear this space. As a modelling convention , 20% of the total volume of flood pool 369 encroachment is released every day until storage has either been cleared from the pool or reaches the 370 maximum design capacity, such that: 371 𝑚𝑖𝑛𝑓𝑙𝑜𝑜𝑑 𝑤,𝑡=𝑚𝑎𝑥 [0.2∗(𝑆𝑤,𝑡−𝑡𝑜𝑐 𝑤,𝑓𝑐𝑖,𝑡),(𝑆𝑤,𝑡−𝑆𝑀𝐴𝑋 𝑤),0] (14) 372 where minflood = minimum release for flood control (m3/s); toc = top of conservation pool, SMAX = 373 maximum storage capacity, fci = flood control index value 374 A complete schedule of flood pool volumes and flood control index thresholds for all reser voirs can be 375 found in Supplemental Section A . 376 16 Water Contract Managers 377 Water contracts entitle owners to some amount of surface water, either as flow in a r iver or a 378 portion of the yield in an imported water project (e.g., SWP/CVP) . Water deliveries from these contracts 379 are simulated in CALFEWS through request s for reservoir releases and subsequent withdrawals from 380 rivers and canals. Each contract is associated with one or more reservoirs (Table 2) where contractors can 381 store their water. Some reservoirs store multiple contracts under a priority -based system to allo cate 382 supplies between the contracts. Before deliveries can be made, water contract managers must use 383 hydrologic variables to estimate the total contract allocation in a given year and/or when to make 384 additional flood flows available to contractors. Decisi ons about contract allocations and flood flow 385 availability help contractors to make their own coordinated surface and groundwater use decisions based 386 on individual supplies and demands. CALFEWS includes ten unique water contracts including water 387 rights al ong the Kings River , Kaweah River , Tule River , and Kern River ; delta imports delivered through 388 the State Water Project, Central Valley Project – San Luis Division, Central Valley Project – Exchange 389 Division, and Central Valley Project - Cross Valley Divisi on, as well as two classes of Central Valley 390 Project water delivered through the Friant -Kern Canal (Friant – Class 1 and Friant – Class 2). Contract 391 allocation s rely upon estimates of total flow through the end of a given water year (Sept 30th), calculated 392 by updating equations (5 -8) with new snowpack and full -natural -flow observations in each time step. The 393 expected available water at each reservoir is estimated to be the existing storage, plus the total expected 394 inflows, less the total volume n eeded to me et instream flow requirements and maintain end-of-water -year 395 (Sept 30th) storage targets, such that: 396 𝐴𝑊 𝑤,𝑡=𝑆𝑤,𝑡−𝐸𝑂𝑆 𝑤+∑ 𝑅𝐼𝑤,𝑚𝑆𝐸𝑃𝑇 𝑚=𝑡𝑚− ∑ max (𝑚𝑖𝑛𝑠𝑡𝑟∗𝑤,𝑑𝑎,𝑚𝑖𝑛𝑜𝑢𝑡∗𝑤,𝑑𝑎)𝑡+365 −𝑑𝑜𝑤𝑦 𝑑𝑎=𝑡(15) 397 where AW = availa ble water (m3); S = current storage (m3); EOS = end of September storage target (m3); 398 e = environmental index; RI = remaining inflow (m3), as calculated from equations (5) and (7); and t m = 399 month of current time step 400 401 402 403 404 405 17 Table 2: Tulare Basin Reservoirs and their surface water contracts. 406 Reservoir Name Water Contracts San Luis (state) State Water Project San Luis (federal) Central Valley Project/ Exchange Contractors (senior) Central Valley Project/Delta Division Central Valley Project/Cross Valley Contractors Millerton Central Valley Project/Friant Division Class 1 (senior) Central Valley Project/Friant Division Class 2 Pine Flat Kings River Water Rights -holders Kaweah Kaweah River Water Rights -holders Success Tule River Water Rights -holders Isabella Kern River Water Rights -holders 407 Water that i s available through SWP and CVP contracts is stored in reservoirs north of the delta 408 (as described in Table 2) and must be pumped through the delta and into San Luis Reservoir before it can 409 be delivered to contractors. Water allocations sourced north of the delta are subject to variability caused 410 by (a) the need to release stored water to meet delta outflow requirements; (b) the ability to export 411 unstored incremental flows that are avai lable in excess of delta regulations; and (c) conveyance 412 limitations within the delta caused by infrastructure capacity and regul atory constraints. Equation (15 ) 413 reflects the additional responsibility of reservoir operators to make releases to support del ta outflows 414 (minout) , reducing the amount of water stored in these reservoirs that can be assumed ‘available’ for 415 delivery to contractors. However, if incremental flows are high enough throughout the Sacramento -San 416 Joaquin watershed, unstored flows that reach the delta in excess of the required outflows can be exported 417 through SWP/CVP pumps. As with their shared responsibility to meet delta outflow requirements, 418 unstored exports are divided between the projects based on the SWP/CVP Coordinated Operations 419 Agreement, which states that ‘unstored water available for export is allocated 55 %/45% to the CVP and 420 SWP, respect ively ’ (USBR, 2018), such that: 421 𝑈𝑊 𝑐,𝑡=𝑐𝑒𝑥 𝑐∗∑ 𝑚𝑎𝑥 (∑𝑖𝑛𝑐 𝑟,𝑡∗ 𝑟 − 𝑑𝑚𝑖𝑛 𝑚,𝑒−𝑑𝑒𝑝𝑙𝑒𝑡𝑖𝑜𝑛𝑠 𝑡∗,0)365 𝑑𝑎=𝑡𝑑𝑜𝑤𝑦 (16) 422 where UW = unstored water available (m3); cex = Article 6 SWP/CVP sharing fraction for excess 423 unstored flows; inc* = estimated incremental flows from training period (m3/s); and depletions* = 424 estimated in -delta consumptive use from training period (m3/s) 425 Individual contracts allocate estimated available and unstored water as a percentage of a full 426 annual delivery. In reservoirs that hold more than one type of water contract, allocations are determined 427 based on seniority, such that: 428 18 𝑎𝑙𝑙𝑜𝑐 𝑐,𝑡=max ( 𝑈𝑊 𝑐,𝑡+∑ 𝐴𝑊 𝑤𝑐,𝑡 𝑤𝑐+∑ 𝐷𝐸𝐿 𝑗𝑛𝑐 𝑗𝑛𝑐 +∑ 𝐷𝐸𝐿 𝑠𝑛𝑐 𝑠𝑛𝑐 − ∑ 𝐷𝐸𝐿𝑀𝐴𝑋 𝑠𝑛𝑐 𝑠𝑛𝑐 ∑ 𝐷𝐸𝐿𝑀𝐴𝑋 𝑗𝑛𝑐 𝑗𝑛𝑐,0) (17) 429 where alloc = contract allocations; DEL = year -to-date contract deli veries (m3); DELMAX = maximum 430 annual contract delivery (m3); wc = reservoirs used to store contract c; snc = all contracts at reservoir w 431 that have a higher seniority than contract c; jnc = all contracts at reservoir w with the same seniority as 432 contract c 433 Senior water contracts that share storage with more junior contracts (i.e., CVP – Exchange and Friant – 434 Class 1) have defined maximum annual deliveries, as listed in Table 2, and cont ract allocations in 435 equation (17 ) are capped at 1.0. The junior contracts at each storage reservoir receive an allocation only 436 after full allocations are granted to their more senior counterparts. The maximum annual contract 437 delivery values for junior contracts are limited by pumping and conveyance constraints, enumerated in 438 Supplement A. Local water rights on the Kern, Tule, Kaweah, and Kings River are the senior rights 439 stored in their respective reservoirs, but those reservoirs contain no junior water rights. The maximum 440 annual contract delivery for these contracts is unlimited, and allocations , as formulated in equation (17), 441 are calculated using the average annual flow of each river as the value for DELMAX , with allocations 442 allowed to be > 1.0. 443 Annual contract alloca tion decisions allow irrigation/water districts to schedule contract 444 deliveries based on their individual allocations and estimated demands over the course of a water year. 445 Water contract managers can also make unscheduled deliveries available to irrigati on/water districts 446 during brief, intermittent periods when reservoir storage is expected to encroach on the flood pool. These 447 deliveries are made in addition to scheduled deliveries and can be used to meet consumptive demands or 448 for targeted aquifer recha rge. When water is being cleared from the flood control pool, release rate s, as 449 calculated in equation (14 ), often exceed the capacity to recharge aquifers and/or the immediate demands 450 for any other productive uses of the water. To allow irrigation/water districts to use as much of this 451 unscheduled water as possible, water contract managers make unscheduled water deliveries available 452 before storage levels reach the flood control pool. The unscheduled water available in each time step is 453 equal to the mini mum rate that storage would need to be released to avoid flood pool encroachment over 454 any look -ahead period n, such that: 455 𝑢𝑛𝑠𝑐 ℎ𝑤,𝑡= max 𝑛=0,…,365𝑆𝑤,𝑡+∑ [𝑄𝑤,𝑚𝑛,𝑡∗ 𝑛𝑢𝑚𝑑𝑎𝑦𝑠 𝑚−∑ 𝑑𝑒𝑚𝑎𝑛𝑑 𝑑𝑤,𝑛 𝑑𝑤]−𝑡𝑜𝑐 𝑤,𝑒,𝑛 𝑡+𝑛 𝑑𝑎=𝑡 𝑛 (18) 456 where unsch = maximum flow rate f or unscheduled deliveries (m3/s); n = lookahead period (d); Q* = 457 estimated reservoir inflow in time interval m (m3/s); numdays = number of days in time interval m; 458 19 demand = maximum node demand (m3/s); dw = irrigation distr icts that store water in reservoir w; toc = 459 top of conservation pool (m3); S = reservoir storage (m3) 460 If the unscheduled delivery rate rises above a given threshold, defined here equal to the total recharge 461 capacity of contractor districts, unscheduled deliveries become available to any district that makes a 462 request. Contract manager decisions about the size of an annual allocation and the rate and timing of 463 unscheduled flows , as calculated in equations (17 -18), form the basis for thresholds used by districts to 464 make adaptive, state -based decisions. 465 Districts 466 Import projects and local water rights in the Tulare Basin are delivered to individual contractors 467 from one of six surface water reservoirs, conveyed through a system of natural c hannel s and c anals 468 (Figure 1). Contractors are typically organized into ‘districts’ that provide water within a service area that 469 contains individual consumptive demands and/or capacity for aquifer recharge . Here, we refer to an 470 Irrigation District (ID) as a contractor that delivers water to irrigators but do es not engage in groundwater 471 recharge within the boundaries of their service area. A Water District (WD) refers to a contractor that 472 makes deliveries primarily to municipal users or suppliers. Water Stora ge Districts (WSD) refer to 473 contractors that have both irrigation demands and groundwater recharge facilities within their service 474 areas. Finally, a Groundwater Bank (GWB) is a standalone entity with no irrigation demands that 475 include s groundwater recharg e and recovery capacity that are owned and operated by one or more ID, 476 WD, or WSD s. A list of canals and the orientation of their nodes can be found in Tables 3 and 4. 477 Consumptive demands are described in equation (4) and represent either irrigation demand, diversion to a 478 municipal water treatment plant, or pumping into a canal branch that leaves the Tul are Basin (shown in 479 Figure 1 as the Pacheco Tunnel , Las Perillas, and Edmonston Pumping Plants). Aquifer recharge capacity 480 in a WSD or GWB represents the rate at which water can be diverted into dedicated spreading basins and 481 percolate into the groundwater aquifer. Spreading basins within a WSD service area are operated with the 482 intention of increasing groundwater levels, reducing pumping c osts for distr ict landowners when WSD 483 surface water supplies are insufficient to meet irrigation demands . Deliveries to districts for irrigation and 484 recharge are dependent on shared infrastructure, including surface water storage, canal conveyance, and 485 groundwater recharge and recovery capacity. District decisions represent ‘requests’ on this shared 486 infrastructure, subject to priority -based capacity sharing rules. 487 488 489 20 Table 3: Nodes, main canals/channels (those that begin at a reservoir). 490 Node California Aqueduct/Delta Mendota Canal Friant - Kern Canal Madera Canal Kern River Kings River Kaweah River Tule River 1 San Luis Reservoir Millerton Reservoir Millerton Reservoir Isabella Reservoir Pine Flat Reservoir Kaweah Reservoir Success Reservoir 2 South Bay Pumping Plant City of Fresno Madera WSD Cawelo WSD Consolidat ed ID Tulare WSD Lower Tule WSD 3 San Luis ID Fresno WSD Chowchilla WSD North Kern WSD Alta ID Friant - Kern Canal Porterville ID 4 Panoche ID Kings River Kern -Delta WSD Kings River Water Authority Kaweah - Delta WSD Friant -Kern Canal 5 Del Puerto ID Tulare WSD Cross Valley Canal Fresno WSD Tulare Lake WSD Tulare Lake WSD 6 Westlands ID Kaweah - Delta WSD Arvin - Edison Canal Friant - Kern Canal 7 Las Perillas Pumping Plant Kaweah River Friant -Kern Canal Kaweah - Delta ID 8 Tulare Lake ID Exeter ID Kern Canal Tulare Lake ID 9 Dudley Ridge ID Lindsay ID Rosedale - Rio Bravo ID 10 Lost Hills ID Lindmore ID City of Bakersfield 11 Berrenda -Mesa ID Porterville ID Berrenda Mesa WB 12 Belridge ID Lower Tule WSD Bakersfield ‘2800’ WB 13 Semitropic WSD Tule River Pioneer WB 14 Buena Vista WSD Teapot Dome ID Kern WB 15 West Kern WSD Saucelito ID Buena Vista ID 16 Cross Valley Canal Terra Bella ID California Aqueduct 17 Kern Bank Canal Pixley WSD 18 Kern River Delano - Earlimart WSD 19 Henry Miller ID Kern - Tulare WSD 21 20 Wheeler Ridge - Maricopa ID South San Joaquin ID 21 Arvin Edison Canal Shafter - Wasco ID 22 Tejon -Castaic ID North Kern WSD 23 Tehachapi ID Cross Valley Canal 24 Edmonston Pumping Plant Kern River 25 Arvin - Edison Canal 491 Table 4: Nodes, intermediate canals (begin/end with other canals). 492 Node Cross Valley Canal Kern Bank Canal Arvin -Edison Canal Cross Valley Canal Kern Canal 1 California Aqueduct California Aqueduct Friant -Kern Canal California Aqueduct Kern River 2 Buena Vista WSD Kern Water Bank Cross Valley Canal Buena Vista WSD Kern -Delta WSD 3 Kern GWB Kern Canal Kern River Kern GWB Improvement District No 4 4 Pioneer GWB Arvin -Edison WSD Pioneer GWB Pioneer WB 5 Bakersfield ‘2800’ GWB California Aqueduct Bakersfield ‘2800’ GWB Buena Vista WSD 6 Berrenda -Mesa GWB Berrenda -Mesa GWB Kern Bank Canal 7 Rosedale -Rio Bravo WSD Rosedale -Rio Bravo WSD 8 Improvement District No 4 Improvement District No 4 9 Kern River Kern River 10 Friant -Kern Canal Friant -Kern Canal 11 Arvin -Edison Canal Arvin -Edison Canal 12 Cawelo WSD Beardsley Canal 13 North Kern WSD 493 When contract managers decide to make unscheduled water available to districts, the unscheduled 494 request at each canal node is equal to the maximum amount of water that can be diverted at each node, the 495 sum of consumptive demand and recharge capacity, such that: 496 22 𝑟𝑒𝑞𝑢𝑛 𝑐𝑛𝑖,𝑑,𝑡=𝑑𝑒𝑚𝑎𝑛𝑑 𝑑𝑐𝑛𝑖,𝑡+𝑘𝑜𝑐𝑛𝑖,𝑑,𝑡∗𝑏𝑐𝑎𝑝 𝑐𝑛𝑖 (19) 497 where requn = unscheduled water request (m3/s), cni = canal node index; demand = consumptive 498 deman d (m3/s); dcni = irrigation/water district at canal node cni; ko = district ownership share of 499 groundwater r echarge capacity at canal node cni; bcap = initial aquifer recharge capacity (m3/s) 500 Districts also receive scheduled deliveries from their individual water contract accounts. Scheduled 501 deliveries are equal to some fraction of the maximum unscheduled request, based on the estimated district 502 supplies. District supplies from local water rights and/or imported SWP and CVP contracts are calculated 503 as fixed percentage of the total contract allocation calculate in equation (17) , such that: 504 𝑠𝑢𝑝𝑝𝑙𝑦 𝑑,𝑐,𝑡=𝑘𝑎𝑙𝑙𝑜𝑐 𝑑,𝑐∗𝑎𝑙𝑙𝑜𝑐 𝑐,𝑡+𝑐𝑎𝑟𝑟𝑦 𝑑,𝑐,𝑦 (20) 505 where supply = annual estima ted district water supplies (m3); d = district; c = contract, alloc = contract 506 allocation (m3); carry = previous year’s unused contract allocation credited t owards this year’s supplies 507 (m3); y = year 508 Under normal conditions, districts are able to ‘carry -over’ their water accounts from one water year to the 509 next using excess reservoir storage capacity. At the beginning of each new water year (October 1st), 510 contract allocations are reset and districts are granted a carry -over credit for any o f the previous year’s 511 allocation that was not delivered to the district (via scheduled delivery) , such that: 512 𝑐𝑎𝑟𝑟𝑦 𝑑,𝑐,𝑦=𝑠𝑢𝑝𝑝𝑙𝑦 𝑑,𝑐,𝑡−1−∑ 𝑑𝑒𝑙 𝑑,𝑐,𝑑𝑎𝑡−1 𝑑𝑎=𝑡−365 (21) 513 where del = sche duled contract deliveries (m3/s) 514 When reservoirs fill this unused storage capacity with new inflow, districts forfeit any carry -over 515 water that is stored in the reservoir. Their individual carry -over water is redistributed as part of the 516 current year’s co ntract allocation to replace any unscheduled deliveries or flood spills caused by storing 517 the previous year’s water. To avoid losing their carry -over supplies in this fashion, districts request 518 increased deliveries for recharge before the reservoir fills. At each time -step, the time -to-fill can be 519 calculated such that: 520 𝑛𝑓𝑖𝑙𝑙 𝑤,𝑑𝑜𝑤𝑦̂ =argmin (𝑡𝑜𝑐 𝑤,𝑒,𝑛𝑓𝑖𝑙𝑙 −𝑆𝑤,𝑡−∑ [𝑄𝑤,𝑚𝑑𝑎,𝑡∗ 𝑛𝑢𝑚𝑑𝑎𝑦𝑠 𝑚−∑ 𝑑𝑒𝑚𝑎𝑛𝑑 𝑑𝑤,𝑑𝑎 𝑑𝑤]𝑡+𝑛𝑓𝑖𝑙𝑙 𝑑𝑎=𝑡)2 (22) 521 where nfill = time until the reservoir reach es capacity (days); Q* = estimated reservoir inflow in time 522 interval m (m3/s); numdays = number of days in time interval m; demand = maximum node demand 523 (m3/s); dw = irrigation districts that store water in reservoir w; toc = top of conservation pool (m3); and S 524 = reservo ir storage (m3) 525 23 Equation (22 ) is calcula ted through simulation in each time step. If S starts out greater than toc, the 526 reservoir is already full and nfill is equal to zero. If the value of nfill results in storage less than the top of 527 the conservation pool, such that: 528 𝑡𝑜𝑐 𝑤,𝑒,𝑛𝑓𝑖𝑙𝑙 >𝑆𝑤,𝑡+∑ [𝑄𝑤,𝑚𝑑𝑎,𝑡∗ 𝑛𝑢𝑚𝑑𝑎𝑦𝑠 𝑚−∑ 𝑑𝑒𝑚𝑎𝑛𝑑 𝑑𝑤,𝑑𝑎 𝑑𝑤]𝑡+𝑛𝑓𝑖𝑙𝑙 𝑤,𝑑𝑜𝑤𝑦̂ 𝑑𝑎=𝑡 (23) 529 the reservoir is not expected to fill and nfill is set to a maximum value of 365. Given a reservoir fill -time 530 of nfill, districts can calculate a dynamic recharge capacity based on the rate at which surface water can 531 be recharged into the aquifer , such th at: 532 𝑑𝑟𝑐ℎ𝑔𝑑,𝑤,𝑡=[∑ 𝑘𝑏𝑔𝑤𝑏 ,𝑑,𝑡∗𝑏𝑐𝑔𝑤𝑏 𝑐𝑛𝑖 ]∗𝑛𝑓𝑖𝑙𝑙 𝑤,𝑑𝑜𝑤𝑦 (24) 533 where drchg = dynamic recharge capacity during reservoir fill period (m3); kb = district ownership share 534 of spreading basin capacity; bc = gro undwater recharge capacity (m3/s); gwb = groundwater bank index; d 535 = district index 536 When a district has carry -over water stored in a reservoir, it is in danger of losing it if it cannot be 537 delivered before that reservoir fills. If the total carry -over water that has not yet been delivered to the 538 district is greater than the dynamic recharge capacity, calculated in equation (2 4), the district requests an 539 expedited scheduled delivery , such that : 540 𝑟𝑒𝑞𝑠𝑐 ℎ𝑑,𝑐,𝑡=min (𝑐𝑎𝑟𝑟𝑦 𝑑,𝑐,𝑦−[𝑑𝑟𝑐ℎ𝑔𝑑,𝑤𝑐,𝑡+∑ 𝑑𝑒𝑙 𝑑,𝑐,𝑑𝑎𝑡 𝑑𝑎=𝑤𝑦𝑠 ],∑ 𝑟𝑒𝑞𝑢𝑛 𝑐𝑛𝑖,𝑑,𝑡 𝑐𝑛𝑖 ) (25) 541 where reqsch = scheduled contract delivery request (m3/s); carry = previous year’s unused contract 542 allocation (m3); del = sche duled contract deliveries (m3); drchg = dynamic recharge capacity (m3), requn 543 = maximum unscheduled water request (m3/s); wys = first day of the water year (October 1) 544 If a district has adequate dynamic recharge capacity for their carry -over supplies, they will request a 545 normal scheduled delivery as a function of their remaining supplies that have not been delivered during 546 the current water year, such that: 547 𝑟𝑒𝑞𝑠𝑐 ℎ𝑑,𝑐,𝑡=min (𝑠𝑢𝑝𝑝𝑙𝑦 𝑑,𝑐,𝑡−∑ 𝑑𝑒𝑙 𝑑,𝑐,𝑑𝑎𝑡 𝑑𝑎=𝑡−𝑑𝑜𝑤𝑦 𝑀𝐷𝐷∗𝑑,𝑡+𝐼𝑅𝐷∗𝑑,𝑡,1.0)∗ 𝑑𝑒𝑚𝑎𝑛𝑑 𝑑,𝑡, (26) 548 where MDD* = expected municipal demands through the end of the year (m3); IRD* = expected irrigation 549 demands through the end of the year (m3); supply = annual estimated contract supplies (m3); del = 550 scheduled contract deliveries (m3/s) 551 Equation (26 ) represents the request that a district would make to a surface water reservoir used 552 for the storage of that district’s water contract. Likewise, a district can also make a request to a 553 24 groundwater bank for recovery of that district’s banked groundwater. Nodes that represent out -of-district 554 groundwater banks also have the capacity to recover groundwater, making it available either as a direct 555 delivery via canal or as an exchange for the stored surface water of another distric t. Districts with 556 positive ba nking accounts can request recovery of those accounts when their surface water supplies are 557 low. Groundwater recovery is limited by the pumping capacity at the bank, so districts initiate 558 groundwater recovery before they have completely exhausted their sur face supplies. Like deliveries for 559 recharge, groundwater recovery is a state -aware decision made by individual districts comparing their 560 total recovery capacity to the expected surface water shortfall. Recovery capacity is evaluated through 561 the end of th e water -year, such that: 562 𝑑𝑟𝑐𝑣𝑦 𝑑,𝑡=(365 −𝑑𝑜𝑤𝑦 𝑡)∗∑ 𝑘𝑤 𝑔𝑤𝑏 ,𝑑,𝑡∗𝑤𝑐𝑔𝑤𝑏 𝑔𝑤𝑏 (27) 563 where drcvy = remaining recovery capacity (m3); dowy = day -of-water -year index, beginning October 1 564 (1.. 365); kw = district ownership share of recovery we ll capacity; and wc = total recovery well capacity 565 (m3/s) 566 When this threshold is greater than the difference between a district’s consumptive demand and surface 567 water supplies through the end of the water year, recovery well requests are triggered, such that: 568 𝑟𝑤𝑏 𝑔𝑤𝑏 ,𝑑,𝑡=𝑀𝐷𝐷∗𝑑,𝑡+𝐼𝑅𝐷∗𝑑,𝑡−∑(𝑠𝑢𝑝𝑝𝑙𝑦 𝑑,𝑐,𝑡−∑ 𝑑𝑒𝑙 𝑑,𝑐,𝑑𝑎𝑡 𝑑𝑎=𝑤𝑦𝑠 ) 𝑐 − 𝑑𝑟𝑐𝑣𝑦 𝑑,𝑡 (28) 569 where rwb = groundwater b ank recovery well request (m3/s); MDD* = expected municipal demands 570 through the end of the year (m3); IRD* = expected irrigation demands through the end of the year (m3); 571 supply = annual estimated contract supplies (m3); del = sche duled contract deliveries (m3/s); wys = first 572 day of the water year; 573 Equations (19 -28) represent the thresholds and decision rules used to estimate the requests made 574 by individual districts. These requests are then subject to priority -based infrastructure capacity sharing 575 rules that translate individual request into water deliveries and c hanges in model state variables. 576 Operational Rules for Shared Infrastructure 577 Water distribution in each time step and the resulting changes to model state variables (surface 578 and groundwater accounts, delta X 2, reservoir storage) are governed by infrastruc ture operations, 579 including shared capacity in surface reservoirs, pumping plants, canal conveyance, spreadi ng basins, and 580 recovery wells. Decisions made by reservoir operators, contract managers, and irrigation/water district s, 581 described in equations (1 1-28) are aggregated to joint infrast ructure operations via priority -based sharing 582 rules. 583 25 To resolve SWP and CVP operations in the delta , reservoir operations integrate the reservoir 584 operator decisions described in equations (1 1-14) with releases based on CVP and SWP contract manager 585 allocation decisions described in equations (15 -18). SWP and CVP contract managers face the additional 586 decision of scheduling releases from north of the delta storage to support pumping while meeting 587 regulatory constraints. Several seasonal and contextual limits are placed on maximum pumping levels at 588 SWP and CVP facilities (SWRCB, 2000; NMFS, 2009), including a rule specifying the minimum allowed 589 ratio bet ween delta exports (through SWP and CVP pumps) and delta inflows. When t his rule, called the 590 E/I ratio, is binding, any increase in the combined pumping rate in the delta must also be met with a larger 591 increase in total delta inflow, some of which escapes the delta as outflow (SWRCB, 2000) . Rearranging 592 equation (2) and using a general ‘delta inflow’ term to replace the summations of reservoir releases and 593 incremental flows, the maximum export rate can be expressed as a function of E/I ratio, delta outflow, and 594 delta depletions (consumptive uses within the delta), such that: 595 𝐸𝑡≤𝐸𝐼𝑅 𝑚∗(𝑑𝑜𝑢𝑡 𝑡+𝑑𝑒𝑝𝑙𝑒𝑡𝑖𝑜𝑛𝑠 𝑡) 1−𝐸𝐼𝑅 𝑚 (29) 596 where E = delta exports (m3/s); dout = delta outflow (m3/s); depletions = delta consumptive use (m3/s); 597 and EIR m = E/I ratio in month m (i.e., 0.35 or 0.65). 598 Substituting minimum delta outflow regulations for dout in equation (17) results in the maximum 599 allowable export rate when delta outflow is at the minimum target levels. Even though the permitted 600 capacity a t any given moment may be higher than this rate , pumping above this level will result in 601 additional required delta outflows, reducing the yield of the SWP and CVP delta export projects. 602 CALFEWS decision rules use this rate as a maximum target to schedule reservoir releases for export, 603 such that: 604 𝐸𝑐,𝑡′′=∑ 𝐴𝑊 𝑤𝑐,𝑡 𝑤𝑐 𝑚𝑎𝑥 (∑ 𝐸𝑡′ 365 −𝑑𝑜𝑤𝑦 +𝑡 𝑑𝑎= 𝑡 ,∑ 𝐴𝑊 𝑤𝑐,𝑡 𝑤𝑆𝑊𝑃+∑ 𝐴𝑊 𝑤𝑐,𝑡 𝑤𝐶𝑉𝑃 )∗min (𝐸𝑡′,𝑝𝑚𝑎𝑥 𝑚,𝑒) (30) 605 Where E’’ = target export rate for individual contract (SWP & CVP) , (m3/s); E’ = maximum total export at 606 minimum delta outflow (m3/s); AW = available water at each reservoir (m3); pmax = maximum combined 607 pumping capacity at SWP and CVP delta pumps (m3/s). 608 SWP and CVP contract managers augment downstream incremental flows and regulatory releases 609 described in equations (1 1-14) with additional releases meant to support exports at th e level calculated in 610 equation (30 ), such that: 611 𝑟𝑒𝑥𝑝 𝑐,𝑡=𝐸𝑐,𝑡′′−𝑐𝑒𝑥 𝑐∗[∑𝑖𝑛𝑐 𝑟,𝑡 𝑟 +∑ 𝑒𝑛𝑣𝑟𝑒𝑙 𝑤,𝑡 𝑤𝑐 −𝑑𝑚𝑖𝑛 𝑚,𝑒−𝑑𝑒𝑝𝑙𝑒𝑡𝑖𝑜𝑛𝑠 𝑡] (31) 612 26 where rexp = total c ontract releases for de lta export (m3/s); cex = SWP/CVP sharing agreement for excess 613 unstored flows; inc = incremental flows (m3/s); envrel = minimum reservoir release to meet in -stream 614 requirements, delta outflow requirements, and flood control releases (m3/s) 615 Releases for each contract (SWP and CVP) are distributed between the north o f delta reservoirs based on 616 the fraction of the total expected available water ( AW) stored in each reservoir. The export rate E** is a 617 target used to manage reservo ir releases, but delta pumps can also capture downstream incremental flows 618 that are larger than the required delta outflow and depletions, subject to the SWP/CVP sh aring agreement 619 in SWRCB (2000) , such that: 620 𝐸𝑐,𝑡=𝑚𝑎𝑥 (𝐸𝑐,𝑡′′,min (𝑐𝑒𝑥 𝑐∗[∑𝑖𝑛𝑐 𝑟,𝑡 𝑟 +∑ 𝑒𝑛𝑣𝑟𝑒𝑙 𝑤,𝑡 𝑤𝑐 −𝑑𝑚𝑖𝑛 𝑚,𝑒−𝑑𝑒𝑝𝑙𝑒𝑡𝑖𝑜𝑛𝑠 𝑡],𝑝𝑚𝑎𝑥 𝑐,𝑚,𝑒))(32) 621 where totexp = total delta exports (m3/s); e = environmental index; and t m = month of current time step, 622 E** = target expor t rate for individual contract (m3/s) 623 Operations in the Tulare Basin integrate the reservoir operator decisions described in equations (1 1-14) 624 with the request decisions made by irrigation/water districts in equations ( 19-28). Deliveries for irrigation 625 and groundwater recharge travel through a shared network of canals and natural channels before they can 626 fulfill district requests. Each reach of canal has a conveyance capacity, which is shared between nodes 627 using a priority -based system, such that: 628 𝑑𝑒𝑙 𝑐𝑛𝑖,𝑐,𝑡=𝑘𝑐𝑐𝑛𝑖,𝑤,𝑝∗∑ 𝑟𝑒𝑞𝑝 𝑐𝑛𝑖,𝑑𝑐𝑛𝑖,𝑐,𝑡 𝑑𝑐𝑛𝑖+𝑘𝑐𝑐𝑛𝑖,𝑛𝑝∗∑ 𝑟𝑒𝑞𝑛𝑝 𝑐𝑛𝑖,𝑑𝑐𝑛𝑖,𝑐,𝑡 𝑑𝑐𝑛𝑖 (33) 629 where delivery cni,c = total deliveries to a canal node cni from surface water contract c (m3/s); cni = canal 630 node index; kp = canal sharing coefficient for priority requests; kcnp = canal sharing coefficient for non - 631 priority requests; reqp = priority district requests, schedule d or unscheduled (m3/s), reqnp = non -priority 632 district requests, scheduled or unscheduled (m3/s), dcni = districts with ownership rights at the canal node 633 The canal sharing coefficient , kccni,p is calculated to share the conveyance of any given reach equally with 634 all requests made ‘down -canal’ of that reach, giving priority to ‘pri ority requests’, such that: 635 𝑘𝑐𝑐𝑛𝑖,𝑝=min (𝑐𝑐𝑎𝑝 𝑐𝑛𝑖 ∑ ∑ 𝑟𝑒𝑞 𝑛𝑑,𝑑𝑛𝑑,𝑝,𝑡 𝑑𝑛𝑑𝑐𝑛𝑖𝑒𝑛𝑑 𝑛𝑑=𝑐𝑛𝑖,1.0) (34) 636 and 637 𝑘𝑐𝑐𝑛𝑖,𝑛𝑝=𝑚𝑖𝑛 (𝑚𝑎𝑥 (𝑐𝑐𝑎𝑝 𝑐𝑛𝑖−∑ ∑ 𝑟𝑒𝑞 𝑛𝑑,𝑑𝑛𝑑,𝑝,𝑡 𝑑𝑛𝑑𝑐𝑛𝑖𝑒𝑛𝑑 𝑛𝑑=𝑐𝑛𝑖,0.0) ∑ ∑ 𝑟𝑒𝑞 𝑛𝑑,𝑑𝑛𝑑,𝑛𝑝,𝑡 𝑑𝑛𝑑𝑐𝑛𝑖𝑒𝑛𝑑 𝑛𝑑=𝑐𝑛𝑖,1.0) (35) 638 27 where req = district request, scheduled or unsc heduled (m3/s); ccap = canal conveyance capacity in reach 639 cni (m3/s) 640 Releases for canal deliveries are made from each reservoir in addition t o the regulatory releases described 641 in equations (1 1-14), such that: 642 𝑟𝑑𝑒𝑙 𝑐,𝑡= ∑ 𝑑𝑒𝑙 𝑛𝑑,𝑐,𝑡𝑐𝑛𝑖 𝑒𝑛𝑑 𝑛𝑑= 𝑐𝑛𝑖 𝑠𝑡𝑎𝑟𝑡 (36) 643 Groundwater recovery requests originate from within the canal network, rather than at the head of 644 the canal network as do surface water delivery requests. It is not always possible to deliver this recovered 645 groundwater directly to the district that is mak ing pumped withdrawals from their groundwater banking 646 account. Instead, recovered groundwater can be delivered to any other district for exchange, provided 647 that district has surface water stored in an accessible reservoir. In CALFEWS, recovery exchange i s 648 simulated by delivering recovered water to districts with turnouts along the downstream canal nodes, such 649 that: 650 𝑑𝑒𝑙 𝑐𝑛𝑖,𝑔𝑤𝑏 ,𝑡=max [min (∑ 𝑟𝑒𝑞𝑠𝑐 ℎ𝑑𝑐𝑛𝑖,𝑐,𝑡 𝑑𝑐𝑛𝑖,𝑟𝑒𝑞𝑟𝑣𝑦 𝑐𝑛𝑖,𝑑,𝑡−∑ 𝑑𝑒𝑙 𝑛𝑑,𝑔𝑤𝑏 ,𝑡𝑐𝑛𝑖 𝑛𝑑=𝑐𝑛𝑖 𝑔𝑤𝑏),0.0] (37) 651 where delivery cni,gwb = delivery of recovered groundwater from groundwater bank gwb to canal node cni 652 (m3/s); reqsch = scheduled request at delivery node (m3/s); reqrvy = banked recov ery request at bank 653 node (m3/s) 654 Deliveries to each node within the canal network, as detailed in Tables 3 and 4, are calculated through 655 iteration. Figure 4 illustrates the flow of water through different system states over the course of a single 656 water year. The flow begins in Northern California, where water is either routed to the delta outflow sink 657 (along the top of the chart), pumped through the delta to San Luis Reservoir, or carried over into the next 658 year in surface water storage. The flow can come from one of four reservoirs used as north -of-the delta 659 storage by the SWP and CVP, or from ‘uncontrolled’ sources closer to the delta. From there water 660 pumped to San Luis Reservoir joins that stored in the other surface water reservoirs that form Tulare 661 Basin supplies, including Millerton Reservoir via the Friant -Kern Canal. Annual flows to those reservoirs 662 are divided into various surface water contracts (Table 2), where along with the previous year’s contract 663 carry -over water it forms this year’s contract allocation. Some of the surface water is delivered as 664 unscheduled flood deliveries. Contract allocations and unscheduled deliveries are divided among 665 individual contractors, grouped here by general geographic characteristics for visual simplicity (the 666 complete list of contractors and groundwater banks included in CALFEWS is shown in Tables 3 and 4). 667 Based on contractor requests, contract allocations an d unscheduled deliveries are sent for irrigation, 668 municipal use, and direct or in -lieu groundwater recharge. Contractors can also save undelivered carry - 669 28 over water for the next water year. Whatever contractor demands cannot be met via individual surface 670 water supplies trigger groundwater use, either via banked recovery or private, in -district wells. 671 After delta exports and district deliveries are resolved, CALFEWS updates state variables based 672 on infrastructure operations. Reservoir relea ses, calculate d in equations (11 -14, and 3 6) are used to 673 update storage at each simulated surface water reservoir and delta outflow, which is used to update the X2 674 salinity line, as in equations (3 -4). Recharge and recovery operations at groundwater banks are used to 675 update individual district banking accounts. Scheduled contract deliveries are used to update allocations 676 and individual district accounts to surface water contracts. Updated state variable values are carried 677 through to the next time step where they form the basis for the next iteration of adaptive decisions. 678 679 Figure 4: CALFEWS water flow between inter -basin transfer projects, surface water storage, 680 water contract allocations, individual district supplies, and water use categories 681 Results 682 Model Evaluation and Capabilities 683 The adaptive operating rules employed in CALFEWS enable simulations based on any daily 684 input time series of flow and snowpack data at the storage and regulatory nodes shown in Figure 1. 685 Simulation results based on historical i nput data can be compared to observations at a number of critical 686 locations throughout the Central Valley system as a means of quantifying how well decision rules capture 687 historical system operations . In addition to encompassing a range of hydrologic condi tions, t he 20-year 688 29 historical period of comparison, October 1996 – September 2016, includes substantial changes to 689 statewide re gulatory regimes that impacted the operation of the SWP and CVP as well as significant 690 infrastructure expansion within Kern Count y groundwater banks . During simulations of this historical 691 evaluation period, CALFEWS representations of these changes, including environmental flow 692 requirements, pumping limits, and infrastructure capacities are integrated to reflect the timing of their 693 implementation . Choosing an evaluation period that experienced these types of structural changes, in 694 addition to a wide range of hydrologic conditions, increases confidence that the system of adaptive rules 695 embedded within CALFEWS can provide insight into future uncertainties related to hydrologic change, 696 infrastructure development, and environmental policies. 697 Figure 5 shows the performance between observed storage and simulated results during the 20 - 698 year historical period at all twelve surface reservoirs . In the Sacramento Basin, all four simulated 699 reservoirs, S hasta, Oroville, Folsom, and New Bullards Bar Dam (Figures 5 a-d) display R2 values ranging 700 between 0.86 and 0.94. The se large reservoirs form the bulk of the releases to regulate delta outflows an d 701 support north -south exports. S an Joaquin Reservoirs (Figures 5 e-g), including New Melones, Don Pedro, 702 and Exchequer have slightly higher levels of performance, with R2 values ranging from 0.93 – 0.97. 703 Many of the releases for these reservoirs are made to deliver water to downstream agricultural users. 704 Agricultural demands supplied by these three reservoirs are not modelled based on implied ET demands 705 from land cover as CALFEWS does for Tulare Basin irrigators . Instead, historical withdrawals for 706 irrigation are calculated as negative incremental flows in the reaches between these reservoirs and their 707 downstream regulatory node , as in equation (1) . Negative incremental flows force the reservoirs to 708 release water to meet downstream flow requirements, meeting the demands without the type of explicit 709 agricultural modelling that occurs in the Tulare Basin , as described by equation (10) . Although New 710 Melones, Don Pedro, and Exchequer are not explicitly operated to support SWP and CVP delta e xport 711 programs, the three reservoirs here perform important flood control and minimum flow regulation for 712 delta inflows through the Vernalis ga uge that can impact pumping rates . 713 Releases from Millerton Reservoir are not included when regulating flows at Vernalis, even 714 though the dam controls the headwaters of the San J oaquin River . We assume here that most excess 715 releases are consumed at the Mendota Pool (before interacting with any gages in the delta system), and 716 any releases that do contribute to delta inflows are included in the observed ‘uncontrolled’ flows on the 717 San Joaquin River. The reservoirs shown in Figure 5h-l (Millerton, Pine Flat, Kaweah, Success, and 718 Isabella) deliver water directly to the Tulare Basin irrigation/water districts. The simu lation results for 719 Millerton Reservoir (Figure 5 h) are the poorest of the CALFEWS represented reservoir s, but still generat e 720 an R2 value of 0.57. Millerton is a smaller reservoir subject to flashy flows, especially during the winter 721 30 ‘wet’ periods. Flood control releases can be large and potentially occur well in advance of the reservoir 722 reaching full capacity, as operators attempt to deliver as much flood water as possible to contractors along 723 the conveyance -constrained Friant -Kern Canal. The flow estima tes used in equation (18 ) to schedule 724 flood control decisions in CALFEWS do not capture all of the information used by Millerton Reservoir 725 operators and Friant contract managers when they make their flood control decisions, leading to errors in 726 storage when the timing of flood releases are mismatched. Model operations would like ly be improved 727 by more resolved estimation o f wet period flow in the San Joaquin headwaters . It should be noted, 728 however, that operational rules used in CALFEWS do broadly capture major storage dynamics in 729 Millerton and perform quite well in simulating th e recent 2012 – 2016 drought, suggesting that they can 730 adequately represent the influence of the San Joaquin River Restoration Project, which began in 2009, on 731 dry-year storage levels in Millerton Reservoir. 732 733 Figure 5: Daily correspondence between observe d and simulated storage at the 12 major surface 734 water reservoirs modelled in CALFEWS (excluding San Luis Reservoir), October 1996 – 735 September 2016. 736 31 Flow that makes it to the delta is eithe r exported through SWP (Figure 6a) and CVP (Figure 6 b) 737 pumping work s or allowed to flow out to the San Francisco Bay, where the impact on the ‘X2’ salinity 738 line (Figure 6 c) can be measured. The delta X2 salinity line measures the point where salinity in the delta 739 is equal to 2 parts per thousand , one meter from the botto m of the bay floor , relative to the Golden Gate 740 Bridge. X2 values peak in the late summer/early fall, after low summer flows have allowed delta salinity 741 to move eastward (inland, farther from the Golden Gate Bridge), and reach their low point in the sprin g 742 after high winter flows push the salinity back towards the sea. Simulated X2 corresponds well with 743 historical values, as calculated in the California DWR’s DAYFLOW time series, displaying an R2 of 0.95 744 for weekly average values and 0.96 for monthly aver ages. Simulations of exports at the SWP and CVP 745 delta pumps also correspond well with historical observations at the annual scale (R2 of 0.89 and 0.91 for 746 the SWP and CVP, respectively), with the relationship holding up well even when compared on a weekly 747 time step (R2 of 0.64 and 0.59, respectively). The sub -annual results are particularly important because 748 the pumping time series serve as inflows into San Luis Reservoir and the timing of inflows impacts the 749 size and type of deliveries that can be made to Tulare Basin contractors. 750 751 Figure 6: Correspondence between total w eekly and annual observed and simulated pumping 752 through SWP and CVP delta pumps, and weekly/monthly estimations of the delta X2 salinity, 753 measuring distance inland from the Golden Gate Bridge to a point of 2 ppt salinity, October 1996 754 – September 2016 755 32 The model’s ability to capture the storage dynamics for the San Luis Reservoir, both the state and 756 federal portions, are shown in Figure 7 . Despite being subject to some degree of modelling error in 757 inflow (delta pumping estimations) and reservoir releases (d istrict demand estimations), they broadly 758 capture the monthly observed storage (monthly is the only time step at which individual SWP and CVP 759 storage accounts are recorded in San Luis Reservoir). Simulated storage in San Luis Reservoir has an R2 760 value of 0.73 in the SWP portion and 0.66 in the CVP portion. Given the sheer complexity of the San 761 Luis Reservoir’s operations, the CALFEWS simulation manages to capture the general timing, variability, 762 and bounds of the system’s storage. 763 764 Figure 7: Correspondence between observed and simulated monthly storage in the state (SWP) 765 and federal (CVP) portions of San Luis Reservoir, October 1996 – September 2016. 766 Water delivered for groundwater recharge is delivered either within the service area of an WSD 767 or to a GWB outside of the district service area. Water recharged in GWBs can be recovered and 768 delivered to an ID/WD/WSD , but only if the district has a positiv e balance in the bank. Figure 8 769 illustrates the correspondence between simulated and observed (CDEC, 2018; Hanak et al., 2012) 770 groundwater storage accounts in the Kern GWB (KWB) and Semitropic WSD (SWSD) , where most of 771 the banking users are SWP con tractors. The KWB is operated for pri marily agricultural users, while 772 banking members in the S WSD are mostly municipal water districts. CALFEWS is able to capture the 773 historical groundwater banking dynamics with relatively high R2 of 0.70 and 0.67 for the annual change 774 in storage accounts at KWB and SWSD , respectively. High levels of R2 at KWB ( 0.77) and SWSD (0.64) 775 are also attained for the total cumulative balance in each bank. At both banks, errors are largest in very 776 wet years in which simulated results do not recharge as much water as i s reflected in observed accounts. 777 Simulation results have better correspondence with observations during dry years. As the most 778 ‘downstream’ part of the CALFEWS model, groundwater banking results are subject to modelling errors 779 in reservoir releases, delta pumping, and contractor water demands . However, the errors observed in 780 33 banking accounts, in both the K WB and SWSD , are not systematically biased in any direction, and 781 storage accounts in both banks are very close to the observed accounts at the end of th e 20-year 782 simulation. To the authors’ knowledge, no simulation system outside of CALFEWS has ever been able to 783 capture the complexity of human systems operations and water balance dynamics with the level of fidelity 784 shown here. Errors between simulated gro undwater banking storage accounts and observed storage 785 accounts overall appear not to be amplified across years, that is, our simulation results do not show 786 sustained inter -annual over or under -prediction . 787 788 Figure 8: Correspondence between simulated and observed groundwater banking balances , and 789 net annual change in groundwater banking balances, held in the Kern and Semitropic Water 790 Banks, October 1996 – September 2016 note: observed balances available at an annual time step 791 State -Aware Decisions 792 The general agreement between observed and simulated results at key Central Va lley locations 793 set the stage for a deeper look into t he dy namic and adaptive ways CALFEWS simulations represent 794 stakeholder decisions. Simulated infrastructure operations are the product of individual, heterogeneous 795 agents making decisions in response to changing hydrologic and management states. These sta tes are 796 based on the translation of environmental variables into simulated, management -relevant states like those 797 relating to State Water Projec t allocations shown in Figure 9 . Simulated allocation s are updated in every 798 timestep based on t he component part s of the SWP contract allocati on described in equations (15 -17). 799 During the CALFEWS simulation of the historical evaluation period (Oct 1996 – Sept 2016), t he 800 expected SWP allocation (white line) responds to changes in the expected available water at Orov ille and 801 New Bullards, the SWP portion of any expected unstored flows , and the year -to-date exports that have 802 already been delivered to San Luis Reservoir. In addition, annual simulated allocations are also 803 constrained by the expected pumping capacity thro ugh the end of the water year. During the historical 804 34 evaluation, pumping constraints cause the expected SWP allocation to occasionally fall below the sum of 805 its component parts, particularly during wet periods. When this occurs, SWP contract managers ‘carr y- 806 over’ this excess water in Oroville and/or New Bullards, resulting in end -of-year storage above target 807 levels. In the following years, this extra carry -over storage is included in the calculations of expected 808 available storage in the respective reservoi rs, increasing initial estimates of that year’s SWP allocation. 809 810 Figure 9: Projected annual State Water Project contract allocations, as a function of expected 811 available water in Oroville and New Bullards Bar Reservoirs, expected unstored flows available 812 for export in the delta, and year -to-date pumping at SWP delta facilities du ring the historical 813 evaluation period, October 1996 – September 2016 814 Calculations of SWP allocations (Figure 9 ) are translated into individual contractor allocations 815 that can be used to make district -level water supply decisions , as demonstrated for a spe cific irrigation 816 district, Wheeler Ridge – Maric opa (Figure 10 ). The historical evaluation period includes a significant, 817 recent drought from 2013 -2016, during which CALFEWS simulated the district’s groundwater recovery 818 operations. In 2013, the first year of the drought, the district’s portion of the SWP allocation wa s equal to 819 approximately half of its expected irrigation demand. The district made requests for surface water 820 deliveries based on this allocation according to equation (2 7), with the balance of the irrigation demand 821 met through recovery of the district’s banked groundwater (originating in groundwater banks outside the 822 district’s service area) and private groundwater pumping by the district’s irrigators. Although the district 823 had sufficient suppl ies in their groundwater bank account in 2013 , the district’s recovery pumping 824 capacity at the bank limited the rate at which the banked water could be delivered to the district , requiring 825 35 some amount of in -district, private groundwater pumping. The following winter , low snowpack levels 826 caused expected SWP allocations to drop further (Figure 9 ), which in turn reduced Wheeler Ridge - 827 Maricopa’s expected surface water supply (Figure 10). The dis trict relied heavily on banked groundwater 828 recovery in water year 2014 to make up for reduced surface water deliveries, and by the end of the 829 irrigation season the district completely depleted their banked groundwater storage . CALFEWS 830 simulation rules do n ot permit groundwater recovery when banked storage accounts are empty, so when 831 the simulated historical drought continued in 2015, the district’s irrigation was almost entirely supplied by 832 private groundwater pumping at wells within the district’s service area. The final year of the drought, 833 2016, started out dry, but increased precipitation led to larger expected water contract allocations , 834 increasing district surface water supplies . Irrigators within t he district began the year pumping private 835 groundwater , expecting that the rest of the year would be dry as well, but were able to cease pumping by 836 July when it was clear the remaining demands could be met through surface water deliveries from the 837 SWP . Due to increases to the SWP allocation late in the year, the district was able to end the year with 838 additional supplies and thus carry -over SWP supplies into the next year . 839 840 Figure 10: Expected water supplies for the Wheeler Ridge -Maricopa Water Storage District, 841 with irrigation deliveries from the district’s surface water contract, groundwater banking recover, 842 and in -district private groundwater wells during the drought period October 2012 – September 843 2016. 844 During wet periods, CALFEWS also simulates unscheduled flood deliveries to contractors. 845 Deci sions about the timing and magnitude of these releases are made by surface water contract managers 846 36 when reservoirs are close to filling. As reservoir storage increases, reservoir fill -time falls in accordance 847 with seasonal trends (e.g., the same storage v olume will correspond to a shorter fill -time if it is observed 848 in December, and a longer fill -time if it is observed in June , after a significant portion of snowmelt has 849 already occurred ), and as s torage approaches capacity fill -time goes to zero (Figure 1 1). At San Luis 850 Reservoir, n atural inflow is negligible , and the reservoir is almost entirely fed by SWP/CVP pumps at the 851 delta. Pumping capacity limits the rate of inflow into San Luis Reservoir during high flow periods, 852 reducing the need for pre -emptive flood releases driven by expected future inflows, as in equation (19). In 853 CALFEWS, SWP flood releases are not made from San Luis Reservoir until storage approaches capacity 854 in the state -owned portion of San Luis Reservoir. However, reservoir fill -time in San Luis is an important 855 metric for individual districts attempting to manage their carry -over water . If an SWP contractor does not 856 deliver their entire SWP contract, they are able to carry it over in San Luis Reservoir. Any carry -over 857 water remaining in San Luis when it reaches capacity is forfeited by the district carrying it over and 858 instead delivered to any contractor with the capacity to take it. Districts therefore will attempt to use any 859 carry -over water if they observe the reservoir filling up. This decision is triggered when a district’s 860 cumulative recharge capacity during the expected reservoir fill -time, calculated in equation (24), is less 861 than a district ’s current and/o r expected cumulative carryover . 862 863 Figure 11: Storage, reservoir fill -time, and flood deliveries from San Luis Reservoir during the 864 historical evaluation period, October 1996 – September 2016 865 Individual district carry -over operations, as shown in Figure 12 , are designed to store excess 866 surface water allocations (carry -over w ater) from one year for use in the next, either for groundwater 867 37 recharge, or, when possible, to meet irrigation or municipal demands. In the historical simulation , 868 Wheeler Ridge - Maricopa begins water year 2005 (October 2004) with about 25 tAF (31 x 106 m3) of 869 unused carry -over water in San Luis Reservoir , as shown by the white lin e. However, San Luis Reservoir 870 also had a significant volume of unused storage capaci ty at this time , and the district’s metric to measure 871 their dynamic recharge capacity (the total volume of water that could be diverted into district groundwater 872 recharge facilities before San Luis reached its storage capacity) rem ained larger than the vol ume of carry - 873 over water they stored in San Luis. As the winter progressed, the simulation delivered the district’s carry - 874 over water to meet winter irrigation demands. The district was able to use all of their carry -over water for 875 irrigation before San Lui s Reservoir filled in February of 2005 (Figure 1 2). Expectations for that year’s 876 SWP contract allocation continued to increase throughout 2005 ( as previously shown in Figure 9 ), 877 eventually causing Wheeler Ridge – Maricopa’s individual SWP supplies to exce ed their remaining 878 irrigatio n demand . The district carried over a similar volume in water year 2006, but San Luis Reservoir 879 was much closer to capacity because other contractors were also storing carry -over water. Reservoir fill - 880 time fell much more quick ly at the beginning of water year 2006, reflected in the district’s falling 881 dynamic recharge capacity ( dark blue area of Figure 12 ). At the point during water year 2006 when this 882 dynamic recharge capacity fell below the districts’ remaining carry -over storage, CALFEWS trigger ed 883 the district’s decision to begin delivering their carry -over water to groundwater recharge facilities. The 884 use of groundwater recharge capacity allowed Wheeler Ridge – Maricopa to deliver all their carry -over 885 water earlier than in 2005, avoiding the need to forfeit unused supplies. Water year 2006 also saw very 886 high expected SWP contract allocations, and by mi d-summer of 2006, the district was expected t o bring a 887 very large volume (>60 x 106 m3) of carry -over water into the next year. High simulated storage levels at 888 San Luis Reservoir again resulted in low dynamic recharge capacity for the district, and the co mbination 889 of high expected carry -over storage and low dynamic recharge capacity caused the district to begin 890 delivering their potential carry -over water to groundwater banking facilities before the end of water year 891 2006. The district was able to recharge this water more quickly than expected, because few other districts 892 were recharging surface water at this time and Wheeler Ridge – Maricopa was able to take advantage of 893 unused capacity at their groundwater banking facilities . At the start of water year 200 7, the district 894 delivered their remaining carry -over water for irrigation and groundwater recharge before San Luis 895 Reservoir could re -fill in early 2007. Carry -over storage operations in CALFEWS enable individual 896 districts to make coordinated surface and g roundwater use decisions, saving their surface water for 897 irrigation or municipal demands when possible while still avoiding ‘losing’ their supplies through 898 selective use of groundwater recharge capacity. 899 38 900 Figure 12: Carry -over storage and dynamic recharge capacity (cumulative groundwater recharge 901 capacity during the expected reservoir fill -time) for the Wheeler Ridge – Maricopa Water 902 Storage District during a wet period from October 2004 – September 2007, with deliveries of 903 carry -over storage for i rrigation and groundwater recharge. 904 Extended Historical Re -evaluation 905 The rules -based adaptations that drive simulations allow CALFEWS to evaluate reservoir 906 releases, delta operations, irrigation deliveries, and groundwater recharge/recovery under a wide range of 907 input conditions, infrastructure configurations, and regulatory regimes. Over the course of the 20 year 908 historical evaluation period (October 1996 – September 2016), decisions rules adapt to increasing 909 capacity in Tulare Basin groundwater banks (AECOM , 2016 ), the imposition of the National Fisheries 910 and Wildlife Services Old & Middle River rule (NMFS 2009) , limiting the capacity of delta pumps 911 between January and June, and the San Joaquin River Restoration Project (Meade, 2013) , which increases 912 the required environmental releases from Millerton Reservoir. These changes are implemented into 913 model simulations as they occur in real time (construction of the Kern Water Bank, 2001 -2003; Old & 914 Middle River delta rule, 2008; San Joaquin River Restoration, 2009) over the historical evaluation period, 915 but we can also conduct an extended historical re -evaluation, applying regulator y changes to the entirety 916 of an extended full-natural -flow record available through the California Data Exchange Center (CDEC). 917 39 Full-natural -flow records in the Sacramento, San Joaquin, and Tulare Basins reach back as far as 1905, 918 enabling a 111 -year exte nded historic re -evaluation, under scenarios reflective of current infrastructure 919 and regulatory conditions. In watersheds where flow and snowpack data were not available over the 920 entire period, they are synthetically extended using historical relationshi ps with existing data. In addition , 921 incremental flow and reservoir inflow datasets are not available for the same historical duration, so inputs 922 are synthetically generated based on more recent (10/1996 – 09/2016) observed relationships with the 923 full-natural-flow data, as described in Supplemental Section B . 924 925 Figure 13: Scenario comparison between the historical evaluation (October 1996 – September 926 2016) and the extended historical re -evaluation (October 1905 – September 2016) with respect to 927 SWP and CV P delta pumping, total delta outflows, and the distribution of Sacramento River 928 Index (SRI) water year types 929 40 Simulation results illustrate the water availability that would have been observed in the system 930 under historical hydrologic variability and a stat ic set of institutional conditions, including current land 931 use, population, infrastructure, and regulatory regime . Figure 1 3 compares the distribution of SWP and 932 CVP delta pumping and delta outflows under the extended historical re -evaluation scenario (111 years , 933 water years 1906 -2016 ), the historical evaluation scenario (20 years , water years 1997 - 2016 ), and 934 historical obser vations (20 years , water years 1997 -2016 ). Although the extended historical period (1905 - 935 2016) contains a slightly higher portion of ‘Wet’ and ‘Above Normal’ water years than the historical 936 evaluation period (1996 -2016), it produces a much lower frequency of years with very high annual 937 exports through both the SWP pumps (> 4300 x 106 m3/year) and CVP pumps (> 3400 x 106 m3/year) . 938 This illustrates the impact of apply ing the recent regulatory changes across the entire extended historical 939 period, rather than o nly during the 2008 -16 period under which they are applied in the historical 940 evaluation scenario. New regulations applied to the delta primarily limit pumping rates from January to 941 June, preventing the pumps from running at capacity for a substantial port ion of the year and limiting the 942 water that can be exported during the typical high -flow season. The regulatory impact can also be 943 observed in very dry years, which form a second , smaller peak in the bi-modal pumping distribution that 944 is most pronounced in the extended historical scenario. During these years, there is often very little 945 snowpack above SWP and CVP storage reservoirs, and most of the water that could be exported is 946 available as uncontrolled infl ows to the delta during brief periods in the wetter winter months. However, 947 regulations become more restrictive to wintertime pumping operations when conditions are the driest . In 948 addition to having fewer supplies to export, SWP and CVP managers are also effectively operating with 949 reduced infrastructure capacity during dry year s, leading to the bimodal distribution shown in Figure 1 3. 950 Discussion 951 This study presents results from a 20-year historic al simulation and a 111-year, synthetically 952 extended histori cal re -evaluation. In both scenarios, infrastructure and land cover are set deterministically, 953 the former tracking the observed changes over the 20-year period October 1996 – September 2016, and the 954 latter applying current conditions to the entire hydrolo gic record that occurred from October 1905 – 955 September 2016. The historical simulation provides a benchmark for quantifying how well the decision 956 rules described in CALFEWS capture stakeholder adaptations to continually changing surface and 957 groundwater co nditions throughout the State of California. In contrast with statewide MP-based models 958 such as CALVIN (Draper et al., 200 3), CalSIM (Draper et al., 2004) , or CalLite (Islam et al., 2011) that 959 seek to identify optimal allocations of surface water under a specific set of hydrologic and demand 960 conditions, the state -aware decision rules framework adopted here seeks to describe the system as it 961 currently exists . Perhaps more importantly, the f ramework describes how decisions within the current 962 41 system is driven by different environmental indicators (e.g. , snow pack, flow, land cover). The ability to 963 quantify and evaluate how individual water users respond to changing conditions is particularly he lpful in 964 identifying how they are impacted by marginal changes from current operations like those that could arise 965 from the State’s Flood -MAR Research and Data Development plan (CADWR, 2019). By linking decision 966 rules to a heterogeneous set of users and stakeholders like irrigation districts or reservoir operators, the 967 analysis can also capture the distributional effects of changes to operating policies and/or infrastructure. 968 These distributional effects are particularly important with respect to the contin uing development of 969 groundwater recharge and recovery efforts in the state. The location, magnitude, and timing of groundwater 970 recharge determines how much groundwater can be recovered in the future, and by whom. The groundwater 971 banking rules used in CALFE WS, limiting groundwater recovery to only water that has been previously 972 recharged at the site, aids in understand ing these multi -year regulatory links between flood and drought 973 periods. 974 The spatial and temporal scale used within the CALFEWS simulation framework also allow it to 975 be interoperable with land use and power dispatch models. Land cover selection used to estimate irrigation 976 demand in this study is deterministic, ignoring the relationship between surface water variability and 977 irrigated acreage. I rrigation demands that are not met by surface water or banked recovery deliveries are 978 assumed to be met through private groundwater pumping. However, literature suggests that the relationship 979 between surface water availability, groundwater pumping, and irrigated acreage is a more c omplex 980 economic decision for irrigators (Medellin -Azuara et al., 2015). In future work, irrigation deliveries 981 generated by CALFEWS can be linked with economic models of agricultural production such as 982 California’s SWAP (Howitt et al., 2012) to represent a daptive land use decisions. In order to get an accurate 983 picture of the pumping costs faced by irrigators, future versions of CALFEWS can also include an explicit 984 representation of the changes to groundwater levels that result from direct aquifer recharge and groundwater 985 pumping in a given spatial area , an important factor in meeting sustainability targets described in the 986 Sustainable Groundwater Management Act . Extending the state -aware decision framework to groundwater 987 levels (as an environmental indicato r) and district -level land cover (using a decision rule) could enable the 988 exploration of more complex groundwater management strategies. 989 Likewise, s tate-of-the-art power dispatch modelling has demonstrated the connection between 990 drought and wholesale energ y prices in California (Kern et al., 2020), with a particular attention to changes 991 in hydropower generation and temperature -based variability in energy use for the cooling of buildings . 992 However, these models can also consider changes to other energy consu mption related to surface water 993 drought in California, such as changes to the volume of groundwater pumping or conveyance of the State 994 Water Project, the single largest energy user in the State. Coordinated modelling of surface and groundwater 995 42 use, paired with estimates of wholesale and retail electric power prices, can provide insight into the financial 996 risks faced by irrigation districts, groundwater banks, and individual irrigators. These risks impact the 997 ability of institutions to repay loans and meet o ther fixed cost obligations, playing a role in determining 998 investment decisions. Future versions of CALFEWS can incorporate feedbacks between environmentally - 999 driven changes in energy consumption, energy prices, and financial risk to irrigators and groundwa ter 1000 bankers. As water supplies become more diversified as outlined in the State of California’s Resilient Water 1001 Portfolio Initiative (CANRA, 2020), institutions that are capable of managing the year -to-year financial 1002 variability will be capable of greater adaptation in response to hydrologic and regulatory uncertainty. 1003 Conclusions 1004 This study introduces the California Food -Energy -Water System (CALFEWS) simulation model 1005 to illustrate the integrated, multi -sector dynamics that emerge from the coordinated manag ement of 1006 surface and groundwater in the State of California. The CALFEWS simulation framework captures the 1007 relationships between actors at multiple scales, linking the operation of inter -basin transfer projects in 1008 California’s Central Valley with coordina ted water management strategies abstracted to the more highly 1009 resolved scale of irrigation and water storage districts. A set of interdependent rules, conditioned on 1010 dynamic environmental variables, enable the model to abstract the coordinated management of surface 1011 and groundwater resources in the Central Valley . These abstractions are evaluated against observations 1012 from a recent, 20 -year period (Oct 1996 – Sept 2016), and are shown to accurately represent SWP/CVP 1013 deliveries, surface water storage, and gr oundwater banking operations in California’s Tulare Basin. 1014 Distributed, state -aware decisions provide insight into how a range of institutions adapt to changing 1015 hydrologic and regulatory conditions in a way that is consistent with recent historical observ ations of 1016 surface water storage, delta exports and water quality metrics, and groundwater banking accounts in the 1017 Tulare Basin. 1018 Flexible decision rules enable CALFEWS to evaluate alternative streamflow scenarios under 1019 particular infrastructure and regulato ry assumptions. The simulation framework can specifically support 1020 Monte Carlo exploratory modelling results, particularly with respect to irrigation deliveries and pumping 1021 requirements . Simulations can be linked with agricultural production and electric po wer dispatch models 1022 to create hydrologically consistent scenarios upon which to evaluate risks to food and power systems. 1023 Economic models of agricultural production like the Statewide Agricultural Production (SWAP) model 1024 used in California (Howitt et al., 2012) use surface water deliveries and groundwater access to estimate 1025 crop choice decisions, groundwater pumping, and annual agricultural yields. Abstractions of groundwater 1026 banking operations made within CALFEWS can better resolve water deliveries to ind ividual districts, 1027 allowing for more detailed projections of land use and groundwater pumping (Medellin -Azuara et al., 1028 43 2015). Hydropower is responsible for between 7 and 21% of California’s total energy generation 1029 (USEIA, 2020), but energy used for convey ance and distribution can offset a significant portion of this 1030 production. During the period 1998 -2004, the energy used to convey State Water Project supplies alone 1031 ranged between 8% (wet year) and 24% (dry year) of the total annual hydropower production ( CEC, 1032 2010; Nyberg, 2020). State -of-the-art electric power dispatch modelling has demonstrated the connection 1033 between drought and wholesale energy prices in California (Kern et al., 2020) based on changes to 1034 hydropower generation and energy use for cooling structures. However, the literature has not considered 1035 any potential drought -induced covariation between hydropower production and the energy demands for 1036 surface water conveyance and groundwater pumping. 1037 Instead of a prescribed sequence of optimal water deliveries assigned to specific time periods , 1038 CALFEWS formulates daily data input series into a number of state variables that are used to coordinate 1039 infrastructure operations . Model rules adapt to dynamic regulatory constraints on infrastructu re, enabli ng 1040 Monte Carlo simulations that combine different hydrologic, regulatory, and infrastructure scenarios. 1041 Institutional abstraction at multiple scales (e.g., inter -basin transfer projects, irrigation districts, joint 1042 groun dwater banks) enables rule -based co ordination between regional and statewide actors, linked 1043 through conditions throughout the state . Regulations and hydrologic conditions that affect exports 1044 through SWP and CVP delta pumps, for example, also affect imported water contract allocations and 1045 floodwater availability, which in turn influences how individual districts operate their groundwater 1046 recharge and recovery infrastructure. Groundwater banking and other coordinated use operations create a 1047 relationship between flood and drought periods, limiting recovery operations as a function of previous 1048 recharge. This relationship may become more important to irrigators and municipal users as the issue of 1049 groundwater sustainability increases in salience due to the recently enacted Sustainable Groundwater 1050 Management Act (CADWR, 2019) . CALFEWS provides a foundational framework that can support 1051 future Monte Carlo exploratory modeling efforts to understand the path -dependent impacts of hydrologic 1052 and regulator y uncertainty on coordinated surface and groundwater management , revealing potential risks 1053 and opportunities as they play a larger role in statewide ‘Resilient Water Portfolios ’ (CANRA et al., 1054 2020). CALFEWS is able to resolve these actions at the level o f individual irrigation and urban water 1055 districts, providing insight into financial risks and water use at a management -relevant scale. Tools that 1056 allow institutions evaluate and manage co -evolving physical and financial risks are crucial to the process 1057 of developing sustainable and resilient water solutions for institutionally complex contexts like the 1058 American West. 1059 1060 44 Acknowledgements 1061 This work was supported by the National Science Foundation through the Innovations in Food, 1062 Energy, and Water Program (CNS -1639268) 1063 1064 45