DOI: 10.5281/zenodo.14253522
title: Shifts in global lake littoral habitats under intensifying hydrological variability and warming

description: Shifts in global lake littoral habitats under intensifying hydrological variability and warming

Introduction

This repository contains the necessary code to reproduce the results of the manuscript "Shifts in global lake littoral habitats under intensifying hydrological variability and warming" (currently under review). Due to the large volume of original meteorological input data and model simulation results (daily scale), the raw data are not included in this archive. The source data provided in this archive includes monthly temperature simulation results, records of detected heatwave events based on daily temperature data, and monthly lake surface extent data (from Li et al.,2025).

How to Run the Scripts

System Requirements

Some of the code requires loading large datasets into RAM, so it is recommended to have at least 64 GB of RAM (for Windows users).

Data Preparation





First, download all the files from this repository to an empty folder and unzip all the .zip files. After unzipping, you should have three folders: Data, Analysis_code, and Fig_code, as well as 15 folders named monthlyProfileInt_X_Y.




Create a new empty folder named monthlyData under the Data folder, and move each .mat file from the monthlyProfileInt_X_Y folders into it. After this step, Data\monthlyData will contain 143 files named monthlyProfileInt_X.mat each containing a subset of results from approximately 1.42 million lake simulations.



Data and code description

The input source data includes:





depthSensitivityResult.mat: Sensitivity analysis result of different depths of lakes by the FLake model (Extended Data Fig.9).




era5Trend:Trend in ERA5-land meteorological datasets used for attribution analysis of lake littoral warming (Extended Data Fig.5).




heatwaveAll: Lake heatwave event records extracted from daily temperature simulation results for each lake. For each lake, there are six columns corresponding to start dates, end dates, durations, maximum intensities, cumulative intensities, and heatwave categories.




KeuSensitivityTrend.mat: Sensitivity analysis result of different Keu values of lakes by the FLake model (Extended Data Fig.7).




lake_basin_idmatch.mat: Match lakes to hydrological basins (Extended Data Fig.4).




lake2Cell.mat: Map lakes to 1-degree grid cells by HydroLAKES ids.




lake2CellAreaId: Map lakes to 1-degree grid cells by HydroLAKES ids sorted in the lake area dataset.




lake3D.mat: Results of the 3D lake model and the corresponding results of the 1D model in nine representative lakes (Extended Data Fig.10).




modelValidation.mat: Validation results the for 1D model for 106 lakes (Extended Data Fig.6 and 8).




lakeArea.csv: Monthly scale lake area data.




lakeAreaId.csv: HydroLAKES ids of the lake area dataset.




lakeSDD.csv: Contains the SDD values for each lake.




GLOBathy_hAV_relationships.nc: Lake bathymetry data from the GLOBathy dataset, including lake depth and the lake surface area-elevation relationship function parameters.




monthlyData\monthlyrProfileInt_X.mat: Lake temperature simulation results from 2000/01 to 2023/12 stored in integer format. Lake temperatures (in degrees Celsius) are multiplied by 100, and missing values are represented by 9999. The three dimensions of each cell (lake) correspond to model (GOTM, Simstrat, FLake, MyLake), month(Jan 2000 to Dec 2023), and depth (0 to the maximum depth). The maximum depth was defined as the smallest integer greater than or equal to the lake depths provided by GLOBathy. The vertical resolution was set to 0.5 m for lakes with maximum depth ≥ 10 m or to 1/20 of the maximum depth for depths < 10 m. The lakes are sorted according to the HydroLake lake id sequence. For example, Partition 0 contains Lake 1 to Lake 10,000.



You can run the following code in the order given (MATLAB 2024b or newer version) to generate the data required for plotting:





lake_littoral_temperatures_hottest_month_1.m: This script reads monthly temperature simulation results to generate the following data: temperature profiles of the hottest month in global lake littoral zones (hottestMonthProfiles.mat), monthly temperature series for global lake littoral zones (littoralTemperature.mat), and the temperature series for the hottest month in global lake littoral zones (littoralTempHottestMonth). In addition, this script also generates the index of the hottest month of each lake (hottestMonthIndex.mat).This script is time-consuming and may take ~ one hours to run.




high_temperature_event_2.m: This script generates global lake high-temperature event results (monthlyHighTemperatureEvents.mat) based on heatwave event records from global lake littoral zones.




compound_event_3.m: This script generates global lake high/low water extreme event data (extremeWaterSurface.mat) and global lake high-temperature-high-water (HT-HW)/high-temperature-low-water (HT-LW) compound extreme event data (compoundExtremeEvent.mat) based on high-temperature event records (monthlyHighTemperatureEvents.mat) and global lake monthly surface extent series (lakeArea.csv).




isothermal_line_shift_4.m: This script generates data on isothermal line shifts between the early 12 years (2000-2011) and the late 12 years (2012-2023) (isothermMovement.mat), based on temperature profiles of the hottest month in global lake littoral zones (hottestMonthProfiles.mat). The output data includes the movement distance of 20 evenly spaced isothermal lines within each lake, as well as integer temperature isothermal lines with each lake. (For details, please refer to the manuscript.)




isothermal_line_shift_compoundevent_5.m: This script takes compound extreme event records (compoundExtremeEvent.mat) and monthly temperature profile data (monthlyrProfileInt_X.mat) as input and generates the isothermal line shift distance during compound extreme events of HT-LW (isothermalChangeCompoundExtremeEvent.mat). This script is also time-consuming and may take ~ one hour to run.




littoral_volume_rate_6.m: This script takes lake monthly area data as input and generates the littoral zone volume percentage, littoral zone volume, and total lake water volume (littoralVolumeRate.mat).




nonoverlap_rate_extremeevent_7.m: This script calculates the non-overlap rate of lake littoral habitats (nonoverlapResultsCompoundEvent.mat) during HT-LW compound extreme events based on isothermal line shifts during global lake compound extreme events (isothermalChangeCompoundExtremeEvent.mat), compound extreme event data records (compoundExtremeEvent.mat), and lake monthly surface extent data (lakeArea.csv).




seasonal_littoral_nonoverlap_rates_8.m: This script calculates the seasonal non-overlap rate (seasonalNonoverlapRate.mat) of global lake littoral zones, based on global lake monthly surface extent series and lake bathymetry, SDD, and other related data.




annual_littoral_nonoverlap_rates_9.m: This script calculates the seasonal non-overlap rate (yearlyNonoverlapRate.mat) of global lake littoral zones, based on global lake monthly surface extent series and lake bathymetry, SDD, and other related data.



You can use Fig1_plot.m, Fig2_plot.m, Fig3_plot.m, Fig5_plot.m, and Ex_fig2_plot.m to Ex_fig10_plot.m to plot corresponding figures. These figures are further modified by Adobe Illustrator.