Skip to content

Commit

Permalink
bug fix and new regions
Browse files Browse the repository at this point in the history
  • Loading branch information
ledm committed Nov 21, 2024
1 parent b95efd6 commit 4ff85c0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions bgcval2/bgcvaltools/makeMask.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bgcval2/functions/circulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion key_files/salinity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion key_files/temperature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down

0 comments on commit 4ff85c0

Please sign in to comment.