I just discovered rOpenSci - amazing work! Would love to get involved!
I’ve been trying to download ERDDAP data for a relatively small number of lat/long locations (less than 1000) but for a relatively longer time-span, 2003-2013. I’ve been trying to use the xtractomatic package on GitHub, but have been running into some issues.
My questions are:
Is it possible to extract griddap values per lat/long & date (dd/mm/yyyy) using either rerddap or rnoaa rather than downloading the whole griddap?
Is there a way to search all ERDDAP griddap database by specifying a region (e.g., lat/long bounding box) and temporal bounds? Something similar to the ERDDAP > Advanced Search webpage?
Is there any major differences between rerddap and rnoaa with regards to ERDDAP?
Yes, with both, but both packages are might still be a bit buggy here and there with ERDDAP data since I’m still working on making the functions more robust. For example, with rnoaa
No, I don’t think we support advanced searches yet. I just played around with those, and looks like we can - opened an issue here https://github.com/ropensci/rerddap/issues/7 for rerddap
rerddap is meant to be a general purpose client for working with ERDDAP servers, including tabledap and griddap data - then users can use this directly, and package developers could use it do develop another package. rnoaa is a client for many different NOAA data services (as listed in the README for rnoaa), of which data from erddap servers is a subset of the functions avail. in that package.
Eventually, once rerddap is more stable, i will just use that package in rnoaa to do anything with ERDDAP servers.
So we can debug things if problems come up - what versions of each package do you have?
Cool. There’s lots of ways to get involved: submit a package you already work on to be in the suite, or contribute to an existing package - maybe even rnoaa or rerddap
One more thing: Right now, we download data from ERDDAP servers in .csv format. I realize that this is not ideal, and perhaps .ncdf would be better (better compression, faster download times), but a separate package dependency is needed to parse the ncdf binary file format. BUT, I am playing with that now, so hopefully will be in rnoaa and rerddap soon.
So I managed to get my data! However, I ended-up using Xtractomatic from Roy Mendelssohn (on GitHub). We had some good discussion and here are my thoughts:
They implemented a function called searchData which essentially does search all available datasets included in Xtractomatic by using some keywords. For example: searchData(searchList = list(list("varname","upwelling"))) will give you a list of datasets that contains ‘upwelling’ in their varname. However when you are not familiar with these datasets, you end-up looking-up all of them (which right now is less than 155), so not too long to do. Something similar in rerddap and rnoaa would be useful (especially if all ERDDAP datasets can be accessed).
I tried to download ERDDAP data using rerddap but because I needed to extract lots of spatial/temporal information, this was taking way to long with the current csv files (but I know that’s on your radar).
Would love to get involved! I think these tools are so essential! However, I never worked on developing R packages before… Any tips on where/how I should start?
Hi,
Sounds good. Though can you share an actual search query you did with xtractomatic? Or is that one: searchData(searchList = list(list("varname","upwelling")))? ed_search() in rerddap does search, but I guess it doesn’t use the advanced search features, should be in there soon.
Glad to know you need more speed! Good motivation to work on the netcdf stuff.
Oh great I haven’t looked in much detailed at the ed_search() function. Yes, searchData(searchList = list(list("varname","upwelling"))) is one-way of searching but you can also specify further keywords by adding lists. Not the most straightforward way of searching (I think they are working on it though). It would be fun to be able to search with logical operator and specify the dates/time frame and region.
Thanks for the tips on getting started with building pkgs!
devtools::install_github("ropensci/rerddap")
library("rerddap")
ed_search_adv(variableName = 'upwelling')
10 results, showing first 20
Source: local data frame [10 x 2]
title dataset_id
1 Wind Stress, METOP ASCAT, Global, Near Real Time (1 Day Composite) erdQAstress1day
2 Wind Stress, METOP ASCAT, Global, Near Real Time (14 Day Composite) erdQAstress14day
3 Wind Stress, METOP ASCAT, Global, Near Real Time (3 Day Composite) erdQAstress3day
4 Wind Stress, METOP ASCAT, Global, Near Real Time (8 Day Composite) erdQAstress8day
5 Wind Stress, METOP ASCAT, Global, Near Real Time (Monthly Composite) erdQAstressmday
6 Wind Stress, QuikSCAT, Global, Science Quality (1 Day Composite) erdQSstress1day
7 Wind Stress, QuikSCAT, Global, Science Quality (14 Day Composite) erdQSstress14day
8 Wind Stress, QuikSCAT, Global, Science Quality (3 Day Composite) erdQSstress3day
9 Wind Stress, QuikSCAT, Global, Science Quality (8 Day Composite) erdQSstress8day
10 Wind Stress, QuikSCAT, Global, Science Quality (Monthly Composite) erdQSstressmday
Try it out and let me know if it’s working for you
Hi sckott, I was in mission with university so I checked only now and… is working!
Thanks a lot!
By the way a new question: I was using xctractomatic before, and it was quite good because it extract the wind at the animal position without computing by myself.
The problems is that the dataset in xctractomatic are quite bad.
There is some function in rerddap that do the same thing? (Interpolate spatially and temporally in the grid on the animal position?)
Thank you in advance.
Hi sckott, in the previous mail a minimal sketch of my files.
The trajectories are really much longer!
Please do not publish it!
just some advice.
I want to assign a weight on my wind data, for example temporal and
spatial variability.
In the dataset I am using this values are not present.
Do you think there are some smart way of doing it with rerddap?
Or I should download everything and perform the analysis manually?