[138] | 1 | |
---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
| 3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 4 | |
---|
| 5 | <!-- Generated by IDLdoc 2.0 --> |
---|
| 6 | |
---|
| 7 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 8 | <head> |
---|
| 9 | <title>julday.pro (SAXO Documentation)</title> |
---|
| 10 | |
---|
| 11 | |
---|
[191] | 12 | <link rel="stylesheet" type="text/css" media="all" href="./../main_files.css" /> |
---|
| 13 | <link rel="stylesheet" type="text/css" media="print" href="./../main_files_print.css" /> |
---|
[138] | 14 | |
---|
| 15 | |
---|
| 16 | <script type="text/javascript"> |
---|
| 17 | function setTitle() { |
---|
| 18 | parent.document.title="julday.pro (SAXO Documentation)"; |
---|
| 19 | } |
---|
| 20 | </script> |
---|
| 21 | </head> |
---|
| 22 | |
---|
| 23 | <body onload="setTitle();"> |
---|
| 24 | |
---|
| 25 | <div id="navbar_title"> |
---|
| 26 | <h1>SAXO Documentation</h1> |
---|
| 27 | </div> |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | <div id="main_navbar"> |
---|
| 31 | |
---|
| 32 | <table cellspacing="0"> |
---|
| 33 | <tr> |
---|
| 34 | |
---|
[189] | 35 | <td><a href="./../overview.html" title="Overview of library">Overview</a></td> |
---|
[138] | 36 | |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | <td >Directory</td> |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
[189] | 43 | <td><a href="./../idldoc-categories.html" title="Browse library by category">Categories</a></td> |
---|
[138] | 44 | |
---|
| 45 | |
---|
| 46 | |
---|
[189] | 47 | <td><a href="./../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td> |
---|
[138] | 48 | |
---|
| 49 | |
---|
| 50 | |
---|
[189] | 51 | <td><a href="./../search-page.html" title="Search library">Search</a></td> |
---|
[138] | 52 | |
---|
| 53 | |
---|
| 54 | <td id="selected">File</td> |
---|
| 55 | |
---|
| 56 | |
---|
[189] | 57 | <td><a href="../../../Calendar//julday.pro" title="Source code of a file">Source</a></td> |
---|
[138] | 58 | |
---|
| 59 | |
---|
| 60 | |
---|
[189] | 61 | <td><a href="./../idldoc-help.html" title="Help on IDLdoc">Help</a></td> |
---|
[138] | 62 | |
---|
| 63 | |
---|
| 64 | <td >Etc</td> |
---|
| 65 | |
---|
| 66 | <td id="flexible">Developer documentation</td> |
---|
| 67 | </tr> |
---|
| 68 | </table> |
---|
| 69 | |
---|
| 70 | </div> |
---|
| 71 | |
---|
| 72 | <div id="secondary_navbar"> |
---|
| 73 | |
---|
[189] | 74 | <a href="jul2date.html"><<prev file</a> | <a href="leapyr.html">next file >></a> <a href="julday.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a> summary: fields | routine details: <a href="#routine_details">routine</a> |
---|
[138] | 75 | |
---|
| 76 | </div> |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | <div id="container"> |
---|
| 80 | |
---|
[189] | 81 | <h1 class="directory"><a href="directory-overview.html">Calendar/</a></h1> |
---|
[138] | 82 | <h2 class="pro_file">julday.pro</h2> |
---|
| 83 | |
---|
| 84 | <div id="file_attr"> |
---|
| 85 | <dl> |
---|
| 86 | </dl> |
---|
| 87 | </div> |
---|
| 88 | |
---|
| 89 | <div id="file_comments"> |
---|
| 90 | Calculate the Julian Day Number for a given month, day, and year. |
---|
[321] | 91 | This is the inverse of the library function <a href="..//Calendar/caldat.html">caldat</a>. |
---|
[234] | 92 | 3 calendars are available according to the value of key_caltype |
---|
[138] | 93 | (variable of the common file cm_4cal): 'greg', '360d', 'noleap' |
---|
| 94 | </div> |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | <div id="routine_details"> |
---|
| 105 | |
---|
| 106 | |
---|
[163] | 107 | <div class="routine_details" id="_julday"> |
---|
[138] | 108 | |
---|
[234] | 109 | <h2><a class="top" href="#container">top</a>julday <span class="categories"> |
---|
| 110 | Calendar |
---|
[138] | 111 | </span></h2> |
---|
| 112 | |
---|
| 113 | <p class="header"> |
---|
[321] | 114 | <span class="result">result = </span>julday(<span class="result">[<a href="#_julday_param_month">month</a>][, <a href="#_julday_param_day">day</a>][, <a href="#_julday_param_yearin">yearin</a>][, <a href="#_julday_param_hour">hour</a>][, <a href="#_julday_param_minute">minute</a>][, <a href="#_julday_param_second">second</a>]</span>, <a href="#_julday_keyword_NDAYSPM">NDAYSPM</a>=<span class="result">integer</span>)</p> |
---|
[138] | 115 | |
---|
| 116 | <div class="comments"> |
---|
| 117 | </div> |
---|
| 118 | |
---|
[234] | 119 | <h3>Return value</h3><div class="preformat"> |
---|
[138] | 120 | the Julian Day Number (which begins at noon) of the specified calendar date. |
---|
[234] | 121 | If Hour, Minute, and Second are not specified, then the result will be a |
---|
| 122 | long integer, otherwise the result is a double precision floating point |
---|
[138] | 123 | number. |
---|
| 124 | </div> |
---|
| 125 | |
---|
| 126 | |
---|
| 127 | <h3>Parameters</h3> |
---|
| 128 | |
---|
| 129 | |
---|
[290] | 130 | <h4 id="_julday_param_month">month |
---|
[138] | 131 | <span class="attr">in</span> |
---|
| 132 | |
---|
[321] | 133 | <span class="attr">optional</span> |
---|
[138] | 134 | |
---|
| 135 | |
---|
[234] | 136 | <span class="attr">type:</span> <span class="value">scalar (integer or double) or array of scalars</span> |
---|
[138] | 137 | |
---|
| 138 | |
---|
| 139 | </h4> |
---|
| 140 | |
---|
[234] | 141 | <div class="comments"> |
---|
| 142 | Number of the desired month (1 = January, ..., 12 = December). |
---|
[138] | 143 | </div> |
---|
| 144 | |
---|
[290] | 145 | <h4 id="_julday_param_day">day |
---|
[138] | 146 | <span class="attr">in</span> |
---|
| 147 | |
---|
[321] | 148 | <span class="attr">optional</span> |
---|
[138] | 149 | |
---|
| 150 | |
---|
[234] | 151 | <span class="attr">type:</span> <span class="value">scalar (integer or double) or array of scalars</span> |
---|
[138] | 152 | |
---|
| 153 | |
---|
| 154 | </h4> |
---|
| 155 | |
---|
[234] | 156 | <div class="comments"> |
---|
| 157 | Number of day of the month. |
---|
[138] | 158 | </div> |
---|
| 159 | |
---|
[290] | 160 | <h4 id="_julday_param_yearin">yearin |
---|
[138] | 161 | <span class="attr">in</span> |
---|
| 162 | |
---|
[321] | 163 | <span class="attr">optional</span> |
---|
[138] | 164 | |
---|
| 165 | |
---|
[234] | 166 | <span class="attr">type:</span> <span class="value">scalar (integer or double) or array of scalars</span> |
---|
[138] | 167 | |
---|
| 168 | |
---|
| 169 | </h4> |
---|
| 170 | |
---|
[234] | 171 | <div class="comments"> |
---|
[138] | 172 | Number of the desired year.Year parameters must be valid |
---|
| 173 | values from the civil calendar. Years B.C.E. are represented |
---|
| 174 | as negative integers. Years in the common era are represented |
---|
| 175 | as positive integers. In particular, note that there is no |
---|
| 176 | year 0 in the civil calendar. 1 B.C.E. (-1) is followed by |
---|
[234] | 177 | 1 C.E. (1). |
---|
| 178 | Change: However for climatological year, we do accept the year |
---|
[290] | 179 | 0 but we change it for year 654321L (the same trick is done in |
---|
| 180 | <a href="..//Calendar/caldat.html">caldat</a> so caldat, julday(1,1,0) gives you back Jan 1st of year 0) |
---|
[138] | 181 | </div> |
---|
| 182 | |
---|
[290] | 183 | <h4 id="_julday_param_hour">hour |
---|
[138] | 184 | <span class="attr">in</span> |
---|
| 185 | |
---|
| 186 | <span class="attr">optional</span> |
---|
| 187 | |
---|
| 188 | |
---|
[234] | 189 | <span class="attr">type:</span> <span class="value">scalar (integer or double) or array of scalars</span> |
---|
[138] | 190 | <span class="attr">default:</span> <span class="value">12</span> |
---|
| 191 | |
---|
| 192 | </h4> |
---|
| 193 | |
---|
[234] | 194 | <div class="comments"> |
---|
| 195 | Number of the hour of the day. |
---|
[138] | 196 | </div> |
---|
| 197 | |
---|
[290] | 198 | <h4 id="_julday_param_minute">minute |
---|
[138] | 199 | <span class="attr">in</span> |
---|
| 200 | |
---|
| 201 | <span class="attr">optional</span> |
---|
| 202 | |
---|
| 203 | |
---|
[234] | 204 | <span class="attr">type:</span> <span class="value">scalar (integer or double) or array of scalars</span> |
---|
[138] | 205 | <span class="attr">default:</span> <span class="value">0</span> |
---|
| 206 | |
---|
| 207 | </h4> |
---|
| 208 | |
---|
| 209 | <div class="comments"> |
---|
[234] | 210 | Number of the minute of the hour. |
---|
[138] | 211 | </div> |
---|
| 212 | |
---|
[290] | 213 | <h4 id="_julday_param_second">second |
---|
[138] | 214 | <span class="attr">in</span> |
---|
| 215 | |
---|
| 216 | <span class="attr">optional</span> |
---|
| 217 | |
---|
| 218 | |
---|
[234] | 219 | <span class="attr">type:</span> <span class="value">scalar (integer or double) or array of scalars</span> |
---|
[138] | 220 | <span class="attr">default:</span> <span class="value">0</span> |
---|
| 221 | |
---|
| 222 | </h4> |
---|
| 223 | |
---|
| 224 | <div class="comments"> |
---|
[234] | 225 | Number of the second of the minute. |
---|
[138] | 226 | </div> |
---|
| 227 | |
---|
| 228 | |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | <h3>Keywords</h3> |
---|
| 234 | |
---|
[163] | 235 | <h4 id="_julday_keyword_NDAYSPM">NDAYSPM |
---|
[138] | 236 | |
---|
| 237 | |
---|
| 238 | |
---|
| 239 | |
---|
| 240 | |
---|
[234] | 241 | <span class="attr">type:</span> <span class="value">integer</span> |
---|
[138] | 242 | <span class="attr">default:</span> <span class="value">30</span> |
---|
| 243 | |
---|
| 244 | </h4> |
---|
| 245 | |
---|
[234] | 246 | <div class="comments"> |
---|
| 247 | To use a calendar with fixed number of days per month. |
---|
[138] | 248 | see also the use of key_caltype (variable of the common file cm_4cal) |
---|
| 249 | </div> |
---|
| 250 | |
---|
| 251 | |
---|
| 252 | |
---|
| 253 | |
---|
| 254 | <h3>Version history</h3> |
---|
| 255 | |
---|
[234] | 256 | <h4>Version</h4><div class="preformat"> |
---|
[402] | 257 | $Id: julday.pro 396 2009-04-08 16:14:31Z smasson $</div> |
---|
[234] | 258 | <h4>History</h4><div class="preformat"> |
---|
[321] | 259 | Translated from "Numerical Recipes in C", by William H. Press, |
---|
[138] | 260 | Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. |
---|
| 261 | Cambridge University Press, 1988 (second printing). |
---|
| 262 | |
---|
| 263 | AB, September, 1988 |
---|
| 264 | DMS, April, 1995, Added time of day. |
---|
| 265 | |
---|
| 266 | Eric Guilyardi, June 1999 |
---|
| 267 | Added key_work ndayspm for fixed number of days per months |
---|
| 268 | |
---|
| 269 | CT, April 2000, Now accepts vectors or scalars. |
---|
| 270 | |
---|
| 271 | Sebastien Masson, Aug. 2003 |
---|
| 272 | fix bug for negative and large values of month values |
---|
| 273 | eg. julday(349,1,1970) |
---|
| 274 | |
---|
[234] | 275 | Sebastien Masson, May 2006, add different calendat with key_caltype |
---|
[138] | 276 | (variable of the common file cm_4cal) |
---|
| 277 | </div> |
---|
| 278 | |
---|
| 279 | |
---|
| 280 | <h3>Known issues</h3> |
---|
| 281 | |
---|
| 282 | |
---|
| 283 | |
---|
[234] | 284 | <h4>Restrictions</h4><div class="preformat"> |
---|
| 285 | The result will have the same dimensions as the smallest array, or |
---|
[138] | 286 | will be a scalar if all arguments are scalars. |
---|
[234] | 287 | |
---|
| 288 | |
---|
[138] | 289 | Accuracy using IEEE double precision numbers is approximately |
---|
| 290 | 1/10000th of a second, with higher accuracy for smaller (earlier) |
---|
| 291 | Julian dates. |
---|
| 292 | </div> |
---|
| 293 | |
---|
| 294 | <h3>Other attributes</h3> |
---|
| 295 | |
---|
| 296 | |
---|
[234] | 297 | <h4>Uses routines</h4><div class="preformat"> |
---|
[402] | 298 | <a href="..//Commons/cm_4cal.html">cm_4cal</a> |
---|
[138] | 299 | </div> |
---|
| 300 | |
---|
| 301 | |
---|
| 302 | |
---|
| 303 | |
---|
[163] | 304 | <h3>Statistics</h3> |
---|
| 305 | <table class="statistics"> |
---|
[210] | 306 | <tr><td>McCabe cyclic</td><td> 43</td></tr> |
---|
[163] | 307 | <tr><td>McCabe essential</td><td> 1</td></tr> |
---|
| 308 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
| 309 | </table> |
---|
[138] | 310 | |
---|
| 311 | |
---|
| 312 | </div> |
---|
| 313 | |
---|
| 314 | </div> |
---|
| 315 | |
---|
| 316 | |
---|
| 317 | |
---|
| 318 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
| 319 | |
---|
| 320 | </div> |
---|
| 321 | |
---|
| 322 | </body> |
---|
[249] | 323 | </html> |
---|