DOI: 10.5281/zenodo.13332326
title: Runoff from Greenland's Firn Area - Why do MODIS, RCMs and a Firn Model disagree? - Code and Data

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

 

Basic workflow

Table 1 lists the projects, the pieces of code in the projects 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: This table might not display properly, please refer to the file _README_overview.pdf. 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. (in review) 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

Unless mentioned otherwise, all input data required is provided in this repository. Input files for one piece of code are at the same time the output of a piece of code that needs to be run before.

Note 1: due to space constraints only the so called “test” data set for runoff limit detection is provided. The full input data to Greenland-wide runoff limit detection are too large in volume but can be obtained from the authors.

Note 2: While we only provide the test data for the MODIS runoff limit detection, we provide the full output of the Greenland-wide runoff limit detection (these data are small in volume).

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

or for 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

/flash/tedstona/MARv.HorstRCMStudy_20240624/*

what is the DEM, probably the same as used elsewhere?

flowline Polygons

/flash/tedstona/_list_PolyIDs.xlsx

Why output still to 'MAR-v3.12.1-rlim-slush.nc'? Probably simply not changed without any effect?

 

Input to Greenland_RCM_analysis_prep/modis_vs_racmo.py

/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

è This file has not been tested whether it 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

è This file has not been tested whether it 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

è Certain data sets (indicated below) are not provided as they would exceed the available space in the repository. They can be obtained at no conditions from the authors

è This file has not been tested whether it would also works with the “test” data

Too large: /FDM_Greenland-wide/* 

Too large: /RACMO-FDM_K-Transect_updated/* 

Too large: /RACMO_Greenland-wide/* 

Too large: /MARv3.14_K-transect_continuous/*

Too large: 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

 

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

 

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)