
| Category | Value (percent) |
|---|---|
| 1 hour | 4.167 |
| 2 hours | 8.333 |
| 3 hours | 12.5 |
| 4 hours | 16.667 |
| 6 hours | 25 |
Illustrative calculation, not observations from the linked source. For uniform 24-slot toy days, 100×shift/24; not a real clock transition model.
Executive summary
A date does not by itself identify the interval a daily weather value describes. An observer might record rainfall at seven in the morning for the period since the previous reading. A sensor network might summarize measurements between two UTC midnights. A garden diary might use the civil date at the garden, with daylight saving changes in spring and fall. All three files can print the same date while describing substantially different hours. A statistical baseline for that month and day is a fourth thing again. It describes a historical reference, not a new measurement for that date.
Before joining records, name the intervals on both sides, identify the clocks that define their boundaries, and confirm that the operations fit the meteorological element. Keep publication labels and interpreted times as separate fields. Rebuild an aligned daily value from suitable subdaily observations only if available and comparable. A published total cannot generally be reallocated exactly to different hours if no within-day measurements exist. If the timing is unknown, keep that limitation visible and test whether interpretation changes under alternatives rather than inventing midnight.
The chart in this article is a fictional calculation. On a perfectly uniform 24-slot day, moving a boundary by one to six whole hourly slots can change the assignment of between roughly 4.167 and 25 percent of hourly records. That does not measure precipitation, prove a bias of that size, or describe daylight saving transitions. It is a way to see how a date-only comparison can hide boundary differences even when all rows are present.
Read the label before you read the value
A local observer checks a rain gauge in the morning and labels a reading with the date on the calendar. An automated recorder collects intervals through each midnight in UTC. A school garden logs when plants were examined, using the clock visible to the teacher. Suppose all three tables contain the label June 12. They need not refer to the same start, the same end, or even the same number of elapsed hours. The files can each be correct on their own terms while an exact match on the date column combines incompatible periods.
Ask what the label is doing. Is it a civil calendar date attached to an event? Is it the nominal date of an interval? Does it label the day when a manual reading was taken, with the relevant accumulation beginning earlier? Does it index a reference statistic that repeats across all years in a given baseline edition? Sometimes there is an explicit interval start and end. In other data the only evidence is a product manual and station metadata. A time printed near a value may be an observation time, an issue time, or another record time altogether. Use the product definitions before assigning any of those meanings.
For one event at a known instant, assigning a civil date can be straightforward. Take a fictional timestamp of 23:30 on June 12 at an offset of seven hours west of UTC. Its UTC instant is 06:30 on June 13. A local date-keyed count for June 12 includes the event, while a UTC date-keyed count puts it in June 13. No water or insects have changed; only their grouping has. That difference is expected when the keys answer different questions. The mistake is to treat a matching date string in the two tables as proof that the groups have the same members.
An interval requires more care than an event. If a rain gauge reports a value for the preceding hour, it may label that interval by its end. A record timestamped at exactly midnight can therefore describe rainfall mostly in the previous date, depending on the definition and the precision of the data. Placing an observation entirely in the date named by the timestamp is not necessarily faithful to the interval it represents. Use the reporting convention rather than the visual intuition that midnight belongs to the printed date below it.
Write a one-line interpretation for each input before coding. For example: “Garden visit start in the local civil calendar at the garden, confirmed actual offset”; “hourly amounts for full disjoint intervals ending at UTC timestamps”; or “station-day total under the provider's station observation convention, interval boundaries unconfirmed.” These statements already reveal which combinations are possible. Naming the problem before choosing a key prevents a commonly seen mistake: a program resolves all timestamps correctly and still creates the wrong daily join because it was asked to resolve the wrong concept of day.
Keep civil time, offset and interval separate
A named time zone defines a civil-clock rule for a place and relevant period. A numeric UTC offset describes the difference between local time and UTC at an instant. A plain local clock reading without either does not fully identify an instant. In a region observing seasonal offset changes, one named zone can use more than one offset within a year. Conversely several places can share a numeric offset at one instant and use different rules at another. An offset found on one row is not enough to reconstruct the station's civil history or assume the same offset for a whole series.
Choose the time zone appropriate to the thing you are trying to describe. A public diary's date may be the local civil date at the place of observation. A weather archive may use local standard time rather than the civil clock as changed by daylight saving, or it may use a reporting period set by an observer. Calling all these conventions local does not make them equivalent. Keep the convention explicit and do not apply daylight saving adjustment just because coordinates correspond to a region where civil clocks usually change. An instrument can operate on a fixed reference clock through the whole year.
For accurately timestamped events, a useful data representation retains the raw string, its interpretation and provenance, the resulting instant if known, and the derived reporting date. Store the named civil zone if relevant and the effective offset used to resolve each event. If a value summarizes several measurements, retain the interval endpoints as well. In an audit, those endpoints may matter more than the offset on the displayed label. A single record might legitimately have a UTC date for processing and a local date for reporting, neither of which replaces the source's date.
Use an interval convention such as including the start and excluding the end in analysis bins so that an event exactly on a shared boundary belongs to one bin. This rule is a good choice for point events and explicitly defined bins. It does not override the conventions of a source reporting accumulated values. For such sources preserve the original definition of the observation period, interpret intervals consistently, and verify whether the interval method supports a clean reaggregation. If an input gives only a printed day with no interval detail, a consistent bin rule on your side cannot supply what the provider did not record.
The difference is visible in a brief counterexample. A temperature sensor provides an instantaneous reading at midnight, and a rain instrument provides the preceding hour's total with a label at that same midnight. The temperature observation belongs to the first instant of the date under a start-inclusive convention. The rainfall amount refers to elapsed time before that instant and may belong to the previous date when bins line up. Assigning both with the same function that extracts the date of the timestamp will be wrong for at least one of them if the desired output measures those two things as described.
Read NOAA's station-day fields with the product in mind
The NOAA GHCN-Daily documentation describes a daily archive compiled from multiple sources, with a station identifier, date and element values. It also describes optional measurement, quality and source flags and, where given in the documented output, a time of observation expressed in local time at the station. It distinguishes the temperature at observation time from daily extrema and precipitation totals. An analyst should preserve those distinctions rather than treating all element values as instantaneous measurements at the same displayed time.
Read flags by field and by the exact format's documentation. A code in the measurement field can qualify how a value was produced or mark a trace. A code in a quality field refers to a different class of information. Source metadata helps identify where an element came from. Dropping these columns because the first plot looks clean may remove clues needed to interpret a boundary mismatch or an unusual record. When an export has blank values or a documented sentinel for missing data, neither is a measured zero. A trace is different again; record any numeric convention for it explicitly if used in a calculation.
A documented multi-day amount is not a series of daily amounts. Suppose a gauge was not read on two dates, then reports a combined total. The information that a total exists is valuable, but it does not say how much to assign to either missing calendar day. Dividing equally could be a scenario for a particular analysis, not a recovered observation. In a study testing same-day response after precipitation, treating the entire multi-day amount as rain on the printed date can create an artificial association. Store the original total with its accumulation status and make a deliberate decision about whether it is usable for a defined time window.
Do not infer endpoints from an archive name or assume the archive's sources share identical timing rules. The local observation time field, where supplied, is valuable evidence, but interpreting exactly which hours contributed requires relevant station and element information. A representative reporting convention does not necessarily cover all stations or historical segments. If an analyst can confirm from metadata that a shift in observation practice happened halfway through a series, record distinct rules for the appropriate periods. If a change is only suspected, flag that uncertainty and avoid creating a retrospective deterministic conversion that lacks evidence.
A single station identifier also does not answer how well the station represents a field site. The time alignment discussed here is separate from spatial representativeness. A suitable station may have a usable daily convention but sit far from the garden, and a close station may have an uncertain reporting history. A methods statement should describe both choices independently. Weather fields that share a date key can differ in nearby terrain, exposure, elevation, or measurement practice without any coding error. A successful column match is a necessary technical step only after the scientific interpretation has been justified.
Normals belong in a separate table
A daily normal is not just another station reading that happens to have a shorter date. The NOAA 1991–2020 daily normals documentation describes historical reference statistics organized by station and calendar month and day. Its suite includes averages, frequencies and percentiles for specified elements. The format's date field is month and day, not a year-specific observation timestamp. Use a join keyed by the appropriate station or an explicitly justified station mapping, normal edition, calendar date and element or statistic. Preserve the year and chronology of the observed record on its own side.
For example, an observed daily maximum can be compared with the matching normal for daily maximum if the intended variables, units and conventions align sufficiently for the study. Subtracting a precipitation percentile from a station-day total and describing it as a departure from the mean would misstate the reference. Adding probabilities of precipitation from several calendar days does not in general give the probability of precipitation over the combined period. Statistical summaries are not interchangeable with observations just because both contain familiar weather names.
Special calendar days reveal the distinction. The documentation for this edition states that February 29 temperature averages are estimated from results for February 28 and March 1, while precipitation averages are not estimated for February 29. Accordingly, code should not blindly assume that the applicable element has a counterpart for every date, or that special-day handling is the same for every product and statistic. A day-of-year key can introduce another mismatch when leap years shift the index of dates after February. A month-and-day key is appropriate here because the product is documented that way; the leap-day policy remains an explicit choice distinct from the key itself.
Keep a method note about how a baseline supports the inference. An anomaly relative to a specified 30-year product can show the size of a difference from a chosen reference, not what hour rain began or the conditions when a single field observation occurred. Compare the same elements, preserve the product's stated treatment of incomplete station records where relevant, and do not use a normal to quietly fill a missing observation. If a model intentionally uses the climatological value as an estimate, label it as estimated so a reader can distinguish it from an observed daily value.
The chart: the fraction that changes dates is not the fraction of rain lost
The toy example imagines consecutive days, each with exactly 24 counted hourly slots, and moves the reporting boundary by a fixed whole number of slots. For a defined one-day set of 24 slots, shifting by one through six hours makes the corresponding number of slots cross into a neighboring date assignment. The arithmetic is 100 times the shift divided by 24. This is a count of slots, not a sum of their physical measurements. Whether the moved records sit before or after the boundary depends on the direction of the change.
| Fixed boundary shift | Number of slots assigned to another date | Share of 24 slots |
|---|---|---|
| 1 hour | 1 | 4.167% |
| 2 hours | 2 | 8.333% |
| 3 hours | 3 | 12.5% |
| 4 hours | 4 | 16.667% |
| 6 hours | 6 | 25% |
This is illustrative arithmetic independent of the NOAA observations. Count records that cross out of the defined original day's set; do not add the equal number that can cross into that day from its neighbor and divide the doubled count by 24. The chart asks how much of the original set gets a different date. A new day may still have 24 slots even though it trades some with the adjacent day. If you are comparing the full membership of two one-day sets, say explicitly whether the measure is overlap, slots lost from one set, or all differences in both sets.
An actual shift can have very little or a large effect on a specific amount. If all rainfall occurred far from the changed boundary and incoming slots were dry, a daily total might be identical. If one storm hour near the boundary supplied almost all the precipitation, including or excluding that hour can move most of the total. Maximum temperature can change if the warmest observation moves; the swap need not affect it if another value is just as extreme. Average temperature responds differently and may depend on observation spacing or elapsed durations. The chart cannot bound any of those quantities without more information about the values.
Reconstruct a day only from evidence that can support it
Suppose an hourly gauge measures nonoverlapping one-hour totals for intervals labeled by their end in UTC, and the project is interested in June 12 in a place on UTC minus seven throughout that date. The local date begins at 07:00 UTC on June 12 and ends at 07:00 UTC on June 13. The time bounds are sufficient to select exactly the 24 covered intervals, assuming no missing observations or quality exclusions. An interval beginning at the local start and ending an hour later belongs to the day. The interval ending at the local start does not belong merely because its timestamp displays that date.
Imagine that 8 millimetres fell in an interval beginning at 05:00 UTC on June 13, and 3 millimetres in another beginning at 06:00 UTC on June 12. The UTC June 12 daily total derived from just these two fictional wet hours is 3 millimetres. The local June 12 total derived from the same hours is 8 millimetres. The 3 millimetre hour began at 23:00 local on June 11, and the 8 millimetre hour began at 22:00 local on June 12. In this simple example the same total rain volume exists in the full period, but the relevant day differs. The reallocation is possible because the source tells us what happened in the individual intervals.
If the file instead supplies only daily totals under UTC, they cannot tell you those intervals. The same 3 millimetres for June 12 could have fallen at noon instead of 06:00 UTC, or the daily amount could have been spread across multiple hours. The 8 millimetres labeled June 13 could have occurred well after 07:00. These alternatives are identical from the perspective of the daily input and produce different local totals. Dividing the source totals in proportion to the hours that overlap each target day assumes a distribution that the input does not verify. Such a model may be useful as a declared sensitivity scenario, but not as a factual reaggregation.
Partial overlap at the subdaily scale creates the same problem in smaller form. A target-zone offset need not be a whole hour. If the target boundary bisects the reporting interval, a total for that interval cannot be split exactly without finer data or extra assumptions. If the product is an instantaneous sampled temperature instead, its timestamp can move between bins without dividing the value. These are distinct measurements. A robust method branches according to what was measured, instead of settling on one rule for any row that has a time label.
Revisit the summary operator at the same time. Precipitation amounts for suitable disjoint intervals can generally be added after checking coverage, units and interval definitions. A cumulative gauge reading may need differencing with handling for resets or discontinuities; adding the readings would count old rain more than once. Maxima from fully contained comparable subintervals can be combined by taking the maximum, but an extreme from a source interval crossing the boundary may occur on either side of it. A simple average of time samples is not automatically an elapsed-time weighted mean when spacing differs. Document which operator and completeness rule each published element uses.
A reconstruction may be technically possible but not desirable for a particular comparison. The available subdaily source might represent a different instrument, station history or measurement method from the original daily archive. For a climatology comparison, switching source just to get midnight boundaries can introduce another discrepancy. Verify what question is being asked and whether the method delivers the same quantity. Sometimes the best result is to compare multi-day or less boundary-sensitive windows, with limitations noted, rather than claim that two superficially aligned daily values are interchangeable.
Build daylight saving exceptions into the calculation
A local midnight to local midnight interval does not necessarily contain 24 elapsed hours. In a named civil zone a forward clock transition can create a gap in displayed times, and a backward transition can repeat displayed times. On a common one-hour forward transition, the civil day defined by its two local midnights spans 23 elapsed hours; the corresponding backward case spans 25. Those are examples, not universal historical rules. Do not infer a country's time conventions from a modern example used to test a spreadsheet. Derive each endpoint according to the rules supported for the place and date represented.
A raw wall-clock string such as “01:30” can be ambiguous if clocks have fallen back and that time occurs twice. If the record also carries a reliable offset, or another authoritative field identifies the instant, the two occurrences can be kept distinct. If the file lacks the needed evidence, assigning the earlier or later occurrence is an assumption rather than data recovery. The date may still be known in some cases, but calculations depending on the exact instant, sequence or span should reflect the uncertainty. A nonexistent civil-clock time in a forward transition also requires review. It could indicate a fixed-standard-time source, a logging convention, or an error; a parser that silently shifts the value forward is not independent evidence.
Keep elapsed hours and expected slots separate. If a network emits an observation every elapsed hour, a 23-hour civil window might have 23 expected intervals under aligned hourly boundaries, not 24 with one presumed missed observation. A 25-hour civil window can contain two observations carrying the same displayed hour with different offsets. If a logger samples only at stated civil clock readings, the source's behavior during a transition may differ. A daily completeness policy needs to use the expected observations for that product and window, not a one-size-fits-all row count.
An interval spanning midnight or a clock transition is special even outside a weather archive. A person records a twilight field visit beginning at 23:45 and ending at 00:15. The project can use the start date, allocate the actual event times where available, or classify the visit in its own evening session. Splitting the total bee count in half merely because the visit spans 15 minutes on either date would invent the timing of detections. A classification rule is acceptable if stated and appropriate to the field protocol. That rule does not tell you what civil-day weather convention to use; decide the linkage explicitly.
Choose the join by writing the question it must answer
For a garden diary looking for weather at the moment of observation, a nearest-eligible subdaily observation with an explicit tolerance may be a better match than a daily value. The time tolerance matters because a very distant measurement can be a poor substitute for actual conditions. State whether a nearest match is allowed on either side or only before the visit. If the link should represent antecedent conditions, allowing future weather can silently invalidate the interpretation. Store the difference in elapsed time as a diagnostic, and preserve cases where no eligible matching record was found.
For a question about daily summaries, rebuild compatible intervals where possible and join by an explicit definition of date, station linkage and element. Check the cardinality expected for the join. Many garden observations may legitimately link to one daily station value, but summing that value after it has been repeated into many diary rows will multiply the precipitation. Conversely a duplicated daily record can unexpectedly multiply the observation rows. Aggregate at the intended unit first, or preserve the many-to-one link and use an operator that does not mistake duplicated attributes for repeated measurements. A test with several visits at the same site on one day should catch this failure.
For an investigation of exposure before each observation, use elapsed time bounds that express the hypothesis. A window from 24 hours before a visit to its start is different from the previous named calendar date plus part of the current one. When daylight saving changes, elapsed duration and wall-clock subtraction can also differ. If the data give only day-level values, report that the requested rolling interval is unavailable or use a clearly labeled proxy. A provider day ending before the visit might be a defensible proxy under some designs. It should not be described as the exact preceding 24 hours unless verified.
For historical context, join the daily observed value to the matching normal and preserve both sources. This relationship is about corresponding calendar positions in a defined statistical baseline. It is not a chronological observation-to-observation match. Keep observation dates and normal month-day labels separate in human-readable tables. If one normal is attached to several different years, you may still have one baseline value for the day rather than multiple independent climatic observations. The same warning applies when one station provides context to many field sites.
When the source's observation window is not recoverable, choose whether a label-aligned exploratory analysis answers anything defensible. It might show an association with the provider-reported station day without establishing local-day simultaneity. Inspect plausible alternative assignments before drawing a narrow conclusion. For example, compare the cluster of apparent associations before and after a likely date-boundary correction, but do not choose the correction solely because it produces a desirable result. Frame the comparison as a robustness check. If an important conclusion changes direction under plausible rules, that sensitivity belongs in the result and may rule out a stronger temporal claim.
Make an audit receipt and test it against awkward dates
A short data receipt should state the original data products, the station identifiers and relevant date ranges, any known changes in station practice, and whether you identified the clock conventions from primary documentation or inferred them. Put the actual operation beside each input: preserve source date, resolve to UTC for matching, assign local date through a named zone, or reconstruct by documented interval bounds. Explain what stays unknown. A date field is often a convenient join key once these decisions have been made, but it is not a substitute for the decisions.
Document how each element behaves when input quality or availability is weak. Does a flagged daily record stay in the analysis view with a caution or become unavailable under the eligibility rule? How is a trace represented in a threshold test? What happens when a local daily rebuild is missing an interval? Apply a rule appropriate to the quantity. A missing hour before a daily maximum might hide the true extreme; a partial precipitation sum may be a valid subtotal but not a complete daily amount. Missingness can therefore affect the claim even when you know the day boundaries perfectly. This is separate from the mismatch between two complete but nonaligned sets of intervals.
Tests should include a known local timestamp that changes UTC date, an end-labeled interval touching a bin boundary, and a civil-date transition with ambiguous or absent wall-clock times. Include a leap day in a norms lookup, a multi-day precipitation total, a true zero, a trace, and a missing value. Use fake rows with obvious expected answers and check outputs rather than simply executing the code. For totals, also check that shifting complete intervals among bins does not create or destroy volume across an overall test period after accounting for edges. A test should fail when the logic approaches midnight with the wrong direction or treats a missing slot as zero.
Keep a report of matches and nonmatches organized by reason. Distinguish “no eligible observation,” “interval unknown,” “normal not available for this element and calendar date,” and “multiple candidates violated the intended key.” They require different fixes. A well-instrumented join can explain why a set of observations has weather available but a subset did not meet the temporal requirement. Without a reason field, an analyst may guess that unmatched rows reflect sensor downtime and try to fill them from another station when the actual problem is an unrecognized reporting boundary.
What a successful join looks like in a short field report
Consider a hypothetical early summer plant survey conducted at two gardens by people who record the visit start and end to the minute. They want to distinguish visits following a wet period from visits on days that merely received rain at some other hour. They have originally downloaded a nearby station's daily totals and noticed that several daytime visits fall on dates with nonzero totals. A first draft says each visit followed rain. That conclusion does not follow: the daily interval could extend past the visit, report earlier hours according to an observer's reading convention, or cover a different time window from the garden diary.
The team can specify a new analytical question prospectively: was there reported precipitation in the twelve elapsed hours immediately preceding the visit? It can check whether a suitable subdaily record covers that time window, whether intervals align with the visit clock or require treatment of partial intervals, and how close the instrument is to the garden. For a visit beginning at 10:20, one-hour amounts cannot reveal which portion of the measurement labeled 10:00 to 11:00 fell before departure. Rather than inventing an event time, the team could define a metric ending at the last complete hour preceding the visit, report it as such, or use finer data. These choices make different claims.
The same analysis can organize unavailable results usefully. One station series might have a known missing observation at the start of the window, while another garden day cannot be assigned an exact starting instant because its log lacked a time zone. Neither is evidence of a dry period. The report might display confirmed wet windows, windows with no recorded precipitation under complete eligible coverage, and indeterminate windows. The planning question then changes from trying to interpret a chart built by a date join to deciding which records actually support a temporal comparison, and where collecting better time information would add value next year.
Retain a small hand-checked example beside the data specification. Suppose a visit at 11:00 falls after one completed wet hour at 08:00 but before a second wet hour at 14:00, and the provider day contains both. A daily total is still relevant background, but only the earlier hour belongs in a suitably defined antecedent window. If an automated report includes the afternoon amount in its visit exposure, the hand check reveals the mismatch directly. A handful of fixtures like this are often more informative than a successful join for thousands of rows, because they verify the meaning of the statement that will appear beside the chart.
Finally, describe the analysis in terms of its remaining limitations. For example, a report may say that wetness is characterized by complete, eligible station intervals ending before each visit; it cannot establish whether rain fell at the garden itself. Another report using station-day values only may state that it compares visit dates with the label on the station record and does not make before-and-after claims. These are different levels of inference. A clean, reproducible data pipeline helps a reader see that difference rather than covering it with a shared date column.
Frequently asked questions
Can I set every source to UTC and merge on date?
You can express known instants in UTC, but that alone does not relocate the underlying measurements into UTC daily bins. If a source value already summarizes another window, converting a timestamp or appending a zone to a date label does not change which hours contributed. Define your common interval and reaggregate from appropriate detail, or keep the source convention and qualify the comparison.
If both files say local, are they aligned?
Not necessarily. Civil midnight, fixed standard midnight and the end of a manual observer interval can all be called local. Even two daily values labeled by local reading date can cover different intervals if their observation practices differ. Check the source convention, not just the word local.
Is a temperature normal an acceptable substitute for a missed weather measurement?
It is a separately defined historical reference, not an observation of the day that was missed. If a particular analysis uses it as a modeled substitute, state the method, preserve the missing observation and mark the substitute as estimated. Do not represent the substitution as recovered station data.
Can I make an exact local total from two UTC daily totals?
In general, no. Exact arithmetic requires knowing the amount contributed by the overlapping portions of the source periods or knowing that the periods align. An assumption of even rainfall through each source period may provide a scenario, not an observed local total. The edge-hour example shows how two compatible-looking daily totals can hide very different timing.
How much does the date boundary matter?
The toy chart measures assignment of counted slots, not the error in a weather element. Compare boundary sensitivity on appropriate data for the actual variables and question. At minimum, disclose the conventions, keep questionable cases distinguishable, and avoid claims about narrow timing when the data describe only differently bounded days.
References
- NOAA National Centers for Environmental Information, GHCN-Daily Documentation, format, elements, reporting fields and flags.
- NOAA National Centers for Environmental Information, 1991–2020 Daily Normals Documentation, daily statistics, calendar keys, station coverage and special-date treatment.