2 Materials and methods

2.1 Study organisms

The laboratory culture of the host P. interpunctella and larval hosts parasitised by V. canescens larvae were kept in temperature controlled incubators at University of Leeds, UK, under a constant temperature of 28℃ and 16:8 light: dark cycles (Jones et al., 2015, Mugabo et al., 2019). Adult V. canescens were kept at ambient temperature, with a sugar water solution for maintenance. Larval hosts were provided with a wheat bran diet (same with Mugabo et al., 2019). No artificial source of moisture was provided inside the incubator for the laboratory culture to date (Figure S1).

2.2 Experimental procedure

We conducted a life history experiment where hosts were kept individually for their entire life cycles. Eggs were collected for 24 hours from approximately 50 randomly-selected newly emerged host adults from the laboratory culture (Jones et al., 2015). The eggs were then transferred into 25 well (1cm x 1cm) clear plastic plates (Sterilin Limited, Thermo Fisher Scientific, UK), with a single egg plus 0.3g food added into each cell, which is sufficient for complete host development (see Mugabo et al., 2019). A piece of 2-ply tissue paper and a nylon mesh were placed between the well-plate and lid to provide ventilation, while also preventing host larvae from moving between cells or escaping.
We prepared 1360 eggs for the experiment, and assigned these eggs in different treatment combinations. We first placed half of the eggs (i.e., 680 eggs), in an incubator with artificially manipulated humidity, with the other half placed in an incubator with no humidity manipulation, both under a constant 28 ℃ with 16:8 light: dark cycle. Artificial humidity was created by placing ~1000 ml of a saturated sodium chloride solution in the humidity treatment incubators (Solomon, 1951). Pilot data showed that at a constant temperature of 28 ℃ or 38 ℃ the solution can increase the relative air humidity (RH) from 30 ± 5% in the incubators with no solution to 60 ± 5% (Fig S1 -S4).
Larval development was checked daily to identify when they were at either the 4th instar or 5th instar. To avoid changes in the microclimate during monitoring of host development inside the 25-well plates, which may affect their development rates, 200 extra eggs were set up in the same way and monitored to estimate the overall developmental status of the experimental cohort. When host larvae had reached their early fourth instar, half of them were parasitised in each humidity treatment (i.e., 340 eggs per humidity treatment; hereafter ‘H-P’ treatment) and half were unparasitized in each humidity treatment (hereafter ‘H’ treatment). To parasitize hosts in the ‘H-P’ treatment, we took each host out of its cell, and placed it in a petri dish under normal laboratory conditions. A newly emerged parasitoid wasp from the stock culture was placed with a host until it was parasitised, which was confirmed when V. canescens performed a unique cocking motion (Rogers, 1972). Each parasitized host was put back into its original cell and original treatment, to continue development.
170 parasitized hosts and 170 unparasitized hosts that were kept in a humid or non-humid environment, were then exposed to heat waves in their fourth instar (immediately after parasitizing), and the rest were kept in their original incubators until they were exposed to heat waves in their fifth instar (~5th day after parasitizing). Heat waves were generated by transferring parasitised and unparasitized larvae into incubators at a constant 38℃ incubators (either with or without artificially increased humidity) for different durations of 6 hours or 72 hours. Control parasitised and unparasitized larvae were kept at 28ºC (i.e. no heatwave). Larvae exposed to the heatwaves were returned to 28ºC and corresponding humidity conditions and monitored daily until host or parasitoid adults emerged and died naturally. Collectively, the treatments comprised unparasitized hosts and hosts parasitised in the 4th instar, which were kept in a humid or non-humid environment, and exposed to heatwaves of durations of 0, 6, or 72 hours in their fourth or fifth instar. There were 50 individual larvae for the 0-hour treatment, 60 larvae for the 6-hour heat waves, and 60 larvae for 72-hour heat waves, in each combination of humidity × parasitism × larval stage.
We measured the following traits in unparasitized hosts: 1) host emergence 2) juvenile development time (i.e., from egg to adult emergence) 3) mid femur length (which is correlated with body size, Jones et al., 2015, Mugabo et al., 2019). For parasitized hosts, we measured 1) relative emergence success —whether a host (i.e. parasitoids were killed by heat stress; where encapsulation was not considered), wasp (i.e. parasitoids survived and killed the host), or neither emerged (i.e., both were killed) 2) wasp juvenile development time (i.e., from parasitism to wasp emergence) 3) hind tibia length (as a measure of adult body size, Harvey et al., 2001).

