cfsDayToAF=86400/43560 opening=TEXT_SLIDE("Cadillac Desert, forty years later","Marc Reisner’s Cadillac Desert first appeared in 1986. These four reservoir case studies put its questions beside public water records.","Elephant Butte, Lake Powell, Lake Mead and Shasta: storage since 1986 and a common calendar-year 2024 accounting window.","The charts ask how much water arrived, how much left, and how storage changed. They do not by themselves explain every cause of scarcity.") method=TEXT_SLIDE("Read the water balance before the widths","All Sankey widths represent acre-feet during January 1 through December 31, 2024. Storage histories use millions of acre-feet. These are calendar years, not October-to-September water years.","Opening storage is the December 31, 2023 observation; closing storage is December 31, 2024. Storage drawn supplies the balance; storage gained is a destination. Neither branch represents the entire reservoir inventory.","Reported inflow plus storage drawn plus an unexplained balance in equals releases plus evaporation plus storage gained plus an unexplained balance out. A balance term can reflect omitted processes, revisions, rounding or inconsistent measurement windows.","Daily source coverage was checked for the 2024 series used here. Repeat that check if you change dates or item IDs; missing observations must not be treated as zero.") ebStory=TEXT_SLIDE("Elephant Butte: follow the water downstream","The reservoir balance is only the first accounting boundary. The 2024 Sankey continues through Caballo to the reported New Mexico, Texas and Mexico delivery charges.","Those branches are administrative delivery accounts, not measured crop consumption. Evapotranspiration, return flows and nonagricultural uses require additional data.","The downstream extension comes from the 2024 Rio Grande Compact Commission report and is embedded in the Java budget helper. It is not a live RISE destination feed.") ebHistoryRaw=USBR("329",19860101,20241231) ebHistory=SET_UNITS(SET_NAME(ebHistoryRaw/1000000,"Elephant Butte storage - million acre-feet"),"million_acre-feet") ebStorageChart=SET_TITLE(LINE_CHART(ebHistory),"Elephant Butte storage | 1986-2024 | million acre-feet") ebIn=USBR("4376",20240101,20241231) ebOut=USBR("4378",20240101,20241231) ebEvap=USBR("333",20240101,20241231) ebCumIn=SET_UNITS(SET_NAME(CUM_SUM(ebIn)/1000000,"Cumulative reported inflow"),"million_acre-feet") ebCumOut=SET_UNITS(SET_NAME(CUM_SUM(ebOut)/1000000,"Cumulative releases"),"million_acre-feet") ebCumEvap=SET_UNITS(SET_NAME(CUM_SUM(ebEvap)/1000000,"Cumulative evaporation"),"million_acre-feet") ebFlowChart=SET_TITLE(LINE_CHART(ebCumIn,ebCumOut,ebCumEvap),"Elephant Butte cumulative flows | calendar 2024 | million acre-feet") ebSankey=SET_TITLE(USBR_SANKEY(2024),"Elephant Butte to delivery accounts - calendar 2024 - acre-feet") ebCaveat=TEXT_SLIDE("Elephant Butte: what the delivery branches mean","Reported Caballo release: 625,613 acre-feet. Listed charges are 170,150 to New Mexico, 303,344 to Texas and 57,390 to Mexico. Their sum is 530,884 acre-feet, leaving a 94,729 acre-foot downstream accounting balance.","The report prints a delivery total of 530,788, which differs from its listed components by 96 acre-feet. This chart uses the listed components and leaves that discrepancy explicit.","The difference between Elephant Butte releases and Caballo releases is also an accounting balance. It must not automatically be labeled seepage, evaporation or agricultural consumption.") pStory=TEXT_SLIDE("Lake Powell: inflow, releases and storage","This case uses RISE reported inflow, total release, evaporation and reservoir storage. It deliberately uses operational inflow rather than the separate unregulated-inflow estimate.","A storage gain does not mean that all upstream needs were met. A storage draw shows that stored water helped support the annual outflow balance. The chart leaves any remaining mismatch as an unexplained balance.","Powell and Mead belong to the same river system. Their releases and inflows cannot be added as though they were independent new water supplies.") pHistoryRaw=USBR("509",19860101,20241231) pHistory=SET_UNITS(SET_NAME(pHistoryRaw/1000000,"Lake Powell storage - million acre-feet"),"million_acre-feet") pStorageChart=SET_TITLE(LINE_CHART(pHistory),"Lake Powell storage | 1986-2024 | million acre-feet") pIn=USBR("4288",20240101,20241231) pOut=USBR("4354",20240101,20241231) pEvap=USBR("510",20240101,20241231) pStock=USBR("509",20231231,20241231) pCumIn=SET_UNITS(SET_NAME(CUM_SUM(pIn)/1000000,"Cumulative reported inflow"),"million_acre-feet") pCumOut=SET_UNITS(SET_NAME(CUM_SUM(pOut)/1000000,"Cumulative releases"),"million_acre-feet") pCumEvap=SET_UNITS(SET_NAME(CUM_SUM(pEvap)/1000000,"Cumulative evaporation"),"million_acre-feet") pFlowChart=SET_TITLE(LINE_CHART(pCumIn,pCumOut,pCumEvap),"Lake Powell cumulative flows | calendar 2024 | million acre-feet") pAnnualIn=LAST(CUM_SUM(pIn),1) pAnnualOut=LAST(CUM_SUM(pOut),1) pAnnualEvap=LAST(CUM_SUM(pEvap),1) pDelta=LAST(pStock,1)-BEG_VALUE(pStock) pDraw=POSITIVE_PART(pDelta*(-1)) pGain=POSITIVE_PART(pDelta) pResidual=pAnnualIn-pAnnualOut-pAnnualEvap-pDelta pResidualIn=POSITIVE_PART(pResidual*(-1)) pResidualOut=POSITIVE_PART(pResidual) pLake=SANKEY_LINK(SET_NAME(pAnnualIn,"Lake Powell")) pInput=SANKEY_LINK(SET_NAME(pAnnualIn,"Reported inflow")) pDrawNode=SANKEY_LINK(SET_NAME(pAnnualIn,"Storage drawn")) pReleaseNode=SANKEY_LINK(SET_NAME(pAnnualIn,"Reservoir releases")) pGainNode=SANKEY_LINK(SET_NAME(pAnnualIn,"Storage gained")) pEvapNode=SANKEY_LINK(SET_NAME(pAnnualIn,"Evaporation")) pResidualInNode=SANKEY_LINK(SET_NAME(pAnnualIn,"Unexplained balance in")) pResidualOutNode=SANKEY_LINK(SET_NAME(pAnnualIn,"Unexplained balance out")) pPath1=SANKEY_PATH(pInput,pLake,pAnnualIn) pPath2=SANKEY_PATH(pDrawNode,pLake,pDraw) pPath3=SANKEY_PATH(pLake,pReleaseNode,pAnnualOut) pPath4=SANKEY_PATH(pLake,pGainNode,pGain) pPath5=SANKEY_PATH(pLake,pEvapNode,pAnnualEvap) pPath6=SANKEY_PATH(pResidualInNode,pLake,pResidualIn) pPath7=SANKEY_PATH(pLake,pResidualOutNode,pResidualOut) pGroup=SET_TITLE(SANKEY_GROUP(pPath1,pPath2,pPath3,pPath4,pPath5,pPath6,pPath7),"Lake Powell - calendar 2024 - acre-feet") pSankey=SET_UNITS(SANKEY_CHART(pGroup),"acre-feet") mStory=TEXT_SLIDE("Lake Mead: a deliberately limited balance","The selected Mead RISE operations record supplies storage and releases, but no daily inflow or evaporation series. Its Sankey therefore shows an inferred net input.","Inferred net input equals annual releases plus the annual change in storage. It represents all remaining inflows and outflows combined, including evaporation and any omitted withdrawals or returns. It is not a measured gross inflow.","This identity forces the chart to close. It cannot independently test Mead’s water balance, estimate evaporation or allocate water use by sector.") mHistoryRaw=USBR("6124",19860101,20241231) mHistory=SET_UNITS(SET_NAME(mHistoryRaw/1000000,"Lake Mead storage - million acre-feet"),"million_acre-feet") mStorageChart=SET_TITLE(LINE_CHART(mHistory),"Lake Mead storage | 1986-2024 | million acre-feet") mOut=USBR("6122",20240101,20241231) mStock=USBR("6124",20231231,20241231) mCumOut=SET_UNITS(SET_NAME(CUM_SUM(mOut)/1000000,"Cumulative reported releases"),"million_acre-feet") mFlowChart=SET_TITLE(LINE_CHART(mCumOut),"Lake Mead cumulative releases | calendar 2024 | million acre-feet") mAnnualOut=LAST(CUM_SUM(mOut),1) mDelta=LAST(mStock,1)-BEG_VALUE(mStock) mNetInput=mAnnualOut+mDelta mDraw=POSITIVE_PART(mDelta*(-1)) mGain=POSITIVE_PART(mDelta) mLake=SANKEY_LINK(SET_NAME(mNetInput,"Lake Mead - net accounting only")) mInput=SANKEY_LINK(SET_NAME(mNetInput,"Inferred net input")) mDrawNode=SANKEY_LINK(SET_NAME(mNetInput,"Storage drawn")) mReleaseNode=SANKEY_LINK(SET_NAME(mNetInput,"Reservoir releases")) mGainNode=SANKEY_LINK(SET_NAME(mNetInput,"Storage gained")) mPath1=SANKEY_PATH(mInput,mLake,mNetInput) mPath2=SANKEY_PATH(mDrawNode,mLake,mDraw) mPath3=SANKEY_PATH(mLake,mReleaseNode,mAnnualOut) mPath4=SANKEY_PATH(mLake,mGainNode,mGain) mGroup=SET_TITLE(SANKEY_GROUP(mPath1,mPath2,mPath3,mPath4),"Lake Mead - net accounting only - calendar 2024 - acre-feet") mSankey=SET_UNITS(SANKEY_CHART(mGroup),"acre-feet") sStory=TEXT_SLIDE("Shasta: a computed inflow record","Shasta reports daily inflow, total release and evaporation in cubic feet per second. Each daily value is converted to acre-feet using 86,400 seconds per day divided by 43,560 cubic feet per acre-foot.","The operations report defines computed inflow from storage change, releases and evaporation. A close balance is therefore partly built into the source methodology; it is not an independent confirmation of all river inflow.","RISE labels the evaporation series with aggregation sum despite its cfs units. Here it is treated as the daily equivalent flow rate, consistent with USBR’s daily operations tables. Full natural flow is a different series and is not substituted for reservoir inflow.") sHistoryRaw=USBR("10864",19860101,20241231) sHistory=SET_UNITS(SET_NAME(sHistoryRaw/1000000,"Shasta storage - million acre-feet"),"million_acre-feet") sStorageChart=SET_TITLE(LINE_CHART(sHistory),"Shasta storage | 1986-2024 | million acre-feet") sInCfs=USBR("10867",20240101,20241231) sOutCfs=USBR("10869",20240101,20241231) sEvapCfs=USBR("10861",20240101,20241231) sStock=USBR("10864",20231231,20241231) sIn=sInCfs*cfsDayToAF sOut=sOutCfs*cfsDayToAF sEvap=sEvapCfs*cfsDayToAF sCumIn=SET_UNITS(SET_NAME(CUM_SUM(sIn)/1000000,"Cumulative computed inflow"),"million_acre-feet") sCumOut=SET_UNITS(SET_NAME(CUM_SUM(sOut)/1000000,"Cumulative total releases"),"million_acre-feet") sCumEvap=SET_UNITS(SET_NAME(CUM_SUM(sEvap)/1000000,"Cumulative evaporation"),"million_acre-feet") sFlowChart=SET_TITLE(LINE_CHART(sCumIn,sCumOut,sCumEvap),"Shasta cumulative flows | calendar 2024 | million acre-feet") sAnnualIn=LAST(CUM_SUM(sIn),1) sAnnualOut=LAST(CUM_SUM(sOut),1) sAnnualEvap=LAST(CUM_SUM(sEvap),1) sDelta=LAST(sStock,1)-BEG_VALUE(sStock) sDraw=POSITIVE_PART(sDelta*(-1)) sGain=POSITIVE_PART(sDelta) sResidual=sAnnualIn-sAnnualOut-sAnnualEvap-sDelta sResidualIn=POSITIVE_PART(sResidual*(-1)) sResidualOut=POSITIVE_PART(sResidual) sLake=SANKEY_LINK(SET_NAME(sAnnualIn,"Shasta")) sInput=SANKEY_LINK(SET_NAME(sAnnualIn,"Reported inflow")) sDrawNode=SANKEY_LINK(SET_NAME(sAnnualIn,"Storage drawn")) sReleaseNode=SANKEY_LINK(SET_NAME(sAnnualIn,"Reservoir releases")) sGainNode=SANKEY_LINK(SET_NAME(sAnnualIn,"Storage gained")) sEvapNode=SANKEY_LINK(SET_NAME(sAnnualIn,"Evaporation")) sResidualInNode=SANKEY_LINK(SET_NAME(sAnnualIn,"Unexplained balance in")) sResidualOutNode=SANKEY_LINK(SET_NAME(sAnnualIn,"Unexplained balance out")) sPath1=SANKEY_PATH(sInput,sLake,sAnnualIn) sPath2=SANKEY_PATH(sDrawNode,sLake,sDraw) sPath3=SANKEY_PATH(sLake,sReleaseNode,sAnnualOut) sPath4=SANKEY_PATH(sLake,sGainNode,sGain) sPath5=SANKEY_PATH(sLake,sEvapNode,sAnnualEvap) sPath6=SANKEY_PATH(sResidualInNode,sLake,sResidualIn) sPath7=SANKEY_PATH(sLake,sResidualOutNode,sResidualOut) sGroup=SET_TITLE(SANKEY_GROUP(sPath1,sPath2,sPath3,sPath4,sPath5,sPath6,sPath7),"Shasta - calendar 2024 - acre-feet") sSankey=SET_UNITS(SANKEY_CHART(sGroup),"acre-feet") compareStory=TEXT_SLIDE("Four reservoirs, different accounting boundaries","The long storage histories show timing and persistence. The annual Sankeys show the size of flows during one shared year. An annual flow can exceed a reservoir’s observed inventory because water passes through it.","Absolute storage in acre-feet is not percent full. Capacity definitions, sedimentation and operating limits are not standardized here. Each chart must be read on its own scale.","Powell and Mead are connected: this presentation does not add their flows or claim to trace Powell releases directly into Mead. Intervening tributaries, withdrawals, returns, travel time and losses would need their own accounting.") historyComparison=SET_TITLE(LINE_CHART(ebHistory,pHistory,mHistory,sHistory),"Four storage histories | 1986-2024 | million acre-feet") agriculture=TEXT_SLIDE("How much of this water goes to agriculture?","Reservoir releases and delivery charges alone cannot answer that question. A release can serve irrigation, municipal supply, environmental flows or other purposes, and some diverted water returns to the river.","For an agricultural share, first choose the denominator: gross diversions, delivered water, or consumptive use. Match sector records to the same year and geographic boundary before calculating a percentage.","The Elephant Butte delivery accounts provide a starting point for downstream research. This version assigns no agricultural percentage to the four reservoirs because the required sector and return-flow records are not included.") closing=TEXT_SLIDE("The question after Cadillac Desert","These records make a useful starting point: how dependent is each system on stored water, how variable is replenishment, and where does the accounting become incomplete?","A stronger follow-up would repeat the balances across wet and dry years, add verified sectoral consumptive use, and keep connected reservoirs within one consistent river-system boundary.","The book supplies historical questions. The charts supply a reproducible way to examine a defined part of the present water account, with their limits visible.") sourcesOne=TEXT_SLIDE("Sources and item IDs: Rio Grande and Colorado","Bureau of Reclamation RISE, https://data.usbr.gov/ . Download route: /rise/api/result/download?itemId=ID&type=csv&after=YYYY-MM-DD&before=YYYY-MM-DD . Accessed October 21, 2026.","Elephant Butte: storage 329; inflow volume 4376; total release volume 4378; evaporation volume 333. Catalog https://data.usbr.gov/catalog/2293 . Downstream charges: Reclamation Calendar Year 2024 Report to the Rio Grande Compact Commission.","Lake Powell: storage 509; operational inflow volume 4288; total release volume 4354; evaporation volume 510. Catalog https://data.usbr.gov/catalog/2362 .","Lake Mead: storage 6124; release volume 6122. Catalog https://data.usbr.gov/catalog/4370 . The inflow shown here is inferred net input, not a separate RISE item.") sourcesTwo=TEXT_SLIDE("Sources and reproducibility: Shasta and method","Shasta: storage 10864; inflow rate 10867; total release rate 10869; evaporation rate 10861. Catalog https://data.usbr.gov/catalog/2226 . Daily operations methodology: https://www.usbr.gov/mp/cvo/vungvari/shadop0125.pdf .","All selected 2024 rate and volume series contained 366 daily observations when checked. Storage windows included the December 31, 2023 opening observation. Historic charts run January 1, 1986 through December 31, 2024. Source revisions can change results.","USBR_SANKEY(2024) requires the updated Elephant Butte budget helper with downstream delivery accounting. The other Sankeys use SANKEY_LINK, SANKEY_PATH, SANKEY_GROUP and SANKEY_CHART with single-observation annual-total series. Default link colors come from your existing D3SankeyChart.","First run can be slow: long histories are downloaded in annual chunks, then cached. Live testing verified the Elephant Butte, Powell and Mead calculations. Shasta and generic Sankey units require the accompanying adapter and SET_UNITS fixes before this final version can run in production.") presentation=SLIDESHOW(opening,method,ebStory,ebStorageChart,ebFlowChart,ebSankey,ebCaveat,pStory,pStorageChart,pFlowChart,pSankey,mStory,mStorageChart,mFlowChart,mSankey,sStory,sStorageChart,sFlowChart,sSankey,compareStory,historyComparison,agriculture,closing,sourcesOne,sourcesTwo)