From 88b922d1e2ecf609527b2120f181784b265935e2 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Mon, 13 May 2024 13:22:32 +0100 Subject: [PATCH] Working in place. --- bgcval2/bgcvaltools/pftnames.py | 9 +++++++++ bgcval2/timeseries/timeseriesTools.py | 15 ++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/bgcval2/bgcvaltools/pftnames.py b/bgcval2/bgcvaltools/pftnames.py index b2f8f557..fb37e422 100644 --- a/bgcval2/bgcvaltools/pftnames.py +++ b/bgcval2/bgcvaltools/pftnames.py @@ -250,7 +250,16 @@ def makeLongNameDict(): lnd['AtlanticSubtropicSalinity'] = 'Atlantic Subtropic Salinity' lnd['SubtropicNorthAtlantic'] = 'Subtropic North Atlantic' + + lnd['Surfaceto100m'] = 'Surface-to-100m' + lnd['Surfaceto200m'] = 'Surface-to-200m' + lnd['Surfaceto300m'] = 'Surface-to-300m' + lnd['Surfaceto400m'] = 'Surface-to-400m' + lnd['Surfaceto500m'] = 'Surface-to-500m' + lnd['Surfaceto600m'] = 'Surface-to-600m' + lnd['Surfaceto700m'] = 'Surface-to-700m' lnd['Surfaceto800m'] = 'Surface-to-800m' + lnd['Surfaceto2000m'] = 'Surface-to-2000m' lnd['TotalHeatFlux'] = "Global Total Heat Flux" lnd['HeatFlux'] = "Heat Flux" diff --git a/bgcval2/timeseries/timeseriesTools.py b/bgcval2/timeseries/timeseriesTools.py index 0de5a52c..8f207d21 100644 --- a/bgcval2/timeseries/timeseriesTools.py +++ b/bgcval2/timeseries/timeseriesTools.py @@ -204,15 +204,16 @@ def getHorizontalSlice(nc, coords, details, layer, data=''): return ApplyDepthSlice(data, k_surf) - ApplyDepthSlice(data, k_low) elif layer in [ - 'Surface to 100m', 'Surface to 300m', 'Surface to 700m', 'Surfaceto800m', - 'Surface to 2000m' + 'Surfaceto100m', 'Surfaceto300m', 'Surfaceto700m', + 'Surfaceto500m', 'Surfaceto800m', + 'Surfaceto2000m' ]: - if layer == 'Surface to 100m': z = 100. - if layer == 'Surface to 300m': z = 300. - if layer == 'Surface to 500m': z = 500. - if layer == 'Surface to 700m': z = 700. + if layer == 'Surfaceto100m': z = 100. + if layer == 'Surfaceto300m': z = 300. + if layer == 'Surfaceto500m': z = 500. + if layer == 'Surfaceto700m': z = 700. if layer == 'Surfaceto800m': z = 800. - if layer == 'Surface to 2000m': z = 2000. + if layer == 'Surfaceto2000m': z = 2000. k_surf = bvt.getORCAdepth(0., nc.variables[coords['z']][:],