2.3 Data analysis

Data consisted of multiple trait measurements in unparasitized and parasitized hosts as responses, and three experimental treatments i.e., humidity, larval stage, duration of heatwaves were predictors. Humidity and larval stage were categorical variables, each with two levels, and duration of heat waves was treated as a continuous variable on a log (x+1)-transformed scale. The number of wasps that emerged from host larvae (i.e., without heat waves) as controls for those exposed during the 5th instar were less than the minimum requirements of statistical tests (i.e. < 3), which may bias overall estimates if treated as an independent group. Therefore, we increased the number of observations in this group by shuffling all no-heatwave controls within each humidity treatment and split equally in numbers into two larval stages, using ‘sample_n()’ function in the ‘tidyverse’ package (Wickham et al., 2019).
Statistical analyses were conducted using R (v 4.3.2, RCoreTeam, 2022). We used a generalised linear model (GLM) with a binomial error distribution to investigate if humidity, larval stage, and duration of heat waves affected the adult emergence of unparasitized hosts. In parasitized hosts, we performed a multinomial logit regression model to investigate if the relative success of hosts and parasitoids was affected by the experimental manipulations, using ‘nnet’ package (Ripley et al., 2016). Probability of success was measured by three possible outcomes of each parasitized host: 1) parasitoid emergence – where the host was killed by the successful emergence of a parasitoid; 2) host adult emergence – where a parasitoid failed to kill the host; 3) none – where both the host and the parasitoid failed to emerge (i.e., both were killed). Humidity, larval stage, duration of heat waves, and their interactions were included as predictors. To compare how the survival of parasitoids was changed due to experimental manipulations, we set up the outcome of ‘parasitoid emergence’ as the reference group, indicating that any changes in the outcomes in parasitized larvae (i.e., from parasitoid emergence to host emergence; or from parasitoid emergence to no emergence) were the results of experimental treatments (where encapsulation was not considered). The multinomial logit coefficients of ‘host adult emergence’ and ‘none’ relative to ‘parasitoid emergence’ were estimated and compared using two-tailed Wald z-tests (Kwak and Clayton-Matthews, 2002).
Host and parasitoid larval development were assumed to be gamma-distributed under the constant temperature (Li et al., 2022), so the GLMs were fitted with a log-link Gamma error distribution for hosts and parasitoids that emerged to the adult stage. Body size of unparasitized adult hosts and parasitoids were analysed using GLMs with a log-link gaussian error distribution. Humidity, larval stage, duration of heat waves, and their interactions were included as independent variables in these models. Model residuals were checked using a simulation-based approach by running n=250 simulations in ‘DHARMa’ package (Hartig and Hartig, 2017) and tested for normality using Kolmogorov-Smirnov test.
Finally, we used a piecewise structural equational model (’piecewiseSEM’ package, Lefcheck, 2016) to investigate the direct and indirect effect of humidity, larval stage, and duration of heat waves on hosts, and how they subsequently affected the phenotype of parasitoids (body size). The advantage of this method is that piecewise SEMs can switch from global to local estimation, allowing for the fitting of equations with a range of distributions (Shipley, 2000). As the emergence of parasitoids resulted in the death of the host, we quantified the host’s contribution to the parasitoid using host larval survival time (i.e., the date of parasitoid emergence minus the date of host egg laying). The hind tibia length of parasitoids was used as a measure of parasitoid performance to avoid the correlation between two endogenous variables (i.e., host survived time and parasitoids’ sizes). As such, our piecewise SEM included two underlying structured equations which specified a) the effect of larval stage and duration of heat waves on host survival time, and b) the effect of host larval survival time, duration of heat waves, and host larval stage on the hind tibia of parasitoids. Both equations were fitted by a GLM with a log-link gaussian distribution (Gamma GLMs were not supported), with model assumptions checked by the ‘DHARMa’ package (Hartig and Hartig, 2017). To examine if the effect of heat waves on hosts and parasitoids were modified by humidity, we performed a multigroup analysis incorporating humidity as a grouping variable. Whilst constraining both paths may result in a saturated model (i.e., having 0 degrees of freedom to evaluate model fit), the process of automatically adjusting coefficients in piecewise SEMs allows us to examine if any of the paths varied among groups (Lefcheck, 2016). Thus, any significant interactions indicated whether heat waves interacted with humidity, and any constrained effects implied the path to the hosts or parasitoids did not differ in humidity. Standardized coefficients were calculated for non-categorical variables.