Comparing thermal conditions inside and outside lactating dairy cattle barns in Canada

The health, longevity, and performance of dairy cattle can be adversely affected by heat stress. This study evaluated the in-barn condition [i.e., temperature, relative humidity, and resulting temperature-humidity index (THI)] at 9 dairy barns with various climates and farm design-management combinations. Hourly and daily indoor and outdoor conditions were compared at each farm, including both mechanically and naturally ventilated barns. On-site conditions were compared with on-farm outdoor conditions, meteorological stations up to 125 km away, and NASA Power data. Canadian dairy cattle face periods of extreme cold and periods of high THI, dependent on the regional climate and season. The northernmost location (53°N) experienced about 75% fewer hours of THI >68 compared with the southernmost location (42°N). Milking parlors had higher THI than the rest of the barn during milking times. The THI conditions inside dairy barns were well correlated with THI conditions measured outside the barns. Naturally ventilated barns with metal roofs and without sprinklers fit a linear relationship (hourly and daily means) with a slope <1, indicating that in-barn THI exceeded outdoor THI more at lower THI and reached equality at higher THI. Mechanically ventilated barns fit nonlinear relationships, which showed the in-barn THI exceeded outdoor THI more at lower THI (e.g., 55–65) and approached equality at higher THI. In-barn THI exceedance was greater in the evening and overnight due to factors such as decreased wind speed and latent heat retention. Eight regression equations were developed (4 hourly, 4 daily) to predict in-barn conditions based on outdoor conditions, considering different barn designs and management systems. Correlations between in-barn and outdoor THI were best when using the on-site weather data from the study, but publicly available weather data from stations within 50 km provided reasonable estimates. Climate stations 75 to 125 km away and NASA Power ensemble data gave poorer fit statistics. For studies involving many dairy barns, the use of NASA Power data with equations for estimating average in-barn conditions in a population is likely appropriate especially when public stations have incomplete data. Results from this study show the importance of adapting recommendation on heat stress to the barn design and guide the selection of appropriate weather data depending on the aim of the study.


INTRODUCTION
The adverse effect of high temperature and humidity on cattle health and wellness are well documented (Berry et al., 1964). Heat stress is a physiological response induced when the environmental pressure surpasses the cow's ability to dissipate heat to the environment, forcing the cow to promote heat loss through sweating and panting. In response to heat stress, dairy cows adapt their physiology, metabolism, and behavior to minimize heat production or promote heat loss, or both (Wheelock et al., 2010). These homeorhetic processes are critical to survival but are detrimental for milk production (Wheelock et al., 2010), as well as for reproductive performance (Schüller et al., 2013), health (West, 2003), and welfare (Polsky and von Keyserlingk, 2017). Selective cattle breeding to enhance milk production has, overall, resulted in animals that produce more metabolic heat Dikmen and Hansen, 2009). Respectively, cows that produce 18.5 and 31.6 kg/d of milk generate 27.3% and 48.5% more heat than dry cows (Purwanto et al., 1990). Increasing dairy cattle productivity may increase cattle sensitivity to heat, even in seasonally temperate and continental climates. Moreover, due to climate change, both the average temperature and the frequency of high temperatures are rising in Canada and globally (Zhang et al., 2019;IPCC, 2021). Therefore, understanding the conditions that dairy cows are subject to is increasingly important for productivity and sustainability of the dairy industry.
In line with the broader trend in the dairy sector, dairy cows in Canada are typically housed indoors (Bewley et al., 2017;CDIC, 2021). As a result, the in-barn thermal environment that cows are subject to is more important than the ambient conditions outside. Presently, public weather stations gather measurements of outdoor conditions for weather data sets, but there are no analogous data sets for cow housing conditions. As with local weather, climate change projections based on global circulation models are developed from outdoor environmental conditions. Limited access to on-farm environmental data presents a challenge in fully understanding the effect of climate change on dairy production. As a result, developing a robust model to estimate in-barn conditions based on outdoor conditions would help address this challenge.
A series of indicators are commonly used to estimate the degree of heat stress experienced by mature animals. Heat stress indicators can be animal-based (i.e., related to the behavior, physiology, or performance of the animal) or environmental (i.e., the thermal environment of the animal). The temperature-humidity index (THI) is the most widely used environmental indicator of heat stress effects in scientific literature (Galán et al., 2018). The THI quantifies the combined effects of ambient air temperature (T) and relative humidity (RH) in relation to thermal stress (Bohmanova et al., 2007). Various thresholds have been identified at which lactating dairy cows begin to exhibit signs of heat stress. A THI of 68 is often used as an indicator of heat stress in both lactating (Zimbelman et al., 2009) and dry cows (Ferreira et al., 2016;Fabris et al., 2019). This threshold was retrieved from a series of 8 studies where the milk yield of 100 multiparous high-producing Holstein cows raised in an arid climate decreased by 2.2 kg/d for each 24 h at a daily THI of 68. Hence, the THI threshold of 68 was only determined for a decrease in milk yield in Holstein dairy cows raised in an arid climate producing more than 35 kg of milk/d. Lower THI thresholds of 64, 50, and 58 for a decline in milk, fat, and protein yield, respectively, have been suggested recently based on estimated outdoor THI and test-day milk records in the Canadian provinces of Ontario and Québec (Campos et al., 2022).
The climate conditions inside and outside the barn can differ significantly. In a study of 7 barns in Germany (Schüller et al., 2013), in-barn temperature was 6.4°C higher and THI was 11.1 units greater than the nearest meteorological station (spread decreased as THI increased). Based on in-barn conditions, they observed 64 d above a THI threshold at risk for causing heat stress, in contrast to 4 d reported at the nearby meteorological station. In the United States, Wagner-Storch and Palmer (2002) noted that in the daytime, inside and outside conditions were similar, but the barn was 0.7°C warmer at night. A Ukrainian study compared in-barn data with outdoor weather data from 2 local meteorological stations situated 19 and 27 km away, as well as to an on-farm weather station (Mylostyvyi et al., 2020). Higher THI was found inbarn than outdoors, and T and RH were significantly different when comparing on-farm measurements to the nearest meteorological station. Therefore, on-farm measurements, and in-barn measurements, are critical to accurately understand and evaluate sources of heat stress.
So far, 3 studies have been conducted in Canada, exclusively within Ontario and Québec. Shock et al. (2016) evaluated THI conditions at 48 dairy farms in Ontario during the summer. The in-barn THI conditions were compared with outdoor THI calculated from official government meteorological stations situated 1.5 to 65.5 km away. They found the daily THI measured in-barn were consistently higher than the nearest meteorological station, with a mean THI difference of 3 to 4 units. A similar study was conducted in Québec, comparing the summer on-farm environmental conditions of 6 tiestall farms to the nearest meteorological station (Ouellet et al., 2019). The average distance from the farm to the nearest meteorological station was 8.1 ± 2.6 km in eastern Québec and 35.3 ± 7.8 km in southwestern Québec. As with Shock et al. (2016), the data from Ouellet et al. (2019) showed that in-barn THI values were higher than the local meteorological readings, with a mean daily difference of 4.6 and 3.7 units for eastern Québec and southwestern Québec, respectively. Campos et al. (2022) used public meteorological data to estimate average daily THI. They hypothesized that meteorological data likely underestimate in-barn heat stress when they are located further from the farm.
Presently, there is a lack of data characterizing the relationship between in-barn and outdoor conditions. Although earlier research has addressed certain aspects of this relationship, these studies had limitations, including geographic scope, study duration, and number of sensors used. This study is unique in that it is the first in Canada to compare in-barn condition to on- The objectives of this study were to (1) characterize the in-barn THI conditions from a range of Canadian climates, (2) relate in-barn conditions to outdoor THI barns with different designs and ventilation systems, (3) assess the utility of applying weather station data to barn thermal conditions as the distance from the station increases, and evaluate the merits of ensemble weather data. The hypotheses were (1) that the exposure to elevated in-barn THI conditions would differ substantially among the regions, (2) that the relationship between in-barn THI and outdoor conditions would differ according to barn design, and (3) that weather data nearer to the barn would provide better estimates than those farther away.

