Convert {worldmet}
to the Global Historical Climatology Network
#34
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.
Note that the GHCN still only has majority US data, so this PR is a draft.
This PR fixes #32.
This PR is quite a large overhaul of
{worldmet}
to use the GHCN over the ISD. This PR:import_ghcn_stations()
andimport_ghcn_codes()
to access GHCN metadata.import_ghcn_hourly()
andimport_ghcn_daily()
to access data from the GHCNh and GHCNd.getMeta()
,importNOAA()
, andweatherCodes
.{pkgdown}
site, package documentation, vignette, andREADME
files to reflect these changes.Back Compatibility
The choice to deprecate
getMeta()
andimportNOAA()
rather than replace their internals was done for a couple of reasons:importNOAA()
where it is ensures back-compatibility for users using{worldmet}
in production.importNOAA()
andgetMeta()
aren't particularly descriptive names - import what from NOAA? Get what metadata? More evocative function names make for nicer, more readable scripts.getMeta()
is an awkward function because it isn't clear whether it returns a map, a table, or just prints both, leading to themap
andreturnMap
args.import_ghcn_stations()
has thereturn
arg, wherein a user can specify"map"
,"table"
, or"sf"
(the latter of which returns a spatial dataframe).Future
There are lots of data sources that are part of the GHCN that aren't accessible through
{worldmet}
. I think two that could be of interest are:Synoptic Summary of the Day (https://www.ncei.noaa.gov/oa/synoptic-summary-of-the-day/v2/doc/ssodv2_DOCUMENTATION.pdf) - much like the GHCNh, it doesn't appear to be finished, but could be nice to provide (a global day summary, to compare the same 24-hour period in - e.g., - the UK and the US, rather than the local 12 AM - 11 PM).
GHCN Monthly (https://www.ncei.noaa.gov/products/land-based-station/global-historical-climatology-network-monthly) - these are all in great big ZIP files so would have to work differently, but why not complete the set?
Questions
snake_case
rather thancamelCase
like the rest of the{openair}
toolkit - in part becauseimportGHCNhHourly()
looks dreadful written down. I'd probably prefercamelCase
for consistency.