def _allocExtraSSACoefficients(self): """Allocate storage for SSA coefficients.""" vecs = self.modeldata.vecs if util.fileHasVariable(self.boot_file, 'ssa_driving_stress_x'): vecs.add(model.createDrivingStressXVec(self.grid)) if util.fileHasVariable(self.boot_file, 'ssa_driving_stress_y'): vecs.add(model.createDrivingStressYVec(self.grid)) no_model_mask = None # For a regional run we'll need no_model_mask, usurfstore, thkstore if self.is_regional: no_model_mask = model.createNoModelMaskVec(self.grid) vecs.add(no_model_mask, 'no_model_mask') vecs.add(model.createIceSurfaceStoreVec(self.grid)) vecs.add(model.createIceThicknessStoreVec(self.grid)) if self.config.get_boolean('stress_balance.ssa.dirichlet_bc'): vecs.add( model.create2dVelocityVec( self.grid, name='_ssa_bc', desc='SSA velocity boundary condition', intent='intent'), "vel_ssa_bc") if self.is_regional: vecs.add(no_model_mask, 'bc_mask') else: vecs.add(model.createBCMaskVec(self.grid), 'bc_mask') if self.phi_to_tauc: vecs.add(PISM.model.createBasalMeltRateVec(self.grid)) vecs.add(PISM.model.createTillPhiVec(self.grid)) vecs.add(PISM.model.createBasalWaterVec(self.grid))
def _allocExtraSSACoefficients(self): """Allocate storage for SSA coefficients.""" vecs = self.modeldata.vecs if util.fileHasVariable(self.boot_file, 'ssa_driving_stress_x'): vecs.add(model.createDrivingStressXVec(self.grid)) if util.fileHasVariable(self.boot_file, 'ssa_driving_stress_y'): vecs.add(model.createDrivingStressYVec(self.grid)) no_model_mask = None # For a regional run we'll need no_model_mask, usurfstore, thkstore if self.is_regional: no_model_mask = model.createNoModelMaskVec(self.grid) vecs.add(no_model_mask, 'no_model_mask') vecs.add(model.createIceSurfaceStoreVec(self.grid)) vecs.add(model.createIceThicknessStoreVec(self.grid)) if self.config.get_boolean('ssa_dirichlet_bc'): vecs.add(model.create2dVelocityVec(self.grid, name='_ssa_bc', desc='SSA velocity boundary condition', intent='intent'), "vel_ssa_bc") if self.is_regional: vecs.add(no_model_mask, 'bc_mask') else: vecs.add(model.createBCMaskVec(self.grid), 'bc_mask') if self.phi_to_tauc: vecs.add(PISM.model.createBasalMeltRateVec(self.grid)) vecs.add(PISM.model.createTillPhiVec(self.grid)) vecs.add(PISM.model.createBasalWaterVec(self.grid))
def _allocateBCs(self, velname='_bc', maskname='bc_mask'): """Helper method that allocates standard Dirichlet data :cpp:class:`IceModelVec` variable and stores them in :attr:`modeldata` ``.vecs``: * ``vel_bc`` * ``bc_mask`` """ vecs = self.modeldata.vecs vecs.add( model.create2dVelocityVec(self.grid, name=velname, desc='SSA velocity boundary condition', intent='intent'), "vel_bc") vecs.add(model.createBCMaskVec(self.grid, name=maskname), "bc_mask")
def _allocateBCs(self, velname='_bc', maskname='bc_mask'): """Helper method that allocates standard Dirichlet data :cpp:class:`IceModelVec` variable and stores them in :attr:`modeldata` ``.vecs``: * ``vel_bc`` * ``bc_mask`` """ vecs = self.modeldata.vecs vecs.add(model.create2dVelocityVec(self.grid, name=velname, desc='SSA velocity boundary condition', intent='intent'), "vel_bc") vecs.add(model.createBCMaskVec(self.grid, name=maskname), "bc_mask")