{"id":2783,"date":"2019-12-11T09:22:51","date_gmt":"2019-12-11T00:22:51","guid":{"rendered":"http:\/\/home.hiroshima-u.ac.jp\/~leehs\/?p=2783"},"modified":"2019-12-24T10:48:02","modified_gmt":"2019-12-24T01:48:02","slug":"masking-out-a-variable-below-a-particular-value-using-grads","status":"publish","type":"post","link":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/?p=2783","title":{"rendered":"Masking out a variable below a particular value using Grads"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">How to mask out a certain region below a particular water depth or above a particular elevation with GEBCO_2019.nc dataset.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GEBCO_2019.nc is a global topographic and bathymetric chart with 15 arc-sec resolution which can be obtained from  <a href=\"https:\/\/www.gebco.net\/\">https:\/\/www.gebco.net\/<\/a> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Below is an example to mask out the ocean part with water depth below 200 m.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">reinit\nsdfopen GEBCO_08.nc\nq file\n>\nset lon 128 147\nset lat 30 46\nset mpdset hires\nset map 1 1 10\nset gxout shaded\nd elevation\n>\ndefine d200 = maskout(maskout(elevation, elevation-(-200)),0-elevation)\nd d200\ncbarn\n>\nopen surf_xxxx.ctl\nq file 2\ndefine mask = const(d200,10,-u)\nd mask\n>\nset t 1\nset z 1\ndefine maskdata=lterp(mask,u.2(t=1))\nd maskdata\n>\nd maskout(u.2(t=1),-maskdata)  \n>\ndraw title Wind resource within 200 m depth<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to mask out a certain region below a particular water depth or above a particular elevation with GEBCO_2019.nc dataset. GEBCO_2019.nc is a global topographic and bathymetric chart with 15 arc-sec resolution which can be obtained from https:\/\/www.gebco.net\/ Below is&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/?p=2783\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-2783","post","type-post","status-publish","format-standard","hentry","category-tool"],"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"hslee","author_link":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/?author=1"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/?cat=12\" rel=\"category\">Tool<\/a>","rttpg_excerpt":"How to mask out a certain region below a particular water depth or above a particular elevation with GEBCO_2019.nc dataset. GEBCO_2019.nc is a global topographic and bathymetric chart with 15 arc-sec resolution which can be obtained from https:\/\/www.gebco.net\/ Below is...Read more","_links":{"self":[{"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=\/wp\/v2\/posts\/2783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2783"}],"version-history":[{"count":5,"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=\/wp\/v2\/posts\/2783\/revisions"}],"predecessor-version":[{"id":2794,"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=\/wp\/v2\/posts\/2783\/revisions\/2794"}],"wp:attachment":[{"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/home.hiroshima-u.ac.jp\/~leehs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}