Closed krober10nd closed 3 years ago
Perhaps the kwargs of extract_subdomain
could be specified as name/value pairs instead of fixed position args.
Yes I agree we should change the kwarg to name/value pairs. Also can you have threshold work both ways or as a range. Often I want to do it so only elements shallower than 250 m are kept, i.e., only continental shelf.
Yes I agree we should change the kwarg to name/value pairs. Also can you have threshold work both ways or as a range. Often I want to do it so only elements shallower than 250 m are kept, i.e., only continental shelf.
Sure that's reasonable. Also, when you do the extraction, you might want to remove singly connected elements there.
Singly elements can be deleted using msh.clean
Ok I'm still a little confused about the the description of min_depth and max_depth on the help and how it is actually implemented. I think the way it is implemented is correct; so that if depth is less than the max_depth and more than the min_depth and inside the polygon then it is trimmed. But help is saying max_depth is to keep parts that are sufficiently deep when it should be other way around. Keep the parts that are shallower than max_depth and deeper than min_depth right?
and change the if statement to be max_depth ~= +9999
rather than negative
Can change the max_depth to be sufficiently shallow and min_depth to be sufficiently deep on the help?
polygon
and remap all the attributes (nodal attributes and boundaries) back to the trimmed mesh.Note this maps all nodal attributes to the subdomain. For example, if the parent mesh had a directional wind stress nodal attribute, now the subdomain does too.