Dairy Barns
Nine Canadian commercial dairy farms with Holstein cows were selected for this study. Environmental [T, RH, windspeed (WS), and THI], outdoor (T a , RH a , WS a , THI a ), and in-barn (T b , RH b , WS b , THI b ) conditions were measured at the 9 farms. No animals were handled during the collection of the data in this study; the research project was approved by the University of Windsor Animal Care Committee (AUP no. 22-10). Farms in the study follow the code of practice established by the National Farm Animal Care Council (NFACC, 2009). Each farm was given a unique alphanumeric identifier made up of its respective provincial abbreviation [Alberta (AB), Ontario (ON), Québec (QC), and Nova Scotia (NS)] and degree of latitude (53°, 50°, 46°, 45°, and 42°). In instances where there were multiple farms within the same province and degree of latitude, a lowercase letter was used for differentiation (e.g., ON45a, ON45b, and ON45c). The farms selected cover a broad range of barn designs and farm management systems (Table 1) as well as unique ecoregions, including prairie (e.g., AB), humid (e.g., ON), and coastal (e.g., NS; Figure 1). The site locations range from the northernmost (53° latitude, AB53) to the southernmost (42° latitude; ON42a, ON42b) extent of dairy production in Canada and span ~50° longitudinally.
Six of the lactating cow barns were naturally ventilated and 3 were negative pressure mechanically ventilated (Table 1). Ventilation refers to air exchange (i.e., fresh air introduced from the outside to provide cows with a clean and cool microenvironment) in contrast to recirculation (i.e., air mixing within the barn to provide additional cooling to the animals). All barns except AB53 had some form of fan assisted air mixing.
In the Ottawa region (ON45), 3 barns were selected with contrasting barn designs, which are mechanically ventilated (ON45a), naturally ventilated (ON45b), and naturally ventilated with sprinklers and fans (ON45c). One farm (ON45c) had a tension fabric roof, whereas all others had steel roofs (Table 1). The barns ranged from heavily insulated to uninsulated (Table 1). The barns had varying milking systems, 4 had a parlor system, 2 had in-stall milking, 1 milked in headlocks, and 2 had robotic milking. Six barns had a freestall design, 1 had a loose housing design, and 2 were tiestalls (ON42b and QC46).

Data Acquisition
Depending on the farm, the duration of data collection varied from 1 to 3 yr between 2019 and 2021. This was due to delays in sensor installation because of restrictions associated with the COVID-19 pandemic.
Within the stall area, each barn was instrumented with 4 to 5 T/RH sensors (RXW-THC-900 HOBOnet Temp/RH Sensor; Onset). Sensors were mounted at a height of 2.5 to 3 m, either on horizontal brackets attached to central support posts or suspended from the ceiling. Sensors were distributed across the barn so that each quadrant of the barn had at least 1 sensor. In addition, a T/RH sensor was installed in the milking area (T m , RH m , THI m ), typically suspended from the ceiling at a height of 3 to 3.5 m. At farms with milking parlors, it was mounted in the holding area, whereas at farms with robotic milking, it was mounted in the queue area adjacent to a robot. Farms with in-stall or in-headlock milking did not have this additional milking area sensor installed. A WS and direction sensor (RXW-WCF-900 HOBOnet Wind Speed and Direction Sensor) was positioned at 2.5-to 3-m height near the center of each barn. Note that this sensor was positioned to measure horizontal air movement (i.e., tunnel ventilation, natural cross-ventilation) and it did not measure vertical air movement or fan-driven circulation (i.e., air mixing).
An on-site outdoor weather station was installed at each farm on a flat and unobstructed location, within 200 m of the barn. This was comprised of a shielded T and RH sensor mounted on a tripod at a height of 2 to 3 m (RXW-THC-900 HOBOnet Temp/RH Sensor), a solar radiation sensor (RXW-LIB-900 HOBOnet Solar Radiation Sensor), WS and direction (RXW-WCF-900 HOBOnet Wind Speed and Direction Sensor), and a rain gauge (RXW-RGF-900 HOBOnet Rainfall Sensor).
At each farm, environmental data from all sensors were logged with a single datalogger (HOBO RX3000 station). Sensors took measurements every minute and 15-min average data were recorded and then auto-   matically uploaded onto a cloud server (HOBOnet data cloud).
In addition to the on-site data, 30-yr historical climate normals  and historical hourly data were downloaded from Environment and Climate Change Canada (ECCC) weather stations (https: / / climate .weather .gc .ca). To compare the effect of distance between the farm and climate station, ECCC climate stations from multiple locations up to 125 km away from each farm were downloaded. Agrometeorological data for the exact location of each farm were also downloaded from NASA Power (https: / / power .larc .nasa .gov), which derives hourly meteorological parameters based on an assimilation model. Due to periods of missing ECCC data, all data were synchronized in a data set covering the period where hourly data were observed at each farm (during 2019 to 2021). Thus, for the comparison of weather data source, the weather data sets associated with each farm contained the same number of hours of data to enable comparisons. Hourly T and RH from each data source were used to calculate THI.

