{"id":256,"date":"2025-12-10T17:36:37","date_gmt":"2025-12-10T08:36:37","guid":{"rendered":"https:\/\/met-ohara.com\/?p=256"},"modified":"2025-12-10T17:36:37","modified_gmt":"2025-12-10T08:36:37","slug":"grads%e3%81%ab%e3%81%8a%e3%81%91%e3%82%8b%e6%97%a5%e6%99%82%e3%81%ae%e3%83%95%e3%82%a9%e3%83%bc%e3%83%9e%e3%83%83%e3%83%88%e3%81%ae%e5%a4%89%e6%8f%9b","status":"publish","type":"post","link":"https:\/\/met-ohara.com\/?p=256","title":{"rendered":"GrADS\u306b\u304a\u3051\u308b\u65e5\u6642\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u5909\u63db"},"content":{"rendered":"\n<p>\u63cf\u753b\u3057\u305f\u56f3\u306e\u30bf\u30a4\u30c8\u30eb\u306e\u4e00\u90e8\u306b\u65e5\u6642\u306e\u60c5\u5831\u3092\u66f8\u304d\u305f\u3044\u3053\u3068\u304c\u3088\u304f\u3042\u308b.<\/p>\n\n\n\n<p>GrADS\u306b\u304a\u3044\u3066, \u73fe\u5728\u6307\u5b9a\u3057\u3066\u3044\u308b\u65e5\u6642\u306e\u60c5\u5831\u306f&#8221;q time&#8221;\u3067\u53d6\u5f97\u3067\u304d\u308b\u304c, 00Z15SEP2025\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u3042\u308a, GIF\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u6642\u523b\u30e9\u30d9\u30eb\u306a\u3069\u306b\u4f7f\u7528\u3059\u308b\u306b\u306f\u4e0d\u5411\u304d\u3067\u3042\u308b. \u305d\u3053\u3067, GrADS\u5f62\u5f0f\u306e\u65e5\u6642\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u308b:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>yyyy\/mm\/dd hh:nnZ<\/li>\n\n\n\n<li>yyyy-mm-dd hh:nnZ<\/li>\n<\/ul>\n\n\n\n<p>&#8216;q time&#8217;\u3067\u5f97\u3089\u308c\u308b\u65e5\u6642\u306e\u6587\u5b57\u5217\u306f\u9577\u3055\u304c12\u307e\u305f\u306f15\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3042\u308b. 12\u664230\u5206\u306e\u3088\u3046\u306b\u5206\u306e\u90e8\u5206\u304c&#8217;00&#8217;\u3067\u306a\u3044\u5834\u5408\u306f&#8217;12:30Z15SEP2025&#8217;\u306e\u3088\u3046\u306b15\u6841\u3067\u3042\u308b\u304c, 12\u664200\u5206\u306e\u5834\u5408\u306b\u306f&#8217;12Z15SEP2025&#8217;\u306e\u3088\u3046\u306b12\u6841\u3067\u8868\u793a\u3055\u308c\u308b. \u306a\u306e\u3067, \u6587\u5b57\u5217\u306e\u9577\u3055\u3092\u8abf\u3079\u3066\u5834\u5408\u5206\u3051\u304c\u5fc5\u8981\u3068\u306a\u308b.<\/p>\n\n\n\n<p>&#8216;q time&#8217;\u3067\u53d6\u5f97\u3057\u305f\u65e5\u6642gdate\u3092\u4e0a\u8a18\u306e\u3088\u3046\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u63db\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u51e6\u7406\u3059\u308c\u3070\u3088\u3044:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:1.125rem;font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(2 * 0.6 * 1.125rem);line-height:1.625rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>'q time'\ngdate = subwrd(result,3)\nlen = math_strlen(gdate)\nif (len != 12 &amp; len != 15)\n    say 'Wrong length of GrADS date: 'gdate\n    exit\nendif\n\nif (len = 12)\n    yyyy = substr(gdate,9,4)\n    mon  = substr(gdate,6,3)\n    mm   = mon2mm(mon)\n    dd   = substr(gdate,4,2)\n    hh   = substr(gdate,1,2)\n    nn   = '00'\n    date1 = yyyy % '\/' % mm % '\/' % dd % ' ' % hh % ':00Z'\n    date2 = yyyy % '-' % mm % '-' % dd % ' ' % hh % ':00Z'\nelse\n    yyyy = substr(gdate,12,4)\n    mon  = substr(gdate,9,3)\n    mm   = mon2mm(mon)\n    dd   = substr(gdate,7,2)\n    hh   = substr(gdate,1,2)\n    nn   = substr(gdate,4,2)\n    date1 = yyyy % '\/' % mm % '\/' % dd % ' ' % hh % ':' % nn % 'Z'\n    date2 = yyyy % '-' % mm % '-' % dd % ' ' % hh % ':' % nn % 'Z'\nendif\n\nsay date1\nsay date2<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">&#39;q time&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">gdate = subwrd(result,3)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">len = math_strlen(gdate)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">if (len != 12 &amp; len != 15)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    say &#39;Wrong length of GrADS date: &#39;gdate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    exit<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">endif<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">if (len = 12)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    yyyy = substr(gdate,9,4)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    mon  = substr(gdate,6,3)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    mm   = mon2mm(mon)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    dd   = substr(gdate,4,2)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    hh   = substr(gdate,1,2)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    nn   = &#39;00&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    date1 = yyyy % &#39;\/&#39; % mm % &#39;\/&#39; % dd % &#39; &#39; % hh % &#39;:00Z&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    date2 = yyyy % &#39;-&#39; % mm % &#39;-&#39; % dd % &#39; &#39; % hh % &#39;:00Z&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">else<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    yyyy = substr(gdate,12,4)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    mon  = substr(gdate,9,3)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    mm   = mon2mm(mon)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    dd   = substr(gdate,7,2)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    hh   = substr(gdate,1,2)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    nn   = substr(gdate,4,2)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    date1 = yyyy % &#39;\/&#39; % mm % &#39;\/&#39; % dd % &#39; &#39; % hh % &#39;:&#39; % nn % &#39;Z&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    date2 = yyyy % &#39;-&#39; % mm % &#39;-&#39; % dd % &#39; &#39; % hh % &#39;:&#39; % nn % &#39;Z&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">endif<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">say date1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">say date2<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306a\u51e6\u7406\u3092\u7d44\u307f\u8fbc\u3093\u3060\u95a2\u6570get_date.gsf\u3092github\u4e0a\u3067\u516c\u958b\u3057\u3066\u3044\u307e\u3059:<br>URL: <a href=\"https:\/\/github.com\/CptHaus\/my_grads_script\/tree\/main\/get_date\">https:\/\/github.com\/CptHaus\/my_grads_script\/tree\/main\/get_date<\/a><\/p>\n\n\n\n<p>\u4f8b\u3048\u3070, \u6642\u523b\u4ed8\u304d\u306eGIF\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u306b\u306f, \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f7f\u7528\u3067\u304d\u308b:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:1.125rem;font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(2 * 0.6 * 1.125rem);line-height:1.625rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>ret = gsfallow('on')\nn = 1\nwhile(n&lt;=24)\n  'set t 'n\n  # \u63cf\u753b\u8a2d\u5b9a\n  ~~~\n  # \u63cf\u753b\n  ~~~\n  # \u65e5\u6642\u306e\u53d6\u5f97\n  kind = 'ymdh' # 'y', 'ym', 'ymd', 'ymdh', 'ymdhn'\u3092\u6307\u5b9a\u53ef\u80fd\n  format = 1    # 1: yyyy\/mm\/dd hh:nnZ, 2: yyyy-mm-dd hh:nnZ\n  date = get_date(kind,format)\n  # \u30bf\u30a4\u30c8\u30eb\u306b\u65e5\u6642\u3092\u8868\u793a\n  'draw title DATE = 'date\n  'gxprint tmp.eps'\n  label = math_format('%02g',n)\n  '!convert -rotate 90 -density 300 tmp.eps fig-'label'.jpg'\n  n = n + 1\nendwhile\n'!convert -delay 30 -loop 0 fig-*.jpg test.gif'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">ret = gsfallow(&#39;on&#39;)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">n = 1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">while(n&lt;=24)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  &#39;set t &#39;n<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  # \u63cf\u753b\u8a2d\u5b9a<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  ~~~<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  # \u63cf\u753b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  ~~~<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  # \u65e5\u6642\u306e\u53d6\u5f97<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  kind = &#39;ymdh&#39; # &#39;y&#39;, &#39;ym&#39;, &#39;ymd&#39;, &#39;ymdh&#39;, &#39;ymdhn&#39;\u3092\u6307\u5b9a\u53ef\u80fd<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  format = 1    # 1: yyyy\/mm\/dd hh:nnZ, 2: yyyy-mm-dd hh:nnZ<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  date = get_date(kind,format)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  # \u30bf\u30a4\u30c8\u30eb\u306b\u65e5\u6642\u3092\u8868\u793a<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  &#39;draw title DATE = &#39;date<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  &#39;gxprint tmp.eps&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  label = math_format(&#39;%02g&#39;,n)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  &#39;!convert -rotate 90 -density 300 tmp.eps fig-&#39;label&#39;.jpg&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  n = n + 1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">endwhile<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">&#39;!convert -delay 30 -loop 0 fig-*.jpg test.gif&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>.gsf \u3092\u547c\u3073\u51fa\u3057\u3066\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306f, gsfallow(&#8216;on&#8217;)\u3092\u5b9f\u884c\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b. get_date.gsf \u3067\u306f, \u65e5\u4ed8\u306e\u51fa\u529b\u9805\u76ee\u3068\u3057\u3066\u4ee5\u4e0b\u306e5\u3064\u3092\u9078\u629e\u53ef\u80fd(kind\u3067\u6307\u5b9a)\u3067\u3042\u308b:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>yyyy<\/li>\n\n\n\n<li>yyyy\/mm \u307e\u305f\u306f yyyy-mm<\/li>\n\n\n\n<li>yyyy\/mm\/dd \u307e\u305f\u306f yyyy-mm-dd<\/li>\n\n\n\n<li>yyyy\/mm\/dd hhZ \u307e\u305f\u306f yyyy-mm-dd hhZ<\/li>\n\n\n\n<li>yyyy\/mm\/dd hh:nnZ \u307e\u305f\u306f yyyy-mm-dd hh:nnZ<\/li>\n<\/ul>\n\n\n\n<p>get_date.gsf \u306e\u8a73\u7d30\u306a\u4f7f\u7528\u65b9\u6cd5\u306f README.md \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63cf\u753b\u3057\u305f\u56f3\u306e\u30bf\u30a4\u30c8\u30eb\u306e\u4e00\u90e8\u306b\u65e5\u6642\u306e\u60c5\u5831\u3092\u66f8\u304d\u305f\u3044\u3053\u3068\u304c\u3088\u304f\u3042\u308b. GrADS\u306b\u304a&#8230; <a href=\"https:\/\/met-ohara.com\/?p=256\" class=\"readmore\">\u7d9a\u304d\u3092\u8aad\u3080<span class=\"screen-reader-text\">GrADS\u306b\u304a\u3051\u308b\u65e5\u6642\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u5909\u63db<\/span><span class=\"fa fa-angle-double-right\" aria-hidden=\"true\"><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[11],"tags":[],"class_list":["post-256","post","type-post","status-publish","format-standard","hentry","category-grads","content-layout-excerpt-thumb"],"_links":{"self":[{"href":"https:\/\/met-ohara.com\/index.php?rest_route=\/wp\/v2\/posts\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/met-ohara.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/met-ohara.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/met-ohara.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/met-ohara.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=256"}],"version-history":[{"count":8,"href":"https:\/\/met-ohara.com\/index.php?rest_route=\/wp\/v2\/posts\/256\/revisions"}],"predecessor-version":[{"id":264,"href":"https:\/\/met-ohara.com\/index.php?rest_route=\/wp\/v2\/posts\/256\/revisions\/264"}],"wp:attachment":[{"href":"https:\/\/met-ohara.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/met-ohara.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/met-ohara.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}