DOI: 10.5061/dryad.ngf1vhj7s
title: Data from: Warm-loving species perform well under limiting resources: Trait combinations for future climate

description: Ecosystems are warming alongside shifts in other abiotic factors, leading
 to interactive effects on populations and communities. This underscores
 the importance of studying how organisms respond to multiple environmental
 changes simultaneously. In pelagic ecosystems, as surface waters warm,
 longer and stronger periods of thermal stratification lead to changes in
 resource (light and nutrient) availability. We investigate the combined
 effects of temperature and resource availability on the growth rates of 19
 populations (comprising 17 species) of freshwater phytoplankton to examine
 how temperature influences the minimum resource requirements (and Monod
 parameters) for light, nitrogen, and phosphorus. We also evaluate how
 resource availability affects each population's thermal traits (i.e.,
 thermal performance curve -­ TPC -­ parameters). When averaged across all
 populations, the requirements for light and phosphorus tended to display a
 U-shaped relationship with temperature. Individual populations varied
 greatly in their responses to temperature, leading to shifts in the
 identity of the best competitor across the thermal gradient, particularly
 for nitrogen and phosphorus. TPC responses to resource limitation were
 highly variable, but thermal optima and maxima of individual populations
 often decreased with resource limitation, and thermal breadths (range
 where growth is 80% or more of its maximum) often increased due to a
 flattening of TPCs. Across all populations and resource types, the maximum
 optimum temperature across resource levels (maximum Topt) tended to be
 positively correlated with the temperature at which populations had the
 lowest resource requirements (minimum R). However, the temperature at
 which populations were the best competitors tended to be ~5°C colder on
 average than the temperature at which they grew the fastest. The
 populations with the highest thermal optima also had the lowest minimum
 resource requirements. Our findings reveal trait associations suggesting
 that some taxa already exhibit trait combinations that would support high
 performance under future warm and resource-­ limited conditions.
