Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions landice/output_processing_li/plot_globalStats.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
import textwrap

rhoi = 910.0
rhosw = 1028.
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__)
Expand Down Expand Up @@ -188,10 +191,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 / Aocn * rhoi / rhofw * m_to_mm

def seaLevel2VAF(vol):
return vol * scaleVol * 3.62e14 * rhosw / rhoi / 1000.
return vol * scaleVol * Aocn * rhofw / rhoi / m_to_mm

def addSeaLevAx(axName):
seaLevAx = axName.secondary_yaxis('right', functions=(VAF2seaLevel, seaLevel2VAF))
Expand Down