Skip to content

Commit 8114a47

Browse files
committed
Bring in better doc for time interval from ISO string.
Merge branch 'iso_time_interval_doc' into develop
2 parents 977d04e + 241d7f2 commit 8114a47

File tree

2 files changed

+47
-42
lines changed

2 files changed

+47
-42
lines changed

src/Infrastructure/FieldBundle/src/ESMF_FieldBundle.cppF90

+7-12
Original file line numberDiff line numberDiff line change
@@ -2183,8 +2183,8 @@ msg="This call does not work with packed FieldBundle.",&
21832183
!------------------------------------------------------------------------------
21842184
^undef ESMF_METHOD
21852185
^define ESMF_METHOD "ESMF_FieldBundleGetIndex()"
2186-
!BOPI
2187-
! !IROUTINE: ESMF_FieldBundleGet - Access the fieldIndex-th Field in FieldBundle
2186+
!BOP
2187+
! !IROUTINE: ESMF_FieldBundleGet - Access the Field at a specific index in a FieldBundle
21882188
!
21892189
! !INTERFACE:
21902190
! Private name; call using ESMF_FieldBundleGet()
@@ -2198,28 +2198,23 @@ msg="This call does not work with packed FieldBundle.",&
21982198
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
21992199
integer, intent(out), optional :: rc
22002200
!
2201-
! TODO: This method is DEPRECATED starting at 5.2.0r (was not part of the 5.2.0r
2202-
! reference manual.
2203-
! TODO: We should put a deprecation message into the Log file when this message
2204-
! is being called!
2205-
!
22062201
! !DESCRIPTION:
2207-
! Get the fieldIndex-th Field in FieldBundle. The order of the Field in FieldBundle
2208-
! is not guranteed. If this call is used iteratively, then any Add, Replace, Remove
2209-
! call on the FieldBundle will invalidate the order of the Field in the FieldBundle.
2202+
! Get the fieldIndex-th Field from a FieldBundle. The order of the Fields in FieldBundle
2203+
! is not guranteed. If this call is used iteratively, then any Add, Replace, or Remove
2204+
! call on the FieldBundle can change the order and/or number of Fields in that FieldBundle.
22102205
!
22112206
! \begin{description}
22122207
! \item [fieldbundle]
22132208
! {\tt ESMF\_FieldBundle} to be queried.
22142209
! \item [fieldIndex]
2215-
! The fieldIndex-th Field to be returned.
2210+
! The index of the Field to be returned.
22162211
! \item [field]
22172212
! The fieldIndex-th Field to be returned.
22182213
! \item [{[rc]}]
22192214
! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
22202215
! \end{description}
22212216
!
2222-
!EOPI
2217+
!EOP
22232218
!------------------------------------------------------------------------------
22242219
integer :: localrc ! local return code
22252220
integer :: l_fieldCount, i ! helper variable

src/Infrastructure/TimeMgr/interface/ESMF_TimeInterval.F90

+40-30
Original file line numberDiff line numberDiff line change
@@ -3135,10 +3135,12 @@ end subroutine ESMF_ParseDurString
31353135
#undef ESMF_METHOD
31363136
#define ESMF_METHOD "ESMF_TimeIntervalSetStr()"
31373137
!BOP
3138-
! !IROUTINE: ESMF_TimeIntervalSet - Initialize or set a TimeInterval from ISO format string
3138+
! !IROUTINE: ESMF_TimeIntervalSet - Initialize or set a TimeInterval from an ISO format string
3139+
! \label{API:TimeIntervalSetStr}
31393140

31403141
! !INTERFACE:
3141-
! Private name; call using ESMF_TimeIntervalSet()
3142+
! Private name; call using ESMF_TimeIntervalSet()
3143+
31423144
subroutine ESMF_TimeIntervalSetStr(timeinterval, timeIntervalString, rc)
31433145

31443146
! !ARGUMENTS:
@@ -3150,14 +3152,25 @@ subroutine ESMF_TimeIntervalSetStr(timeinterval, timeIntervalString, rc)
31503152
!
31513153
! !DESCRIPTION:
31523154
! Sets the value of the {\tt ESMF\_TimeInterval} using a user specified
3153-
! string in ISO duration format (P[n]Y[n]M[n]DT[n]H[n]M[n]S).
3155+
! string in ISO duration format P[y]Y[mm]M[d]DT[h]H[m]M[s]S. See ~\cite{ISO} and ~\cite{ISOnotes} for information about the format. In ESMF's implementation the time values can have the following types:
3156+
! \begin{description}
3157+
! \item[y] - the number of years expressed in up to a 64-bit integer
3158+
! \item[mm] - the number of months expressed in up to a 64-bit integer
3159+
! \item[d] - the number of days expressed in up to a 64-bit integer or a 64-bit floating point value (double)
3160+
! \item[h] - the number of hours expressed in up to a 32-bit integer or a 64-bit floating point value (double)
3161+
! \item[m] - the number of minutes expressed in up to a 32-bit integer or a 64-bit floating point value (double)
3162+
! \item[s] - the number of seconds expressed in up to a 64-bit integer or a 64-bit floating point value (double)
3163+
! \end{description}
31543164
!
3165+
! As with the ISO format, in ESMF's implementation the specifier and value can be left out if the value is 0. For example, P1YT1H3M4S is a valid format if the number of months and
3166+
! days are both 0. The time part including the T can also be left off if the time values are all 0, so P1Y is a valid string if just 1 year is being specified.
3167+
!
31553168
! The arguments are:
31563169
! \begin{description}
31573170
! \item[timeinterval]
31583171
! The object instance to initialize.
31593172
! \item[timeIntervalString]
3160-
! ISO format duration string.
3173+
! ISO format duration string (e.g. P[y]Y[mm]M[d]DT[h]H[m]M[s]S).
31613174
! \item[{[rc]}]
31623175
! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
31633176
! \end{description}
@@ -3179,9 +3192,6 @@ subroutine ESMF_TimeIntervalSetStr(timeinterval, timeIntervalString, rc)
31793192
if (present(rc)) rc = ESMF_RC_NOT_IMPL
31803193
localrc = ESMF_RC_NOT_IMPL
31813194

3182-
! DEBUG OUTPUT:
3183-
!write(*,*) "Duration string is:",timeIntervalString
3184-
31853195
! Parse string into values for each time unit
31863196
call ESMF_ParseDurString(timeintervalString, &
31873197
yy_i8=yy_i8, mm_i8=mm_i8, d_i8=d_i8, d_r8=d_r8, &
@@ -3219,7 +3229,7 @@ end subroutine ESMF_TimeIntervalSetStr
32193229
#undef ESMF_METHOD
32203230
#define ESMF_METHOD "ESMF_TimeIntervalSetStrCal()"
32213231
!BOP
3222-
! !IROUTINE: ESMF_TimeIntervalSet - Initialize or set a TimeInterval from ISO format string
3232+
! !IROUTINE: ESMF_TimeIntervalSet - Initialize or set a TimeInterval from an ISO format string and calendar
32233233

32243234
! !INTERFACE:
32253235
! Private name; call using ESMF_TimeIntervalSet()
@@ -3235,9 +3245,12 @@ subroutine ESMF_TimeIntervalSetStrCal(timeinterval, calendar, &
32353245
!
32363246
!
32373247
! !DESCRIPTION:
3238-
! Sets the value of the {\tt ESMF\_TimeInterval} using a user specified
3239-
! string in ISO duration format (P[n]Y[n]M[n]DT[n]H[n]M[n]S).
3240-
!
3248+
! Sets the value of the {\tt ESMF\_TimeInterval} using a user specified
3249+
! string in ISO duration format P[y]Y[mm]M[d]DT[h]H[m]M[s]S. See ~\cite{ISO} and ~\cite{ISOnotes} for
3250+
! information about the format. Also, see the description for the method
3251+
! {\tt ESMF\_TimeIntervalSetStr()}~\ref{API:TimeIntervalSetStr}
3252+
! for the specific types supported by ESMF for the values in the duration string.
3253+
!
32413254
! The arguments are:
32423255
! \begin{description}
32433256
! \item[timeinterval]
@@ -3252,7 +3265,7 @@ subroutine ESMF_TimeIntervalSetStrCal(timeinterval, calendar, &
32523265
! it contains a calendar. Alternate to, and mutually exclusive with,
32533266
! calkindflag below. Primarily for specifying a custom calendar kind.
32543267
! \item[timeIntervalString]
3255-
! ISO format duration string.
3268+
! ISO format duration string (e.g. P[y]Y[mm]M[d]DT[h]H[m]M[s]S).
32563269
! \item[{[rc]}]
32573270
! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
32583271
! \end{description}
@@ -3274,9 +3287,6 @@ subroutine ESMF_TimeIntervalSetStrCal(timeinterval, calendar, &
32743287
if (present(rc)) rc = ESMF_RC_NOT_IMPL
32753288
localrc = ESMF_RC_NOT_IMPL
32763289

3277-
! DEBUG OUTPUT:
3278-
!write(*,*) "Duration string is:",timeIntervalString
3279-
32803290
! Parse string into values for each time unit
32813291
call ESMF_ParseDurString(timeintervalString, &
32823292
yy_i8=yy_i8, mm_i8=mm_i8, d_i8=d_i8, d_r8=d_r8, &
@@ -3315,7 +3325,7 @@ end subroutine ESMF_TimeIntervalSetStrCal
33153325
#undef ESMF_METHOD
33163326
#define ESMF_METHOD "ESMF_TimeIntervalSetStrCalTyp()"
33173327
!BOP
3318-
! !IROUTINE: ESMF_TimeIntervalSet - Initialize or set a TimeInterval from ISO format string
3328+
! !IROUTINE: ESMF_TimeIntervalSet - Initialize or set a TimeInterval from an ISO format string and calendar kind
33193329

33203330
! !INTERFACE:
33213331
! Private name; call using ESMF_TimeIntervalSet()
@@ -3331,8 +3341,11 @@ subroutine ESMF_TimeIntervalSetStrCalTyp(timeinterval, calkindflag, &
33313341
!
33323342
!
33333343
! !DESCRIPTION:
3334-
! Sets the value of the {\tt ESMF\_TimeInterval} using a user specified
3335-
! string in ISO duration format (P[n]Y[n]M[n]DT[n]H[n]M[n]S).
3344+
! Sets the value of the {\tt ESMF\_TimeInterval} using a user specified
3345+
! string in ISO duration format P[y]Y[mm]M[d]DT[h]H[m]M[s]S. See ~\cite{ISO} and ~\cite{ISOnotes} for
3346+
! information about the format. Also, see the description for the method
3347+
! {\tt ESMF\_TimeIntervalSetStr()}~\ref{API:TimeIntervalSetStr}
3348+
! for the specific types supported by ESMF for the values in the duration string.
33363349
!
33373350
! The arguments are:
33383351
! \begin{description}
@@ -3343,7 +3356,7 @@ subroutine ESMF_TimeIntervalSetStrCalTyp(timeinterval, calkindflag, &
33433356
! calendar above. More convenient way of specifying a built-in
33443357
! calendar kind.
33453358
! \item[timeIntervalString]
3346-
! ISO format duration string.
3359+
! ISO format duration string (e.g. P[y]Y[mm]M[d]DT[h]H[m]M[s]S).
33473360
! \item[{[rc]}]
33483361
! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
33493362
! \end{description}
@@ -3365,10 +3378,7 @@ subroutine ESMF_TimeIntervalSetStrCalTyp(timeinterval, calkindflag, &
33653378
if (present(rc)) rc = ESMF_RC_NOT_IMPL
33663379
localrc = ESMF_RC_NOT_IMPL
33673380

3368-
! DEBUG OUTPUT:
3369-
!write(*,*) "Duration string is:",timeIntervalString
3370-
3371-
! Parse string into values for each time unit
3381+
! Parse string into values for each time unit
33723382
call ESMF_ParseDurString(timeintervalString, &
33733383
yy_i8=yy_i8, mm_i8=mm_i8, d_i8=d_i8, d_r8=d_r8, &
33743384
h_r8=h_r8, m_r8=m_r8, s_i8=s_i8, s_r8=s_r8, rc=localrc)
@@ -3404,7 +3414,7 @@ end subroutine ESMF_TimeIntervalSetStrCalTyp
34043414
#undef ESMF_METHOD
34053415
#define ESMF_METHOD "ESMF_TimeIntervalSetStrStart()"
34063416
!BOP
3407-
! !IROUTINE: ESMF_TimeIntervalSet - Initialize or set a TimeInterval from ISO format string
3417+
! !IROUTINE: ESMF_TimeIntervalSet - Initialize or set a TimeInterval from an ISO format string and start time
34083418

34093419
! !INTERFACE:
34103420
! Private name; call using ESMF_TimeIntervalSet()
@@ -3420,8 +3430,11 @@ subroutine ESMF_TimeIntervalSetStrStart(timeinterval, startTime, &
34203430
!
34213431
!
34223432
! !DESCRIPTION:
3423-
! Sets the value of the {\tt ESMF\_TimeInterval} using a user specified
3424-
! string in ISO duration format (P[n]Y[n]M[n]DT[n]H[n]M[n]S).
3433+
! Sets the value of the {\tt ESMF\_TimeInterval} using a user specified
3434+
! string in ISO duration format P[y]Y[mm]M[d]DT[h]H[m]M[s]S. See ~\cite{ISO} and ~\cite{ISOnotes} for
3435+
! information about the format. Also, see the description for the method
3436+
! {\tt ESMF\_TimeIntervalSetStr()}~\ref{API:TimeIntervalSetStr}
3437+
! for the specific types supported by ESMF for the values in the duration string.
34253438
!
34263439
! The arguments are:
34273440
! \begin{description}
@@ -3433,7 +3446,7 @@ subroutine ESMF_TimeIntervalSetStrStart(timeinterval, startTime, &
34333446
! in time. If not set, and calendar also not set, calendar interval
34343447
! "floats" across all calendars and times.
34353448
! \item[timeIntervalString]
3436-
! ISO format duration string.
3449+
! ISO format duration string (e.g. P[y]Y[mm]M[d]DT[h]H[m]M[s]S).
34373450
! \item[{[rc]}]
34383451
! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
34393452
! \end{description}
@@ -3455,9 +3468,6 @@ subroutine ESMF_TimeIntervalSetStrStart(timeinterval, startTime, &
34553468
if (present(rc)) rc = ESMF_RC_NOT_IMPL
34563469
localrc = ESMF_RC_NOT_IMPL
34573470

3458-
! DEBUG OUTPUT:
3459-
!write(*,*) "Duration string is:",timeIntervalString
3460-
34613471
! Parse string into values for each time unit
34623472
call ESMF_ParseDurString(timeintervalString, &
34633473
yy_i8=yy_i8, mm_i8=mm_i8, d_i8=d_i8, d_r8=d_r8, &

0 commit comments

Comments
 (0)