@@ -41,6 +41,18 @@ def __init__(self):
41
41
- 570 , - 630 , - 690 , - 750 , - 810 , - 870 , - 930 , - 990 , - 1050 , - 1110 , - 1170 ,\
42
42
- 1230 , - 1290 , - 1350 , - 1410 , - 1470 , - 1530 , - 1590 , - 1650 , - 1710 , - 1770 ), dtype = 'float64' )
43
43
44
+ # create bnds array
45
+ self .ismip6shelfMelt_zBndsOcean = np .zeros ((2 , len (self .ismip6shelfMelt_zOcean )))
46
+ self .ismip6shelfMelt_zBndsOcean [0 , 0 ] = 0.0
47
+ for z in range (1 , len (self .ismip6shelfMelt_zOcean )):
48
+ self .ismip6shelfMelt_zBndsOcean [0 , z ] = 0.5 * (self .ismip6shelfMelt_zOcean [z - 1 ] +
49
+ self .ismip6shelfMelt_zOcean [z ])
50
+ for z in range (0 , len (self .ismip6shelfMelt_zOcean ) - 1 ):
51
+ self .ismip6shelfMelt_zBndsOcean [1 , z ] = 0.5 * (self .ismip6shelfMelt_zOcean [z ] +
52
+ self .ismip6shelfMelt_zOcean [z + 1 ])
53
+ self .ismip6shelfMelt_zBndsOcean [1 , - 1 ] = self .ismip6shelfMelt_zOcean [- 1 ] + \
54
+ (self .ismip6shelfMelt_zOcean [- 1 ] - self .ismip6shelfMelt_zBndsOcean [0 , - 1 ])
55
+
44
56
def prepare_mpaso_mesh_data (self ):
45
57
46
58
#open mpas ocean mesh
@@ -335,6 +347,7 @@ def remap_mpas_to_mali(self, year):
335
347
ds_remapped = xr .open_dataset (tmp_maliDestFile , decode_times = False , decode_cf = False )
336
348
ds_out = xr .Dataset (data_vars = {'ismip6shelfMelt_3dThermalForcing' : ds_remapped ['ismip6shelfMelt_3dThermalForcing' ]})
337
349
ds_out ['ismip6shelfMelt_zOcean' ] = xr .DataArray (self .ismip6shelfMelt_zOcean , dims = ("nISMIP6OceanLayers" ))
350
+ ds_out ['ismip6shelfMelt_zBndsOcean' ] = xr .DataArray (self .ismip6shelfMelt_zBndsOcean , dims = ("TWO" , "nISMIP6OceanLayers" ))
338
351
if self .have_landIceFreshwaterFlux :
339
352
ds_out ['floatingBasalMassBal' ] = ds_remapped ['floatingBasalMassBal' ]
340
353
0 commit comments