@@ -779,8 +779,8 @@ at that before we continue with ``customize_masked_climatology()``.
779779 Compute the OHC from the temperature and layer thicknesses in a given
780780 climatology data sets.
781781 """
782- ds_restart = xr.open_dataset(self .restartFileName )
783- ds_restart = ds_restart .isel(Time = 0 )
782+ ds_mesh = xr.open_dataset(self .meshFilename )
783+ ds_mesh = ds_mesh .isel(Time = 0 )
784784
785785 # specific heat [J/(kg*degC)]
786786 cp = self .namelist.getfloat(' config_specific_heat_sea_water' )
@@ -789,18 +789,18 @@ at that before we continue with ``customize_masked_climatology()``.
789789
790790 units_scale_factor = 1e-9
791791
792- n_vert_levels = ds_restart .sizes[' nVertLevels' ]
792+ n_vert_levels = ds_mesh .sizes[' nVertLevels' ]
793793
794- z_mid = compute_zmid(ds_restart .bottomDepth, ds_restart .maxLevelCell- 1 ,
795- ds_restart .layerThickness)
794+ z_mid = compute_zmid(ds_mesh .bottomDepth, ds_mesh .maxLevelCell- 1 ,
795+ ds_mesh .layerThickness)
796796
797797 vert_index = xr.DataArray.from_dict(
798798 {' dims' : (' nVertLevels' ,), ' data' : np.arange(n_vert_levels)})
799799
800800 temperature = climatology[' timeMonthly_avg_activeTracers_temperature' ]
801801 layer_thickness = climatology[' timeMonthly_avg_layerThickness' ]
802802
803- masks = [vert_index < ds_restart .maxLevelCell,
803+ masks = [vert_index < ds_mesh .maxLevelCell,
804804 z_mid <= self .min_depth,
805805 z_mid >= self .max_depth]
806806 for mask in masks:
@@ -812,7 +812,7 @@ at that before we continue with ``customize_masked_climatology()``.
812812 return ohc
813813
814814 This function uses a combination of mesh information taken from an MPAS
815- restart file (available from the ``self.restartFileName `` attribute inherited
815+ mesh file (available from the ``self.meshFilename `` attribute inherited
816816from :py:class: `~mpas_analysis.shared.climatology.RemapMpasClimatologySubtask `),
817817namelist options available from the ``self.namelist `` reader (inherited from
818818:py:class: `~mpas_analysis.shared.AnalysisTask `), and ``temperature `` and
@@ -1160,8 +1160,8 @@ here is the full analysis task as described in this tutorial:
11601160 Compute the OHC from the temperature and layer thicknesses in a given
11611161 climatology data sets.
11621162 """
1163- ds_restart = xr.open_dataset(self .restartFileName )
1164- ds_restart = ds_restart .isel(Time = 0 )
1163+ ds_mesh = xr.open_dataset(self .meshFilename )
1164+ ds_mesh = ds_mesh .isel(Time = 0 )
11651165
11661166 # specific heat [J/(kg*degC)]
11671167 cp = self .namelist.getfloat(' config_specific_heat_sea_water' )
@@ -1170,18 +1170,18 @@ here is the full analysis task as described in this tutorial:
11701170
11711171 units_scale_factor = 1e-9
11721172
1173- n_vert_levels = ds_restart .sizes[' nVertLevels' ]
1173+ n_vert_levels = ds_mesh .sizes[' nVertLevels' ]
11741174
1175- z_mid = compute_zmid(ds_restart .bottomDepth, ds_restart .maxLevelCell- 1 ,
1176- ds_restart .layerThickness)
1175+ z_mid = compute_zmid(ds_mesh .bottomDepth, ds_mesh .maxLevelCell- 1 ,
1176+ ds_mesh .layerThickness)
11771177
11781178 vert_index = xr.DataArray.from_dict(
11791179 {' dims' : (' nVertLevels' ,), ' data' : np.arange(n_vert_levels)})
11801180
11811181 temperature = climatology[' timeMonthly_avg_activeTracers_temperature' ]
11821182 layer_thickness = climatology[' timeMonthly_avg_layerThickness' ]
11831183
1184- masks = [vert_index < ds_restart .maxLevelCell,
1184+ masks = [vert_index < ds_mesh .maxLevelCell,
11851185 z_mid <= self .min_depth,
11861186 z_mid >= self .max_depth]
11871187 for mask in masks:
0 commit comments