Changeset 137 for trunk/SRC/Calendar
- Timestamp:
- 07/12/06 11:33:44 (18 years ago)
- Location:
- trunk/SRC/Calendar
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Calendar/caldat.pro
r136 r137 2 2 ; 3 3 ; @file_comments 4 ; Return the calendar date and time given Julian date.4 ; Return the calendar date and time given julian date. 5 5 ; This is the inverse of the function JULDAY. 6 ; 6 ; 3 calendars are avalable according to the value of key_caltype 7 ; (variable of the common file cm_4cal): 'greg', '360d', 'noleap' 8 ; 7 9 ; @categories Calendar 8 10 ; … … 30 32 ; 31 33 ; @keyword NDAYSPM {default=30} 32 ; for using a calendar with fixed number of days per months. 34 ; To use a calendar with fixed number of days per months. 35 ; see also the use of key_caltype (variable of the common file cm_4cal) 33 36 ; 34 37 ; @uses cm_4cal … … 39 42 ; 40 43 ; @history 41 ; Translated from "Numerical Recip es in C", by William H. Press,44 ; Translated from "Numerical Recipies in C", by William H. Press, 42 45 ; Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 43 46 ; Cambridge University Press, 1988 (second printing). … … 51 54 ; 52 55 ; AB, 3 January 2000, Make seconds output as DOUBLE in array output. 56 ; 57 ; Sebastien Masson, May 2006, add diferent calendat with key_caltype 58 ; (variable of the common file cm_4cal) 53 59 ; 54 60 ; @version $Id$ -
trunk/SRC/Calendar/date2jul.pro
r136 r137 12 12 ; date in yyyymmdd format 13 13 ; 14 ; @keyword GRADS {in}{optional}14 ; @keyword GRADS 15 15 ; if 1 <= year <= 49 --> year = 2000 + year 16 16 ; if 50 <= year <= 99 --> year = 1900 + year … … 27 27 ; 1 28 28 ; 29 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr)30 ; 29 ; @history 30 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) June 2005 31 31 ; 32 32 ; @version $Id$ -
trunk/SRC/Calendar/date2string.pro
r136 r137 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 1 ;------------------------------------------------------------ 4 2 ;+ … … 10 8 ; 11 9 ; @param yyyymmdd {in}{required} 12 ; the date in the format yyyymmdd 13 ; 14 ; @file_comments 15 ; keyword parameters of string function to specify the format of 16 ; the month (the C format) can be used 10 ; the date in the format yyyymmdd. Can be scalar or array 17 11 ; 18 12 ; @keyword _EXTRA 19 ; used to pass your keywords to the created procedure. 13 ; used to pass your keywords to other procedures, for example 14 ; keyword FORMAT of string function (see example bellow) 20 15 ; 21 ; @returns 22 ; a string containing the date in a easy readable format 16 ; @returns 17 ; a string containing the date in a easy readable format with the 18 ; same number of elements than yyyymmdd. 23 19 ; 24 20 ; @examples … … 37 33 ;- 38 34 ;------------------------------------------------------------ 39 ;------------------------------------------------------------40 ;------------------------------------------------------------41 35 FUNCTION date2string, yyyymmdd, _EXTRA = ex 42 36 ; -
trunk/SRC/Calendar/daysinmonth.pro
r136 r137 9 9 ; @categories calendar 10 10 ; 11 ; @param month {in}{optional} 12 ; @param year {in}{optional} 13 ; Year is used only if the common variable key_caltype = 'greg'. 14 ; In that case, month and year must have the same number of elements. 15 ; If not provided, we take month and year from "time" common variable. 11 ; @param year {in}{optional}{default=from "time" common variable of cm_4cal} 12 ; To specify the year of the onth. Used only if the common variable 13 ; key_caltype = 'greg'. In that case, month and year must have the same 14 ; number of elements. 16 15 ; 17 16 ; @returns 18 17 ; number of days in a month or -1 in case of error 19 18 ; 20 ; @uses cm_4cal 19 ; @uses cm_4cal, updatenew 21 20 ; 22 21 ; @examples -
trunk/SRC/Calendar/jul2date.pro
r136 r137 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 1 ;------------------------------------------------------------ 4 2 ;+ … … 27 25 ;- 28 26 ;------------------------------------------------------------ 29 ;------------------------------------------------------------30 ;------------------------------------------------------------31 27 function jul2date, jday 32 28 ; -
trunk/SRC/Calendar/julday.pro
r136 r137 4 4 ; Calculate the Julian Day Number for a given month, day, and year. 5 5 ; This is the inverse of the library function CALDAT. 6 ; See also caldat, the inverse of this function. 6 ; 3 calendars are avalable according to the value of key_caltype 7 ; (variable of the common file cm_4cal): 'greg', '360d', 'noleap' 7 8 ; 8 9 ; @categories Calendar … … 15 16 ; Number of day of the month.Can be scalar or array 16 17 ; 17 ; @param YEARin {in}{required} 18 ; Number of the desired year. 18 ; @param YEARin {in}{required} 19 ; Number of the desired year.Year parameters must be valid 19 20 ; values from the civil calendar. Years B.C.E. are represented 20 ; as negative integers. 21 ; as positive integers. 21 ; as negative integers. Years in the common era are represented 22 ; as positive integers. In particular, note that there is no 22 23 ; year 0 in the civil calendar. 1 B.C.E. (-1) is followed by 23 ; 1 C.E. (1). Can be scalar or array 24 ; 25 ; @param HOUR {in}{optional} 24 ; 1 C.E. (1). 25 ; Change: However for climatological year, we do accept the year 26 ; O but we change it for year 654321L (the same trick is done in 27 ; caldat so caldat, julday(1,1,0) gives you back Jan 1st of year 0) 28 ; Can be scalar or array 29 ; 30 ; @param HOUR {in}{optional}{default=12} 26 31 ; Number of the hour of the day. Can be scalar or array 27 32 ; 28 ; @param MINUTE {in}{optional} 33 ; @param MINUTE {in}{optional}{default=0} 29 34 ; Number of the minute of the hour. Can be scalar or array 30 35 ; 31 ; @param SECOND {in}{optional} 36 ; @param SECOND {in}{optional}{default=0} 32 37 ; Number of the second of the minute. Can be scalar or array 33 38 ; … … 37 42 ; 38 43 ; @keyword NDAYSPM {default=30} 39 ; for using a calendar with fixed number of days per months. 44 ; To use a calendar with fixed number of days per months. 45 ; see also the use of key_caltype (variable of the common file cm_4cal) 40 46 ; 41 47 ; @returns … … 52 58 ; Julian dates. 53 59 ; 54 ; @history Translated from "Numerical Recipes in C", by William H. Press, 60 ; @history 61 ; Translated from "Numerical Recipies in C", by William H. Press, 55 62 ; Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 56 63 ; Cambridge University Press, 1988 (second printing). … … 60 67 ; 61 68 ; Eric Guilyardi, June 1999 62 ; Added keyword ndayspm for fixed number of days per months 63 ; + change to accept year 0 69 ; Added key_work ndayspm for fixed number of days per months 70 ; 71 ; CT, April 2000, Now accepts vectors or scalars. 64 72 ; 65 73 ; Sebastien Masson, Aug. 2003 … … 67 75 ; eg. julday(349,1,1970) 68 76 ; 69 ; CT, April 2000, Now accepts vectors or scalars. 77 ; Sebastien Masson, May 2006, add diferent calendat with key_caltype 78 ; (variable of the common file cm_4cal) 70 79 ; 71 80 ; @version $Id$ -
trunk/SRC/Calendar/leapyr.pro
r136 r137 10 10 ; 11 11 ; @param year {in}{required} 12 ; year to be tested as a leap year 12 ; year to be tested as a leap year. Can be scalar or array 13 13 ; 14 14 ; @returns 15 15 ; 0 then not a leap year, 1 then year is a leap year 16 ; with the same number of elements than year. 16 17 ; 17 18 ; @uses cm_4cal … … 25 26 ;20/09/88 26 27 ; 27 ; 28 ; November 2004: correction for century years... S. Masson; 28 29 ; 29 ; 30 ; 31 ; 32 ; 33 ; 34 ; 35 ; + suppress the automatic change 89 -> 198930 ; Every year divisible by 4 is a leap year. 31 ; But every year divisible by 100 is NOT a leap year 32 ; Unless the year is also divisible by 400, then it is still a 33 ; leap year. 34 ; This means that year 1800, 1900, 2100, 2200, 2300 and 2500 are 35 ; NOT leap years, while year 2000 and 2400 are leap years. 36 ; + supress the automatic change 89 -> 1989 36 37 ; 37 ; June 2005 update for new commons, Sebastien Masson. 38 ; 38 ; June 2005 update for new commons, Sebastien Masson. 39 39 ; 40 40 ; @version $Id$ -
trunk/SRC/Calendar/monthname.pro
r136 r137 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 1 ;------------------------------------------------------------ 4 2 ;+ … … 7 5 ; gives the name of a month 8 6 ; 9 ; @categories calendar 7 ; @categories calendar, string 10 8 ; 11 ; @param m m1 {in}{required}12 ; the month number (from 1 to 12) 9 ; @param month {in}{required} 10 ; the month number (from 1 to 12). Can be scalar or array 13 11 ; 14 ; @keyword _EXTRA 15 ; used to pass your keywords to the created procedure. 12 ; @keyword _EXTRA 13 ; used to pass your keywords to other procedures, for example 14 ; keyword FORMAT of string function (see example bellow) 16 15 ; 17 ; @file_comments 18 ; keyword parameters of string function to specify the format of the 19 ; month (the C format) can be used. 20 ; 21 ; @returns 22 ; the month's name 16 ; @returns 17 ; the month names, a string with the same number of elements than month. 23 18 ; 24 19 ; @examples … … 32 27 ;- 33 28 ;------------------------------------------------------------ 34 ;------------------------------------------------------------ 35 ;------------------------------------------------------------ 36 FUNCTION monthname, mm1, _EXTRA = ex 29 FUNCTION monthname, month, _EXTRA = ex 37 30 ; 38 31 compile_opt idl2, strictarrsubs 39 32 ; 40 return, string(format='(C(CMoA0))',31*(m m1-1), _EXTRA = ex)33 return, string(format='(C(CMoA0))',31*(month-1), _EXTRA = ex) 41 34 end
Note: See TracChangeset
for help on using the changeset viewer.