This repository was archived by the owner on May 28, 2024. It is now read-only.
Change time zone used for formatting gridmet dates #167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the second item in #159, "check date formatting for gridmet data," and changes the time zone used to format gridmet dates in
p2a_met_light_data
fromEtc/GMT+5
toUTC
.In
p2_met_data_at_obs_sites
, we read in the netcdf file containing the gridmet data and subset the data to the "well-observed" COMIDs. When we read in the netcdf, R formatstime
as a datetime ("dttm") column:I previously thought the gridmet dates were being read in and assigned a datetime using EST by default. However, taking a closer look, I think this should be changed to UTC. The gridmet website indicates that the data begin in 1979, so I think we're currently assigning dates 1 day off from what was in the original gridmet data. @jsadler2, can you confirm that you'd expect the gridmet data to start on 1979-01-01 and end on 2022-06-12?
Here's a comparison of using EST vs UTC (see last two columns):