US agriculture is among the world's most productive due in large part to past public research and development (R&D) (1,2). Higher productivity increases farm profitability while reducing the sector's environmental impact and food prices (3)(4)(5). Despite substantial productivity gains, US agriculture remains acutely vulnerable to extreme weather (6,7). Recent climate trends have been detrimental to global agriculture (8,9) and there are signs both US and global agricultural productivity growth are slowing (10,11). Given the delayed benefits of R&D investments, it is pressing to assess US agriculture's R&D needs in a rapidly changing climate. We quantify the public R&D spending growth needed to offset the emerging impacts of climate change on US agricultural productivity. We first estimate econometric models quantifying the historical effect of R&D spending and weather fluctuations on national agricultural Total Factor Productivity (TFP). TFP measures productivity and reflects the ratio of all measured agricultural outputs to inputs (12). We use these estimates to simulate how climate change would affect agricultural TFP via changes in counterfactual weather trajectories since 1950 based on climate model output from the 6 th Coupled Intercomparison Project Model (CMIP6) (13). We then solve for the R&D spending needed to offset these emerging climate change impacts on TFP by certain target dates. Our estimates quantify the additional R&D spending required to avoid declines in US agricultural productivity under climate change with stagnant public R&D spending. Our primary measures of national agricultural TFP and R&D expenditures come from official USDA-ERS statistics which we complement with other sources (14) (Fig. S1). We use annual public agricultural R&D expenditures to construct a stock of knowledge that explains the observed growth in agricultural TFP (Fig. 1A,1F). We aggregate daily gridded weather datasets (15,16) to the national level based on various land cover weights (17) (Fig. S2) to explain yearto-year fluctuations in agricultural TFP. We then conduct counterfactual simulations based on downscaled bias-corrected data from CMIP6 over 1950-2100 (18) (Figs. S3-S5). We describe our data and methods in greater detail in the SM. Many studies analyze the link between R&D spending and agricultural productivity (19-21). Universities, government agencies, and private agricultural firms conduct agricultural R&D and translate the resulting knowledge into new technologies to be adopted by farmers with the support of extension services. This process is notoriously slow (22). Over time, we observe farmers producing more relative to the inputs they use, which manifests as TFP growth. We propose a simple empirical model of how public agricultural R&D translates into TFP. Our baseline model takes the form:

where 𝐴 ! is national agricultural TFP in year 𝑡, 𝑆 ! is an R&D or knowledge stock resulting from past public R&D activities, 𝑍 ! is a vector of weather variables and 𝜖 ! is an error term. Following conventional practice, we model 𝑆 ! as a finite accumulation of knowledge flows proxied by public R&D expenditures 𝑅𝐷 ! (20). Past R&D spending contributes for up to 50 years before reaching obsolescence, so that

