From ce8d86b15ea4b0c2d5a954158546944b4509ca74 Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Tue, 12 May 2026 13:59:21 -0600 Subject: [PATCH 1/2] Account for freshwater density when calculating sea-level equivalent --- landice/output_processing_li/plot_globalStats.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/landice/output_processing_li/plot_globalStats.py b/landice/output_processing_li/plot_globalStats.py index 617004818..fede4f549 100755 --- a/landice/output_processing_li/plot_globalStats.py +++ b/landice/output_processing_li/plot_globalStats.py @@ -15,6 +15,7 @@ rhoi = 910.0 rhosw = 1028. +rhofw = 1000. print("** Gathering information. (Invoke with --help for more details. All arguments are optional)") parser = ArgumentParser(description=__doc__) @@ -188,10 +189,16 @@ def VAF2seaLevel(vol): - return vol / scaleVol / 3.62e14 * rhoi / rhosw * 1000. + """ + This function accounts for the fact that ice, when melted, + takes on freshwater density. This density correction is only + applied to the volume above flotation, when in reality, it should + be applied for all melted ice. + """ + return vol / scaleVol / 3.62e14 * rhoi / rhofw * 1000. def seaLevel2VAF(vol): - return vol * scaleVol * 3.62e14 * rhosw / rhoi / 1000. + return vol * scaleVol * 3.62e14 * rhofw / rhoi / 1000. def addSeaLevAx(axName): seaLevAx = axName.secondary_yaxis('right', functions=(VAF2seaLevel, seaLevel2VAF)) From 39cfc318561173efe77d6e2cb87dbd56b4bb911d Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Tue, 12 May 2026 14:01:38 -0600 Subject: [PATCH 2/2] add variables for ocean area and m to mm constants --- landice/output_processing_li/plot_globalStats.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/landice/output_processing_li/plot_globalStats.py b/landice/output_processing_li/plot_globalStats.py index fede4f549..9800efdf5 100755 --- a/landice/output_processing_li/plot_globalStats.py +++ b/landice/output_processing_li/plot_globalStats.py @@ -14,8 +14,10 @@ import textwrap rhoi = 910.0 -rhosw = 1028. -rhofw = 1000. +rhosw = 1028.0 +rhofw = 1000.0 +Aocn = 3.625e14 # m^2 (Gregory et al. 2019) +m_to_mm = 1000.0 print("** Gathering information. (Invoke with --help for more details. All arguments are optional)") parser = ArgumentParser(description=__doc__) @@ -195,10 +197,10 @@ def VAF2seaLevel(vol): applied to the volume above flotation, when in reality, it should be applied for all melted ice. """ - return vol / scaleVol / 3.62e14 * rhoi / rhofw * 1000. + return vol / scaleVol / Aocn * rhoi / rhofw * m_to_mm def seaLevel2VAF(vol): - return vol * scaleVol * 3.62e14 * rhofw / rhoi / 1000. + return vol * scaleVol * Aocn * rhofw / rhoi / m_to_mm def addSeaLevAx(axName): seaLevAx = axName.secondary_yaxis('right', functions=(VAF2seaLevel, seaLevel2VAF))