<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">That's good. I does say in the documentation -- "The axis described in the TDEF entry is an envelope that spans the time ranges of all ensemble members." So if you want to keep the tdef size to match the latest forecast, you will have to trim the lengths of the other members so they fit in that envelope. <div><br></div><div>For operational generation of descriptor files, I create a single template that has strings like XXX and YYY where the date strings should be and then use 'sed' to substitute those with real time dates to create a new version of my template that is relevant for the current time. I also use the date handling in GrADS scripting to generate those substitution strings, or short C programs like the following:</div><div><br></div><div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">#include <stdio.h></span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">#include <string.h></span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">#include <time.h></span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">char *cmons[12] = {"jan","feb","mar","apr","may","jun","jul","aug",</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"> "sep","oct","nov","dec"};</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">main () {</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">time_t *tsec;</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">time_t tt;</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">struct tm *tm;</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">char sname[50];</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">int rc;</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"> </span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"> tt = time((long *)0);</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"> tsec = &tt;</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"> tm = gmtime(tsec);</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"> if (tm->tm_year>99) tm->tm_year = tm->tm_year-100;</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"> sprintf (sname,"%02i%s%4i",</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"> tm->tm_mday,cmons[tm->tm_mon],tm->tm_year+2000);</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;"> printf ("%s\n",sname);</span></font></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-style-span" style="font-size: 13px;">}</span></font></div></div><div><br></div><div>This program returns a string like "20jan2014". </div><div><div>--Jennifer</div><div><br></div><div><br><div><div>On Jan 20, 2014, at 4:24 PM, Tom Hultquist wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Jennifer,<div><br></div><div>Ok, so I did wind up looking at it today after all. In any event, your suggestion definitely helped and I "think" it is fixed (at least the oddity I noticed before is gone, and the output I've checked thus far looks ok). In a nutshell, I needed to change the TDEF definition so that it would use the earliest time in any of the members, and adjust the number of times up (by 19) to cover the full range of time steps (even though each individual member has 149, the range covered by all of them is 168). Luckily, I can get <a href="http://g2ctl.pl/">g2ctl.pl</a> to do most of this for me by simply reversing the order of the names in the -ens templating option (oldest first, newest last). This gives me a ctl file that works with the exception of needing to change tdef 149... to tdef 168..., which I can accomplish easily enough with a quick sed command after g2ctl runs. Now I just need to modify the scripts I'd written, since all of my time related coding needs to be increased by 19. That's not a big deal, will just take a bunch of search/replaces. So, for now I think things are ok. Thanks again.</div>
<div><br></div><div>tom</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 20, 2014 at 12:36 PM, Jennifer Adams <span dir="ltr"><<a href="mailto:jma@cola.iges.org" target="_blank">jma@cola.iges.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Yes, I agree that the behavior for e03 is weird, but for the purpose of debugging, it would be helpful to rule out the other things I point out. <div>
1. Make sure that TDEF is big enough to cover all time steps in all members. </div><div>2. Use wgrib2 to make sure that all data files have the expected number of time steps for all variables.</div><div>3. Run gribmap with the -v option and see if every record in every file gets matched. </div>
<span class="HOEnZb"><font color="#888888"><div>--Jennifer</div></font></span><div><div class="h5"><div><br></div><div><br><div><br><div><div>On Jan 20, 2014, at 12:21 PM, Tom Hultquist wrote:</div><br><blockquote type="cite">
<div dir="ltr">Jennifer, <div><br></div><div>Thanks for the reply. With regard to what you mentioned...</div><div><br></div><div>1) The TDEF was defined by g2ctl, and seems to match how its documentation says it would do things for a time-lagged ensemble (whereby it is set to the 1st/most recent member). I can certainly try adjusting it though, to see if it helps. It is my intention, however, to only do calculations on the overlapping time period, essentially from the beginning time of member 1 (most recent) out 4 weeks. The previous runs (members 2-20) all overlap that time time period, but contain earlier data, since at one time each of them was member #1 (every six hours that changes). I'm not re-downloading the files, but am simply using the "realtime" files that were downloaded earlier. I'll play around, and see if I see any more meaningful info from gribmap.</div>
<div><br></div><div>2) Yes, I copy/rename the files each run so that the templating is easier, just the %e is different between each member. </div><div><br></div><div>3) I'm not sure of this either, but I am only downloading the realtime output (basically 12 hours after run time). So, my older members are not re-downloaded, but are simply the files I previously downloaded.</div>
<div><br></div><div>It is just odd that everything works fine, except for what winds up as member 3 each time, whether that is from 00, 06, 12, or 18Z run. And, when that member becomes member 2, it's fine as well.</div>
<div><br></div><div>tom</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 20, 2014 at 9:00 AM, Jennifer Adams <span dir="ltr"><<a href="mailto:jma@cola.iges.org" target="_blank">jma@cola.iges.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Tom,<div>I have a couple of suggestions:</div><div><br></div><div>1. You have set your TDEF to cover the entire range of times for ensemble e01, but not for the entire span of all the other members. If you were to expand your tdef so that it started at 18z28jan2014 (the start of e20) and ended with the final time step of e01, then you would not see the "valid time outside of file limits" messages. However, if it is your intention to only look at data from the older runs (members e02 - e20) that overlap with the most recent run, then you should change the length of those members from 149 to match the actual number of time steps that fit inside the range of e01. Expanding your TDEF to include the whole length of all members will clean up the gribmap output to make it easier to see if there are other problems. </div>
<div><br></div><div>2. You have a fixed date string in your file name "/home/mdladmin/CFS/Input/cfspgb.01.20140119%e.grb2" . Are you renaming the older forecast files to match this? Make sure that your naming convention matches your DSET entry. </div>
<div><br></div><div>3. I can't verify this at the moment, but I have noticed that the CFS real time data files are not the same when they are brand new compared to when they are a couple of days old. I think they add some additional time steps after some time has elapsed since the forecast was initially posted. In my own operational scripts to grab this data I wait for 48 hours before getting the data -- for our purposes, looking at data in real time is not strictly necessary, so it's not big deal to wait. But see if the number of records in each file in your ensemble set really covers the nominal 149 time steps. A careful look at the wgrib2 output should help you see if this may be an issue in your case. </div>
<div><br></div><div>--Jennifer</div><div><br><div><div><div><div>On Jan 19, 2014, at 10:32 PM, Tom Hultquist wrote:</div><br></div></div><blockquote type="cite"><div><div><div dir="ltr">Jennifer,<div>
<br></div><div>No problem, I just didn't want to provide too many details initially. The GRIB files are from the CFS off of NOMADS. I'm grabbing 6-hourly files from the 4x per day runs, and just grabbing member 1 (for a certain window of time, whereby the previous files over the past five days will overlap the same time period for which I'm computing things). The files are at <a href="http://nomads.ncep.noaa.gov/pub/data/nccf/com/cfs/prod/cfs/cfs.20140117/00/6hrly_grib_01/" target="_blank">http://nomads.ncep.noaa.gov/pub/data/nccf/com/cfs/prod/cfs/cfs.20140117/00/6hrly_grib_01/</a> with YYYYMMDD/CC changing depending on date/cycle downloaded.</div>
<div><br></div><div>The ctl file for the most recent "run" is attached. It works ok except for the issue I described (member #3 always causes the issue). GrADS is version 2.1.a1, although I also had the issue with 2.0.2. As best I can tell <a href="http://g2ctl.pl/" target="_blank">g2ctl.pl</a> is 0.0.4o, so perhaps that is an issue (since I do see a more recent version, 0.0.8.8 online). I suppose I'll give that a shot in the meantime.</div>
<div><br></div><div>tom</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jan 19, 2014 at 8:39 PM, Jennifer Adams <span dir="ltr"><<a href="mailto:jma@cola.iges.org" target="_blank">jma@cola.iges.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Tom,<div>Can you please provide the source of your grib files, and the descriptor file that doesn't work? I can't resolve a problem that can't be reproduced. It would also be useful to know the version of GrADS and g2ctl you're using.</div>
<div>--Jennifer<br><div><br><div><div><div>On Jan 19, 2014, at 3:12 PM, Tom Hultquist wrote:</div><br></div><blockquote type="cite"><div><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">I have a set of files with different initial times, whose forecast times overlap so that I can use them as an ensemble dataset. I am using </span><a href="http://g2ctl.pl/" style="font-family:arial,sans-serif;font-size:13px" target="_blank">g2ctl.pl</a><span style="font-family:arial,sans-serif;font-size:13px"> with the -ens option, and it is creating a proper ctl file. I thought everything was working fine, but then noticed some oddities in a few calculations I was doing. So, I decided to view data from each member interactively in </span><span style="background-color:rgb(255,255,204);font-family:arial,sans-serif;font-size:13px">GrADS</span><span style="font-family:arial,sans-serif;font-size:13px">, using the ctl file which was created by </span><a href="http://g2ctl.pl/" style="font-family:arial,sans-serif;font-size:13px" target="_blank">g2ctl.pl</a><span style="font-family:arial,sans-serif;font-size:13px">. For some reason, it would not display anything from the third ensemble member (entire grid undefined). There was, however, nothing wrong with the file, since it worked fine if viewed individually outside of the ensemble set. In addition, when a new ctl is created later, and that member 3 became member 4, it no longer caused a problem. However, the "new" member 3 (which was previously member 2) had the same issue. When looking at the gribmap feedback (with -v turned on), I can see it runs into issues with valid times being outside of file limits (which indeed is true, since the files overlap, but don't cover the exact same time frame as member 1). When gribmap has this error, it shows it= (e.g. it=10) vs t= for the valid time conflict. I couldn't find any info on what it= references. The same error happens with subsequent files (members 4-20), but gribmap appears to scan those files twice and they display properly for me.</span><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Has anyone experienced anything like this, and/or have any suggestions?</div></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>
</div></blockquote></div><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div>
--</div><div>Jennifer M. Adams<br>Center for Ocean-Land-Atmosphere Studies (COLA)<br>111 Research Hall, Mail Stop 2B3<br>George Mason University<br>4400 University Drive<br>Fairfax, VA 22030 <br><br></div><div><br></div>
<br>
</span></span></div></span></span><br>
</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></div></div>
</div></div><span><CFS_ensemble1.ctl></span>_______________________________________________<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></div></blockquote></div><div><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div>
--</div><div>Jennifer M. Adams<br>Center for Ocean-Land-Atmosphere Studies (COLA)<br>111 Research Hall, Mail Stop 2B3<br>George Mason University<br>4400 University Drive<br>Fairfax, VA 22030 <br><br></div><div><br></div>
<br>
</span></span></div></span></span><br>
</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></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>
</blockquote></div><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div>
--</div><div>Jennifer M. Adams<br>Center for Ocean-Land-Atmosphere Studies (COLA)<br>111 Research Hall, Mail Stop 2B3<br>George Mason University<br>4400 University Drive<br>Fairfax, VA 22030 <br><br></div><div><br></div>
<br>
</span></span></div></span></span><br>
</div>
<br></div></div></div></div></div><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></div></div>
_______________________________________________<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">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 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; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-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; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 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; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams<br>Center for Ocean-Land-Atmosphere Studies (COLA)<br>111 Research Hall, Mail Stop 2B3<br>George Mason University<br>4400 University Drive<br>Fairfax, VA 22030 <br><br></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div><br class="Apple-interchange-newline">
</div>
<br></div></div></body></html>