Data Analysis
Quality controlled 15-min on-farm data were aggregated into average hourly and daily timesteps using MATLAB (R2022a; The MathWorks Inc.). Hours with incomplete 15-min data were excluded from the data sets. In total, the data set contained 123,674 site-hours of in-barn data and 115,560 site-hours of outdoor conditions. For analysis of daily means, days with less than 24 h of data were excluded. In cases where the average barn conditions are reported, these were calculated as the mean of the sensors located in the lactating cow barn (i.e., excluding the milking area sensor). The THI (outdoor: THI a , barn: THI b ) was calculated using hourly data according to the following equation: where T is air temperature in degrees Celsius and RH is relative humidity (%) as described by Kendall and Webster (2009) and developed by the NRC (NRC, 1971). Tabulation, regression, and graphing were done in JMP 16.2 (SAS Institute Inc., 2022). The number of hours exceeding various THI thresholds were calculated, summed, and aggregated in JMP 16.2. Differences between the in-barn sensors at each barn was assessed using 1-way ANOVA with Tukey's honestly significant difference comparisons in JMP 16.2. This was done with data from the warmest month at each farm. Means were considered significantly different when P < 0.05.
The influence of weather data source was examined several ways. Differences between THI a measured onsite at the farms (study weather data) were compared with THI a from different weather data sources (NASA Power, ECCC 0-50 km, ECCC 75-125 km) by paired t-tests using the matched pairs procedure in JMP 16.2. This was done with hourly data from June through October (n = 52,043 pairs for each t-test). Regressions were made between hourly THI b and the following sources of outdoor weather data: THI a measured onsite at each farm, THI a calculated from NASA Power data for each barn location, and THI a calculated from ECCC data at different proximity to each barn (0-50 km, 75-125 km). Last, the mean number of hours per year where THI exceeded various thresholds (60, 68, 72, 75) were calculated for each farm using each data source (on site: in barn, on site: outdoor, NASA Power, ECCC 0-50 km, ECCC 75-125). For each threshold, means were compared using a 1-way ANOVA with the model having hours > threshold as the response variable, THI data source as a fixed effect, and farm as block. Multiple comparisons among means were done using Tukey's honestly significant difference procedure, with differences being considered significantly different when P < 0.05.

Range of Environmental Conditions at the 9 Farms
Drawing from Environment Canada 30-yr climate normal temperatures (1981-2010; Appendix Table A1), the mean monthly T a in the region of the southernmost farms (ON42a, ON42b) ranged from −3.8°C (January) to 23.0°C (July). In the region of the northernmost farm (AB53), the 30-yr normal temperatures show mean monthly T a ranging from −12.0°C (January) to 16.2°C (July). For the northernmost region, the historical temperature records for extreme hot and cold span a range of almost 84°C, whereas in the southernmost region they span nearly 69°C. Thus, dairy barns at all these locations need to handle both extremes, cold winters and warm summers.
During the measurement period, the warmest month at both farms in AB was in July, and at farms in eastern Canada was in August (Table 2). At ON42a, the warmest month was August, which had a mean T a of 23.9°C, RH a of 74.4%, and THI b of 73.0. At AB53, the warmest month was July, with a mean T a of 17.0, RH a of 76.9, and THI b of 63.1. The highest hourly T a recorded at any location was 36.6°C at AB50 in June 2021, during a sustained heat wave that occurred in western Canada over that period. The mean monthly T a of the warmest month ranged from 18.8°C to 23.9°C and, in ascending order, were as follows: AB53 (18.8°C), NS45 (20.1°C), AB50 (20.7°C), QC46 (21.2°C), ON45a (21.8°C), ON45c (21.9°C), ON45b (22.3°C), ON42b (22.3°C), and ON42a (23.9°C) ( Table 2). This temperature pattern corresponds well to the degree of latitude of the farms, except for NS45, where the climate is influenced by proximity to the Atlantic Ocean.
Considering the warm period of July and August 2021 across all the farms, the highest mean monthly RH a was observed at NS45 (August, 86.1%) and the RH a of all the farms in eastern Canada (ON, QC, NS) were in the range of 74% to 86%, whereas those in western Canada (AB) were lower (Table 2). Both T a and THI a were greatest at the southernmost research sites (ON42a and ON42b). Respectively, the August 2021 mean monthly THI b at ON42a and ON42b were 1.5 and 1.1 units more than at the next highest location. At the northernmost site (AB53), there were 3 mo when the mean monthly T a was above 15°C (June-August) and no instances where it exceeded 20°C. In contrast, the  Table 2. Mean monthly outdoor temperature (T a ), relative humidity (RH a ), and temperature-humidity index (THI a ) as well as mean monthly in-barn temperature-humidity index (THI b ) of the warmest months (July and August) for the 9 study sites in 2021 Site 1

