From f97787955ddba4ad52a189c1ca0018b05fc3e97d Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sat, 2 Sep 2023 13:08:03 +0200 Subject: [PATCH] Update variables checked in DISMF performance test --- .../global_ocean/performance_test/__init__.py | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/compass/ocean/tests/global_ocean/performance_test/__init__.py b/compass/ocean/tests/global_ocean/performance_test/__init__.py index 0487f4f9f3..2b027eda8c 100644 --- a/compass/ocean/tests/global_ocean/performance_test/__init__.py +++ b/compass/ocean/tests/global_ocean/performance_test/__init__.py @@ -63,6 +63,24 @@ def validate(self): Test cases can override this method to perform validation of variables and timers """ + + common_variables = [ + 'ssh', 'landIcePressure', 'landIceDraft', 'landIceFraction', + 'landIceMask', 'topDrag', 'topDragMagnitude', + 'landIceFreshwaterFlux', 'landIceHeatFlux', + 'accumulatedLandIceMass'] + land_ice_variables = { + 'prognostic_ice_shelf_melt': common_variables + [ + 'landIceFrictionVelocity', 'heatFluxToLandIce', + 'landIceBoundaryLayerTemperature', + 'landIceBoundaryLayerSalinity', + 'landIceHeatTransferVelocity', + 'landIceSaltTransferVelocity', + 'landIceInterfaceTemperature', + 'landIceInterfaceSalinity', 'accumulatedLandIceHeat'], + 'data_ice_shelf_melt': common_variables + } + for step in self.steps.values(): step_subdir = step.subdir variables = ['temperature', 'salinity', 'layerThickness', @@ -72,22 +90,8 @@ def validate(self): filename1=f'{step_subdir}/output.nc') if self.mesh.with_ice_shelf_cavities: - variables = [ - 'ssh', 'landIcePressure', 'landIceDraft', - 'landIceFraction', 'landIceMask', - 'landIceFrictionVelocity', 'topDrag', - 'topDragMagnitude', 'landIceFreshwaterFlux', - 'landIceHeatFlux', 'heatFluxToLandIce', - 'landIceBoundaryLayerTemperature', - 'landIceBoundaryLayerSalinity', - 'landIceHeatTransferVelocity', - 'landIceSaltTransferVelocity', - 'landIceInterfaceTemperature', - 'landIceInterfaceSalinity', 'accumulatedLandIceMass', - 'accumulatedLandIceHeat'] - compare_variables( - test_case=self, variables=variables, + test_case=self, variables=land_ice_variables[step.name], filename1=f'{step_subdir}/land_ice_fluxes.nc') timers = ['time integration']