{"id":1017,"date":"2018-01-22T19:50:48","date_gmt":"2018-01-22T19:50:48","guid":{"rendered":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/?page_id=1017"},"modified":"2018-10-17T20:42:50","modified_gmt":"2018-10-17T19:42:50","slug":"monthly-averaging-script","status":"publish","type":"page","link":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/","title":{"rendered":"Example CSH monthly-averaging script"},"content":{"rendered":"<p><b>Example CSH monthly-averaging script:<\/b><br \/>\n<i>&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n#! \/bin\/csh<br \/>\nset path1=&#8217;\/work\/scratch\/pmcguire\/config\/outputs\/&#8217;<br \/>\nset prefix=&#8217;Euro44_bvv_nancil_CTL-BCJ-GL_jules-vn4.9p_u-as052globeE.6-hourly.&#8217;<br \/>\nset prefix2=&#8217;Euro44_bvv_nancil_CTL-BCJ-GL_jules-vn4.9p_u-as052globeE_monmean_&#8217;<br \/>\n<\/i><\/p>\n<p><i>foreach yr (1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012)<br \/>\necho monmean ${yr}<br \/>\n#the shifttime of 1 sec is for the midnight of Dec 31 in the time bounds equalling 00:00:00 of Jan 1 of the next year<br \/>\ncdo monmean -shifttime,-1sec ${path1}${prefix}${yr}.nc ${prefix2}${yr}.nc<br \/>\nend<br \/>\n<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}1979.nc ${prefix2}1980.nc ${prefix2}1981.nc ${prefix2}1982.nc ${prefix2}1983.nc ${prefix2}1979_1983.nc<br \/>\n<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}1984.nc ${prefix2}1985.nc ${prefix2}1986.nc ${prefix2}1987.nc ${prefix2}1988.nc ${prefix2}1984_1988.nc<br \/>\n<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}1989.nc ${prefix2}1990.nc ${prefix2}1991.nc ${prefix2}1992.nc ${prefix2}1993.nc ${prefix2}1989_1993.nc<br \/>\n<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}1994.nc ${prefix2}1995.nc ${prefix2}1996.nc ${prefix2}1997.nc ${prefix2}1998.nc ${prefix2}1994_1998.nc<br \/>\n<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}1999.nc ${prefix2}2000.nc ${prefix2}2001.nc ${prefix2}2002.nc ${prefix2}2003.nc ${prefix2}1999_2003.nc<br \/>\n<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}2004.nc ${prefix2}2005.nc ${prefix2}2006.nc ${prefix2}2007.nc ${prefix2}2008.nc ${prefix2}2004_2008.nc<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}2009.nc ${prefix2}2010.nc ${prefix2}2011.nc ${prefix2}2012.nc ${prefix2}2009_2012.nc<br \/>\n<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}1979_1983.nc ${prefix2}1984_1988.nc ${prefix2}1989_1993.nc ${prefix2}1994_1998.nc ${prefix2}1999_2003.nc ${prefix2}2004_2008.nc ${prefix2}2009_2012.nc ${prefix2}1979_2012.nc<br \/>\n<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}1980.nc ${prefix2}1981.nc ${prefix2}1982.nc ${prefix2}1983.nc ${prefix2}1980_1983.nc<br \/>\n<\/i><\/p>\n<p><i>cdo mergetime ${prefix2}1980_1983.nc ${prefix2}1984_1988.nc ${prefix2}1989_1993.nc ${prefix2}1994_1998.nc ${prefix2}1999_2003.nc ${prefix2}2004_2008.nc ${prefix2}2009.nc ${prefix2}1980_2009.nc<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n<\/i><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Example CSH monthly-averaging script:  &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;  #! \/bin\/csh  set path1=&#8217;\/work\/scratch\/pmcguire\/config\/outputs\/&#8217;  set prefix=&#8217;Euro44_bvv_nancil_CTL-BCJ-GL_jules-vn4.9p_u-as052globeE.6-hourly.&#8217;  set prefix2=&#8217;Euro44_bvv_nancil_CTL-BCJ-GL_jules-vn4.9p_u-as052globeE_monmean_&#8217;      foreach yr (1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008<\/p>\n","protected":false},"author":12,"featured_media":0,"parent":998,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"__cvm_playback_settings":[],"__cvm_video_id":"","footnotes":""},"class_list":["post-1017","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Example CSH monthly-averaging script - Land Surface Processes Group<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Example CSH monthly-averaging script - Land Surface Processes Group\" \/>\n<meta property=\"og:description\" content=\"Example CSH monthly-averaging script: ----------------- #! \/bin\/csh set path1=&#039;\/work\/scratch\/pmcguire\/config\/outputs\/&#039; set prefix=&#039;Euro44_bvv_nancil_CTL-BCJ-GL_jules-vn4.9p_u-as052globeE.6-hourly.&#039; set prefix2=&#039;Euro44_bvv_nancil_CTL-BCJ-GL_jules-vn4.9p_u-as052globeE_monmean_&#039;   foreach yr (1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008\" \/>\n<meta property=\"og:url\" content=\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/\" \/>\n<meta property=\"og:site_name\" content=\"Land Surface Processes Group\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-17T19:42:50+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/\",\"url\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/\",\"name\":\"Example CSH monthly-averaging script - Land Surface Processes Group\",\"isPartOf\":{\"@id\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/#website\"},\"datePublished\":\"2018-01-22T19:50:48+00:00\",\"dateModified\":\"2018-10-17T19:42:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Running JULES\",\"item\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Library of Plotting Code Samples\",\"item\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Example CSH monthly-averaging script\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/#website\",\"url\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/\",\"name\":\"Land Surface Processes Group\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Example CSH monthly-averaging script - Land Surface Processes Group","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/","og_locale":"en_GB","og_type":"article","og_title":"Example CSH monthly-averaging script - Land Surface Processes Group","og_description":"Example CSH monthly-averaging script: ----------------- #! \/bin\/csh set path1='\/work\/scratch\/pmcguire\/config\/outputs\/' set prefix='Euro44_bvv_nancil_CTL-BCJ-GL_jules-vn4.9p_u-as052globeE.6-hourly.' set prefix2='Euro44_bvv_nancil_CTL-BCJ-GL_jules-vn4.9p_u-as052globeE_monmean_'   foreach yr (1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008","og_url":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/","og_site_name":"Land Surface Processes Group","article_modified_time":"2018-10-17T19:42:50+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/","url":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/","name":"Example CSH monthly-averaging script - Land Surface Processes Group","isPartOf":{"@id":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/#website"},"datePublished":"2018-01-22T19:50:48+00:00","dateModified":"2018-10-17T19:42:50+00:00","breadcrumb":{"@id":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/monthly-averaging-script\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/"},{"@type":"ListItem","position":2,"name":"Running JULES","item":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/"},{"@type":"ListItem","position":3,"name":"Library of Plotting Code Samples","item":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/software-examples\/code-samples\/"},{"@type":"ListItem","position":4,"name":"Example CSH monthly-averaging script"}]},{"@type":"WebSite","@id":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/#website","url":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/","name":"Land Surface Processes Group","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"}]}},"_links":{"self":[{"href":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/wp-json\/wp\/v2\/pages\/1017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/wp-json\/wp\/v2\/comments?post=1017"}],"version-history":[{"count":2,"href":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/wp-json\/wp\/v2\/pages\/1017\/revisions"}],"predecessor-version":[{"id":1219,"href":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/wp-json\/wp\/v2\/pages\/1017\/revisions\/1219"}],"up":[{"embeddable":true,"href":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/wp-json\/wp\/v2\/pages\/998"}],"wp:attachment":[{"href":"https:\/\/research.reading.ac.uk\/landsurfaceprocesses\/wp-json\/wp\/v2\/media?parent=1017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}