Outdoor
In-barn Values with different letters indicate a significant difference (P < 0.05) between THI a and THI b in the same month using a paired t-test. 1 AB53 and AB50 = farms in Alberta at 53° and 50° latitude, respectively; ON42a, ON42b, ON45a, ON45b, and ON45c = farms in Ontario at 42° and 45° latitude, respectively; QC46 = farm in Québec at 46° latitude; NS45 = farm in Nova Scotia at 45° latitude. 2 Calculated from partial data set, n = 19 d and n = 17 d for July and August, respectively. southernmost site (ON42a) had 5 mo of mean monthly T a > 15°C (June-October) and 3 mo of mean month T a > 20°C (June-August). Monthly mean THI b was significantly higher than THI a across all barns (Table 2). A boxplot of hourly THI (THI a , THI b ) shows that the period from May to October is when THI may exceed even conservative heat stress thresholds ( Figure 2).

In-Barn Variability
Spatial variability was examined by analyzing the main barn sensors for differences in T b during daytime (1200-1500 h) and nighttime (0100-0400 h) in 1 summer month of 2021. In most barns, T b did not vary significantly among the in-barn sensor locations (Table  3). No significant within-barn differences, day or night, were observed at AB53, AB50, ON45a, ON45c, ON42a, and ON42b, where the mean temperature of all sensors in the barn differed by less than 0.7°C. Significant dif-ferences among in-barn sensors were observed during the nighttime period at QC46 and NS45. These temperature differences were, on average, 1.3°C. At NS45, the southeast sensor was located within 7 m of a large door (3.2 m × 5.0 m), which enabled that position to cool more rapidly at night than other parts of the barn. At the mechanically ventilated QC46, the warmer sensor was located farthest away from the air inlet. The only instances where there was a significant difference in the daytime was at ON45b, where the sensor in the southwest portion of the barn was significantly warmer than in the northwest or northeast portions (by 0.8°C and 1.0°C, respectively), and this was likely due to solar heat gain through the open south wall and southwest doors.
Spatial variability was also examined by comparing conditions in the stall area (THI b ) with conditions in the milking area (THI m ). Diurnal patterns of THI b in the summertime showed the peak in the afternoon and Boxplots of hourly 2021 temperature-humidity index (THI) data within each month during May to October (5-10) at each location (sorted from west to east). Gray boxes show outdoor THI and white boxes show in-barn THI conditions. For each box, the lines indicate the 25th, 50th (median), and 75th percentile, whereas whiskers indicate 1.5 times the interquartile range. The horizontal reference line indicates THI = 68. AB53 and AB50 = farms in Alberta at 53° and 50° latitude, respectively; ON42a, ON42b, ON45a, ON45b, and ON45c = farms in Ontario at 42° and 45° latitude, respectively; QC46 = farm in Québec at 46° latitude; NS45 = farm in Nova Scotia at 45° latitude. cooling overnight (Figure 3). All farms identified in Figure 3 milked their cows twice daily, in the early morning and in the afternoon. During milking, the temperature in the parlor holding area was always higher than in the stall area of the barn. The barns in Alberta (AB53, AB50) showed a greater THI spike in the parlor holding area compared with the stall area, whereas barns in warmer, more humid climates had smaller increases in THI m . At AB53, the median hourly value of THI m during afternoon milking was 70.1 at 1700 h, which was 4.9 units more than THI b . At ON42a, THI m was the highest of all farms (76.1 at 1700 h), but only 0.8 units higher than THI b (75.3 at 1700 h). These results show that heat and humidity generated in milking time combined with the congregation of cows in the parlor holding area leads to higher THI (and hence heat stress) exposure for the cows. During the afternoon, cows were generally exposed to the highest THI b , regardless of milking events, which was then exacerbated by even higher THI m conditions in the parlor holding area. During the early morning, elevated THI m during milking reduces the time when cows can dissipate accumulated metabolic heat (i.e., cool off from the warm period of the previous day). Increasing fresh air exchange and air movement toward the animals could help them cope with the exposure to high THI m .