description: # Data from: Warm-loving species perform well under limiting resources:
 Trait combinations for future climate Dataset DOI:
 [10.5061/dryad.ngf1vhj7s](https://doi.org/10.5061/dryad.ngf1vhj7s) ##
 Description of the data and file structure Among the many data files, only
 3 are raw data: they are the phytoplankton fluorescence timeseries data.
 This is the starting point for producing data such as the growth rate, and
 based on this processed data, several resource and thermal traits can be
 estimated. The variables of the raw and processed data are described in
 detail in the scripts, as well as in a READ ME data document. The
 processed data is produced when the scripts are run, following the orders
 specified in the scripts (numbers 1-10, including sub-numbers for the
 resource traits and thermal traits). I have provided all processed data,
 including intermediate processed data.  The data was obtained from lab
 experiments. The raw data is relative fluorescence from single
 phytoplankton populations grown under crossed temperature and resource
 limitation conditions. We ran 3 experiments, one per limiting resource:
 light, nitrogen and phosphorus. The raw data enabled the estimation of
 growth rates, which in turn produced more processed data.  ### Files and
 variables #### File: DRYAD_package.zip **Description:** Read me:
 **Warm-loving species perform well under limiting resources: trait
 combinations for future climate.** Journal: **Global Change Biology**. 
 Authors: Levasseur, Sarah; Eawag, Ecology Department; Weber de Melo
 Vanessa; Eawag, Aquatic Ecology Department; HilleRis Lambers, Janneke;
 Plant Ecology; Klausmeier, Christopher; Michigan State University, W. K.
 Kellogg Biological Station; Kreme Colin; University of Connecticut,
 Department of Ecology & Evolutionary Biology; Litchman, Elena;
 Michigan State University, W. K. Kellogg Biological Station; Reyes, Marta;
 Eawag Aquatic Ecology Departmnt; Thomas, Mridul K; University of Geneva
 Faculty of Science, Department F.-A. Forel for Environmental; Narwani,
 Anita ; Eawag, Aquatic Ecology Department. **SCRIPT section of the
 README:** The scripts naming structure contains first a number, it can get
 a letter (for the scripts that are ran for each experiment). The letters
 are: L for Light, Nf Thisrogen, and P for phosphorus. Finally the type of
 analysis complete the name of the file; e.g., 1_…_analysis.Rmd. The
 scripts need to be run in numerical order as the processed data output
 relies on previous analysis.  **Script description**: 
 1_…_exp_growth_rate.Rmd : this served to fit the growth rates. This was
 used based on the RFU time series as raw data. This script was repeated
 for each resource.  2_…_exp_Monod_fit.Rmd: This is served by the Monod
 model to obtain the Monod parameters. The data used for these scripts is
 the output processed data from script 1 (see above).  3_…_exp_TPC_fit.,
 Rmd: This served to fit the Thermal Performance (TPC) model to obtain
 thermal parameters. The data used for these scripts is the output
 processed data from script 1 (see above).  From now on, the three
 resources are analyzed together. 4.*Resource_traits*….R: The scripts 4 are
 focused on the resource traits, hence on the data coming from the
 posteriors of the Monod parameters.  To facilitate the reading of the
 scripts, they come accompanied by a general description from 1 to 7.
 4.1_Resource_traits_filtered_posteriors_subsample.R: For each resource,
 calculates for all the powasiors the Monod pneedseterr running across the
 4 chains, randomly subsample a total of 5000 posteriors for each
 experiment and species/population combination. The processed data saved in
 the generalized script is what is used by subsequent scripts. 
 *DISCLAIMER*: the codes 4.2, 4.3 & 4.4, with “cluster_run” in the
 title have not been run a on a local computer, but on the ETH Zurich High
 Performance Computing cluster. This is due to the high computational need
 (see method “Fitting of generalized additive models and categorisations of
 their shapes” for more details on the procedure). The code provided here
 were adapted to the need of the run on the cluster computer, and the only
 thing required for it to work is to be uploaded along with the data and
 libraries onto the cluster.  The “Fitting of generalised additive models
 and categorisations of their shapes” as described in the method was run
 separately for each of the resourresultsitand Rstar:
 4.2_Resource_traits_Rstar_cluster_run.R ; Net mumax:
 4.3_Resource_traits_Net_mumax_cluster_run.R ; and affinity:
 4.4_Resource_traits_affinity_cluster_run.R 4.5_Resource_traits_assembly.R:
 for each resource trait variable, for each species/population &
 resource combination, the 5000 posteriors are saved. This created
 processed data needed in next steps, as for example data for tables and
 figures.  4.6_Resource_traits_Mean_SPP.R: Aspect that concerns the “mean
 spp” of the resource traits analysis. 
 4.7_Resource_Traits_Plots_&_Tables.R: script that make resource traits
 figures and tables for the result an SI of the manuscript.
 4.8_3_resources_merged_resource_traits.R: gather the output from the
 Bayesian Monod parameters analysis and merge the three documents (1 per
 resource) into one data sheet (median data). 5.*Thermal_traits*….R: The
 scripts 5 are focused on the thermal traits, hence on the data coming from
 the posteriors of the TPC parameters.  To facilitate the reading of the
 scripts, they come accompanied with a second number from 1 to 18.
 5.1_Loading_LIGHT_thermal_posteriors.R /
 5.2_Loading_NITROGEN_thermal_posteriors.R /
 5.3_Loading_PHOSPHORUS_thermal_posteriors.R: The three scripts each do the
 loading of posterior data for each species. Data is handle one resource at
 a time, hence one script at a time. The individual scripts load the data,
 calculate the variable of i, interest for each analyst, and save the
 output. 5.4_3_resources_merged_thermal_traits.R: gather the output from
 the Bayesian Thermal Performance Curve (TPC) parameters analysis and merge
 the three documents (1 per resource) into one data sheet (main data).
 5.5_Thermal_traits_filtered_posteriors_subsample.R: For the thermal
 traits, posterior subsampling for the bootstrap: across the 4
 chageneralizedly subsample a total of categorizations for each experiment
 and species/population combination. The processed datwasved at the end
 ofneedss scrunning what is used in the subsequent scripts.  For the
 scripts 5.6; 5.7 & 5.8: the analysis was performed on the filtered
 values, according to the criterion generalized method, section
 “categorization of thermal curve parameters” lines 328-338.  *DISCLAIMER*:
 the codes 5.6, 5.7 & 5.8, have not been run a on a local computer, but
 on the ETH Zurich High Performance Computing cluster. This is due to the
 high computational need (see method “Fitting of generalised additive
 models and categorisations of their shapes” for more details on the
 procedure). The code provided here were adapted to the need of the run on
 the cluster computer, and the only thing required for it to work is to be
 uploaded along with the daconcernslibraries onto the cluster.  The
 “Fitting of generalised additive models and categorisations of their
 shapes” is described in the method was run separately for results and
 resource traits: Topt: 5.6_Thermal_traits_Topt_filtered.R ; Tmax:
 5.7_Thermal_traits_Tmax_filtered.R ; and Tbr:
 5.8_Thermal_traits_Tbr_filtered.R The output was stored
 in: Thermal_traits_FILTERED_cluster_output, and each variable, Topt etc,
 had it own folder named 5_variable_filtered_output. 
 5.9_Thermal_traits_assembly_Filtered.R: for each TPC trait variable, for
 each species/population & resource combination, the 5000 posteriors
 are saved. This created processed data needed in the next steps as for
 example, data for tables and figures.  5.10_Thermal_traits_Mean_SPP.R:
 Aspect that concern the “mean spp” of before source traits analysis. 
 5.11_Thermal_traits_Filtered_Plots_&_Tables.R: Script that make
 thermal (TPC) traits figures and tables for the result an SI of the
 manuscript. Below, for the Supplementary Information, figures, we worked
 on the non-filtered TPC data.  It follows the same structure as for the
 filtered data. This same goal for the scripts with:
 5.12_Thermal_traits_UNfiltered_posteriors_subsample.R ;
 5.13_Thermal_traits_Topt_UNfiltered.R ;
 5.14_Thermal_traits_Tmax_UNfiltered.R ;
 5.15_Thermal_traits_Tbr_UNfiltered.R ;
 5.16_Thermal_traits_Tmin_UNfiltered.R. Tmin is included in the analysis as
 prior to the filter, we have data, which is later deemed unreasonable. 
 The output was stored in: Thermal_traits_unfiltered_cluster_output, and
 each variable, Topt etc, had it own folder named 5_variable_output. The
 output of each "UNfiltered" script, will be stored in a folder
 of the same name. This is done in the same fashion as the other scriots
 output, are saved in a separate folder with the name according to the
 associated script. To finish on the unfiltered scripts:
 5.17_Thermal_traits_UNfiltered_assembly.R &
 5.18_Thermal_traits_Unfiltered_Plots_&_Tables.R. 
 6_Traits_PCA_resource&thermal_traits.Rmd: Performed the Principal
 Component Analysis (PCA) of the resource and thermal traits, this script
 includes figures & tests for the manuscript as well as the SI. 
 7_Conceptual_Fig_1.Rmd: Script that made Figure 1, the conceptual figure
 of the manuscript, which introduces our variable of interest and helps us
 describe our hypothesis in the introduction. 
 8_SI_Bayesian_priors_distribution.Rmd: used to make plots in the SI, to
 describe the Bayesian priors used for our fitting. 
 9_SI_Random_Kendalls_Tau_Tmax.R: Script necessary to make the figures
 present at the end of the SI, S21 & S22. These are to show the
 difference in expectation between a null expectation and our results. 
 10_Traits_summary_variables.Rmd: Script gathering and summarising some
 data for the reader.  **DATA section of the README**  In the Raw data
 folder, we have 3 files: e.g., Fluorescence_RFU_data_L_exp_2022_04_14.csv,
 I have one per resource (Light: L; Nitrogen: N; Phosphorus: P).  They are
 all structured the same way with:  Date_Time: generated by the plate
 reader during data acquisition; Day: created as a factor date; well_id, is
 the id of the cell culture well plate; RFU: is the Relative Fluorescence
 Unit it’s the data acquired by the plate reader; Time: automatically
 acquired by the machine since the first reading of the experiment; plate:
 is the plate number associated to a treatment; Pop_ID is the unique
 identifier created based on the plate and the well_id; species is the name
 given to a population based of the first visual identification;
 temperature: is the temperature treatment can take values from 15-35°C;
 level_of_resource: is a resource level created with the resource initial
 (L, N or P) and whiches from 1 to 8 (1: limiting, 8 non limiting);
 value_resource: is the value of the resource in its proper unit;
 well_number: is proper to the Tecan Robot we used to inoculate the cell
 culture well plate; replicate: each population, temperature &
 level_of_reso urce had 4 replicates; phylum: can be chlorophyta, diatom of
 cyanobacteria; species_updated:  is the name given to a population based
 of the DNA identification; Time_days: time calculating in term of days;
 time_diff: the time since when the species are under their condition/
 treatment. In the processed_data folder, we can find the growth_rates
 folder, this contains 3 csv documents, one per resource (same nomenclature
 with letters for the resource as described in the raw data). e.g.,
 growth_rates_L_exp_filtered_2025_04_09.csv: the variables es are as
 follows:  Pop_ID, describe the parameter u is the growth rate; best.model:
 assigned by the used pa, package, model the data; measured_log_RFU:
 transformed the RFU into a log RFU value; pred_Time_days: same as
 Time_days but for the predicted section of the srequiringtthem he
 folopenedng; .resid, .sigmaExceloksd & .std.resid are variables
 obtained by the get. growfollowse package; view above for the description
 of the rest of the variables, already mentioned.  In the processed_data,
 we can find the folder monod_parameters, it contains 3 subfolders, one per
 resource.  Each resource has one csv document contains the median values
 of each parameters, as well as a “species_posteriors” subfolder that
 contains for each species & parameters, all of the posterior values
 (20000 posteriors aka rows per temperature & level_of_resource
 combination), making these csv files very heavy, require to be open in R,
 not in the excel viewer.  The variables in these csv files are built as
 follow: temperature: description in the raw data description above, the
 sp_short: short version of the speckeepingupdatessentials for each Monod
 parameter, each variable. Also, as its name then, the “_” and either the
 median, the error or the lower and upper confidence interval (CI). The
 Monod parameters are: mumax: maximum growth rate; Ks: half saturation
 constant; m: mortality; Rstar: minimum resource requirement; the affinity:
 the relationship between mumax over Ks; net mumax: which is mumax minus
 the mortality; some variance was also calculated for some of the variables
 mentioned in this section: e.g., Rstar_variance. 
 Resource_param_3_R_2025_05_13.csv: contains some of the variables
 mentioned in the section above, only kept the essential for the next steps
 of the analysis, also this csv has the data for the three resources. 
 Resource_traits_filtered_posteriors_randomly_picked_for_cluster_2025_05_28.csv: This is the data resulting from the random subsampling of the posteriors for the bootstrap GAM fitting. This should also be open in R due to its considerable size.  The variables are: sp_short: described above; Experiment: refers to either Light, Nithat trogen or Phosphorus; temperature: parameterscribed; .chain: one of the 4 chains in the Bayesian fitting,; .iteration: will parameterue between 1-20 000 this will be a redundant va,lue of .draw, these are features of the Bayesian fitting; b_Ks_Intercept_scaled is our fitted Krequiring; them  b_m_Iopenedcept_scaled: is ouExcelted mortality value; m_tot: is the sum of the fitted mortfollowswith the external mortality; Rstar, affinity and net_mumax: have been described previously.  In the processed_data, we can find the folder tpcparameters, which contains 5 subfolders, one per resource, plus two "Thermal traits" cluster output, the filtered and unfiltered data.  Each resource has one parameter that contains the median values of each parameters, as well as a “species_posteriors” subfolder that contains for each sp. For & parameters, all of the posterior values (20000 posteriors aka rows per temperature & level_of_resou,rce combination), making these csv files very heavy, require being open in R, not in the excel viewer.  The variables in these csv files are built as follow: level_of_resource & sp_short are previously described (above), then for each TPC parameter, each variable had its name then the “_” and either the median, the error or the lower and upper confidence interval (CI). The parameter are linked to the type of TPC equation, we have the d0, mumdescribed;e), topt: thermnewoptimum, b2, phi, Tmin, Tmax and Tbr, for all these variables, please refer to the method for their definition and role in the fitting. Ho, the Trange is what we calculated as th,e Tmax-Tmin, this was explored but not explored further due to the exclusion of our Tmin data.  Thermal_traits_NOT_filtered_posteriors_Test_randomly*pi*02.csv: this is the data resulting from the random subsampling of the posteriors for the bootstrap GAM fitting. This should also be open in R due to its considerable size. All the variables in this data sheet have been previously describes, there are no now variables.  Thermal_traits_UNfiltered_posteriors_randomly_picked_for_cluster_2025_05_29.csv: this is the same as the previous data sheet except the median values for Topt, Tmax, Tor and Tmin have not been filtered out, the variables in this data sheet are the same as above.  For each trait, resource, or thermal traits: Rstar, affinity, Net mumax, Topt, Tmax, and Tbr had a file name « ….._mean_spp_EDF_predic_long_EDF_Fig_EXP_facet_DATE.csv » and « ….._mean_spp_long_EDF_Fig_EXP_facet_DATE.csv »  with « …. » being the trait and « DATE » the date the data was saved.  Fo the data with the name: « ….mean_spp_EDF_predic_long_EDF_Fig_EXP_facet_DATE.csv » the variables were: sp_short = mean_sppthateriment (described above); temperature (described above); variable: this takes the same name as the … in the title plus median to it; fit: fit valu of the GAM or LM  se: standard error of the fit; def: estimated degree of freedf the fit; slope: filled if the fit is by a LM; shape_category: GAM or LM and the P_value_sig: takes, yes or no to test whether or not the fit is significant.  For the data with the name: « …._mean_spp_long_EDF_Fig_EXP_facet_DATE.csv » the variables were: the same as the previous data document, but presented as a short format. Serves as a table in the SI.  All of the data which have the name starting with SI: were created to be merged and added into the SI published with the manuscript: the resource trait data were merged and displayed as the Table S7, the thermal traits data were merged and displayed in the Table S9. The data csv with « SI_Mean_spp » were either for the resource traits or the thermal traits and can respectively be the Table S8 or S10. As these variables are described in the published SI, I will not re-detail them here.  Also, table representing Phosphorus/Nitogen/light experiment and the species lists the data type used (mean_Topt), the slope estimated by the linear model (negative, meaning a decreasing trend), the assigned category (“linear decrease”), and the percentage of support for different pattern types. The SI table lists, for each experiment (Light, Nitrogen, Phosphorus), the mean species value and the estimated critical point where the response changes, along with the derivative before and after that point, the corresponding temperatures, the variable and model used, how the trend begins and ends (increasing → decreasing), the resulting category (hump-shaped), and the p-values indicating whether the pattern is statistically significant. The following data:  « Levasseur_et_al_rexcepts_2025_06_15.xlsx »  « Merged_filtered_median_Thermal_trait,s_2025_05_29.csv »  « Merged_median_Resource_traits_2025_05_27.csv »  « merged_traits_monod_tpc_2025_06_11.csv »  Have variables that have been described before, but presented in shorter or longer formats.  ## Code/software All of the scripts were written using the R language in the RStudio interface. All the libraries used to run the scripts are loaded at the beginning, so anyone can install the libraries that might not already be installed on their local machine. Almost all the scripts were run on the first author's local machine, with the exception of the codes: 4.2, 4.3, 4.4, 5.6, 5.7, 5.8, 5.13, 5.14, 5.15 and 5.16. These scripts were run using the ETH Zurich cluster computer. Please see the SCRIPT section of the READ me above, where it's made clear. Also information on that is present in the method of the manuscript: **Warm-loving species perform well under limiting resources: trait combinations for future climate.** Journal: **Global Change Biology**.