DOI: 10.5061/dryad.0k6djhb5r
title: Strong context-dependence in the relative importance of climate and habitat on macro-moth community changes in Finland

description: Aim: Evaluating the relative impacts of land use and climate change on
 community change is challenging, and their impact may be
 context-dependent. Here, we use long-term moth community data to evaluate
 the relative impacts of changing habitats vs. changing climates on
 community composition and diversity of moths in different landscape
 settings and for moth species associated with different traits.
 Location:  Finland, Northern Europe. Time
 period: 1998-2020 Major taxa studied: Nocturnal macro-moths
 Methods: We used Hierarchical Modelling of Species Communities to
 pinpoint moth species’ responses to climate and habitat composition in 109
 sites across Finland. To characterise context-dependence, we extended this
 framework with conditional variance partitioning analysis. We used the
 model predictions to evaluate the relative effect of drivers on community
 diversity across Finland. Results: The landscape context (i.e.
 the habitat composition around the site and its changes) emerged as the
 dominant driver of macro-moth communities. At the site level, where
 forests or shrub-like vegetation dominates, variation in species
 occurrence was mostly explained by local habitat conditions. In
 heterogeneous and water-dominated habitats, both habitat and climate
 variability contributed equally to patterns in species occurrence. At the
 species level, macro-moth responses to drivers of change varied according
 to their host plant affinity but independently of their wingspan. Climate
 and habitat changes can thus contribute congruently or unequally to
 community change, depending on the habitat. At the community level, traits
 also give insights into trends in and temporal variability of
 biogeographic patterns.  Main conclusions: Our results underpin
 the importance of land-use change as a key driver of community change –
 even among heat-sensitive ectotherms. We also demonstrate that the
 sensitivity of local communities to climate and land use change varies
 among habitat profiles. Overall, our results highlight the importance of
 accounting for local conditions to understand and predict community
 patterns under global change.