Hourly Exceedance of Temperature and THI Thresholds
The cumulative number of hours where T > 21°C or THI > 68, broken down by time of day, is visualized for outdoor (THI a , T a ) and in-barn (THI b , T b ) in Figures 4 and 5. All farms had a higher frequency of hours with T > 21°C or THI > 68 in the afternoon, and an overall higher number of hours exceeding these thresholds inside the barn compared with outdoors. However, the diurnal distribution of exceedances was dependent on barn design.
In naturally ventilated barns, the frequency of T > 21°C h for T b and T a were comparable during their peaks (1200-1600 h) but tended to drift apart during the off-peak. This indicates that naturally ventilated barns tend to cool more slowly in the evening and overnight. This is consistent with lower WS observed at night than during the day at all locations, particularly in eastern Canada. For example, in August 2021, the mean WS was twice as high at 1400 h (3.3 m/s) than at 0200 h (1.5 m/s) at AB53, whereas at ON42a, the mean daytime WS was lower (1.5 m/s) and the air was nearly still at night (0.3 m/s). The 2 naturally ventilated barns in western Canada (AB53, AB50) and the naturally ventilated barn in eastern Canada with an insulated roof (ON45b) had very similar THI a and THI b during the daytime, but the barns cooled off more slowly than the outdoors in the evening, leading to more THI b > 68 h between 2200 h and 0600 h. The naturally ventilated barn ON42a had a similar pattern of heat retention overnight but had fewer THI b > 68 h during the mid-day compared with outdoors, suggesting good ventilation and the benefits of the shaded environment under the roof. The naturally ventilated barn with sprinklers (ON45c) showed a greater occurrence of THI b > 68 h than outdoors throughout the day and night, presumably due to the combined effects of sprinklers (increased RH b contribution to THI b ) and the   ON42b) showed a high degree of similarity between T a and T b in terms of > 21°C h. The ON42b farm was moderately effective, whereas ON45a was particularly good at maintaining similar in-barn and outdoor conditions, due to the well-insulated building and continuous airflow. Notably, QC46 differed from these 2 farms in that it had a consistently high exceedance of > 21°C h in-barn compared with outdoors. When the 9 farms are put in ascending order based on the cumulative hours of either THI b > 68 or T b > 21°C, they generally follow the same order for the 2 parameters. The exception is QC46, which has more THI b > 68 h than some farms (AB50 and NS45) despite having fewer T b > 21°C h than those same farms. Taken altogether, this suggests that the ventilation at QC46 was not sufficient, possibly due to fan settings to manage the trade-off of increased ventilation and moderating operating costs. This observation highlights the need for proper management of ventilation, not just in the daytime, but also at night.
At the northernmost, coolest location (AB53), the barn always cooled down at night to a point that THI b was never >68 at 0300 h. On the other hand, at the southernmost, warmest location (ON42a), there were more than 60 nights where THI b > 68. Put another way, THI b was above 68 more often at 0300 h at ON42a . Temperature-humidity index (THI) in-barn and in the parlor holding area on farms with milking parlors during the months of June, July, and August (all years). Lines indicate the median hourly THI in the barn stall area (blue dashed) and milking area (black). Shaded areas are violin plots illustrating the distribution of data within each hour, where the width of the shaded area corresponds to frequency. AB53 and AB50 = farms in Alberta at 53° and 50° latitude, respectively; ON42a = farm in Ontario at 42° latitude; NS45 = farm in Nova Scotia at 45° latitude. than at 1500 h at AB53, this being the case even in a study year (2021), which saw an exceptionally hot June in western Canada, where AB53 is located. Cumulatively, ON42a experienced THI b > 68 for 2,278 h, compared with 641 h in AB53. The analysis was done at other thresholds with comparable results, but the number of hours were reduced at each new threshold as follows: 1,205 h and 301 h at THI b > 72 and 654 h and 132 h at THI b > 75 for ON42a and AB53, respectively.
The conditions under which THI b exceedance occurred differed in response to climate and barn design. In the driest location (AB50), THI b > 68 occurred with a higher T b and lower RH b than other locations. At AB50, the 1,550 h of THI b > 68 in July and August had a mean T b of 25.0 and RH b of 56.6%. In contrast, exceeding the same threshold in the Atlantic region (NS45) occurred at a lower T b (23.8°C) and higher RH b (76.8%; Table 4). These 2 contrasting farms illustrate the differing contributions that T b and RH b have on THI b in different regions. To this point, Figure 6 shows that in the prairie climates, RH b decreased linearly with increasing T b , implying that water vapor was limiting. In contrast, humid climates maintained high RH b as temperature increased, except at the very highest T b .

