From 4ff85c0f7f2ad7de698d69ad29ba924b0ec50e06 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Thu, 21 Nov 2024 09:43:20 +0000 Subject: [PATCH] bug fix and new regions --- bgcval2/bgcvaltools/makeMask.py | 17 +++++++++++++++++ bgcval2/functions/circulation.py | 2 +- key_files/salinity.yml | 2 +- key_files/temperature.yml | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/bgcval2/bgcvaltools/makeMask.py b/bgcval2/bgcvaltools/makeMask.py index eae9603..194da47 100644 --- a/bgcval2/bgcvaltools/makeMask.py +++ b/bgcval2/bgcvaltools/makeMask.py @@ -201,6 +201,8 @@ def makeMask(name, newSlice, xt, xz, xy, xx, xd, debug=False): if newSlice == 'AMM': return np.ma.masked_outside(bvt.makeLonSafeArr(xx), -20., 13.).mask + np.ma.masked_outside(xy, 40., 65.).mask + + if newSlice == 'NorthEastAtlantic': if newSlice == 'SouthernOcean': @@ -347,6 +349,14 @@ def makeMask(name, newSlice, xt, xz, xy, xx, xd, debug=False): mx = np.ma.masked_outside(xx, -15., 10.).mask mx += np.ma.masked_outside(xy, 67., 76.).mask return mx + + if newSlice == 'NorthEastAtlantic': + + mx = np.ma.masked_outside(xx, -25., -2.).mask + mx += np.ma.masked_outside(xy, 53., 65.).mask + return mx + #65-75:20W-15E + if newSlice == 'Cornwall': @@ -417,6 +427,13 @@ def makeMask(name, newSlice, xt, xz, xy, xx, xd, debug=False): mx += np.ma.masked_outside(xy, 67., 76.).mask return mx + if newSlice == 'subpolar': + # subpolar North Atlantic (50–70° N and 70° W–0° E) + # from https://www.nature.com/articles/s41561-024-01568-1 + mx = np.ma.masked_outside(xx, -70., 0.).mask + mx += np.ma.masked_outside(xy, 50., 70.).mask + return mx + if newSlice == 'NorthernSubpolarPacific': mx = np.ma.masked_inside(xx, -100., 120.).mask mx += np.ma.masked_inside(xx, 260., 365.).mask diff --git a/bgcval2/functions/circulation.py b/bgcval2/functions/circulation.py index f013d92..192cf34 100644 --- a/bgcval2/functions/circulation.py +++ b/bgcval2/functions/circulation.py @@ -352,7 +352,7 @@ def TwentySixNorth(nc, keys, lat='26N', return_max_depth=False, **kwargs): e1v_AMOC = e1v_AMOC55N alttmask_AMOC = alttmask_AMOC55N[:] tmask_AMOC = tmask_AMOC55N - e3v_AMOC = e3v_AMOC44N + e3v_AMOC = e3v_AMOC55N else: raise ValueError('Region not recognised', lat) diff --git a/key_files/salinity.yml b/key_files/salinity.yml index 5472595..c045ccf 100644 --- a/key_files/salinity.yml +++ b/key_files/salinity.yml @@ -20,4 +20,4 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface 500m -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean SPNA STNA GINseas LabradorSea IrmingerSea LIGINseas EquatorialAtlanticOcean LIseas +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean SPNA STNA GINseas LabradorSea IrmingerSea LIGINseas EquatorialAtlanticOcean LIseas subpolar diff --git a/key_files/temperature.yml b/key_files/temperature.yml index 81b79b5..581634e 100644 --- a/key_files/temperature.yml +++ b/key_files/temperature.yml @@ -21,7 +21,7 @@ data_convert : NoChange data_tdict : ZeroToZero layers : Surface 500m -regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean SPNA STNA GINseas LabradorSea IrmingerSea LIGINseas LIseas EquatorialAtlanticOcean # NorthHemisphere SouthHemisphere +regions : Global ignoreInlandSeas SouthernOcean ArcticOcean Equator10 NorthPacificOcean SouthPacificOcean NorthAtlanticOcean SouthAtlanticOcean SPNA STNA GINseas LabradorSea IrmingerSea LIGINseas LIseas EquatorialAtlanticOcean subpolar # NorthHemisphere SouthHemisphere