You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a request for a new feature to allow subsetting (and transformation?) of output.
Requirements
Non-functional
Avoid new spatial dependencies (try to work with gdal/shapely/geopandas)
Prefer xarray for handling the files, not raw netcdf4
The subsetting capability can go into schimpy which we will start to use to hold only general interest stuff. The Bay-Delta specific driver script used for Suisun will go in BayDeltaSCHISM/scripts, which at least for now is the holder of Bay-Delta specific visualization recipes and scripts for things like X2, Suisun Habitat.
Functional
def create_partition(mesh,polygons,enforce_exact=False):
“”” Takes a mesh and list of polygons and partitions according to where the centroids (mesh.centroids in schimpy) fall.
Parameters
------------
mesh : schimpy.SchismMesh The mesh to partition
polygons : Polygons (parsed from shape file or yaml into SCHIMPY
enforce_exact: bool
Requires a unique, complete partition. Initially not implemented for True
Produces meshes and dicitonary(?) maps of local_to_global and global_to_local. (tuple or class)”””
def write_global_local_maps(dest,global_local,local_global):
"""writes maps out in the schism + visit format. Note that the global owner
of a shared node is the lowest rank that contains it."""
Parameters:
------------
destdir : str
Location to write
global_local: list
mapping from global node number (zero-based) to the partition ("proc" in real schism) and local index for nodes, elements, sides
local_global: list
list of mappings from each processor to the global counterpart
def partition_schout(infile, partitions, combined=True,exclude=[],
transform={“salt_depth_ave”: (depth_ave,”salt”)):
“”” Partitions a schout binary output file (start with combined) into a set of smaller schout files corresponding to each partition.
Initially implementation will be nodal variables but ultimately native centered (edge centered velocity, prism centered tracers).
Transform is an opportunity to generate new variables that are well determined with the data from one time step, but not based on time-stenciled operations. Exclude would be an opportunity to prune variables not desired by dropping variables,
although certain variables that are required for well-formedness (zcor, wet-dry) and visualization would not be “excludable” so exclude = “all_data” could be used to exclude all but the non-excludable. No output, but side effect is production of files. p0000/schout_1.nc.
The text was updated successfully, but these errors were encountered:
Description
This is a request for a new feature to allow subsetting (and transformation?) of output.
Requirements
Non-functional
Functional
The text was updated successfully, but these errors were encountered: