Extract upward closing contours

Hi all,

Does anyone have a way to extract/isolate upward closing contours (as opposed to downward closing contours)? I’ve made a feature request about implementing this functionality in GMT (https://github.com/GenericMappingTools/gmt/issues/559) since it must already be capable of distinguishing between local highs and lows (ref. the -T option in grdcontour, http://gmt.soest.hawaii.edu/doc/latest/grdcontour.html#t).