compass.landice.mesh.set_cell_width¶
- compass.landice.mesh.set_cell_width(self, section_name, thk, bed=None, vx=None, vy=None, dist_to_edge=None, dist_to_grounding_line=None, flood_fill_iStart=None, flood_fill_jStart=None)[source]¶
Set cell widths based on settings in config file to pass to
mpas_tools.mesh.creation.build_mesh.build_planar_mesh()
.- Parameters:
section_name (str) – Section of the config file from which to read parameters. The following options to be set in the given config section:
levels
,x_min
,x_max
,y_min
,y_max
,min_spac
,max_spac
,high_log_speed
,low_log_speed
,high_dist
,low_dist
,high_dist_bed
,low_dist_bed
,high_bed
,low_bed
,cull_distance
,use_speed
,use_dist_to_edge
,use_dist_to_grounding_line
, anduse_bed
. See the Land-Ice Framework section of the Users or Developers guide for more information about these options and their uses.thk (numpy.ndarray) – Ice thickness field from gridded dataset, usually after trimming to flood fill mask
bed (numpy.ndarray) – Bed topography from gridded dataset
vx (numpy.ndarray, optional) – x-component of ice velocity from gridded dataset, usually after trimming to flood fill mask. Can be set to
None
ifuse_speed == False
in config file.vy (numpy.ndarray, optional) – y-component of ice velocity from gridded dataset, usually after trimming to flood fill mask. Can be set to
None
ifuse_speed == False
in config file.dist_to_edge (numpy.ndarray, optional) – Distance from each cell to ice edge, calculated in separate function. Can be set to
None
ifuse_dist_to_edge == False
in config file and you do not want to set largecell_width
where cells will be culled anyway, but this is not recommended.dist_to_grounding_line (numpy.ndarray, optional) – Distance from each cell to grounding line, calculated in separate function. Can be set to
None
ifuse_dist_to_grounding_line == False
in config file.flood_fill_iStart (int, optional) – x-index location to start flood-fill when using bed topography
flood_fill_jStart (int, optional) – y-index location to start flood-fill when using bed topography
- Returns:
cell_width (numpy.ndarray) – Desired width of MPAS cells based on mesh desnity functions to pass to
mpas_tools.mesh.creation.build_mesh.build_planar_mesh()
.