Published January 22, 2026 | Version v2

Runoff from Greenland's Firn Area - Why do MODIS, RCMs and a Firn Model disagree? - Code and Data

Description

README v2 –  code and data for obtaining MODIS runoff limits and comparison to and between MAR and RACMO / IMAU-FDM

 

Differences to v1 of this repository

This version v2 of the repository includes the follwing changes compared to v1:

- contains new and updated versions of the code used in Machguth et al. (2026). Changes to the code were done in response to reviewers' requests for changes to the figures. updated code can be found mainly in the projects "Greenland_RCM_analysis" and "Notebooks". Elsewhere changes are minor or absent.

- provides also the MAR, RACMO and IMAU-FDM data. In the case of the MAR data, most variables that were not used in the study Machguth et al. (2026) were removed. This was done to reduce the data volume of this repository. Note that for easier up and download to and from this repository, the Greenland-wide MAR data were split  into four ZIP files. All included .nc files can be merged again into one folder after download.

- contains two tables (_depth_of_ice_slab_KAN_U.xlsx and _KAN_U_10m_firn_temperatures.xlsx) that were missing from v1 of this repository.

- clarifications, corrections and additional information in the README, as well as a correctly rendered Table 1.

 

Basic workflow

Table 1 lists the projects, the pieces of code in each project and the key output of each piece of code. This serves at illustrating the basic workflow. More detailed information on required input is provided below. The README files of the various projects provide details on how to use the code.

 

Table 1: General project overview. The projects and code are shown in the order they are intended to be used. In italic are parts of code that were not used for Machguth et al. (2026) but instead for Machguth et al. (2022). They might not be fully compatible anymore with runoff limits Yr calculated along flowline-polygons.

 

Project

Code

Output

flowlines

crop_gdalwarp.py

DEM, cropped and reprojected to required size and grid (identical to the MODIS files)

flowline_seedpoints.py

Seedpoints to calculate flowlines

flowline.py

Flowlines and flowline- polygons

MODIS_Greenland

MODIS_array_filter.py

Daily MODIS grids filtered for outliers

MODIS_stddev_spatial.py

Daily grids of MODIS spatial standard deviation

MODIS_mean_stddev.py

Greenland-wide map of background MODIS spatial standard deviation

MODIS_NDWI_tiff_to_nc.py

MODIS NDWI converted from tiff to netCDF

MODIS_find_slush_limit.py

Table of all detected daily Yr

Greenland_RCM_analysis_prep

modis_vs_mar.py

Tables of daily MAR Yr for all flowline-polygons

modis_vs_racmo.py

Table of daily RACMO Yr for all flowline-polygons

MODIS_Greenland_analysis

MODIS_A_SLmax.py

Calculates annual maxima of the Yr, written into table. Creates plots visualizing MODIS Yr spatial and temporal distribution – only used in Machguth et al. (2022)

MODIS_A_SLanalyis.py

Plots that visualize progression and forcing behind MODIS Yr – only used in Machguth et al. (2022)

MODIS_comp_RCM_maxYs.py

For all of Greenland: Plots that compare RCM and MODIS maxYr

MODIS_comp_RCM_Ys.py

For all of Greenland: Plots that compare RCM and MODIS daily Yr

Greenland_RCM_analysis

RCM_analysis_comp_Ktransect.py

For the K-transect: Plots/tables that compare RACMO/FDM and MAR Yr as well as various RCM parameters

Jupyter notebooks

K-transect_MAR_Greenland-wide_to_K-transect.ipynb

Writes MAR .nc files that contain data only for the K-Transect

K-transect_RACMO-MAR_depth-data-plot.ipynb

For the K-transect: Plots to compare depth information of MAR and RACMO/FDM

 

Input and output data

All required input data is provided in this repository, with some limitations explained in the following. 

Note 1: Basically all data are provided to (i) run the runoff (Y_obs) limit detection, and (ii) to repeat all the RCM analysis and comparison to MODIS Y_obs. However, the MODIS data for all of Greenland are too volumous and thus only the MODIS data for the so called “test” data set for runoff limit detection are provided. These files include sat_modis_proc_test_l1.zip, sat_modis_proc_test_l2.zip, sat_modis_proc_test_l3.zip and sat_modis_proc_test_l2_NDWI.zip. The complete MODIS data (MOD10A1 and MOD09GA), however, can be downloaded from the data sources mentioned in Section 2.1 of Machguth et al. (2026).

Note 2: While we only provide the MODIS test data for the runoff limit detection, we here provide the full output of the Greenland-wide runoff limit detection.

Note 3: the PDF README provided refers to v1, please disregard.

 

Input to flowlines/crop_gdalwarp.py