This framework has several key implications. First, it suggests that TFP is primarily influenced by public agricultural R&D. Private R&D is primarily aimed at technologies that are embodied in the inputs so they can be sold to farmers. The official TFP estimates we use account for inputs that reflect such "quality" changes. As a result, TFP reflects disembodied technical change that arguably should stem primarily from public R&D. We nonetheless revisit this assumption empirically. Second, the stock of knowledge 𝑆 ! affects the level of TFP directly, not its growth (22). This means that constant R&D spending eventually leads to a stabilization of 𝑆 ! and thus to TFP stagnation. This reflects the need for "maintenance" research to keep agricultural productivity from declining due to everchanging pest and weed pressures (23). Previous work finds the benefits of agricultural R&D rise and then fall over time (24). We follow (1,25) and represent the research lags 𝛾 $ with a gamma distribution. This allows us to consider a wide range of lag weight structures with only 2 parameters (Fig. S6). We select a baseline model based on the research lags that best predict the historical levels of TFP. Public agricultural R&D expenditures underwent a steady rise throughout most of the 20 th century, but slowed starting in 1970, stagnated around 2000, and then declined in the last decade (Fig. 1A) (26). Our model of the TFP response to R&D spending suggest the research lags peak around the 30 th year (Fig. 1B-F). Notably, our model reproduces the recent slowdown in TFP growth (27,28), which results from the slowdown of the knowledge stock 𝑆 ! as seen in Fig. 1A. This slowdown in St, in turn, follows from the slowdown of R&D spending that began in the 1970s. The 30-year lag between a slowdown in R&D spending and a subsequent slowdown of the growth in the knowledge stock 𝑆 ! (and thus of TFP growth) has critical implications for future TFP growth. In particular, the ramifications of the stagnation and decline in investment over the past few decades have, for the most part, not yet materialized. A common concern when estimating time-series models like equation ( 1) is the presence of non-stationary variables, in this case TFP and 𝑆 ! . Two non-stationary variables can easily appear to be statistically related when they are not. To avoid spurious inference, it is common to rely on higher-frequency or de-trended variation of the data for identification. This can take the form of a first-difference model or the use of a time-series filter to remove the trends that underpin the spurious relationship (e.g. 29). However, we know based on theory that 𝑆 ! is the primary driver of TFP. This conceptual clarity alleviates concerns regarding the nature of the relationship. However, it does not resolve issues related to the omission of other R&D activities that could bias the magnitude of the relationship. A key challenge in analyzing the return of R&D on TFP is the presence of spillovers (30-32).
For instance, agricultural TFP can grow due to spill-ins of agricultural R&D from other regions or from non-agricultural R&D. If these other sources of R&D are correlated with public agricultural R&D, then not controlling for them in equation ( 1) could overstate the returns of public agricultural R&D. Our baseline model yields elasticities of the knowledge stock 𝛽 # around 0.5 (Fig. 1D, Table S1). This means that increasing TFP by 1% requires about a 2% increase in the knowledge stock. This is slightly higher than other studies seeking to isolate the effect of public R&D specifically (with 𝛽 # ~0.3, e.g. 33). Table S1 shows that controlling for a linear time trend leads to smaller estimates aligned with previous work. However, applying a more sophisticated time-series filter proposed in (34) yields similar (but noisier) estimates to our baseline model (Table S1, columns 1 vs 4). This suggests that spill-ins from other countries or sectors might be limited. We thus favor a baseline model estimated in levels to avoid the additional noise introduced when relying on the high-frequency variation of slow-moving variables. We consider several variations of this model. First, we find that computing a knowledge stock from both public and private agricultural R&D points to qualitatively similar elasticities (Table S2). This is consistent with (35) who find an ambiguous and noisy effect of private R&D on TFP, and the idea that technological change from private R&D is embodied in inputs and thus not reflected in TFP. We also find slightly larger estimates of the elasticity of the research stock when we consider an alternative agricultural data source (Table S3). Finally, we find that excluding weather in all these models has little bearing on the elasticity (column 2 in Tables S1-S3). A potential concern is that our estimate of the returns of R&D may be biased upward due to the omission of rising CO2 fertilization which boosts photosynthesis, especially of C3 crops. We explore this possibility by including summer CO2 concentration as an additional control (Table S4). We find that our baseline estimate remains largely unchanged (columns 1-3). We also explore a specification with a Hamilton trend and obtain a large but imprecise estimate for the elasticity of the knowledge stock when we control for CO2 concentration (columns 4-6). We find no evidence that CO2 fertilization is affecting our estimates of R&D returns. We also find that estimates of the contribution of CO2 to TFP is imprecise, in line with previous work on crop yields (36). Estimating the effect of weather on TFP from equation (1) harnesses variation around the predicted contribution of the knowledge stock (Fig. 1F). This approach may not control fully for data trends that could inadvertently make our estimates less precise. We therefore estimate weather effects separately from R&D effects in an auxiliary regression that controls for trends using the Hamilton time-series filter. Thus, weather effects are estimated around a flexible trend. To ensure that we capture the covariance between R&D and weather effects, we sample observations in the same way in each model when performing the block bootstrap procedure described in the SM. We find that exposure to temperatures exceeding 25°C reduce TFP (Fig. 2A), with a strong nonlinear effect of temperature similar to previous work on crop yields (37,38). Our model explains a significant fraction of TFP variations (Fig. 2B), with warmer conditions associated with lower TFP. We also consider how uniform changes in annual temperature and precipitation would reduce TFP (Fig. 2C-D), finding that total effects are dominated by temperature, again consistent with prior work (38-40) (Tables S5 andS6). A 3°C warming reduces TFP by more than 10%. We also confirm weather effects are noisier when estimated around the predicted value of the knowledge stock (Fig. S7). Our baseline model is based on weather variables aggregated over the entire calendar year. We implement an approach proposed in (41) to recover the underlying seasonality in the data. In general, we find that aggregating weather variables over the summer months improves TFP predictions out of sample (Fig. S8). But we also find that models based on temperature exposure bins still perform well when variables are aggregated over the entire year. And tailoring weather variables to the best-fitting season does not substantially change the weather sensitivities of TFP relative to our baseline model (Fig. S9). We thus favor a baseline model based on annual temperature bins and precipitation. We consider multiple variations of the model. First, we consider alternative specifications that rely on linear and quadratic time trends rather than on a the time-series filter (Fig. S10-S11). We find those estimates to be less precise than our baseline model. Second, we consider models based on weather data aggregated using alternative spatial weights (Fig. S2). We find that estimates based on equal spatial weights are smaller and less precise (Fig. S12) but that those based on cropland and pasture weights are comparable to our baseline model that accounts for the value of production (Fig. S13-S14). We also find comparable estimates when we consider an alternative weather dataset (Fig. S15). We compute the impact of climate change on TFP by simulating the effect of weather trajectories from counterfactual climate simulations (Fig. 3). This approach combines the statistical uncertainty from the econometric model, reflected in the estimated TFP sensitivities to weather, with the climate uncertainty stemming from alternative General Circulation Models (GCMs) along the 4 main Shared Socioeconomic Pathways (SSPs) in CMIP6. The projected TFP impact by 2050 ranges from -7.8% to -13.1% depending on the SSP (Table S8). As expected, the range of impacts expands from -8.4% to -35.2% across SSPs by 2100 (Table S10). Note that projected impacts by 2025 already appear somewhat negative at around -5.6% for SSP2-4.5