description: Data: See manuscript for details. 
 Moth occurrences: We used occurrence and abundance observations
 from the Finnish moth monitoring scheme (Nocturna). This scheme has been
 running across Finland since 1993 (Leinonen et al., 2016). Our data
 comprises 109 sites sampled every night from early spring to late autumn
 using ‘Jalas’ light traps (160 W mixed light or 125 W mercury (Hg) vapour
 bulbs) (Jalas, 1960). We focused our study on the main flight period of
 moths, as lasting from 1 April to 15 October. Our analyses were focused on
 years 1998-2020, which is the period for which both habitat and climate
 data were available. Since species of very low incidence will contribute
 little information on the drivers of distributions, we considered only
 macro-moth species with a prevalence higher than 10%. This resulted in a
 total of 56 966 observations (26.8% of all observations) and a total
 abundance of about 3.5 million of individuals (68% of the total abundance)
 for 1196 trap-years across 78 species. Moth traits:
 All information on wing size and host plant use were gathered
 from Yazdanian et al. (2023) and M. Hällfors et al. (2021).
 Climatic information: All climatic covariates were derived from
 10x10 km gridded data provided by the Finnish Meteorological Institute
 (FMI; (Aalto, Pirinen, & Jylhä, 2016). Growing degree-days were
 calculated as the cumulative sum of temperatures over 5˚C during the
 sampling season (from 1<sup>st</sup>     of April till
 mid-October). The cumulative summer-time precipitation was calculated for
 the same period of time, as based on daily precipitation values. In
 calculating winter chilling degree-days, we followed (Delgado et al.,
 2020) in summing negative deviations from 5 ˚C (as the reference
 temperature) during the winter preceding the sampling (from
 15<sup>th</sup> October till 1<sup>st</sup> of
 April). Average winter-time snow depth for the winter preceding sampling
 was extracted from daily measurements of snow depth.
 Habitat information: We characterised the landscape around
 trapping sites by the overall level of fragmentation, and the proportions
 and diversity of four habitat types: broad-leaved forest, coniferous
 forest, mixed forest, and semi-natural or herbaceous type of habitat based
 on information from the CORINE land cover (CLC) database (Feranec, 2016),
 as available for years 2000, 2006, 2012 and 2018. We converted CLC data to
 a pixel resolution of 20x20 meters using the R package
 <em>terra</em> (Hijmans, 2021) and classified each pixel to
 one of the habitat categories. 
 Methods: Scripts: We provide the R
 scripts for the following: Data
 preparation Environmental analyses
 Hmsc model run Post analyses (Variance
 partitioning) Predictions and community
 analyses
description: # Strong context-dependence in the relative importance of climate and
 habitat on macro-moth community changes in Finland
 [https://doi.org/10.5061/dryad.0k6djhb5r](https://doi.org/10.5061/dryad.0k6djhb5r) The former Data folder has been separated into: Data_prep.7z (raw and transformed, subfiles 1 and 2) and Data_Model.7z (Model results and prediction results, subfiles 3 and 4). To smoothly run the script, the contents of these two (subfiles 1, 2, 3, and 4) need to be combined in a 'Data' folder. Code.7z: software files are now published and publicly available on Zenodo: [https://doi.org/10.5281/zenodo.16811166](https://h52wvrds.r.us-west-2.awstrack.me/L0/https:%2F%2Fdoi.org%2F10.5281%2Fzenodo.16811166/1/01010198bc3d28ed-f9d5ea51-e846-45fb-999e-9d3c41fc7d80-000000/TCkgdQ4vMeQ8SOaP6W5mkdhJWD0=440) Data_prep.7z: supplemental information is now published and publicly available on Zenodo: [https://doi.org/10.5281/zenodo.16811170](https://h52wvrds.r.us-west-2.awstrack.me/L0/https:%2F%2Fdoi.org%2F10.5281%2Fzenodo.16811170/1/01010198bc3d28ed-f9d5ea51-e846-45fb-999e-9d3c41fc7d80-000000/QwIKi_-Hi1QK5SUgqCYJudBkj3A=440) ## Description of the data and file structure The document Metadata_submission.txt details information on the data and code, as well as the software used. Other elements (code and data) are in the subfolder structure Data.7z and Code.7z, and what each folder/script contains. ## Scheme Data.7z 1. Data * 1.EnvironmentalInfo (Data_prep.7z for download) * 2.ObsInfo (Data_prep.7z for download) * 3.ModelRun (Data_Model.7z for download) * 4.Predictions (Data_Model.7z for download) * 1.CommunityMeasures_Sites * 2.CommunityMeasures_FIN Code.7z 2.Script * 1.CovarPrep&EnvirChange * 1.Hab_Clusters_plot * 2.prepare_envir_Sites * 3.prepare_envir_FIN * 4.Envir_change_plot * 2.PrepareDataforModel * 3.RunModel&Diagnostics * 4.VPpostanalysis * 1.VPfunctions * 2.VPconditional * 3.VPtraits * 4.VPall * 5.PredictionsCommunityMeasures * 1.Predictions_prep * 2.Predictions_Fin * 3.Predictions_Site * 7.ScenariosCommunity * 1.SiteLevel * 2.FINLevel * 8.Forplotting_traitSC 3.Metadata Metadata_submission ## Sharing/Access information Data was derived from the following sources: * Moth occurrences were provided by Finnish Environment Institute (SYKE), Nature solutions unit, Helsinki, Finland * Moth traits were gathered from  Yazdanian, M., Kankaanpää, T., Itämies, J., Leinonen, R., Merckx, T., Pöyry, J., . . . Kivelä, S. M. (2023). Ecological and life-history traits predict temporal trends in biomass of boreal moths. *Insect Conservation and Diversity, n/a*(n/a), 1-16. doi:[https://doi.org/10.1111/icad.12657](https://doi.org/10.1111/icad.12657) Hällfors, M., Pöyry, J., Heliölä, J., Kohonen, I., Kuussaari, M., Leinonen, R., . . . Saastamoinen, M. (2021). Combining range and phenology shifts offers a winning strategy for boreal Lepidoptera. *Ecology letters, 24*(8), 1619-1632. doi:[https://doi.org/10.1111/ele.13774](https://doi.org/10.1111/ele.13774) * Climatic information: All climatic covariates were derived from 10x10 km gridded data provided by the Finnish Meteorological Institute (FMI; (Aalto, Pirinen, & Jylhä, 2016). * Habitat information: CORINE land cover (CLC) database (Feranec, 2016), as available for years 2000, 2006, 2012 and 2018. New prepared data and results from the analyses are available with them.  Code and data have been uploaded to zenodo to match a (CC BY 4.0) licence. ## Code/Software All analyses were done using Rstudio: RStudio 2023.06.2+561 "Mountain Hydrangea" Release (de44a3118f7963972e24a78b7a1ad48b4be8a217, 2023-08-23) for Ubuntu Focal Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) rstudio/2023.06.2+561 Chrome/110.0.5481.208 Electron/23.3.0 Safari/537.36 platform x86_64-pc-linux-gnu arch x86_64 os linux-gnu system x86_64, linux-gnu status major 4 minor 2.1 year 2022 month 06 day 23 svn rev 82513 language R version.string R version 4.2.1 (2022-06-23) R libraries and their version are displayed in the metadata file.