arcticdem_mosaic_100m_v30_greenland_icesheet_geoidCorr.tif

 

Input to flowlines/flowline_seedpoints.py

seedline_v2.1.shp

 

Input to flowlines/flowline.py

In the case of using the test data, no seed file exists. Do not provide one, seed points will be calculated along a north-south line as specified.

greenland_vel_mosaic200_2015-2018_vx_v02-composite-crop.tif

greenland_vel_mosaic200_2015-2018_vy_v02-composite-crop.tif

dem_test_gapfilled.tif

In case of calculating flowlines Greenland-wide:

greenland_vel_mosaic500_2015-2018_vx_v02-composite-crop.tif

greenland_vel_mosaic500_2015-2018_vy_v02-composite-crop.tif

arcticdem_mosaic_500m_v30_greenland_icesheet_geoidCorr_GapFilled.tif

seedpoints_v3.4.shp

 

Input to MODIS_Greenland/MODIS_array_filter.py

/sat_modis_proc_GR_l1test/*

 

Input to MODIS_Greenland/MODIS_stddev_spatial.py

/sat_modis_proc_test_l2/*

 

Input to MODIS_Greenland/MODIS_mean_stddev.py

/sat_modis_proc_test_l3/*

dem_test_gapfilled.tif

 

Input to MODIS_Greenland/ MODIS_NDWI_tiff_to_nc.py

Input data were computed directly on Google Earth Engine, they have not been preserved, only output data exist.

 

Input to MODIS_Greenland/MODIS_find_slush_limit.py

/sat_modis_proc_test_l3/*

/sat_modis_proc_test_l2_NDWI/*

mask_greenland_icesheet/dem_test_gapfilled.tif

Ys_polygons__test_W20km.shp

flowlines__test_W20km.shp

test_MOD10A1.l3.v4_yrs2000-2021_doy126-136_stddev_median.tif

 

Input to Greenland_RCM_analysis_prep/modis_vs_mar.py

This code is a direct copy of notebooks that were used to compare Greenland-wide max Y_obs to max Y_rcm MAR. It has not been tested, not all input data might be included in the repository.

/flash/tedstona/MARv.HorstRCMStudy_20240624/*

flowline Polygons

/flash/tedstona/_list_PolyIDs.xlsx

 

Input to Greenland_RCM_analysis_prep/modis_vs_racmo.py

This code is a direct copy of notebooks that were used to compare Greenland-wide max Y_obs to max Y_rcm MAR. It has not been tested, not all input data might be included in the repository.

/flash/tedstona/RACMO/1km/runoff/*

arcticdem_mosaic_500m_v30_greenland_icesheet_GeoidCorr_GapFilled_RACMO1km.tif

racmo_polys.nc

 

Input to MODIS_Greenland_analysis/MODIS_A_SLmax.py

_test_slush-limit_output_table.xlsx

or the Greenland-wide output data:

_GR_slush-limit_output_table.xlsx

 

Input to MODIS_Greenland_analysis/MODIS_A_SLanalyis.py

KAN_U_hourly_v3_fewer_columns.xlsx

KAN_M_hourly_v3_fewer_columns.xlsx

(selected_SL_years_and_stripes_20km.xlsx: not found and was also only used in Machguth et al., 2022)

__test_table_complete_annual_max_SL.xlsx

__test_slush-limit_output_table_OnlyValidEntries.xlsx

or the Greenland-wide output data:

__GR_table_complete_annual_max_SL.xlsx

__GR_test_slush-limit_output_table_OnlyValidEntries.xlsx

 

Input to MODIS_Greenland_analysis/MODIS_comp_RCM_maxYs.py

It has not been tested whether this file also works with the “test” data.

RACMO2.3p2_ERA5_3h_FGRN055.1km-rlim-RUa1mm.xlsx

MAR-v.20240624-rlim-RUa1mm.xlsx

_stripes_with_aquifers.xlsx

__test_table_simple_annual_max_SL.xlsx

__test_table_complete_annual_max_SL.xlsx

or the Greenland-wide output data:

__GR_table_simple_annual_max_SL.xlsx

__GR_table_complete_annual_max_SL.xlsx

 

Input to MODIS_Greenland_analysis/MODIS_comp_RCM_Ys.py

It has not been tested whether this file also works with the “test” data.

__GR_slush-limit_output_table_OnlyValidEntries.xlsx

flowlines_daily_rlims_RACMO_1mmEvents_10mmAnnual_2000_2021.xlsx

flowlines_daily_rlims_MAR-v.20240624_1mmEvents_10mmAnnual_2000_2021.xlsx

 

Input to Greenland_RCM_analysis/RCM_analysis_comp_Ktransect.py

It has not been tested whether this file also works with the “test” data.

/MARv3.14_Greenland-wide_continuous_reduced/*

/FDM_Greenland-wide/* 

/RACMO-FDM_K-Transect_updated/* 

/RACMO_Greenland-wide/* 

/MARv3.14_K-transect_continuous/*

FGRN055_Masks.nc

__GR_slush-limit_output_table_OnlyValidEntries.xlsx

__GR_table_simple_annual_max_SL.xlsx

__GR_table_complete_annual_max_SL.xlsx

 

Input to _notebooks\K-transect_MAR_Greenland-wide_to_K-transect.ipynb

This notebooks applies the Bresenham algorithm to extract those RCM grid cells that are located closest along the K-Transect (or any other Transect). The output of this notebook is already provided in this repository as /MARv3.14_K-transect_continuous/* . (The input to _notebooks\K-transect_MAR_Greenland-wide_to_K-transect.ipynb would be all netCDF files of /MAR_v3.14_reduced_*/).

