<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 30, 2010, at 12:28 PM, Charles Seman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Thanks, Jennifer,<br><br>I didn't think of using a descriptor file to open the source netCDF file!<br><br>"open" file: was able to get the "open" file descriptor file to work as <br>desired...<br></div></blockquote>Great! </div><div><br><blockquote type="cite"><div>gadsdf: Lev dimension level is not an SDF dimension.<br>...<br>the xdf file contains (dset path omitted):<br>dset ...<br>zdef level 1 levels 0<br>tdef time 1 linear 00Z01JAN1998 3hr<br><br>Is the xdfopen file set up correctly?<br></div></blockquote><div><br></div><div>The name of the dimension axis has to be one that exists in the file. Since your variable has no Z or T dimension, use the name of the lon or lat axis instead of "level" and "time". It doesn't matter what values those axes contain, since you are overriding them completely with your own metadata. </div><div><br></div><div>--Jennifer</div><br><blockquote type="cite"><div><br>Thanks for your help!<br>Chuck<br><br>Jennifer Adams wrote:<br><blockquote type="cite">Hi, Charles -- <br></blockquote><blockquote type="cite">Good question! The units of the time axis cannot be changed with the <br></blockquote><blockquote type="cite">'set sdfattr' command. The units attribute will always be written out <br></blockquote><blockquote type="cite">as 'minutes since' and the base time will always be the time value of <br></blockquote><blockquote type="cite">the first time step in your defined variable. The way to fix this <br></blockquote><blockquote type="cite">problem is to assign a time value of 1jan1998 to netcdf variable in <br></blockquote><blockquote type="cite">the first place instead of allowing it to default to 1jan0001. Use a <br></blockquote><blockquote type="cite">descriptor file (for xdfopen or open) that has a tdef statement with <br></blockquote><blockquote type="cite">the time you wish to assign. Then when you define your variable and <br></blockquote><blockquote type="cite">write it out with sdfwrite, it will have the correct time value. <br></blockquote><blockquote type="cite">--Jennifer<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Mar 29, 2010, at 7:58 PM, Charles Seman wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'm unable to modify the time axis units for an sdfwrite netCDF file<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">using the following command:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'set sdfattr time String units "minutes since 1998-01-01 00:00:00"'<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the units remain at "minutes since 0001-01-01 00:00"<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Here are the commands used to generate "nc_file" (the original file had<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">only lat/lon axes; no "z" or "t" axes...)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'set sdfwrite -4d 'nc_file<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'set sdfattr level String long_name height'<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'set sdfattr level String units m'<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'set sdfattr time String units "minutes since 1998-01-01 00:00:00"'<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'set sdfattr rprecip String long_name regridded precipitation'<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'set sdfattr rprecip String units mm/h'<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'set undef 'undef_value ;* change from default -9.99e8 to use source<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">netCDF file undef<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">say<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'q sdfwrite'<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">say result<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'sdfwrite rprecip'<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">'c sdfwrite'<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Here's the "q sdfwrite" output (except for the SDFwrite file name):<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">SDFwrite format is NetCDF<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">SDFwrite output undef value is set to -9999.900000<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">SDFwrite file will have at least 4 dimensions<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">SDFwrite attribute metadata:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> level String long_name height<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> level String units m<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> time String units "minutes since 1998-01-01 00:00:00"<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> rprecip String long_name regridded precipitation<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> rprecip String units mm/h<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Here's output from the "\ncdump -c" on the output "nc_file"... the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">"level" and "rprecip" attributes were modified as desired, but not the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">time units:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">dimensions:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> longitude = 144 ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> latitude = 50 ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> level = 1 ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> time = 1 ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">variables:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> double longitude(longitude) ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> longitude:units = "degrees_east" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> longitude:long_name = "Longitude" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> double latitude(latitude) ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> latitude:units = "degrees_north" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> latitude:long_name = "Latitude" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> double level(level) ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> level:units = "m" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> level:long_name = "height" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> double time(time) ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> time:long_name = "Time" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> time:units = "minutes since 0001-01-01 00:00" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> double rprecip(time, level, latitude, longitude) ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> rprecip:missing_value = -9999.9 ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> rprecip:long_name = "regridded precipitation" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> rprecip:units = "mm/h" ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">data:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">longitude = 1.25, 3.75, 6.25, 8.75, 11.25, 13.75, 16.25, 18.75, 21.25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 23.75, 26.25, 28.75, 31.25, 33.75, 36.25, 38.75, 41.25, 43.75, 46.25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 48.75, 51.25, 53.75, 56.25, 58.75, 61.25, 63.75, 66.25, 68.75, 71.25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 73.75, 76.25, 78.75, 81.25, 83.75, 86.25, 88.75, 91.25, 93.75, 96.25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 98.75, 101.25, 103.75, 106.25, 108.75, 111.25, 113.75, 116.25, 118.75,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 121.25, 123.75, 126.25, 128.75, 131.25, 133.75, 136.25, 138.75, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">141.25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 143.75, 146.25, 148.75, 151.25, 153.75, 156.25, 158.75, 161.25, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">163.75,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 166.25, 168.75, 171.25, 173.75, 176.25, 178.75, 181.25, 183.75, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">186.25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 188.75, 191.25, 193.75, 196.25, 198.75, 201.25, 203.75, 206.25, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">208.75,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 211.25, 213.75, 216.25, 218.75, 221.25, 223.75, 226.25, 228.75, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">231.25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 233.75, 236.25, 238.75, 241.25, 243.75, 246.25, 248.75, 251.25, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">253.75,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 256.25, 258.75, 261.25, 263.75, 266.25, 268.75, 271.25, 273.75, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">276.25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 278.75, 281.25, 283.75, 286.25, 288.75, 291.25, 293.75, 296.25, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">298.75,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 301.25, 303.75, 306.25, 308.75, 311.25, 313.75, 316.25, 318.75, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">321.25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 323.75, 326.25, 328.75, 331.25, 333.75, 336.25, 338.75, 341.25, <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">343.75,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 346.25, 348.75, 351.25, 353.75, 356.25, 358.75 ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">latitude = -49, -47, -45, -43, -41, -39, -37, -35, -33, -31, -29, -27,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-25,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> -23, -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1, 1, 3, 5, 7,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">9, 11,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">47, 49 ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">level = 0 ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">time = 0 ;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thanks for your help,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Chuck<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-- <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Please note that <a href="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</a> <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><<a href="mailto:Charles.Seman@noaa.gov">mailto:Charles.Seman@noaa.gov</a>> should be considered my NOAA<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">email address, not cjs@gfdl.noaa.gov <<a href="mailto:cjs@gfdl.noaa.gov">mailto:cjs@gfdl.noaa.gov</a>>.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">********************************************************************<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Charles Seman <a href="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</a> <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><<a href="mailto:Charles.Seman@noaa.gov">mailto:Charles.Seman@noaa.gov</a>><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">U.S. Department of Commerce / NOAA / OAR<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Geophysical Fluid Dynamics Laboratory voice: (609) 452-6547<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">201 Forrestal Road fax: (609) 987-5063<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Princeton, NJ 08540-6649 <a href="http://www.gfdl.noaa.gov/~cjs/">http://www.gfdl.noaa.gov/~cjs/</a> <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><<a href="http://www.gfdl.noaa.gov/%7Ecjs/">http://www.gfdl.noaa.gov/%7Ecjs/</a>><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">********************************************************************<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">"The contents of this message are mine personally and do not necessarily<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">reflect any position of the Government or NOAA."<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">gradsusr mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">gradsusr@gradsusr.org <<a href="mailto:gradsusr@gradsusr.org">mailto:gradsusr@gradsusr.org</a>><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">Jennifer M. Adams<br></blockquote><blockquote type="cite">IGES/COLA<br></blockquote><blockquote type="cite">4041 Powder Mill Road, Suite 302<br></blockquote><blockquote type="cite">Calverton, MD 20705<br></blockquote><blockquote type="cite">jma@cola.iges.org <<a href="mailto:jma@cola.iges.org">mailto:jma@cola.iges.org</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------------------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">gradsusr mailing list<br></blockquote><blockquote type="cite"><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br></blockquote><blockquote type="cite"><a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></blockquote><blockquote type="cite"><br></blockquote><br>-- <br><br>Please note that <a href="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</a> should be considered my NOAA<br>email address, not <a href="mailto:cjs@gfdl.noaa.gov">cjs@gfdl.noaa.gov</a>.<br><br>********************************************************************<br> Charles Seman <a href="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</a><br> U.S. Department of Commerce / NOAA / OAR<br> Geophysical Fluid Dynamics Laboratory voice: (609) 452-6547<br> 201 Forrestal Road fax: (609) 987-5063<br> Princeton, NJ 08540-6649 <a href="http://www.gfdl.noaa.gov/~cjs/">http://www.gfdl.noaa.gov/~cjs/</a><br>********************************************************************<br><br>"The contents of this message are mine personally and do not necessarily<br>reflect any position of the Government or NOAA."<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></div></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; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><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></div></span> </div><br></body></html>