Skip to content

Commit

Permalink
Update variables checked in DISMF performance test
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Sep 2, 2023
1 parent c2e565d commit 5f754e7
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions compass/ocean/tests/global_ocean/performance_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ def validate(self):
Test cases can override this method to perform validation of variables
and timers
"""

common_variables = [
'ssh', 'landIcePressure', 'landIceDraft',
'landIceFraction', 'landIceMask',
'landIceFrictionVelocity', 'topDrag',
'topDragMagnitude', 'landIceFreshwaterFlux',
'landIceHeatFlux', 'accumulatedLandIceMass']
land_ice_variables = {
'prognostic_ice_shelf_melt': common_variables + [
'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',
Expand All @@ -72,22 +92,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']
Expand Down

0 comments on commit 5f754e7

Please sign in to comment.