当前位置: 首页>>代码示例>>Python>>正文


Python PISM.global_config方法代码示例

本文整理汇总了Python中PISM.global_config方法的典型用法代码示例。如果您正苦于以下问题:Python PISM.global_config方法的具体用法?Python PISM.global_config怎么用?Python PISM.global_config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PISM的用法示例。


在下文中一共展示了PISM.global_config方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: updateYieldStress

# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import global_config [as 别名]
  def updateYieldStress(self,mask,thickness,Hmelt,bmr,tillphi,tauc):
    config = PISM.global_config()
    till_pw_fraction = self.till_pw_fraction#config.get("till_pw_fraction")
    till_c_0 = self.till_c_0#config.get("till_c_0") * 1e3 # convert from kPa to Pa
    hmelt_max = self.hmelt_max#config.get("hmelt_max");

    rho_g = self.rho_g


    with PISM.util.Access(nocomm=[mask,tauc,thickness,Hmelt,bmr,tillphi]):
      mq = PISM.MaskQuery(mask)
      GHOSTS = self.grid.max_stencil_width;
      for (i,j) in self.grid.points_with_ghosts(nGhosts = GHOSTS):
        if mq.floating_ice(i,j):
          tauc[i,j] = 0
          continue

        H_ij = thickness[i,j]
        if H_ij == 0:
          tauc[i,j] = 1000.0e3;  #// large yield stress of 1000 kPa = 10 bar if no ice
        else: # grounded and there is some ice
          p_over = rho_g * H_ij
          p_w    = self.getBasalWaterPressure( H_ij,
                                         Hmelt[i,j],bmr[i,j],till_pw_fraction, 
                                         hmelt_max)
          N = p_over - p_w #  effective pressure on till
          tauc[i,j] = till_c_0 + N * math.tan((math.pi/180.0) * tillphi[i,j])
开发者ID:matthiasmengel,项目名称:pism,代码行数:29,代码来源:ssa_forward.py

示例2: standardBasalWaterVec

# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import global_config [as 别名]
def standardBasalWaterVec(grid,name='bwat'):
  bwat = IceModelVec2S()
  bwat.create(grid,name,True,WIDE_STENCIL)
  bwat.set_attrs("model_state", "effective thickness of subglacial melt water",
                 "m", "")
  #// NB! Effective thickness of subglacial melt water *does* vary from 0 to hmelt_max meters only.
  bwat.set_attr("valid_min", 0.0)
  valid_max = PISM.global_config().get("hmelt_max")
  bwat.set_attr("valid_max", valid_max )
  return bwat
开发者ID:matthiasmengel,项目名称:pism,代码行数:12,代码来源:util.py

示例3: __init__

# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import global_config [as 别名]
  def __init__(self,Mx,My):
    self.grid = PISM.Context().newgrid()
    self.config = PISM.global_config()

    self.setFromOptions()
    
    self.initGrid(Mx,My)

    self.ice = None; self.basal = None; self.enthalpyconverter = None
    self.initPhysics()
    # FIXME: Check that the subclass did its job.

    self.solver = self._constructSSA()

    self.initSSACoefficients()
开发者ID:matthiasmengel,项目名称:pism,代码行数:17,代码来源:ssa.py

示例4: __init__

# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import global_config [as 别名]
  def __init__(self,grid,ice_rho,standard_gravity):
    self.grid = grid

    self.rho_g = ice_rho*standard_gravity

    self.setFromOptions()

    config        = PISM.global_config()
    
    self.till_pw_fraction = config.get("till_pw_fraction")
    self.till_c_0 = config.get("till_c_0") * 1e3 # convert from kPa to Pa
    self.hmelt_max = config.get("hmelt_max");

    self.usebmr        = config.get_flag("bmr_enhance_basal_water_pressure")
    self.usethkeff     = config.get_flag("thk_eff_basal_water_pressure")

    self.bmr_scale     = config.get("bmr_enhance_scale")
    self.thkeff_reduce = config.get("thk_eff_reduced")
    self.thkeff_H_high = config.get("thk_eff_H_high")
    self.thkeff_H_low  = config.get("thk_eff_H_low")
开发者ID:matthiasmengel,项目名称:pism,代码行数:22,代码来源:ssa_forward.py


注:本文中的PISM.global_config方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。