(with a 95% C.I. of -11.2% and +0.2%) (Table S7). This indicates that climate change is projected to be having a detrimental effect on US agricultural productivity, although the impact of recent climate trends is not yet clear (Fig. S16). The bottom panels of Fig.
3  Our projected climate change damages on US agricultural TFP are smaller than in (7). We attribute this difference to the way we model the effect of weather on TFP. In our model, weather affects the level of TFP, not TFP growth. That is, a weather shock only has a transitory effect on TFP and does not affect its future trajectory. This assumption could understate the damage of climate change even if small growth effects are present but are ignored. To estimate the R&D spending needed to offset climate change damages, we first solve for the change in the knowledge stock 𝑆 ! that fully offsets climate change impacts on TFP over time (Fig. S17A-D  We solve for these constant-growth spending trajectories for various target years, and we illustrate how we conduct the stock-to-spending mapping in Fig. S18. To offset climate change damages on TFP by 2050, we estimate that annual R&D spending would need to grow by 5.2% to 7.8% per year starting in 2021 depending on the SSP scenario (Figure 4 and Table S12). For context, Fig. 4B also showcases historical average annual R&D spending growth rates by decade. While our estimates remain imprecise, our central estimates point to R&D spending growth levels that rival those seen following the First and Second World Wars. Monetarily, these needs amount to an additional $207.6 to $433.7B in public R&D spending between 2021 and 2050 above a baseline investment of ~$5B per year observed in 2020 (Table S13). For comparison, the recent Inflation Reduction Act provided an additional $19.5B over a 5-year period to the USDA to support farm conservations practices to mitigate climate change. Public R&D spending needs by 2050 are large for 2 reasons. First, the climate-induced slowdown of US agricultural TFP is imminent if not ongoing. Fig. 3 shows that projected climate change damages by 2025 are close to being negative. Second, we find that research lags are long. Specifically, Fig. 1 shows that the impact of R&D spending peaks around the 30 th year. In summary, imminent climate impacts along slow R&D calls for large offsetting investments in the next 30 years. Naturally, the growth in public R&D spending to offset climate change impacts on TFP is smaller when considering target dates beyond 2050. Fig. S17 (panels I-L) and Table S12 show the annual R&D spending growth needed under alternative SSPs and target dates. As expected, spending requirements are closer across SSPs for target dates that are near because TFP impacts are relatively similar across SSPs in the next few decades (Fig. 3). Because spending growth compounds over time, the requirements to offset damages by 2100 are smaller on a yearly basis than those needed for 2050. However, the needs remain substantial. For instance, offsetting climate change damages on TFP by 2100 requires an annual R&D spending growth of 0.3% to 2.2% per year starting in 2021 depending on the SSP scenario (Table S12). Note that public R&D spending has grown by just 0.5% per year over 1970-2020. These needs amount to an additional $54.6 to $679.9B in public R&D spending between 2021 and 2100 above a baseline investment of ~$5B per year (Table S13). Fig. S19 illustrates how future TFP levels will fundamentally depend on R&D spending and the severity of climate change. We should highlight that the public R&D spending needs we outline here simply offset the slowing effect of climate change on TFP. This can be interpreted as the R&D needed to avoid TFP from declining given a fixed baseline R&D investment. Our framework suggests that simply meeting these targets would result in a stagnation of TFP. Thus, maintaining historical level of TFP growth will require even higher increases in public R&D spending. Our We also rely on an alternative public agricultural R&D dataset from InSTePP (1890-2007) (45) 2 . In addition to the spending categories listed above, this dataset also incorporates expenditures related to extension. As a result, the total public expenditures in this dataset slightly exceed those from the public agricultural R&D expenditures in the dataset described above (see Fig. S1B). One of our analyses also relies on "total" agricultural R&D expenditures that include both public and private sources (Fig. S1B and Table S2). We obtain private agricultural R&D expenditures from 2 sources. We obtain data for 1920-1959 from (44) and data for 1960-2014

1 https://www.ers.usda.gov/data-products/agricultural-productivity-in-the-u-s/productivity-growth-in-u-s-agriculture/ 2 https://instepp.umn.edu/data/instepp-productivity-accounts 3 https://www.ers.usda.gov/data-products/agricultural-and-food-research-and-development-expenditures-in-theunited-states/ from USDA-ERS 3 . These private R&D expenditures relate to various types of agricultural inputs sold to farmers, and include: 1). crop breeding, 2). chemicals for crop protection, 3). synthetic fertilizers, 4). machinery, 5). animal health, 6). animal breeding and 7). animal nutrition. Our analysis relies on detailed gridded climate data that we aggregate to the national level for the econometric analysis. We construct spatial aggregation weights based on the US Geological Survey (USGS)'s 2016 National Land Cover Database (NLCD) for the contiguous US (46) 4 . This is a 30-m resolution dataset with 16 land cover classifications. We capture cropland and pastures based on the "Cultivated Crops" and "Pasture/Hay" land cover classes, respectively. We compute the number of 30-m pixels in these land use categories within each grid cell of the gridded climate datasets we use. We illustrate the various types of aggregation weights we use in Fig. S2. Following (47), we aggregate the climate raster data using sparse matrices based on these aggregation weights. Finally, we also rely on a state-level agricultural output, input and TFP dataset from USDA-ERS . We rely on this dataset to scale agricultural land cover aggregations weights for weather data by production value (Fig. S2D). We do not rely on these state-level TFP estimates because we do not have access to the corresponding state-level R&D data. We primarily rely on a daily gridded weather maintained by Prof. Wolfram Schlenker (15). We refer to this as the "WS" dataset throughout the manuscript. This dataset provides daily minimum and maximum temperature and total precipitation over 1950-2022.
The dataset is largely based on the PRISM dataset (48) 5 . Advantages of WS relative to the daily PRISM data include: 1-a longer temporal coverage (starts in 1950 instead of 1981 for PRISM) and 2maintains a more stable set of underlying weather stations used in the spatial interpolation procedure. More details are provided on the dataset webpage. We also rely on weather data from the ERA5 dataset of the European Centre for Medium-Range Weather Forecasts (ECMWF) (49) 6 . The ERA5 is a global hourly reanalysis dataset available since 1940. We download the data directly from the ECMWF servers using

Python code that we provide with our reproduction package. We crop the data to the lower 48 US states and compute daily minimum and maximum temperature and total precipitation. Our study relies on output from General Circulation Models (GCMs) to simulate counterfactual changes in agricultural TFP. We rely on output from GCMs represented in the 6 th Coupled Intercomparison Project Model (CMIP6) (13). We rely specifically rely on a daily version of this ensemble downscaled and bias-corrected by the Climate Impacts Lab to the ERA5 data (50,51). We select daily minimum and maximum temperature and total precipitation from 1950 to 2014 (historical simulation) and 2015-2100 for the 4 main Shared Socio-economic Pathways (SSPs) in CMIP6. We download the data Microsoft's Planetary Computer using Python code that we provide with our reproduction package. We crop the data to the lower 48 US states similarly to the ERA5 dataset. A challenge with conducting an econometric analysis with a national time series is that weather predictors need to be aggregated to the same national scale. Aggregation either in space or time often leads to loss of information. Our aggregation procedures and criteria seek to minimize this information loss in various ways. The first consideration is spatial aggregation. We aggregate gridded weather and climate datasets (WS, ERA5, CMIP6) based on spatial weights that represent agricultural land cover and production value. Fig. S2 shows 4 sets of aggregation weights. Figs. S3-S5 show key variables for these climate datasets under these 4 aggregation weights. The main analysis in the paper is based on cropland and pastures weights that are scaled by the state's value of production. As a result, cropland and pastures in California, a state with high-value specialty crops, exhibits relatively higher spatial weights, than areas in the Midwest which are more specialized in relatively less valuable field crops. In the main text we discuss that only the equal spatial weights appear to deteriorate model fit. Other aggregation strategies appear to provide similar results. The second consideration is temporal aggregation. Most commodity-specific studies assume a relevant season for weather aggregation that roughly corresponds to the growing season in the region of interest. However, our analysis encompasses the entire US agricultural sector and thus reflects the sensitivities to weather fluctuations of all crops and livestock production. A simple strategy may be to aggregate weather information to the calendar year. A potential disadvantage with this approach is that temporal aggregation might conceal relevant within-year variation for the prediction of agricultural outcomes. We rely on an approach introduced in (41) that seeks to recover the underlying seasonality of the data when that seasonality is unknown. The approach consists of a grid search of all possible calendar periods within the year to identify the best-fitting seasons for a particular outcome. We conduct this analysis for the US national TFP data and show the findings in Fig. S8. As mentioned in the main text, we ultimately rely on variables aggregated to the entire calendar year rather than tailored variables to the best-fitting season, which do not point to substantially different findings. A key feature of our analysis is the measure of temperature. We follow the approach in (37) and described in greater detail in (47) to compute measure of monthly exposure to 1°C intervals between -30 and +50°C. Computing these exposures requires information about the intra-daily distribution of temperature. We derive this by fitting a double sine curve passing through the minimum and maximum temperature of consecutive days and tracking exposure at 15-minute intervals. We perform this calculation for both historical (WS and ERA5) and CMIP6

datasets. The main goal of this approach is to avoid losing information about the occurrence of extreme temperature events when performing spatio-temporal aggregation. Indeed, models based on temperature bins are more forgiving than models based on average temperatures (see Fig. S8). Specifically, out-of-sample model predictions do not deteriorate as much when long aggregation windows (e.g. January-December) are selected. We later describe how we estimate non-linear effects of temperature exposure using a natural cubic spline. We adopt a standard framework based on a Cobb-Douglas production function with constant returns to scale:

where 𝑌 ! is an aggregate output in year 𝑡, 𝑋 '! is the quantity of the 𝑗 th measured input, ∑ 𝛼 ' ' = 1, and 𝐴 ! is Total Factor Productivity (TFP). Weather 𝑍 ! is an exogenous random input vector that is not conventionally accounted for in official statistics and is thus subsumed in 𝐴 ! . The function 𝑓(⋅) is plausibly a nonlinear function of 𝑍. Re-arranging this equation and taking logs yields the definition that TFP growth equals the growth of output that cannot be explained by the growth of measured inputs:

Our study quantifies the changes in R&D needed to avoid future declines in TFP. To clarify the scope of our analysis we first need to clarify the different ways technological progress can operate in this framework. Technical change is said to be "embodied" (in the inputs) if it manifested through changes in the quality of the 𝑋 ' themselves. These quality adjustments can take different forms but apply to all inputs. For instance, workers can become more educated; the formulation of fertilizers can improve over time; machinery can become more advanced; crops and animal can be improved genetically, etc. We can characterize such quality adjustments as

where 𝑏 '!
is a quality adjustment factor for the "conventional" input 𝑋 '! * . In general, changes in input quality are captured through prices. For instance, educated workers command a higher wage, or improved seeds are more expensive. In a competitive market, input prices reflect the value of their marginal product. In other cases, however, input prices may be missing or distorted, in which case one can recover the underlying quality changes through a hedonic analysis (52,53). Note that 𝑏 '! can be thought of as an "augmenting" factor, so this type of technical change can be interpreted as a form of factor-augmenting technical change. Our framework and the official TFP statistics we rely upon are based on quality-adjusted inputs. TFP growth in our framework is thus equal to the growth of output minus the growth of measured quality-adjusted inputs. As a result, technological progress that is embodied in the inputs is not captured by our TFP measure. TFP captures (through 𝑎 ! ) what is commonly referred to as Hicks-neutral or "disembodied" technical change. Our study focuses on public agricultural R&D spending needed to offset climate change impacts on TFP. One reason is that private R&D is primarily oriented towards generating embodied technical change which is not reflected in TFP. Private R&D firms improve the "quality" of inputs that are sold to farmers in the form of enhanced chemicals, seeds and machinery. These higher-quality inputs are sold at a price that reflects the quality of input services delivered, which does not affect TFP (as long as the quality-adjustment technique is correct). Public R&D on the other hand could lead to both embodied and disembodied technical change. As a result, we posit that the rise in TFP over time stems primarily from public R&D. Following conventional practice, we assume that the non-weather component of TFP, 𝑎 ! , is a function of a knowledge stock 𝑆 ! reflecting a distributed lag of past investments (or flows) in public R&D, 𝑅𝐷 ! :

where 𝛽 + is the elasticity of TFP relative to the knowledge stock and 𝐿 is the length of the socalled research lag. We later parametrize these functions in the empirical model. We conceptualize the effect of climate change on TFP over time, 𝐷 ! , as the effect of changing weather 𝑍 ! relative to the effect of a reference climatology 𝑍 ̅ -:

We can derive the change in the knowledge stock Δ log 𝑆 ! * = log 𝑆 ! * -log 𝑆 -that fully offsets 𝐷 ! to ensure ensures that TFP does not change:

(5)

The more productive R&D is (larger 𝛽 + ), the smaller the change in the knowledge stock Δ𝑆 ! needs to be to offset emerging climate change impacts 𝐷 ! . Once Δ𝑆 3 is established for a given target year T, we can solve for sequences of annual public R&D expenditures, 𝑅𝐷 ! . We consider R&D spending paths with fixed growth rates between the year 2021 and the target year. Our framework relies on the historical information of how the knowledge stock and weather affect TFP to conduct counterfactual simulation in the future. We address this concern in the main text. Our econometric model follows from the equation (3a) and takes the general form:

where 𝜖 ! is an error term that is serially correlated. In all models with account for such serial correlation with an overlapping block bootstrap (500 bootstraps) with blocks of 5 observations. We discuss the empirical parametrization of 𝑓(⋅) later. Our national TFP data has a limited number of observations so estimating all the parameters in the distributed lag in equation (3b) is infeasible. We follow (1,25) and generate lag weights 𝛾 . using a gamma distribution. This allows us to generate a wide range of lag weight structures with only 2 parameters of this distribution (𝜆 and 𝛿, see Fig. S6). We conduct a grid search to find the best-fitting combination of these two parameters (Fig. 1B). We find 𝜆 = 0.75 and 𝛿 = 0.90 is the best-fitting combination. Table S1, column 1, shows a baseline estimate of 0.503 for 𝛽 + . Excluding weather as a control has little bearing on this estimate (column 2). Our estimate is slightly larger than previous reported estimates (e.g. 33) that control for a linear time trend. Indeed, we find a smaller but less precise estimate when we control for a time trend (column 3). That model harnesses variation in TFP and the knowledge stock 𝑆 ! around a linear trend for identification. We also consider a model that controls for a Hamilton trend (34). The Hamilton filter was recently proposed as a strategy for removing the trend component of a time series. In our application, we include the 4 recent TFP lags to control for a flexible TFP trend (Fig. S20). Table S2 replicates the analysis on Table S1 but with an alternative measure of the knowledge stock that incorporates both public and private R&D. We find that the new estimates are qualitatively similar to those in Table S1, although estimates accounting for a linear time trend appear no longer significant at conventional levels (column 3). Table S3 also replicates the analysis in Table S1 but with an alternative (but shorter) time series for both TFP and public R&D expenditures. Estimates for 𝛽 + appear slightly higher but are no longer significant at conventional levels when we apply a Hamilton filter to this shorter dataset (column 4). The concentration of carbon dioxide during the summer months of the northern hemisphere (June-August) rose from around 316 ppm in 1958 to about 415 ppm in 2020. Carbon dioxide is beneficial for photosynthesis, especially for C3 plants, which could have boosted productivity during the sample period. In Table S4 we explore whether including carbon dioxide as a control alters our baseline estimates. We find estimates remain largely unchanged when including carbon dioxide as a control (columns 1 vs 3 and 4 vs 6).
Furthermore, while carbon dioxide on its own is positively correlated with the level of TFP (column 2), that association is no longer present when we control for the knowledge stock (column 2 vs 3) or when we control for a Hamilton trend (columns 5 and 6). While there is extensive evidence that carbon dioxide may be beneficial to crop productivity in controlled environments, we find that its contribution in this aggregate setting is too imprecise to capture. Our study considers the effect of temperature and precipitation on TFP. We estimate these weather effects with a model of the form:

where 𝑔(𝑡) is a function that controls for trends in TFP, 𝐸 ! ' is the j th transformed temperature exposure variable and 𝑃 ! is precipitation. We follow (37) in estimating non-linear effects of temperature exposure to various temperature bins (see data section). This procedure is explained in greater detail in (47). In essence, we want to estimate the effect on TFP of spending additional time in each bin. However, the exposure bins are numerous and collinear, so estimating their effects separately in the same regression is infeasible. We thus reduce the dimensionality of these bins by fitting a natural cubic spline. The underlying assumption is that the marginal effects of neighboring bins are similar and vary smoothly. More precisely, the term 𝑒 ! 4 represents the time spent in the k th temperature bin or interval. We originally compute monthly bins in 1°C intervals from -30 to 50°C. To avoid having little to no exposure in the extreme tails, we top and bottom code bins so that the extreme bins have no less than 0.1% of the total exposure. 𝐾 is the total number of bins after top and bottom coding the tails. The term 𝐵 ' 4 represents the value of the k th row and j th column of the basis matrix of natural cubic spline with 𝐽 degrees of freedom (𝐽 = 5 for our baseline model). Thus 4 is a transformed temperature exposure variable. Note that we only estimate 𝐽 = 5 parameters 𝛾 ' in our baseline model, which greatly reduces the dimensionality of the problem. The trend 𝑔(𝑡) can be modelled in various ways. Our baseline approach relies on a Hamilton trend with 1 year look-ahead (34). That is, 𝑔(𝑡) includes the 4 more recent lags of TFP as additional predictors. Fig. S20 illustrates the flexibility of the Hamilton trend with various look-ahead periods (panels A and C). To capture the covariance between the model in equations ( 6) and ( 7) we make sure that the bootstraps sample the sample block of observations. We could, of course, simply set 𝑔(𝑡) = 𝛽 + log 𝑆 ! as in equation ( 6). However, we find that this approach leads to imprecise estimates of weather effects (Fig. S7) relative to the baseline approach with a Hamilton trend (Fig. 2). We also find that control for a linear or quadratic time trend also leads to more imprecise estimates of weather effects (Fig. S10 andS11). These time trends do not appear to control well for small deviations in TFP trends over the sample period (Fig. S20, panels B and D). Our baseline weather variables in equation ( 7) are aggregated over the calendar year (January-December). We consider alternative seasons as well. We apply the approach proposed and validated in (41) to recover the underlying seasonality of the TFP data based on various combinations of weather variables (Fig. S8). We find that seasons that best improve TFP predictions out of sample tend to be concentrated in the summer. However, we find that relying on weather variables tailored to the best fitting season does not substantially alter our findings (compare Fig. S9 and2). We report the sensitivities to uniform changes in temperature and precipitation in Fig. 2 (panels C and D) and in Tables S5 andS6. We compute estimates of the impact of climate change on TFP at year t using the empirical version of equation ( 4):

We first solve for the relative change in the knowledge stock Δ𝑆 ! needed to offset the emerging impacts of climate change on TFP, Δ𝑆 ! . This is directly based on the empirical version of equation ( 5) that incorporates an additional source of econometric uncertainty through 𝛽 ] + :

