-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCAN/SNOTEL metadata #61
Comments
Seems to work (04ffe72). Still need to test, document, and then explain in the related tutorial: http://ncss-tech.github.io/AQP/soilDB/fetchSCAN-demo.html @brownag : figured this would be a nice addition to CDEC-based eval of climate data in our part of the world. Example: # bleeding-edge version
library(soilDB)
x <- fetchSCAN(site.code=c(462, 697, 574), year=2016)
# new metadata element in list
x$metadata
Name Site State Network County Elevation_ft Latitude Longitude HUC
275 Ebbetts Pass 462 California SNOTEL Alpine 8661 38.54970 -119.8047 160502010104
507 Leavitt Lake 574 California SNOTEL Mono 9604 38.27594 -119.6128 160503020104
741 Poison Flat 697 California SNOTEL Alpine 7736 38.50576 -119.6262 160502010102
# all stations can be seen with
data(SCAN_SNOTEL_metadata)
# or
SCAN_site_metadata(site.code) |
Another reminder to link back to the great work in https://github.com/mrke/NicheMapR http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12148/abstract |
Still waiting to hear back from Deb on the mapping between SCAN/SNOTEL site code and KSSL pedon ID. We may be able to reverse-engineer this linkage via spatial proximity. |
I just looked into this and the SCAN/SNOTEL station ID should map back to pedon ID will be via the site.climstaid field in the associated lab pedons. Will need to add that field to fetchNASIS/fetchKSSL. Probably easier to track them all back and save the corresponding pedon ID's in the scan metadata file in the package for easy access. One thing I'm not sure about is if the site.climstaid field has been consistently populated, my initial look indicates that it might not be. However, there are only just over a 1000 stations and not all of them may have corresponding lab data. |
@jskovlin Excellent detective work! I knew that there was a linkage somewhere in one of our databases. Do you have an example sites in mind that I can use to test? What we need is a NASIS or LIMS style query that pulls down the latest site / pedon records that have a non-null |
Unfortunately, it has not been consistently populated......you'll see what I mean when you pull all these data in. Sometimes the field is null and there is mention to the scan/snotel site in the sitetext notes, or dare I say it not at all........ FROM nasis_site, nasis_group, site, OUTER(site_observation, OUTER (pedon, OUTER (transect))) |
Nice. Looks like there are a couple relevant fields then. For now, it might be best to filter on We might need @smroecker help on writing a clever LIMS report that we can periodically hit. |
As of 5d9dcf2, there are some more detailed metadata for SCAN/SNOTEL sites in the Western US. Thanks to Jay and Kent Sutcliffe! library(soilDB)
x <- fetchSCAN(site.code=c(462, 697, 574), year=2016)
knitr::kable(x$metadata, row.names = FALSE)
|
Excellent to see all the progress that has been made here. Unfortunately, can't allocate much mental real estate to this at this time. Have a lot on my plate with CA630. For the record, my intersectHorizon code is pretty basic and is set up to just return ph/chiid/labsampnum corresponding to one or more horizons occurring at a particular depth, or a range of depths. I designed it to be used internally within functions that would deal with manipulation of the actual horizon data. A LEFT JOIN-like intersect would be a bit more involved, but would probably also be friendlier to play with for general use. For the purposes of linking sensor depth (single value) to their horizon properties, that is simple enough. But what about the case where a depth interval is specified/desired? Say, you wanted to estimate the thermal properties of all horizons between 0 and 50cm... Truly JOIN-ing would result in duplication of the "site" record you are joining to if you intersect multiple horizons... unless you do something to aggregate (like depth.wtd.average). Perhaps the option to aggregate would be a neat feature for intersection over an interval... ! Just my 2c. |
Got some updated metadata from Steve Campbell (SCAN pedon IDs). Added a new function for attempting to cross-reference user pedon ID with lab ID via LIMS report. See changes in related commit for details. Still need to verify merging of various metadata sources:
|
Another source of data, c/o @mrke https://github.com/mrke/NicheMapR/blob/master/data/SCANsites.RData |
SCAN / SNOTEL site metadata update. |
Updates, after starting a conversation with Melissa Webb (SCAN/SNOTEL).
Cross-reference IDs: library(soilDB)
SDA_query("SELECT * FROM lab_pedon WHERE pedon_key = '18827' ;")
SCAN_site_metadata(site.code = 2001) Note that SCAN station is described by name in a site text note vs. "Climate Station ID" field ( Note that MLRA-owned pedon contains correct link back to LDM/KSSL, missing "certified" checkbox: TODO:
|
In 44d3a2c#diff-0ecbf43726e8786ff52fe0996cddbff049fae27b910e3ce6c9b7a0c0c125d4be added
The following SCAN stations that are missing a related lab pedon have a KSSL pedon within 500m of the station location (via
|
Good work. I've got some additional metadata from the SCAN folks, will drop it into the folder in /misc/ where we have been working. There will be several levels of cross-referencing that will have to happen. Will try to add the additional kinks described by Kent Sutcliffe soon. |
closed with #357 |
Should be possible to snag it here:
Asking Deb Harms to be sure.
The text was updated successfully, but these errors were encountered: