<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Clarification: %ch may be used with other template options such as %y or %m -- it just depends on the file naming convention for the data set in question.<div>--Jennifer<br><div><br><div><div>On Dec 10, 2012, at 12:34 PM, Jeff Duda wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">When using CHSUB, you only use the template strings %ch. In your case you shouldn't need to use any other template strings.<br><br>Jeff<br><br><div class="gmail_quote">On Mon, Dec 10, 2012 at 12:32 AM, Muhammad Yunus Ahmad Mazuki <span dir="ltr"><<a href="mailto:ukm.yunus@gmail.com" target="_blank">ukm.yunus@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I find that in using the template options, in the dset, %x3 does not work for me.<br>file name ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_200601-202512.nc<br>
ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_202601-204512.nc<br>dset ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_%x3601-%<a href="http://x3512.nc/" target="_blank">x3512.nc</a> this does not work in diplaying data, it will say "Cannot contour grid - all undefined values"<br>
dset ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_%<a href="http://ch.nc/" target="_blank">ch.nc</a> however works. <br>chsub 1 240 200601-202512<br>chsub 241 480 202601-204512<br>TDEF 480 Linear 12:00z01jan2006 1mo<br><br>I do think that%x3601-%x3512 should be replaced with %y401-%y412. This does not work as well. Does this mean in using the substitution template like %x, %y and others, the increment must be 1? Since using %ch is considered as string, it works well with 20 years increment in my files name, I just considered "200601-202512" and "200601-202512" as strings.<br>
<br>To Jeff, you mean the dtype does not need change. dset need to be changet to reflect the filename increment.<br><br>Yunus <br><br><div class="gmail_quote">On Fri, Dec 7, 2012 at 1:27 PM, Jeff Duda <span dir="ltr"><<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If you want the data in one file you'll have to use CDO or other netCDF tools using Fortran or some other programming language. You can get the same effect by using templating. You don't need to change the DSET entry. It should be just netcdf. I'm not 100% the following will work, but it's worth a try because it won't take much time. You'll have to determine exactly how many time indices are contained in each individual file and keep track of them, because you'll need them for the CHSUB entries. It looks like you'll have 4 or 5 entries to write. You'll want the text of the substitution string to match what is in the files. The middle two numbers should reprsent the time indices in your control file that correspond to the times in the data. These indices will depend on your TDEF entry. It looks like you are dealing with monthly data, so your TDEF entry should be something like<div>
TDEF XXX LINEAR 00Z01JAN2010 1MO,</div><div>where XXX is the number of months in the combined files. If you're looking at 90 years, then this number will probably need to be 90*12+1 = 1081? (mental math...check it). Once your TDEF line is specified, the CHSUB entries should look something like</div>
<div><div>chsub t1 t2 200601-202512</div><div>chsub t2 t3 202601-204512</div><div>etc., where t1, t2, and t3 mark specific time indices that mark the start and end time indices within each file. t1 is the first time index, so t1=1. t2 should be the last time index found in the file a_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_200601-202512.nc. If this spans 18 years, then the last time index is probably 12*18+1 = 217. The next data file (in temporal order) will start with the next time index, 218, and end with the additional number of time indices in that specific file. If that file is ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_202601-204512.nc, then you probably have 218+20*12+1 = 459. Repeat this until you reach the end of the files. As a help, the last time index you reach by doing this process will be the value of XXX you should enter in your TDEF entry. Don't forget to add "options template" to your control file. Try this and see if it works.</div>
<span><font color="#888888">
<div><br></div><div>Jeff Duda</div></font></span><div><div><div><br><div class="gmail_quote">On Thu, Dec 6, 2012 at 7:57 PM, Muhammad Yunus Ahmad Mazuki <span dir="ltr"><<a href="mailto:ukm.yunus@gmail.com" target="_blank">ukm.yunus@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If I want to use the template option, for example file name "ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_200601-202512.nc", "ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_202601-204512.nc", "ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_204601-206512.nc" and "ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_206601-208512.nc", "ua_Amon_CSIRO-Mk3-6-0_rcp45_r1i1p1_208601-210012.nc", how do I configure the DSET, and CHSUB? If possible, I actually just wanted 2010-2100 in one file.<br>
<br><div class="gmail_quote">On Wed, Dec 5, 2012 at 1:12 PM, Furrukh Bashir <span dir="ltr"><<a href="mailto:furrukhbashir@gmail.com" target="_blank">furrukhbashir@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Dear Fahim Ahmed <div>You may use NCO as well.</div><div><a href="http://linux.die.net/man/1/ncrcat" target="_blank">http://linux.die.net/man/1/ncrcat</a> <br></div><div class="gmail_extra"><br clear="all"><div>Regards</div>
<span><font color="#888888"><div><br></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><font color="#0000ff" face="comic sans ms, sans-serif"><b><i><u>FURRUKH BASHIR</u></i></b></font><br><i><font color="#3d85c6">Pakistan Meteorological Department<br>
Research and Development Division<br>Islamabad, Pakistan<br>Mob: 0321-5876770<br>Office Phone: <a href="tel:%2B92%2051%209250334" value="+92519250334" target="_blank">+92 51 9250334</a></font></i></font></span><div><div>
<br>
<br><br><div class="gmail_quote">On Wed, Dec 5, 2012 at 1:55 PM, NAGARAJU CHILUKOTI <span dir="ltr"><<a href="mailto:chilukotinagaraju@gmail.com" target="_blank">chilukotinagaraju@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi !!!<br><br> you can do with CDO climate data operators (CDO) <br><br> with cdo mergetimes command <br><br> full details you can find here <a href="https://code.zmaw.de/projects/cdo/wiki/Cdo#Documentation" target="_blank">https://code.zmaw.de/projects/cdo/wiki/Cdo#Documentation</a><br>
<br>I hope this will solve your problem<br> <br><br>With Cheers<br><br><div class="gmail_quote"><div><div>On Wed, Dec 5, 2012 at 8:10 AM, fahim ahmad <span dir="ltr"><<a href="mailto:fahimpmd@yahoo.com" target="_blank">fahimpmd@yahoo.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit" valign="top">
Hi I have downloaded Meteorological Forcing dataset (Daily) from NCEP in order to run CLM (Community Land Model). Dataset include 7 different variables, for each year one file. I want to combine data in monthly files. for example in the file <a href="http://1985-12.nc/" target="_blank">1985-12.nc</a> i want to combine daily data of all the 7 variables. Using grads how can i do this. or if any one has Fortran script??<br>
Thank you very much.<br><br>**************************************<br>
Muhammad FAHIM Ahmad,<br>
PhD Scholar,<br>
Nanjing Univ. of Info. Science & Tech.<br>
Nanjing, China P.R.<br>
Cell# <a href="tel:%2B8615715191564" value="+8615715191564" target="_blank">+8615715191564</a>.<br>
**************************************</td></tr></tbody></table><br></div></div><div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></div></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><span style="color:rgb(0,102,0)"> Nagaraju Chilukoti</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)"> Computational Earth Science Group,</span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)"> Centre for Development of Advanced Computing (CDAC)<br> Pune University Campus, Ganeshkhind</span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)"> Pune 411007</span><br> <b style="color:rgb(204,0,0)">020- 25704226</b><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)"> Mob.<b> <span style="color:rgb(204,0,0)">08087384939</span></b></span><br style="color:rgb(0,102,0)"><span style="color:rgb(0,102,0)"> <span></span><a href="http://goog_932359822/" target="_blank">nagarajuc@cdac.in</a></span><br style="color:rgb(0,102,0)">
<span style="color:rgb(0,102,0)"> <a href="mailto:chilukotinagaraju@gmail.com" target="_blank">chilukotinagaraju@gmail.com</a><span></span></span><br>
</font></span><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br></font></span></div></div><span class="HOEnZb"><font color="#888888"><div>Jeff Duda<br>Graduate research assistant<br>
University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>
<br>
</div></font></span></div></div><span class="HOEnZb"><font color="#888888">
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></font></span></blockquote></div><br>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br><br>
_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span>
</div>
<br></div></div></body></html>