Relationships Between In-Barn and Outdoor THI
Hourly. Strong correlations between hourly THI a and THI b were observed when the data are partitioned based on different barn designs (Figure 7). Mechanically ventilated barns showed a quadratic relationship between THI a and THI b , suggesting that at lower levels of THI, the in-barn conditions were decoupled from outdoor conditions. This is likely caused by the barn ventilation rate being lowered (either manually or automatically) at cooler temperatures. For the 2 mechanically ventilated barns in Ontario (ON42b, ON45a), the equation indicates that THI b was greater than THI a by 2.5 units at 55, 0.6 units at 68, and 0.2 units at 72. At QC46, the regression equation had a much larger  AB53 and AB50 = farms in Alberta at 53° and 50° latitude, respectively; ON42a, ON42b, ON45a, ON45b, and ON45c = farms in Ontario at 42° and 45° latitude, respectively; QC46 = farm in Québec at 46° latitude; NS45 = farm in Nova Scotia at 45° latitude. second order term than the other farms, due to less effective ventilation. As a result, THI b was considerably greater than THI a , especially when THI a was low. The THI b was greater than THI a by 7.1 units at 55, 1.1 units at 68, and 0.3 units at 72. Due to the nonlinearity of the relationship, the number of hours exceeding lower thresholds of THI (e.g., >68) is much greater inside the barn than outside, whereas at very high thresholds (e.g., >75) the exceedance hours are fewer in-barn compared with outside.
Naturally ventilated barns showed a linear relationship between THI a and THI b . At the naturally ventilated barns with metal roofs and without sprinklers, there was a greater spread in the data and somewhat lower coefficient of determination (R 2 = 0.89). Much of the spread in the THI b data can be attributed to nighttime hours with low WS, during which time THI b remained elevated, whereas THI a decreased. In fact, if we consider only the 5549 site-hours with WS b > 0.15 m/s, then the regression improves considerably (R 2 = 0.97), and the slope of the relationship increases (THI b = 0.6795 + 0.9045 × THI a ). One naturally ventilated barn (ON45c) was analyzed separately from the others because of its unique barn attributes (fabric roof  and use of sprinklers; Table 1). The regression for this farm differed from the others in several ways. First, it had the strongest relationship of any naturally ventilated barn, and second, it was the only barn where the slope of the regression was steep enough that THI b was always greater than THI a . This is likely because the fabric roof enabled direct solar heating during the day and allowed long-wave cooling at night, thereby maintaining a more similar pattern inside and outside the barn. The addition of humidity with the sprinkler system consistently elevated the RH b , which also contributed to THI b , continuously exceeding THI a . Given the results above, WS b is clearly a critical parameter that influences the air exchange rate (ven-tilation) and build-up of humidity and high temperature, by extension, the relationship between THI a and THI b . The WS a during the months of May to October had a median value of 1.6 m/s. The WS b was lower at all farms (median of 0 m/s) and there was a striking difference in the distribution of hourly WS b between mechanically and naturally ventilated barns ( . Each ellipse represents the bivariate normal probability density of hourly temperature-humidity index (THI b ) within a specified THI bin (50-58, 58-68, 68-75, ≥75) as a function of hourly in-barn temperature and in-barn relative humidity. Data are from the months of May to October. Dots represent the median relative humidity value for each range of THI values, and each ellipse outlines 90% probability density. AB53 and AB50 = farms in Alberta at 53° and 50° latitude, respectively; ON42a, ON42b, ON45a, ON45b, and ON45c = farms in Ontario at 42° and 45° latitude, respectively; QC46 = farm in Québec at 46° latitude; NS45 = farm in Nova Scotia at 45° latitude. temperature-activated mechanical ventilation at QC46, however, WS b showed 2 distinct distributions. When T b was >21°C, the ventilation was active and the median WS b was 1.1 m/s. When T b was <21°C, ventilation was inactive and the median WS b was 0 m/s. Daily. Because hourly data are not always available, there is value in having the ability to estimate THI b based on daily outdoor data. Daily averages of THI were used to determine the relationship between THI a and THI b on a daily basis. Correlations between daily THI a and THI b were stronger for daily averaged data than for hourly data, whereas following a similar form Relationship between hourly mean temperature-humidity index (THI) measured outside (THI a ) and inside (THI b ) the barns. Data are grouped by ventilation type (mechanical and natural). Mechanically ventilated barns are shown on the top and shown in 2 panels; specifically, the left has farms with similar ventilation and the right has lower ventilation efficacy. Naturally ventilated barns are shown on the bottom, with those farms without sprinkler systems shown on the left panel, and the farm with a sprinkler system shown on the right. Included is all farm data where THI >55 and for the period of May to October. All regressions are significant (P < 0.05). AB53 and AB50 = farms in Alberta at 53° and 50° latitude, respectively; ON42a, ON42b, ON45a, ON45b, and ON45c = farms in Ontario at 42° and 45° latitude, respectively; QC46 = farm in Québec at 46° latitude; NS45 = farm in Nova Scotia at 45° latitude.
Naturally ventilated barns were best described using the following linear equations: Natural ventilation with metal roof: Natural ventilation with fabric roof and sprinklers (ON45c): THI b = 3.8 + 0.972 × THI a (R 2 = 0.99). [5] The main difference between the daily and hourly THI equations is that the daily average THI b remains greater than THI a across the range of observations. For example, with a THI a of 75, the hourly equation for naturally ventilated barns predicts THI b that is 0.2 units less than THI a , whereas the daily equation predicts THI b that is 1.0 units greater than THI a . Similarly, for the mechanically ventilated QC46, at THI a of 75, the hourly equation predicts THI b slightly less than THI a , whereas the daily equation predicts THI b being 0.7 units greater. These results make sense because inbarn conditions may have lower THI during the peak mid-day hours on a hot day, but over the course of a full 24 h, barns tend to have a limited ability to dissipate heat and humidity and tend to exceed THI a overnight.

Effect of Distance to Weather Station
Overall results showed that NASA Power gave a significantly higher THI a than the on-farm outdoor weather stations (mean difference: 0.69, 95% CI: 0.65-0.72, P < 0.0001). Environment and Climate Change Canada stations within 50 km gave a smaller difference and were significantly lower than the on-farm THI a (mean difference: −0.19, 95% CI: −0.17 to −0.21, P < 0.0001). Environment and Climate Change Canada stations that were farthest away (75-125 km) gave a larger difference and were significantly lower (mean difference: −0.65, 95% CI: −0.61 to −0.68, P < 0.0001). Looking at individual farms, the largest mean difference in THI a for NASA Power data were 2.27 at AB50 (95% CI: 2.18 to 2.37, P < 0.0001) and for ECCC within 50 km was −1.18 at ON45a (95% CI: −1.12 to −1.24, P < 0.0001). The smallest differences were at NS45 for both data sources, having no significant difference for NASA Power data, and mean difference of −0.15 for ECCC within 50 km (95% CI: −0.08 to −0.22, P < 0.0001).
Regressions between hourly THI a and THI b for all naturally ventilated barns with metal roofs are shown in Figure 10. Although all regressions were significant (P < 0.0001), the analysis showed the highest R 2 and lowest root mean squared error (RMSE) was observed with on-farm data, followed in descending order by ECCC weather data within 0 to 25 km, 25 to 75 km (not shown), 75 to 125 km, and finally by NASA Power, which had the lowest R 2 and highest RMSE. When the analysis was done for all 9 barns individually, the results were the same, with on-farm . Relationship between daily mean temperature-humidity index (THI) measured outside (THI a ) and inside (THI b ) the barns. Data are grouped by ventilation type (mechanical and natural). Mechanically ventilated barns are shown on the top and shown in 2 panels; specifically, the left has farms with similar ventilation and the right has lower ventilation efficacy. Naturally ventilated barns are shown on the bottom, with those farms without sprinkler systems shown on the left panel, and the farm with a sprinkler system shown on the right. Included is all farm data where THI >55 and for the period of May to October. All regressions are significant (P < 0.05). AB53 and AB50 = farms in Alberta at 53° and 50° latitude, respectively; ON42a, ON42b, ON45a, ON45b, and ON45c = farms in Ontario at 42° and 45° latitude, respectively; QC46 = farm in Québec at 46° latitude; NS45 = farm in Nova Scotia at 45° latitude. THI a having the best fit statistics (R 2 > 0.92, RMSE < 2.0), ECCC stations within 0 to 50 km having the second best fit (R 2 > 0.87, RMSE < 2.6), and NASA data having the poorest fit (R 2 > 0.68, RMSE < 4.1). Two barns (AB50, QC46) had 1 ECCC station within 0 to 25 km and another within 25 to 50 km. At both barns, the fit statistics were similar for both stations, suggesting that ECCC stations within 50 km are reasonable proxies. All barns except NS45 had 3 ECCC stations within 125 km and in every case the closest station (0-50 km) gave the best fit to THI b ; however, the farthest away stations (75-125 km) still gave reasonable fit statistics, with R 2 between 0.80 and 0.92, and RMSE between 1.9 and 3.2. NASA Power data produced inconsistent results, with fit statistics at 4 barns (AB50, AB53, NS45, ON45a) being worse than the farthest away ECCC station. At 2 barns (ON42a, ON42b), the NASA data produced reasonable fit statistics (R 2 > 0.84, RMSE < 2.3) but the regression equations differed markedly from the study weather station and the closest ECCC station. For example, the linear equation between THI b and THI a at ON42a had a slope of 0.77 and 0.81 when calculated from on-farm THI a and ECCC THI a data, respectively, but the slope was 1.1 when calculated from NASA Power THI a data. A slope greater than 1 means THI b was increasingly higher than THI a at greater levels of THI, which is not what was observed at ON42a. At the 4 farms with multiple years of data, the fit statistics for regressions were generally stable across years. One exception was NASA Power at NS45, where the R 2 was 0.87 in 2020 and dropped to 0.72 in 2021. For comparison, the regression with on-farm weather data had an R 2 of 0.92 in 2020, and 0.91 in 2021.
The comparison among weather data sources was also examined by calculating the number of hours of THI above a threshold of 60, 68, 72, and 75 at each farm in each year (Table 5). The results showed, as expected, that THI b had significantly more hours above each threshold than any of the outdoor data sources (P < 0.0001). Differences among the outdoor weather data sources depended on the THI threshold applied. With a threshold of 60, the means were not significantly different. With a threshold of 68 and 72, NASA and the study weather station were not significantly different, whereas ECCC stations, in both 0 to 50 and >75 km classes, were significantly lower. With a threshold of 75 the study weather station was not significantly different from NASA and ECCC at 0 to 50 km, whereas the study weather station was significantly higher than ECCC 75 to 125 km.
Although the mean values across all 15 site-years showed good agreement between the overall number of hours of THI a exceedance at on-farm weather stations and the NASA data, individual farms and individual years varied considerably. For example, at AB50 in 2021 NASA data produced 261 more hours with THI a > 68 than the on-farm weather station, which was greater than the number of exceedances observed in-barn. As another example, QC46 in 2021 NASA data produced 146 fewer hours with THI a >68 than the on-farm station.

DISCUSSION
This study is unique in that it encompasses a variety of temperate and continental climate regions across the dairy producing regions in Canada, complement- ing previous region-specific studies (Shock et al., 2016;Ouellet et al., 2019). Overall, Canadian dairy producers deal both with periods of extreme cold in the winter and high THI in the summer. Mean monthly THI a was as high as 71 at the southernmost location, and even in the northern regions there was a 4-mo period where THI reached the heat stress range. The highest mean monthly THI a observed in this study is considerably less than observed in the southern United States (~80, Bohmanova et al., 2007) but comparable to Europe (~70, Germany, Schüller et al., 2013) and higher than New Zealand (~62, Kendall and Webster, 2009). All the barns in the study routinely exceeded heat stress thresholds, however the contribution of T and RH differed considerably in western Canada where humidity was low and decreased as T increased compared with eastern Canada where RH was maintained or increased with temperature. Bohmanova et al. (2007) suggested arid and humid climates may be better served by different THI formulations that give different weights to RH and T. This merits future evaluation within a Canadian context.
Our study included several points of measurement of in-barn conditions (T b , RH b ) within the lactating cow stall areas (up to 5). In most barns, we found no difference among the different sensor positions, which generally supports Shock et al. (2016) where a single sensor location was used. However, multiple sensor locations are valuable in a mechanically ventilated barn where gradients occurred (as also noted by Ouellet et al., 2019), and in 1 naturally ventilated barn where differences between northern and southern sensor positions were detected (as also noted by Wagner-Storch and Palmer, 2002). Schüller et al. (2013) noted differences throughout the barn; however, that may have been due to sensors located in areas other than where the lactating cows are held. We did note that THI in the parlor holding area was higher than in the stall area, so it is important to consider that cows are exposed to higher THI during 2 or 3 milking times per day with a milk parlor design. How to include these intermittent peri-ods of higher THI when modeling heat stress deserves future consideration.
Contrasting barn designs and management systems were evaluated. The relationship between in-barn and outdoor THI differed according to ventilation system (natural vs. mechanical), how the mechanical ventilation was operated (continuous vs. temperature activated), and use of a fabric roof and water-based cooling. The effect of air mixing on cow comfort was not evaluated. Mechanically ventilated barns exhibited a nonlinear relationship between in-barn and outdoor THI, whereas naturally ventilated barns had a linear fit (when the curtains were open; i.e., THI > 55). The nonlinear relationship for mechanical ventilation was particularly important for the barn where ventilation was activated above a minimum temperature of ~21°C. In this case, THI b exceeded THI a by more than 7 units when THI a was 55, but THI b was equal (hourly) or 0.7 units higher (daily) when THI a was 75. This mechanically ventilated barn would benefit from a lower set-point to bring THI lower at night. Continuously operated mechanically ventilated barns resulted in a smaller difference at low THI (+2.5 units at THI of 55) and a similar difference at high THI.
The linear relationship for daily in-barn and outdoor THI that we derived for naturally ventilated barns with metal roofs and without sprinkler (Equation 4) is nearly identical to the equation developed in Ukraine for the same type of barn ("frame type barn" in Mylostyvyi et al., 2020), and the combined analysis of all data from 6 barns in the United Kingdom (Chamberlain et al., 2022). The relationship for naturally ventilated barns has a lower R 2 than for mechanically ventilated ones. This was partially because of greater variation that occurred when WS was low. Whereas mechanically ventilated barns had control over WS b , naturally ventilated barns rely on the wind and horizontal WS b was zero most of the time (especially at night). The slope of the relationship between in-barn and outdoor THI resulted in a convergence, with THI b being 3 units higher when THI a was 55, but THI b was equal (hourly) or 1 unit  higher (daily) when THI a was 75. Thus, greater air exchange at night would be beneficial for reducing THI b . A dual ventilation system combining exhaust fans with curtain walls could be a way of accomplishing this. One naturally ventilated barn differed from the rest due to its fabric roof and sprinkler cooling system. This combination of direct solar heat gain and the addition of humidity resulted in a steeper linear relationship between in-barn and outdoor THI; thus, the THI b continued to be higher than outdoors at high THI. Similarly, previous research at a barn with a fabric roof without sprinkler showed a steeper relationship than a barn with a metal roof (Mylostyvyi et al., 2020). Fournel et al. (2017) reviewed the use of sprinklers and reported that they can reduce ambient temperature by 0.2 to 4.9°C and reduce THI (despite increasing RH); however, most studies reported were done in dry climates. Bohmanova et al. (2007) noted that evaporative heat relief (i.e., misting) is limited in humid environments but can decrease air temperature by as much as 13°C in arid environments. In our study, the use of sprinklers was done in an already humid location. This is an interesting example where water-based cooling with sprinklers led to an increase in the indicator of potential heat stress (THI). The use of sprinklers or misting in humid environments for heat stress abatement in humid environments could be an area of further study.
Various authors have reported that daily mean inbarn THI was significantly (P < 0.05) greater (1-2.2 units) than outdoor (Shock et al., 2016;Ouellet et al., 2019). Our results agree with those findings in general, and our analyses of hourly data show that daily mean differences do not tell the whole story. In all barns except one, we found that hourly THI inside the barn converged with THI outside the barn as THI increased. Peak THI at mid-day tended to be similar inside and outside the barn, but the minimum THI overnight was higher inside than outside. This difference was exacerbated by lower WS at night (limiting air exchange in naturally ventilated barns) and by mechanically ventilated barns reducing ventilation when temperature fell below a threshold. The importance of air exchange has been previously noted (Shock et al., 2016;Ouellet et al., 2019) and is an area where barn design and ventilation management could be optimized to enable cooling at night and during low wind conditions. Stowell et al. (2003) discuss challenges that farmers face in obtaining adequate warm weather ventilation design guidance and highlights cow level airs flow as a key area for cow comfort. All barns in the study except AB53 had fans for in-barn air circulation, but this did not always lead to fresh air exchange (ventilation). Air mixing can, physiologically, be beneficial to the cows by promoting cooling from wind chill and convection, and may homogenize T and RH, but, without fresh air exchange, these factors are unlikely to substantially improve in-barn conditions through THI reduction. At AB50, the barn was in a very windy area; however, indoor wind speed was low like other naturally ventilated barns. This was likely due to the barn design, which had the smallest windows of any naturally ventilated barn in the study (Appendix Figure A1). The reason for this is to reduce wind and retain heat, especially during the winter. This brings up a particular challenge for farms located in northern regions with extreme high and low temperatures, which is that the barn design must strike a balance between dissipating heat in the summer and retaining heat in the winter.
The ability of a cow to endure the effect of an environment with a high temperature without negative effects refers to her thermotolerance (Bianca, 1962). Thermotolerance is determined by herd and individual factors, acclimatization, and genetic adaptation. These factors include age, lactation stage, diet composition, heat stress management, previous climatic exposure, reproduction stage, developmental stage, parity, housing conditions, latitude, state of health, social ranking, and reproduction stage. Hence, a wide range of THI thresholds associated with different heat stress-related impairments have been suggested over the years, ranging from 72 (Bohmanova et al., 2007), 68 (Zimbelman et al., 2009), 60 (Brügemann et al., 2011), to 50 to 64 (Campos et al., 2022). To start heat stress mitigation protocols before the appearance of adverse production issues, further study is needed to definitively determine at what THI heat stress occurs in relation to barn design. The need for this is particularly important for low thresholds. As we have seen from the 9 Canadian dairy barns observed in this study, the barn designs and management may intentionally be reducing ventilation to retain heat and reduce operating costs. To illustrate, consider barn QC46, which turns off its ventilation fans below a temperature set-point. If adverse heat stress effects occur at a THI of 58, then this operator would be well served to change their ventilation set-point to keep fans operational at a lower temperature. If, however, the appropriate heat stress threshold is at THI of 72, then this operator is saving operating costs by turning off their fans below this threshold. Determining the lower boundary of THI thresholds with respect to Canadian dairy cattle thermotolerance factors is an important area for future study.
It is clear from our study, and others, that the conditions inside dairy barns are different than those outdoors (Brügemann et al., 2011;Schüller et al., 2013;Shock et al., 2016). Given that in-barn conditions are often not known, predicting in-barn conditions based on outdoor THI and an appropriate equation based on barn design seems reasonable. Previous studies have relied on publicly available weather station data to calculate outdoor THI and estimate heat stress exposure (e.g., Ouellet et al., 2021;Campos et al., 2022). Our study showed that publicly available weather data from stations within 50 km were reasonable proxies for on-farm outdoor conditions (supporting Brügemann et al., 2011) and were preferable to weather data from >75 km away or from NASA Power ensemble data. Although nearby stations gave better fit to the data, many stations did not have complete hourly data. This is an advantage of the NASA Power ensemble data, which has already been processed to create a clean gap-free hourly timeseries based on a variety of data sources including weather stations. Our analysis of the number of hours of heat stress exceedance at all barns indicated that NASA Power data were not statistically different from the on-farm station in terms of the mean number of hours exceeding THI thresholds from 60 to 75. This suggests that for studies looking at a population of many dairy barns, the use of such aggregated data combined with equations for estimating in-barn conditions is likely appropriate. However, the use of NASA Power data has potential for very low accuracy for any individual dairy barn. For studies focused on the conditions within a few specific barns, there is no substitute for on-site measurements.

CONCLUSIONS
Periods of high THI b occurred at all barns, but barns in the prairies had lower RH and frequently cooled at night. The THI conditions inside barns were well correlated with outdoor THI after considering barn design, suggesting that in-barn conditions may be estimated based on design. All barns without sprinklers reached equality between THI b and THI a at high values. There are opportunities to reduce the frequency and extent of THI b exceeding thresholds (e.g., enhanced ventilation at night); however, there is a need to determine the economic THI threshold that Canadian farmers should consider, especially if the THI thresholds are low (i.e., <68). Describing THI b is best done with weather data within 50 km if complete hourly data are available. The NASA Power data were inaccurate for some farms but had a complete hourly timeseries for all locations and were acceptable for estimating the mean number of THI exceedances across all site-years.