From 144ac00ae6479084a18209002f47972ed6592ea4 Mon Sep 17 00:00:00 2001 From: Carolyn Begeman Date: Thu, 31 Oct 2024 10:20:10 -0500 Subject: [PATCH] include land ice frazil in land ice mass terms --- mpas_analysis/ocean/conservation.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mpas_analysis/ocean/conservation.py b/mpas_analysis/ocean/conservation.py index 9d224d6d8..ed52ab2d6 100644 --- a/mpas_analysis/ocean/conservation.py +++ b/mpas_analysis/ocean/conservation.py @@ -199,7 +199,7 @@ def setup_and_check(self): 'land_ice_ssh_change': ['landIceSshChange'], 'land_ice_mass_flux': ['landIceMassFlux'], 'land_ice_mass_flux_components': ['accumulatedIcebergFlux', - 'accumulatedLandIceFlux', + 'accumulatedLandIceFluxTotal', 'accumulatedRemovedRiverRunoffFlux', 'accumulatedRemovedIceRunoffFlux']} @@ -208,16 +208,21 @@ def setup_and_check(self): 'massAnomaly': ['massChange', 'netMassFlux'], 'energyAnomaly': ['energyChange', 'netEnergyFlux'], 'saltAnomaly': ['saltChange', 'netSaltFlux'], + 'accumulatedLandIceFluxTotal': ['accumulatedLandIceFlux', + 'accumulatedLandIceFrazilFlux'], 'landIceMassFlux': ['accumulatedIcebergFlux', 'accumulatedLandIceFlux', + 'accumulatedLandIceFrazilFlux', 'accumulatedRemovedRiverRunoffFlux', 'accumulatedRemovedIceRunoffFlux'], 'landIceSshChange': ['accumulatedIcebergFlux', 'accumulatedLandIceFlux', + 'accumulatedLandIceFrazilFlux', 'accumulatedRemovedRiverRunoffFlux', 'accumulatedRemovedIceRunoffFlux'], 'landIceMassChange': ['accumulatedIcebergFlux', 'accumulatedLandIceFlux', + 'accumulatedLandIceFrazilFlux', 'accumulatedRemovedRiverRunoffFlux', 'accumulatedRemovedIceRunoffFlux']} @@ -537,9 +542,14 @@ def _get_variable(self, ds, varname, mks=False): # Convert from kg/month to kg variable = np.cumsum(land_ice_mass_flux) + elif varname == 'accumulatedLandIceFluxTotal': + variable = self._get_variable(ds, 'accumulatedLandIceFlux', mks=True) + \ + self._get_variable(ds, 'accumulatedLandIceFrazilFlux', mks=True) + elif varname == 'landIceMassFlux': variable = self._get_variable(ds, 'accumulatedIcebergFlux', mks=True) + \ self._get_variable(ds, 'accumulatedLandIceFlux', mks=True) + \ + self._get_variable(ds, 'accumulatedLandIceFrazilFlux', mks=True) + \ self._get_variable(ds, 'accumulatedRemovedRiverRunoffFlux', mks=True) + \ self._get_variable(ds, 'accumulatedRemovedIceRunoffFlux', mks=True)