The term 𝐷 Y ! is in log points, and so is Δ log 𝑆 ] ! * . These estimates are depicted in the first row of panels of Fig. S17 as percentage changes. Because the research stock moves slowly, these stock changes are smoothed over time using a natural cubic spline with 3 degrees of freedom over 1950-2100. These estimates are also reported in Table S11 (top). We also convert these relative changes in the knowledge stock to monetary values Δ𝑆 ] ! * . This requires we need to assume a counterfactual level of the knowledge stock without climate change. For this, we assume that public R&D spending 𝑅𝐷 ! remains unchanged (in real terms) at its 2020 level over 2021-2100. We then compute the associated counterfactual knowledge stock over 1950-2100. We can then derive a monetary value of Δ𝑆 ] ! * by subtracting the level of the knowledge stock in the scenario without climate change from the knowledge stock in the scenario with climate change 𝑆 ! * . These estimates are show in the second row of Fig. S17. These estimates are also reported in Table S11 (bottom). These estimates can be interpreted as the additional change in the knowledge stock needed to avoid declines in TFP relative to a counterfactual scenario without climate change and stagnant TFP. If one assumes TFP grows in the counterfactual without climate change (due to rising R&D spending) this would lead to even larger monetary values of 𝑆 ! * . Thus, our monetary values of these estimates can be interpreted as a lower bound.
In addition, note that a $1B increase in the knowledge stock in a steady state, requires a permanent increase of $1B/year in public R&D spending. We then seek to solve for spending trajectories 𝑅𝐷 ! from 2021 to various target years 𝑇 that would be necessary to achieve Δ𝑆 ] ! * . That is, to achieve a change in the knowledge stock that fully compensates for the impacts of climate change by year 𝑇. There is, however, an infinite number of annual spending pathways to achieve a certain change in the knowledge stock. For simplicity, we consider spending pathways with fixed annual growth rates which allows direct comparison with historical spending trajectories. Based on our estimates 𝛽 ] + , we can simulate the growth of 𝑆 ! under a wide range of fixed annual spending growth rates from 2021 until a target year 𝑇. We can then contrast the attained changes in the knowledge stock in year 𝑇, Δ𝑆 3 , with our estimates of the climate-offsetting changes in the knowledge stock Δ𝑆 ] 3 * . We then select the fixed annual growth rates that approximate the necessary changes in the knowledge stock. Noting that Δ𝑆 ] 3 * is an estimate, we derive the necessary spending growth for the central estimates and for its 95 th and 99 th confidence interval. This mapping between fixed annual growth rates and offsetting changes in the knowledge stock is depicted in Fig. S18 for each SSP scenario. Naturally, the more imminent the target date 𝑇 is, the more rapid the growth in annual spending 𝑅𝐷 ! needs to be to reach a certain change in the knowledge stock Δ𝑆 ] ! * . The third row of panels in Fig. S17 shows the necessary changes in annual public R&D spending to offset climate change impacts for various target years from 2050 to 2100 (note these are also represented in the top left quadrants of panels in Fig. S18). These estimates are also reported in Table S12. We also track the additional cumulative spending necessary to offset climate change impacts by various target years. These are depicted in the fourth row of panels of Fig. S17. These estimates are also reported in Table S13. Agricultural Total Factor Productivity (TFP) and Research & Development (R&D) expenditures. Fig. S2 Spatial weights to aggregate weather data to the national level. Fig. S3 CMIP6 projections for mean annual temperature. Fig. S4 CMIP6 projections for annual exposure above 30°C. Fig. S5 CMIP6 projections for annual precipitation. Fig. S6 Lag weights based on the gamma distribution for constructing the knowledge stock. Fig. S7 Historical impact of weather fluctuations on US agricultural TFP based on model with only knowledge stock controlling for the trend. Fig. S8 Reduction in out-of-sample MSE for TFP models based on alternative weather variables and seasons. Fig. S9 Historical impact of weather fluctuations on US agricultural TFP based on weather variables aggregated over the best-fitting season. Fig. S10 Historical impact of weather fluctuations on US agricultural TFP based on model controlling for a linear time trend. Fig. S11 Historical impact of weather fluctuations on US agricultural TFP based on model controlling for a quadratic time trend. Fig. S12 Historical impact of weather fluctuations on US agricultural TFP based on weather variables aggregated using equal spatial weights. Fig. S13 Historical impact of weather fluctuations on US agricultural TFP based on weather variables aggregated using cropland spatial weights. Fig. S14 Historical impact of weather fluctuations on US agricultural TFP based on weather variables aggregated using cropland and pasture spatial weights. Fig. S15 Historical impact of weather fluctuations on US agricultural TFP based on the ERA5 weather data. Fig. S16 Impact of observed historical weather trends on US agricultural TFP. Fig. S17 R&D needs to offset climate change effects on US agricultural TFP. Fig. S18 Mapping changes in R&D spending to changes in the knowledge stock. Fig. S19 Simulated TFP growth under alternative climate change and R&D spending growth scenarios. Fig. S20 Illustration of alternative controls for the TFP trend. Table S1 Elasticity of the knowledge stock with alternative control variables. Table S2 Elasticity of the knowledge stock using the total (public & private) R&D expenditures. Table S3 Elasticity of the knowledge stock using alternative agricultural data source. Table S4 Contribution of the knowledge stock and CO2 concentrations to TFP growth. Table S5 Projected impact of uniform changes in temperature on US agricultural TFP. Table S6 Projected impact of uniform changes in precipitation on US agricultural TFP. Table S7 Projected impact of climate change on US agricultural TFP by 2025. Table S8 Projected impact of climate change on US agricultural TFP by 2050. Table S9 Projected impact of climate change on US agricultural TFP by 2075. 1 Some of our analysis also relies on an alternative dataset from the International Science & Technology Practice & Policy (InSTePP) group at the University of Minnesota. More details about this dataset can be found on the InSTePP website.2 Both data sources account for quality adjustments of inputs over time. This implies these TFP estimates aim to reflect disembodied technical change. We expand on this later.We also rely on a long time series (1888-2020) of US public agricultural expenditures in research and development (R&D). We combine 2 separate data sources. We obtain data for 1888-1969 from (44) and data for 1970-2020 from USDA-ERS 3 . Expenditures are deflated to constant 2020 US$ using the NIH Biomedical R&D Price Index. Public agricultural R&D expenditures includes spending from 1). all USDA agencies (except the US Forest Service), 2). State Agricultural Experimental Stations (SAES) and 3). State Schools of Veterinary Medicine. 1 Some of our analysis also relies on an alternative dataset from the International Science & Technology Practice & Policy (InSTePP) group at the University of Minnesota. More details about this dataset can be found on the InSTePP website.2 Both data sources account for quality adjustments of inputs over time. This implies these TFP estimates aim to reflect disembodied technical change.
We expand on this later. 1 Some of our analysis also relies on an alternative dataset from the International Science & Technology Practice & Policy (InSTePP) group at the University of Minnesota. More details about this dataset can be found on the InSTePP website.2

1 Some of our analysis also relies on an alternative dataset from the International Science & Technology Practice & Policy (InSTePP) group at the University of Minnesota. More details about this dataset can be found on the InSTePP website. 1 Some of our analysis also relies on an alternative dataset

1 Some of our analysis also relies on an alternative dataset

1

Notes:

https://www.mrlc.gov/data/nlcd-2016-land-cover-conus

https://prism.oregonstate.edu

http://cds.climate.copernicus.eu