Ejemplo n.º 1
0
    def _allocStdSSACoefficients(self):
        """Helper method that allocates the standard :cpp:class:`IceModelVec` variables used to solve the SSA and stores them
        in :attr:`modeldata```.vecs``:

          * ``surface``
          * ``thickness``
          * ``bed``
          * ``tauc``
          * ``enthalpy``
          * ``mask``
          * ``age`` if -age is given

        Intended to be called from custom implementations of :meth:`_initSSACoefficients` if desired."""
        vecs = self.modeldata.vecs
        grid = self.grid

        self.geometry = PISM.Geometry(grid)
        geometry = self.geometry

        vecs.add(geometry.ice_surface_elevation)
        vecs.add(geometry.ice_thickness)
        vecs.add(geometry.bed_elevation)
        vecs.add(geometry.sea_level_elevation)
        vecs.add(geometry.cell_type)
        vecs.add(model.createYieldStressVec(grid), 'tauc')
        vecs.add(model.createEnthalpyVec(grid), 'enthalpy')

        # The SIA model might need the "age" field
        if grid.ctx().config().get_boolean("age.enabled"):
            vecs.add(model.createAgeVec(grid), "age")
Ejemplo n.º 2
0
    def _allocStdSSACoefficients(self):
        """Helper method that allocates the standard :cpp:class:`IceModelVec` variables used to solve the SSA and stores them
        in :attr:`modeldata```.vecs``:

          * ``surface``
          * ``thickness``
          * ``bed``
          * ``tauc``
          * ``enthalpy``
          * ``mask``
          * ``age`` if -age is given

        Intended to be called from custom implementations of :meth:`_initSSACoefficients` if desired."""
        vecs = self.modeldata.vecs
        grid = self.grid

        vecs.add(model.createIceSurfaceVec(grid))
        vecs.add(model.createIceThicknessVec(grid))
        vecs.add(model.createBedrockElevationVec(grid))
        vecs.add(model.createYieldStressVec(grid), 'tauc')
        vecs.add(model.createEnthalpyVec(grid), 'enthalpy')
        vecs.add(model.createIceMaskVec(grid), 'mask')

        # The SIA model might need the "age" field
        if grid.ctx().config().get_boolean("do_age"):
            vecs.add(model.createAgeVec(grid), "age")
Ejemplo n.º 3
0
    def _allocStdSSACoefficients(self):
        """Helper method that allocates the standard :cpp:class:`IceModelVec` variables used to solve the SSA and stores them
        in :attr:`modeldata```.vecs``:

          * ``surface``
          * ``thickness``
          * ``bed``
          * ``tauc``
          * ``enthalpy``
          * ``mask``
          * ``age`` if -age is given

        Intended to be called from custom implementations of :meth:`_initSSACoefficients` if desired."""
        vecs = self.modeldata.vecs
        grid = self.grid

        vecs.add(model.createIceSurfaceVec(grid))
        vecs.add(model.createIceThicknessVec(grid))
        vecs.add(model.createBedrockElevationVec(grid))
        vecs.add(model.createYieldStressVec(grid), 'tauc')
        vecs.add(model.createEnthalpyVec(grid), 'enthalpy')
        vecs.add(model.createIceMaskVec(grid), 'mask')

        # The SIA model might need the "age" field
        if grid.ctx().config().get_boolean("do_age"):
            vecs.add(model.createAgeVec(grid), "age")
Ejemplo n.º 4
0
Archivo: ssa.py Proyecto: pism/pism
    def _allocStdSSACoefficients(self):
        """Helper method that allocates the standard :cpp:class:`IceModelVec` variables used to solve the SSA and stores them
        in :attr:`modeldata```.vecs``:

          * ``surface``
          * ``thickness``
          * ``bed``
          * ``tauc``
          * ``enthalpy``
          * ``mask``
          * ``age`` if -age is given

        Intended to be called from custom implementations of :meth:`_initSSACoefficients` if desired."""
        vecs = self.modeldata.vecs
        grid = self.grid

        self.geometry = PISM.Geometry(grid)
        geometry = self.geometry

        vecs.add(geometry.ice_surface_elevation)
        vecs.add(geometry.ice_thickness)
        vecs.add(geometry.bed_elevation)
        vecs.add(geometry.sea_level_elevation)
        vecs.add(geometry.cell_type)
        vecs.add(model.createYieldStressVec(grid), 'tauc')
        vecs.add(model.createEnthalpyVec(grid), 'enthalpy')

        # The SIA model might need the "age" field
        if grid.ctx().config().get_boolean("age.enabled"):
            vecs.add(model.createAgeVec(grid), "age")