While this notebook can be applied to any other Greenland-wide dataset, note that (i) the IMAU-FDM data in /RACMO-FDM_K-Transect_updated/ were obtained directly from IMAU (due to the imense data volume of Greenland-wide IMAU-FDM output for all firn layers) and (ii) that the RACMO grid cells along the K-Transect are extracted on the fly in RCM_analysis_comp_Ktransect.py, also using the Bresenham algorithm.

 

Input to _notebooks\K-transect_RACMO-MAR_depth-data-plot.ipynb

_depth_of_ice_slab_KAN_U.xlsx

_KAN_U_10m_firn_temperatures.xlsx

/RACMO-FDM_K-Transect_updated/*

/MARv3.14_K-transect_continuous/*

 

Input to _notebooks\scatter_plots_production.pynb

table_influence_difference_maxysrcm_incl-albedo_v7.4.xlsx which is being written to output by Greenland_RCM_analysis\RCM_analysis_comp_Ktransect_tables.py

 

Output data

The basic output files of the runoff limit detection for all of Greenland are:

_GR_slush-limit_output_table.xlsx (written by MODIS_Greenland/MODIS_find_slush_limit.py)

__GR_slush-limit_output_table_OnlyValidEntries.xlsx (by MODIS_Greenland_analysis/MODIS_A_SLmax.py)

__GR_table_simple_annual_max_SL.xlsx  (by MODIS_Greenland_analysis/MODIS_A_SLmax.py)

__GR_table_complete_annual_max_SL.xlsx  (by MODIS_Greenland_analysis/MODIS_A_SLmax.py)

 

The basic output files of the runoff limit detection for the “test” data set are:

_test_slush-limit_output_table.xlsx (written by MODIS_Greenland/MODIS_find_slush_limit.py)

__test_slush-limit_output_table_OnlyValidEntries.xlsx (by MODIS_Greenland_analysis/MODIS_A_SLmax.py)

__test_table_simple_annual_max_SL.xlsx  (by MODIS_Greenland_analysis/MODIS_A_SLmax.py)

__test_table_complete_annual_max_SL.xlsx  (by MODIS_Greenland_analysis/MODIS_A_SLmax.py)

 

 

 

Files

code_v2.zip

Files (89.6 GB)

Name Size
md5:147f0320c8bc596b1783b701f6bdfb22
13.3 MB Download
md5:1da68deac9556e0351edc5ef773cd57b
1.4 MB Download
md5:913442c1bec201a90356e9a0efe35688
60.3 kB Download
md5:a141d95ab3b8d82209cdf3eb38e9c873
1.4 MB Download
md5:fec4ca4ead1a626e6fe643bd4aabe6f4
63.9 kB Download
md5:0d7aa63351b7668bb244b255651c546c
8.5 kB Download
md5:07251f5169c49de965c014ec341f541b
8.8 kB Download
md5:252abad5a91973697f986a1fd23ba38f
14.4 MB Download
md5:3eef99893c294443975f08b31893a822
16.8 kB Download
md5:9172ac1f0e1132c5d3519f2ebc528a28
233.3 kB Preview Download
md5:847446fddf84be587ebb524508f1802b
1.4 MB Download
md5:3732d6509c0369c62c13627250bc3feb
1.2 GB Preview Download
md5:1e9ad94bc69f810b63fca54bb8a53c89
49.3 MB Preview Download
md5:5e54ea388bf433dc217ab97f5a01df12
4.6 MB Preview Download
md5:ef4ee3be7902188558ec78e5edc5a04a
2.2 MB Preview Download
md5:e1b724ce245e528608600e34fe288dfb
1.8 GB Preview Download
md5:6540f53520276a3cf25df975b386e289
16.9 MB Download
md5:0e4bb4efc30ec129e5003a18ea2103cf
10 Bytes Download
md5:115d912eb7beac192673db426455175c
1.1 kB Download
md5:e0a4fad2770acecec7667de3da8f036c
659.6 kB Preview Download
md5:f5dc5b4e0f98499d90dd064f6af8ce9f
398 Bytes Download
md5:0c22e942b0205aa68223bcb13621b9a1
258.3 kB Download
md5:903fd4dd459ed81f303ab9a5a7684777
268 Bytes Download
md5:0f17303cb727f00488c822b448d6d105
401.5 kB Download
md5:950eaf4d722cbb2ca14818d4b1ff2bb4
578.1 kB Download
md5:0e4bb4efc30ec129e5003a18ea2103cf
10 Bytes Download
md5:05e6fdfd1e9d5cefe4f7314560bfe752
27.2 kB Download
md5:60291678e5bc4c75bbfc906e66a9f7b3
1.6 MB Preview Download
md5:f5dc5b4e0f98499d90dd064f6af8ce9f
398 Bytes Download
md5:710d7402e8e02a861b4dd6557fde9e3e
4.5 MB Download
md5:c7f53a211eaa1aac2c4ee8a7a3039321
4.5 kB Download
md5:3d0f99d50becd6d09625599869061bc3
2.2 MB Preview Download
md5:58dd9c418517143660335be68c4bfc5e
2.2 MB Preview Download
md5:20c6b32bf9058e45bfd3253e71c05ab1
49.3 MB Preview Download
md5:648b6cf4f3c2fe4cd945784dfa79b0a0
49.3 MB Preview Download
md5:fefd209f8c766d9c83964220e79601df
10.9 MB Download
md5:28c19bbcc08436ef6ed4d031d46a2793
10.3 MB Download
md5:17d829126870fe06449eeb5dbdfc06aa
247.2 MB Preview Download
md5:fc42f6cc1b682843b2b6bd70204dbf32
10.6 GB Preview Download
md5:26c10dd884cdf1a3b6ee389bf5a4cc7a
10.6 GB Preview Download
md5:db90a8be5a95d8fd38e508494edd640a
11.7 GB Preview Download
md5:5c9489709ba2698ed63ce3abbcbb68ec
13.9 GB Preview Download
md5:7d697e3f85ea9425038ccc3a2488fa62
26.8 GB Preview Download
md5:6bfbb739d66eac4a421b5f0f2bc7b172
516.8 MB Preview Download
md5:fa1c831f8052f6eaaae9752ec418e7c4
407.2 MB Preview Download
md5:aa579b5eb6ba509ea6a9b3f8be2357bb
10.1 GB Preview Download
md5:70860c08101307a20178e890349097b4
1.6 GB Preview Download
md5:ae3b3df9970b49b6523e608759bc957d
5 Bytes Download
md5:2ffe66ccce6bcc90d96bc072c62925ab
77 Bytes Download
md5:f5dc5b4e0f98499d90dd064f6af8ce9f
398 Bytes Download
md5:ac91c09d0f1207b0fe7051deaec8729a
657 Bytes Download
md5:9e4e72b40d448497a87f97e1716be742
4.2 kB Download
md5:b1716d1f50a9637c1ee177f3fca8fe3c
108 Bytes Download
md5:0e4bb4efc30ec129e5003a18ea2103cf
10 Bytes Download
md5:8f2da1c08d614bd81479f6489a8a4376
10.9 kB Download
md5:f5dc5b4e0f98499d90dd064f6af8ce9f
398 Bytes Download
md5:2dd92c83a829b096c91fbf95f481bfe4
16.1 kB Download
md5:a252f826d7d52c66fdee6b3086ef3ae2
4.7 kB Download
md5:0e4bb4efc30ec129e5003a18ea2103cf
10 Bytes Download
md5:843d1125c824f90c1a64f339ad00b916
566 Bytes Download
md5:f5dc5b4e0f98499d90dd064f6af8ce9f
398 Bytes Download
md5:6a0e6e6bd262a2d0b41d715b1b306205
288.6 kB Download
md5:9dc130677d8f7cc730c2de8b1e32b1bb
260 Bytes Download
md5:0e4bb4efc30ec129e5003a18ea2103cf
10 Bytes Download
md5:9ce385e748dd7fd0b5b0342265f7e530
12.8 kB Download
md5:f5dc5b4e0f98499d90dd064f6af8ce9f
398 Bytes Download
md5:aa04ed30ff738512d69df84d7b222f57
4.6 MB Download
md5:0a6e8c5e1fb67656ec7e342ac33e9fa5
4.2 kB Download

Additional details

Funding

European Commission
CASSANDRA - Accelerating mass loss of Greenland: firn and the shifting runoff limit 818994

Software

Programming language
Python