rmendels / xtractomatic Goto Github PK
View Code? Open in Web Editor NEWxtractomatic R package for accessing environmental data
License: Other
xtractomatic R package for accessing environmental data
License: Other
I am trying to access some of the sea surface height datasets listed on the ERDDAP website and I am having issues. Specifically, I am interested in hycom_GLBa008_tyx from 2012-2016.
When I run searchData(searchList = list(list("varname","ssh")))
it only lists two datasets both of which are from the coastwatch interface.
On ERDDAP there are 25 SSH datasets and none are listed through searchData. Am I doing something wrong?
xtracto(xpos=temp$Longitude,
ypos=temp$Latitude,
tpos=temp$date,
dtype="hycom_GLBa008_tyx",
xlen=0.1,
ylen=0.1,
verbose=TRUE)
I am trying to extract sst from a series of polygons and I keep running into polygons that throw an error. I have made a reproducable example:
temp<-structure(list(piece = c(9L, 9L, 9L, 9L, 9L, 9L), id = c("SJ_F_Feb-Apr_2015_core_9",
"SJ_F_Feb-Apr_2015_core_9", "SJ_F_Feb-Apr_2015_core_9", "SJ_F_Feb-Apr_2015_core_9",
"SJ_F_Feb-Apr_2015_core_9", "SJ_F_Feb-Apr_2015_core_9"), Sex = c("F",
"F", "F", "F", "F", "F"), type = c("core", "core", "core", "core",
"core", "core"), Island = c("SJ", "SJ", "SJ", "SJ", "SJ", "SJ"
), Season = c("Feb-Apr_2015", "Feb-Apr_2015", "Feb-Apr_2015",
"Feb-Apr_2015", "Feb-Apr_2015", "Feb-Apr_2015"), date.min = structure(c(1L,
1L, 1L, 1L, 1L, 1L), .Label = c("2015-01-03", "2015-09-21", "2015-12-21",
"2016-04-30"), class = "factor"), date.max = structure(c(1L,
1L, 1L, 1L, 1L, 1L), .Label = c("2015-04-30", "2015-12-13", "2016-01-27",
"2016-07-09"), class = "factor"), area = c(0.207268048922507,
0.207268048922507, 0.207268048922507, 0.207268048922507, 0.207268048922507,
0.207268048922507), Longitude = c(-113.90585885689, -113.906338874886,
-113.905876518658, -113.904559116132, -113.90585885689, -113.90585885689
), Latitude = c(31.3655316683359, 31.3660086691013, 31.3680647581512,
31.3660177236027, 31.3655316683359, 31.3655316683359)), class = "data.frame", row.names = c(NA,
-6L))
dtype<-"jplMURSST41mday"
tpos<-c("2015-01-03", "2015-04-30")
evar<-xtractogon(xpos=temp$Longitude,
ypos=temp$Latitude,
tpos=tpos,
dtype=dtype,verbose=TRUE)
-> GET /erddap/griddap/jplMURSST41mday.nc?sst[(2015-01-16):1:(2015-04-16)][(31.37):1:(31.37)][(-113.91):1:(-113.9)] HTTP/1.1
-> Host: coastwatch.pfeg.noaa.gov
-> User-Agent: libcurl/7.54.0 r-curl/3.2 httr/1.3.1
-> Accept-Encoding: gzip, deflate
-> Accept: application/json, text/xml, application/xml, /
->
<- HTTP/1.1 200
<- Date: Tue, 26 Feb 2019 04:26:11 GMT
<- Strict-Transport-Security: max-age=31536000; includeSubDomains
<- Last-Modified: Tue, 26 Feb 2019 04:26:11 GMT
<- xdods-server: dods/3.7
<- erddap-server: 1.82
<- Content-Disposition: attachment;filename=jplMURSST41mday_44f3_f0b8_0d13.nc
<- Content-Encoding: gzip
<- Content-Type: application/x-netcdf
<- Connection: close
<- Transfer-Encoding: chunked
<-
Downloading: 2.3 kB Error in dim(in.poly) <- dim(extract$data[, , 1]) :
dims [product 8] do not match the length of object [2]
I looked into the code for xtractogon and it seems like there is some rounding of the coordinates that are returned by line 27
the ypos1
going in is ypos1 = c(31.36553, 31.36806)
but the result of line 27 extract$latitude
= 31.37
Later when creating in.poly
the entire polygon is outside of the extracted data because of the rounding.
I understand that this is an edge case, but I thought you might have thoughts about how to overcome this issue.
Thanks!!!
Hello,
I'm trying to extract chlorophyll A data from the dataset Chlorophyll-a, Aqua MODIS, NPP, Pacific Ocean (1 Day Composite) using xtracto. I've made sure that my dates and coordinates are within the ones of this dataset, but it doesn't work. When entering a big list of coordinates and dates, I get the following errors:
clorofila<-xtracto('mbchla1day', PD$LongDecimal_INICAL, PD$LatDecimal_INICAL, PD$FECHA, xlen=0, ylen=0, verbose=FALSE)
[1] "Error trying to retrive file, status500"
[1] "Header Info of URL Request"
[1] "https://coastwatch.pfeg.noaa.gov/erddap/griddap/erdMBchla1day.nc?chlorophyll[(1.323e+09):1:(1.323e+09)][(0):1:(0)][(30.425):1:(30.425)][(243.5):1:(243.5)]"
[1] "There was an error in the url call. See message on screen and URL called"
[1] "Returning incomplete download"
Then, I tried entering a single coordinate and date. I made sure that the date has a value for chlorophyll on the website, but I get this error:
xtracto('mbchla1day',-115.029167,26.618333,2008-02-08,xlen=0,ylen=0,verbose=FALSE)
[1] "tpos (time) has elements out of range of the dataset"
[1] "time range in tpos"
[1] "1975-06-22,1975-06-22"
[1] "time range in ERDDAP data"
[1] "2006-01-01,2018-01-28"
Error in xtracto("mbchla1day", -115.029167, 26.618333, 2008 - 2 - 8, xlen = 0, :
Coordinates out of dataset bounds - see messages above
How can I solve this?
Thank you very much for your help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.