Microclimatic variability buffers butterfly populations against increased mortality caused by phenological asynchrony between larvae and their host plants

conditions may lead to larvae breaking diapause earlier without equally advancing host plant growth. Microclimatic variability within and among populations is likely to have a crucial buffering effect against climate change in many insects.


Introduction
The unpredictability and spatial synchrony of weather conditions increase due to climate change, as weather becomes more variable and extreme weather events occur more regularly (Easterling et al. 2000, Kovats et al. 2014, Kahilainen et al. 2018, Hansen et al. 2020. This induces spatial synchrony in classic metapopulation dynamics. Theory predicts that increasing spatial synchrony of local colonization and extinction events compromises the long-term stability of classic metapopulations (Hanski et al. 1995). Thus, the expanding spatial synchrony of weather conditions exposes metapopulations to critical declines during the periods of unfavourable weather (Kindvall 1996, Kahilainen et al. 2018, Hansen et al. 2020. The long-term persistence of classic metapopulations under more spatially synchronized, more extreme and unpredictable weather conditions may be buffered by variable microhabitats (e.g. in terms of vegetation, structure and topography) within and among local populations, allowing for reproduction under favourable microclimatic conditions regardless of the prevailing weather (Kindvall 1996, Suggitt et al. 2011, 2012, Scheffers et al. 2014. A critical question about the resilience of herbivore insects to increasing unpredictability of weather conditions is, whether females are able to select oviposition sites that maximize the vital rates of their offspring. Often though, the most commonly selected oviposition sites are suboptimal for the development of the offspring (Rausher 1979, Schultz et al. 2019. In areas with low predictability in climatic conditions among years, favouring specific microhabitats for oviposition may be maladaptive. Assuming that the performance of the offspring depends on the prevailing weather conditions, which vary between years, the best microhabitats consequently cannot be predicted by the mother (Ehrlich et al. 1980, Suggitt et al. 2012. While the unpredictability of weather conditions increases due to ongoing climate change, the formerly adaptive oviposition site selection strategies may thus become maladaptive. This was observed, for example, in our Glanville fritillary Melitaea cinxia study system during an extreme drought in summer 2018 (Salgado et al. 2020, van Bergen et al. 2020. Similar adverse effects of extreme drought have been observed also in many other insects (Ehrlich et al. 1980, Kindvall 1996, Hawkins and Holyoak 1998, WallisDeVries et al. 2011).
An important mechanism through which climate change threatens organisms is phenological asynchrony between species of interacting trophic levels, such as herbivores and their host plants or predators and their prey (Bale et al. 2002, Parmesan 2007, Thackeray et al. 2010, Cerrato et al. 2016, Kharouba et al. 2018. In bay checkerspot Euphydryas editha bayensis, inability to track the phenological shifts of larval host plants due to increasing variability in precipitation was found to hasten extinctions of a well-studied metapopulation (McLaughlin et al. 2002, Singer andParmesan 2010). Van Nouhuys and Lei (2004) showed that the weather conditions in the spring affected the synchrony between the Glanville fritillary and its specialist parasitoid Cotesia melitaearum: in cool but sunny weather, the actively thermoregulating butterfly larvae developed fast enough to escape the parasitoid wasps, the cocoons of which are not able to warm themselves up behaviourally. Contrastingly, when the spring was predominantly warm and cloudy, the wasps developed in synchrony with their hosts.
In this study, our aim was to understand how the interplay between spring weather conditions and microclimatic variability affects the local and metapopulation dynamics of a butterfly at its high-latitude range edge. Specifically, our research questions were: how do spatial variation 1) in weather and 2) in different microclimatic conditions alter larval growth rate and survival until pupation? For further insight on the thermal conditions experienced by the larvae, we asked, 3) how do larval temperatures deviate from concurrent ambient temperatures and how does this affect larval activity? To answer these questions, we monitored postdiapause larval temperatures in seven local populations of the Glanville fritillary in Åland Islands in 2016, and growth and survival in 13 local populations in 2017. Moreover, we aimed to translate the observed effects of spring weather and microclimatic variability on post-diapause larval survival and growth to more general effects on the metapopulation-level dynamics. Our specific question was: 4) do the spatially variable weather conditions during the post-diapause larval stage and larval microhabitats explain the changes of local population sizes over a butterfly generation? To answer the final question, we utilized two metapopulation-level survey data sets on changes in the sizes of 406 local populations from the autumn of 2015 to the autumn of 2016, and 342 local populations from 2016 to 2017. Observed changes in population sizes were explained using weather and microhabitat data.

Study system
The classic metapopulation of the Glanville fritillary in Åland Islands in Finland inhabits a network of approximately 4500 dry meadows with shallow, often rocky and low-productive soil (Ojanen et al. 2013). Breeding habitat is characterized by the presence of one or both of the larval host plants, ribwort plantain Plantago lanceolata and spiked speedwell Veronica spicata (Ojanen et al. 2013, Hanski et al. 2017). The gregarious larvae live and overwinter in large, mainly full-sib family groups (Fountain et al. 2018) in silk nests they spin around a host plant (Ojanen et al. 2013, Kuussaari andSinger 2017). After the end of their diapause in late March or early April, the black and hairy larvae remain in groups basking to warm up and feeding on the first emerging leaves of the host plants (Kuussaari and Singer 2017). The resources acquired during the post-diapause larval stage are critical for the lifespan and reproductive rate of the adult butterfly (Saastamoinen et al. 2013). In late April or early May, larvae reach the last instar and spread out to find a pupation site.

Field data
We collected two sets of field data: firstly, detailed monitoring data on temperature, growth and survival of post-diapause larval groups and host plant growth that described the smallscale dynamics within local populations in different parts of the Åland main island. Secondly, large-scale survey data on the occurrence of larval groups across the Åland Islands (Ojanen et al. 2013), which served as a tool to translate local dynamics into variation in population growth rates throughout the entire metapopulation spanning over an area of 50 × 70 km (Fig. 1). We obtained a set of gridded weather data with 10 × 10 km cell size covering the Åland Islands from the Finnish Meteorological Institute. The weather data included daily precipitation as well as daily minimum, maximum and average temperatures for our study season, and we used these data to describe the spatial variation in weather conditions in the analyses of both local and metapopulation level dynamics.

Detailed monitoring data
We monitored in detail 13 Glanville fritillary local populations across the main island of Åland throughout the postdiapause larval stage on 24 March-4 May 2017. A total of 159 larval groups were present in these populations (number of winter nests varying between nine and 52 per local population), and each was visited twice a week to monitor larval survival, weight gain and development time from a larval instar to another. In addition, to observe whether trophic phenological asynchronies took place during the larval development, we monitored the number and average leaf length of host plants on 27 plots of 1 m 2 in the same 13 habitat patches. We chose host sites with microhabitat conditions representative for the larval sites of the respective patch, but with no larvae present, to measure host plant growth without the effect of larvae eating them. We also surveyed environmental living conditions of each larval and plant site taking into account microclimatic, microhabitat and weather factors, all of which can affect the survival and development of larvae and the growth of host plants. The Supporting information gives a detailed description of all measured variables.
The survival of the larvae was measured as the number of larvae in each group that were found alive in the end of the gregarious and actively feeding stage divided by the initial post-diapause group size measured in the beginning of the study in late March. The mean weight of larvae in each group was measured once a week in the field with a precision scale that was placed in a styrofoam box and balanced with a bubble level. From groups with ≤ 20 larvae, all individuals were placed into a centrifuge tube, weighed and released in the same place where they were found from. From larger larval groups, a random sample of 20 larvae was weighed. Based on the repeated weighing results, we calculated the mean proportional daily weight gain of the larvae.
Host plant growth was measured by counting each plant on a plot and estimating their average leaf length in late March, mid-April and early May. Host plant availability was estimated on both larval sites and host plant plots without larvae (classified as 0 = no host plants visible within a 1 m distance from larvae or the centre of the host plot, 1 = small number (< 20) of small host plants available, 2 = enough (20-50) host plants available for larval growth, 3 = excessive number (> 50) of well growing host plants available). The changes in the host plant availability, the number of host plants and the average length of host plant leaves were calculated by dividing the subtraction between the later measurement and the earlier measurement with the subtraction between the later measurement date and the earlier measurement date. We calculated the changes separately for the early season, late season and the whole season.
We quantified the ability of larvae to warm up by basking compared to the ambient temperature by measuring the body surface temperatures of 56 larval groups in seven local populations once or twice an hour between 09 a.m. and 05 p.m. during a sunny day in April 2016. We also assessed larval activity to find out how it was affected by the temperature and microhabitat conditions. This was done by marking down if the larvae were resting in the silk nest (activity = 0), basking (activity = 1) or feeding (activity = 2), as well as whether the sun was shining directly on them during each temperature measurement. The body temperatures of larvae were measured with a Raytek MX2 TD infrared thermometer and the ambient temperature with an EasyLog USB data logger placed 30 cm above ground on a sunny area in the patch and shaded from the direct sunlight.

Large-scale survey data
The suitable habitat patches for the Glanville fritillary are surveyed for the presence of the larval overwintering nests every autumn by a group of field assistants (Ojanen et al. 2013). We counted the growth rates of local populations from 2015 to 2016 and from 2016 to 2017 as the number of winter nests found in the autumn divided by the number of winter nests found in the previous autumn. Microclimatic and microhabitat conditions experienced by larval groups throughout the entire Åland metapopulation were surveyed in April 2016 and 2017. A group of field assistants visited all occupied patches based on the previous fall survey; a total of 406 and 342 patches with 1599 and 1404 larval winter nests, respectively. The number of larvae and their median larval instar, mean distance from the winter nest and the host plant species they were eating were recorded using Earthcape database (<https:// earthcape.com>). Recorded variables describing microhabitat and microclimate were shadiness, the steepness and the compass point of a slope at two spatial scales (1 × 1 m and 20 × 20 m), rockiness, overall vegetation and the abundance of host plant at the nest site. The Supporting information gives a more comprehensive description of the variables.

Variable selection
The detailed rationale behind variable selection and the description of each variable are given in the Supporting information. The response variables, which we selected into the analyses of the detailed monitoring data set, were larval survival until the late penultimate instar (i.e. the end of the gregarious and relatively immobile stage) and mean proportional daily weight gain over the same time period. The selected explanatory variables were initial larval group size, the compass point of the slope at 1 × 1 m scale and shadiness at the nest site, the amount of the host plant after the first post-diapause moulting of the larvae, the amount of other vegetation at the nest site, predation and weather variables including degree days and precipitation of the study season. We used the same explanatory variables (excluding the amount of host plant after moulting and predation) to explain the changes in the availability, number and leaf length of host plants.
The response variable in the analyses of the large-scale survey data was the local population growth rate. The selected explanatory variables included initial population size (i.e. the number of winter nests in a patch), the mean compass point of the slope at the nest sites in a local population, the mean and standard deviation of the shadiness of the nest sites, the mean abundance of the host plant at the nest sites, the mean height of other vegetation at the nest sites and the degree days and precipitation of May. The weather of May was used because these climatic conditions have been previously shown to best explain the population dynamics of the Glanville fritillary (Kahilainen et al. 2018), and correlations between weather variables forced us to choose only the weather of one month. In the regression models, we used the logarithm of the local population growth rate.

Statistical analyses
To assess the influence of the selected explanatory variables on larval survival and weight gain as well as host plant growth in the detailed monitoring data set and on population growth rate in the large-scale survey data set, we adopted a Bayesian framework of spatial regression modelling and fitted models using R-INLA with stochastic partial differential equations (SPDE; Rue et al. 2009, Lindgren et al. 2011, <www.r-inla. org>). The key advantage of INLA (integrated nested Laplace approximation) approach compared to frequentist regression modelling in the context of ecological field studies is its ability to handle spatial and temporal autocorrelations in a more realistic manner (Roos et al. 2015). Compared to Bayesian MCMC simulations it provides very exact approximations with a substantially reduced computation cost (Rue et al. 2017). Using the temperature data set from 2016, we fitted spatiotemporal regression models for larval activity as the function of larval and ambient temperatures, sunshine reaching the larvae and larval group size. We also modelled larval temperature as the function of ambient temperature, sunshine and larval group size. We included a residual autoregressive correlation of order one (AR1) to consider the temporal dependencies in the data.
To avoid numerical problems, we standardized the explanatory variables to have the mean value of 0 and variance of 1. We modelled larval survival by fitting a logistic regression with a logit link function. Larval proportional weight gain, host plant growth, larval activity and temperature, and local populations' growth rate were modelled using a linear regression. In addition to running the full models, we utilized a backward model selection that was based on ranking the models by their deviance information criterion (DIC) values for the models of larval survival, weight gain and population growth. In the regression models of all monitoring, survey and temperature data sets, we used uniform prior distributions for the fixed effects.
In SPDE models, spatial dependency of observations is accounted for using a latent Gaussian random field (Lindgren and Rue 2015). We constructed it for the detailed monitoring data by triangulating the map with locations of larval groups using a minimum distance of 10 m and maximum distance of 1 km between triangle vertices. We also used a wider buffer zone surrounding the study area with a maximum distance between vertices of 5 km. To construct the latent Gaussian random field for the large-scale survey data, we triangulated the map with locations of local populations using a minimum distance of 200 m and maximum distance of 5 km between triangle vertices. There was also a wider buffer zone surrounding the study area with a maximum distance between vertices of 10 km.
We used weakly informative prior distributions for the two variables describing the latent Gaussian random field (w): the spatial range (ρ w ) and the marginal standard deviation (σ w ) of the random field (Fuglstad et al. 2019). In the models for the detailed monitoring and temperature data, we used a prior distribution where ρ w was specified as P(ρ w < 1 km) = 0.5 and σ w as P(σ w > 1 km) = 0.25 for the spatial autocorrelation among larval groups. In the models for the large-scale survey data, we used a prior distribution where ρ w was specified as P(ρ w < 5 km) = 0.5 and σ w as P(σ w > 1 km) = 0.25 for the spatial autocorrelation among local populations.

Results
The whole spring (March-May) of 2016 was warmer and drier than on average in 1981-2010 (monthly mean temperatures 0.8-2.1°C above the average; monthly precipitations 33-92% of the average; monthly precipitations and mean temperatures for Åland reported by the Finnish Meteorological Institute). In 2017, March was even warmer than in the previous year (mean temperature 1.7°C, 2.4°C above average), but April and May were cooler than on average in 1981-2010 (mean temperatures 2.8°C and 7.6°C, 0.7°C and 0.9°C below average). The precipitations of March and May were slightly lower (83% and 65% of the average), but the precipitation of April higher (161%) than on average. The growing degree days (measured by accumulating the daily total of degrees (°C) that exceed the minimum temperature threshold of 5°C), which have been commonly found to correlate with the phenology of different taxa including butterflies (Cayton et al. 2015), were on average higher in March than in April of 2017. The average degree days of March, April and May of 2016 were 0.1, 5.8 and 169. The corresponding degree days of 2017 were 4.0, 3.6 and 96.1, respectively.

Larval temperature, activity, growth rate and survival
Larval body surface temperatures were highly variable depending on whether direct sunlight reached the larvae. The ambient temperatures during our temperature measurements varied between +3.0°C and +18.0°C (median +11.5°C), whereas larval temperatures varied from −2.6°C to +36.2°C (median +25.4°C). Larvae were observed feeding at body temperatures ranging from +6.5°C to +35.7°C (median +28.6°C). At the warmest, larval temperature was 26°C warmer than the concurrent ambient temperature. On average, it was 10°C warmer and at the coldest 11°C cooler than the ambient temperature. Larval activity levels (proportion of day spent by resting, basking and feeding) were dependent on all variables tested: larval temperature, larval group size, ambient temperature and the sunshine reaching the larvae (whether the larvae were exposed to direct sunlight or shaded during the temperature measurement; see Table 1 for the summary of the fixed effects). Larval temperature was also explained by all variables tested: ambient temperature, sunshine reaching the larvae and larval group size (Table 1).
For the proportional daily weight gain, the summary of the fixed effects of the full model is shown in Fig. 2a. The availability of host plants for the larvae after their first postdiapause moulting as well as the compass point of the nest site slope towards south increased larval weight gain. The initial post-diapause larval group size, degree days and precipitation 758 of the study season, predation and the height of the vegetation in the vicinity of the nest did not show an effect on larval weight gain in the full model. The best model ranked by DIC included the degree days of the study season and the shadiness of the nest site in addition to the host plant availability and the compass point of the slope, indicating that the two additional variables improved the explanatory power of the model (the summary of the fixed effects of the model with lowest DIC value in Table 2). The range of the spatial autocorrelation for larval weight gain was 2.0 km (Fig. 3a). The survival of the larvae from the end of diapause to the end of the gregarious stage was enhanced by warmer weather (degree days of the study season) and shadiness of the nest site (the summary of the fixed effects of the full model in Fig. 2a). Larval survival was decreased by large initial post-diapause group size, high availability of host plants after the first postdiapause moulting and the compass point of the nest site slope towards south. Total precipitation over the study season, predation and the height of the vegetation in the vicinity of the nest did not show an effect on larval survival in the full model. The best model ranked by DIC included the precipitation of the study season in addition to the predictors with an effect in the full model (the summary of the fixed effects of the model with lowest DIC value in Table 2). The range of the spatial autocorrelation for larval survival was 0.1 km (Fig. 3b).
The two weather variables were highly positively intercorrelated (r S = 0.72), indicating that the larval survival and weight gain were highest under warm and rainy weather conditions. At the microhabitat level, nest sites on flatland or on northward slope, and sites with shading elements impeding direct sunlight supported higher larval survival, but lower weight gain. In the detailed monitoring study, larval survival and weight gain were hence enhanced by similar weather   conditions, but affected contrastingly by microhabitat and -climate variables, with survival increasing in shaded and northward microhabitats but weight gain increasing in sunny and southward microhabitats.

Host plant growth
The host plants did not grow notably even in the absence of larvae during our monitoring season in spring 2017. The median number of host plants per 1-m 2 plot without larvae was 21 in late March and 23 in early May (min. 4 and 6, max. 97 and 104, respectively). Similarly, the median of the average leaf length remained 2 cm throughout the season (min. 1 cm and 0.2 cm, max. 4 cm and 3.5 cm, respectively). During the first half of the monitoring season, precipitation increased the emergence of new host plants and southward slope increased the growth of the leaves (see the Supporting information for the fixed effects of all host plant models). During the second half of the monitoring, none of the variables tested affected host plant growth. Host plant availability remained mainly constant or decreased slightly through the study season when all sites with and without larvae were included in the analyses. It is worth mentioning that at the larval sites, the area with 1 m radius where host plant availability was measured moved with the larvae so that the larval group was always at the centre of the area. Thus, larvae were able to increase the availability of food by moving up to several metres (Rytteri unpubl.). At the host plant sites without larvae, the availability of plants was always measured at the same constant area. While the median change in the availability of host plants remained 0 at all sites through the season, the greatest negative total change at sites with larvae was −0.06 units per day and without larvae it was −0.03. The greatest positive total change in host plant availability at both sites with and without larvae was 0.03. In none of the habitat patches, the average host availability during the study season was measured to be adequate for larval growth (i.e. host plant availability measure ≥ 2). The results that host plant availability was generally poor, and it did not increase and in some cases it even decreased during monitoring season, highlight the lack of growth of the host plants, which in turn led to phenological asynchrony between larvae and their food.
Larval group size affected the change in the food availability negatively in a non-spatial statistical model, indicating that larvae in general and especially big larval groups depleted the food resources (Supporting information). In the spatial models, this effect was absent (Supporting information), while the spatial autocorrelations revealed the pattern of the changing host plant availability in relation to the variability of larval growth rate. In patches with highest larval growth rate, host plant availability changed positively during the first half of the study season, but turned negative during the second half (Fig. 4). In patches with lower larval growth rate, the change of the host plant availability became more positive towards the end of the study season, when the larvae require most food (Fig. 4). These results indicate that the phenology of slowly growing larval groups was synchronized with that of the host plants, while the fastest-growing groups suffered from phenological asynchrony with the food resource.

Population growth rate
Local population growth rates from autumn 2015 to autumn 2016 were affected positively by warm weather in May 2016 and variable shading conditions within population. The precipitation of May, the initial population size, and the average amount of host plants, other vegetation, mean shadiness or the compass point of slope at the nest microhabitats did not show an effect in the full model (for the summary of the fixed effects of the full model, Fig. 2b). The best model according to DIC indicated that larval nests situated on southward slopes further increased local population growth ( Table 2). The range of the spatial autocorrelation for the population growth from 2015 to 2016 was 5.9 km (Fig. 3c).
Local population growth rates from autumn 2016 to autumn 2017 were increased by cool weather in May 2017. In the full model, the precipitation of May nor the microhabitat variables showed no effect on population growth. Fig. 2b gives a summary of the fixed effects. In the best model ranked by DIC, the precipitation of May, mean shadiness and the compass point of the nest sites were included in addition to the degree days of May (Table 2). These results indicate that rainier weather and shaded microhabitats at southward slopes also enhanced local population growth. The range of the spatial autocorrelation for the population growth from 2016 to 2017 was 1.8 km (Fig. 3d).
The local population growth rates were affected contrastingly by the temperature of May in the two consecutive springs, with warm weather increasing population growth in spring 2016 but cool, rainy weather in spring 2017. The data from both years indicated that local populations with nest sites at southward slopes in at least partly shaded microhabitats tended to have highest population growth rates.

Discussion
Our data suggest that the warm weather early in the spring led to phenological asynchrony between herbivorous insect and its host plants. Butterfly larvae responded to early spring warming by early wake-up and fast growth, but host plants lacked such growth response, which resulted in larval food depletion. This asynchrony was buffered by microhabitat heterogeneity, as larval survival and local population growth rate were highest in shaded microhabitats that normally are suboptimal for the development of thermophilous larvae. Effective behavioural thermoregulation of the larvae led their body temperature to exceed the ambient temperature considerably especially in sunny microhabitats, which consequently increased larval activity. In a detailed monitoring study in the field, larval survival and weight gain were both highest under warm weather conditions. Instead, microhabitat and -climate affected survival and weight gain contrastingly, with survival increasing in shaded and northward microhabitats but weight gain increasing in sunny and southward microhabitats.
Host plants generally grew poorly under the cool weather conditions in April, and some larval groups exploited all available host plants towards the end of the study season. Consequently, on habitat patches with highest larval growth rate, the change in the host plant availability was negative during the penultimate larval instar when individuals require most food (Fig. 4, Saastamoinen et al. 2013). We argue that running out of food is a probable reason why larval survival was lowest in microhabitats and habitat patches with highest larval growth rates (see Fig. 3a-b for the spatial autocorrelations of larval growth and survival). The local population growth rates were affected contrastingly by the temperature of May in two consecutive springs, with warm weather increasing population growth in May 2016, but cool, rainy weather in May 2017. The data from both years indicated that local populations with nest sites on southward slopes in at least partly shaded microhabitats tended to have the highest population growth rates.

Larval temperature and activity
Insects have a variety of behavioural (e.g. movement between microclimates, basking and gregarious behaviour) and morphological (e.g. colouration) adaptations for effective thermoregulation (Bryant et al. 2000, Pincebourde et al. 2016). In the light of gregarious basking behaviour and the black colour of the larvae, high larval temperatures during cool but sunny days were expected in the present study. Similar results were reported by Van Nouhuys and Lei (2004) and WallisDeVries (2006). As sufficient body temperature is required for movement and feeding and large groups of larvae heat up more effectively than small ones (Porter 1982, Bryant et al. 2000, it was not surprising that these factors were important in explaining larval activity. Larval temperatures in shaded microhabitats were often cooler than ambient temperature, indicating the importance of sunshine for the effective behavioural thermoregulation. The range of body temperatures under which we observed larvae feeding was narrower than the full range of body temperatures with a median of 28.6°C. This indicates that the optimal body temperature for the larval growth is ca 30°C, which is in line with the larval temperature optima of other Lepidopteran species (Porter 1982, Bryant et al. 2000.

Larval survival and weight gain
Warm weather is generally beneficial for the survival and weight gain of insects at their high latitude or altitude range margin (Chen et al. 2011, Hodgson et al. 2015, which was also observed in our monitoring study. Ambient temperatures at the high latitude range margin are prone to be far below the optimal larval body temperature for development (Porter 1982, Bryant et al. 2000, WallisDeVries 2006, and we therefore expected warm microclimatic conditions to increase weight gain and survival. Consistent with expectations, we recorded accelerated growth rates in sunny and southward microhabitats for as long as the larvae found host plants. However, many larval groups, especially in warm microhabitats, starved after consuming all the food within a few metre radius from their winter nest. This led to the finding that larval survival was enhanced by increasing shadiness of the microhabitat and northward slope. The reduced ability of larvae for basking in shaded conditions synchronized their phenology with that of their host plants, consequently leading to slower growth but higher survival. Figure 4. Posterior mean spatial random fields for the full models of (a) larval weight gain, (b) the change of host plant availability in the first half of April and (c) the change of host plant availability in the second half of April. On patches with the highest larval weight gain, host plant availability changed positively during the first half of the study season, but turned mainly negative during the second half. On patches with lower larval growth rate, the change of the host plant availability became mainly more positive towards the end of the study season. The starvation of the fastest-growing larvae during penultimate instar may explain the higher survival and population growth rate in the patches with more slowly growing larvae.
Our analyses also showed that high food availability after the first moulting increased larval weight gain but decreased survival. This is explained by the timing of measuring the host plant availability: the larvae exploited host plants relatively little until the first moulting. After the first moulting, larval growth rates increased rapidly until they had exploited all available food, which in turn led to increased mortality. The increase in food intake is demonstrated by the finding that in the patches with fastest larval growth, host plant availability started to decrease after the first larval moulting (Fig. 4c). The slightly positive change in the host plant availability in the patches with fastest larval growth before moulting (Fig. 4b) probably resulted from increased larval activity and ability to cover relatively large areas while searching for food, rather than improved host plant growth. Larval growth benefited from warm microclimate, while host plant growth was poor regardless of the microclimatic variation. All except one of the 159 closely monitored larval groups ended the diapause and left the winter nest in March, even though the growing season (as defined by Karlsen et al. 2007) started only in May throughout the study area. Host plants do not warm up similarly as the larvae due to evaporation (WallisDeVries 2006), which amplifies the difference between the effects of microclimate on the interacting species.
We expect that microclimatic factors could have a very different impact on larval survival in a spring with different weather conditions. The females typically lay their eggs in the warmest and driest microhabitats within the breeding habitat patches, which generally enhances the survival of the offspring until spring (Salgado et al. 2020). In an average spring, when the lag between the end of larval diapause and the beginning of the plant growing season is shorter, the thermophilous larvae can exploit host plant resources most efficiently in the warmest microclimates. The warming caused by climate change in northern Europe is expected to be most prominent in winter and early spring (Kovats et al. 2014, Ruosteenoja et al. 2020. Furthermore, amplified variability of weather conditions, up-scaled spatial synchrony of weather and increased occurrence of extreme weather events have been linked to climate change and are expected to become more common in the future (Easterling et al. 2000, Kovats et al. 2014. Hence, the potential for phenological asynchronies between herbivore insects and their hosts, such as the case described in the present study, also grows (Parmesan 2007, Thackeray et al. 2010). On the other hand, with sufficient moisture, climate change may cause microclimatic cooling in the spring by increasing vegetation growth and shading, which may also threaten thermophilous insects including the Glanville fritillary in other parts of its range (WallisDeVries 2006, WallisDeVries andVan Swaay 2006).

Population growth rate
Our results indicate that the impacts of spatial variation of weather on local population growth rates are highly contextdependent, as the temperature of May showed contrasting effects in the two consecutive springs and the precipitation of May showed a positive effect only in the drier year. Thus, we would speculate that the effects of spatial variations of temperature and precipitation may importantly depend on the prevailing conditions across the area: for example, particularly rainy localities probably support highest population growth especially in predominantly dry years. This highlights the importance of long-term data when studying the impacts of weather on biological systems. Previous work in our study system has shown the metapopulation growth rate to be largely determined by the annual variation in the precipitation from the late spring to the late summer (Tack et al. 2015, Kahilainen et al. 2018, van Bergen et al. 2020. Drought desiccates the host plants, which may be fatal for the larvae, and reduced precipitation at both pre-and post-diapause larval instars is the main driving force behind population crashes (Kahilainen et al. 2018, van Bergen et al. 2020. Nest sites situated at slopes with on average more souththan northward aspect tended to increase the local population growth in both years. In the light of the small-scale results, the fast larval weight gain and development enabled by warm southward microclimates enhanced population growth. Interestingly, the population growth rate from 2015 to 2016 was increased also by variable shading conditions at the nest sites, and the population growth rate from 2016 to 2017 by increasing average shadiness of the nest sites. This indicates the importance of at least partly shaded microhabitats to buffer the relatively immobile life stages of the thermophilous butterfly against adverse weather conditions. The desiccation of host plants in dry summers may be less severe in shaded microhabitats (Salgado et al. 2020), as well as the phenological asynchrony with the host plants in spring demonstrated by our monitoring study. Overwintering success may have an important role in the population dynamics of temperate insects (Roland and Matter 2016) and may also be affected by microhabitat conditions, and further study is required to shed light on the overwintering in our study system.
Consistently with the findings of Salgado et al. (2020), the majority of the nests at the metapopulation level were situated in sunny microhabitats, as out of the 1404 winter nests found in the autumn survey 2016 and revisited in the spring survey 2017, 1083 were in sunny, 314 in slightly shaded and five in considerably shaded microhabitats. No larval groups were situated in deeply shaded microhabitats. The local populations were chosen for the close monitoring based on adequate number of larval groups situated at slopes with different aspects and variable shading conditions. Compared to the level of the whole metapopulation examined by the survey data, the larvae in the monitoring data were on average exposed to more variable microhabitats.

Variable microhabitats as a buffer against changing climate and phenological asynchronies
Increased plasticity in oviposition site selection is a prerequisite for the adaptation of insects to more variable and rapidly changing weather conditions (Ehrlich et al. 1980, Salgado et al. 2020. As adults, butterflies and other flying insects are capable of choosing the microhabitat that enhances their performance under the prevailing weather conditions, given that there are diverse microhabitats within the dispersal distance (Suggitt et al. 2012). Immobile juvenile life stages are closely tied to the microhabitat their mother chose for oviposition, and thus ovipositing in a wide range of microhabitats is the best way to secure the performance and survival of at least some offspring under unpredictable climatic conditions (i.e. bet-hedging, Starrfelt and Kokko 2012). From the conservation point of view, increasing the heterogeneity of insect breeding habitats is crucial to buffer populations against adverse climatic conditions (Benton et al. 2003). Diverse habitats at spatial scales from centimetres to several kilometres have been reported to act as an important indicator of long-term population persistence for numerous taxa (Kindvall 1996, Benton et al. 2003, Oliver et al. 2010, Suggitt et al. 2011, Merckx et al. 2019. Microhabitat variability also shapes the responses of populations to climate change and other environmental changes (Wilson et al. 2010, Suggitt et al. 2012, Bennie et al. 2013, Scheffers et al. 2014, Bennett et al. 2015, Pincebourde et al. 2016). In the present study, we demonstrate how shaded microclimatic conditions can, under specific macroclimatic conditions, enhance the larval survival of a thermophilous butterfly. Furthermore, we show that the local population growth rates are increased by higher variation in larval shading conditions in a metapopulation where most larvae are restricted to open habitat without any shading.
In the face of climate change, it is adaptive for plants to lag the phenological phases slightly behind the warming spring temperatures, because there are still late frosts that are more harmful for plants at later phenological phases (Scheifinger et al. 2003). This would be adaptive for herbivores as well to avoid both the phenological asynchrony with the host plants and potential direct adverse effects of frosts. However, our data suggest that butterfly larvae at the high latitude range edge react strongly to the warming of early spring by ending their diapause as early as possible. Parmesan (2007) reported similar trend of butterflies advancing their emergence more than threefold compared to the advancement in the flowering of herbs and grasses, but direct observational studies showing that warming springs induce phenological asynchronies between specialist herbivores and their host plants have been largely lacking (Renner andZohner 2018, for an exception, Visser andHolleman 2001). The phenological shifts at earlier life stages may not be apparent based on the adult emergence timing. Hence, it would be important to consider the phenological shifts throughout the life cycle, with direct data on the life stages that may be most vulnerable towards trophic mismatch in phenology (Post et al. 2008). In a recent meta-analysis, Kharouba et al. (2018) showed that differences of phenological shifts between interacting species have no consistent trend in the direction: some of them led to increased and some to decreased phenological synchrony.
In summary, increasingly variable weather conditions may have unexpected consequences for ecological interactions such as phenological asynchronies between trophic levels, and they challenge populations to evolve rapidly in order to build up resilience towards the adverse weather. Diverse microhabitats can importantly buffer populations against the increasing unpredictability of weather. An adaptive response to amplified macroclimatic variability is to broaden the use of different microclimates within breeding habitat, but our understanding on the potential of populations to undertake such shifts in habitat use is currently limited.