oscarperpinan / meteoforecast Goto Github PK
View Code? Open in Web Editor NEWA package to access outputs from Numerical Weather Prediction models both in raster format and as a time series for a location
License: GNU General Public License v3.0
A package to access outputs from Numerical Weather Prediction models both in raster format and as a time series for a location
License: GNU General Public License v3.0
Thanks so much for yor package! I am trying to download the raster of v wind component at 10m from the NAM service and am getting an error. I think it is having difficulty parsing out the two vertical layers attributed to this variable? I tried using the 'vertical' argument that exists for getPoint, but not sure that argument works for getRaster. Here is what I tried and the error I received. Thanks for your assistance with this.
cloudNAM<-getRaster('v-component_of_wind_height_above_ground', vertical=1, day=testDay, box=bbox, service ='nam')
|=================================================================================================================| 100%
File(s) available at /tmp/Rtmp7lV4q9
Some URLs did not work. Check this file for details: /tmp/Rtmp7lV4q9/failedURL_f20085ae65931
Error in setZ(b, tt) : length(z) == nlayers(x) is not TRUE
In addition: There were 33 warnings (use warnings() to see them)
Fill the slot varname
of the Raster*
with the name of the meteorological variable.
Has someone taken over maintenance of this package? Is it still working for the 4 data sources listed in the doco:
Thanks!
Oscar,
mu suggestion is to add an argument related with the spatial resulotion to functions getPoint, getPointDays, getPointRuns.
In the case of MeteoGalicia we can choose between 36, 12 and 4 km data.
Hi Oscar,
It seems there is a problem with GFS services and the retrieved indexes:
library(meteoForecast)
# Datos de temperatura de Madrid capital modelo GFS
gfs_temp_K <- getPointDays(c(-3.70325, 40.4167), start = "2018-09-23",
end = "2018-09-26", vars = "Temperature", service = "gfs")
The process (with several errors and tryCatch) completed at 100% progress, but then this error appears:
Error in UseMethod("index<-") :
no applicable method for 'index<-' applied to an object of class "NULL"
Hi,
I have a raster, obtained from a netcdf which is in (Lambert Conic Conformal projection):
library(meteoForecast)
wrf_temporary <- getRaster("temp", day = Sys.Date(), frames = 'complete', resolution = 36, service = "meteogalicia")
wrf_temporary
extent : -18, 4230, -18, 3726 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=lcc +lat_1=43 +lat_2=43 +lat_0=34.82300186157227 +lon_0=-14.10000038146973 +x_0=536402.34 +y_0=-18558.61 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=km +no_defs
mfExtent('meteogalicia', resolution = 36)
class : Extent
xmin : -49.18259
xmax : 18.789
ymin : 24.03791
ymax : 56.06608
Now I want to transform that wrf_temporary raster to "+proj=longlat +datum=WGS84" (lat long degree), but the result is wrong. Try:
image(wrf_temporary, layers = 1)
plot(getMap(resolution = "high"), add = T)
Being discussed in: stackoverflow
Thanks in advance, Ricardo Faria
IMPORTANT NOTICE : Due to insufficient funding, the Open Meteo Forecast project will be shutdown on March 1st.
When I run
grepVar("", service = 'gfs', complete = TRUE)
I get the following error
Unknown IO errorfailed to load external entity "http://nomads.ncdc.noaa.gov/thredds/wcs/gfs-004/201702/20170202/gfs_4_20170202_0000_000.grb2?service=WCS&version=1.0.0&request=GetCapabilities" Error: 1: Unknown IO error2: failed to load external entity "http://nomads.ncdc.noaa.gov/thredds/wcs/gfs-004/201702/20170202/gfs_4_20170202_0000_000.grb2?service=WCS&version=1.0.0&request=GetCapabilities"
When I try to access:
in my web browser (Google Chrome), it redirects me to
Can the URL that grepVars use be changed from http to https?
Thanks
Dear Oscar,
the MeteoGalicia url for downloading the file is not working. For example:
I'm really happy to discover your package but I'm having problems when I try to access GFS. Temperature from GFS works fine but getPoint for wind variables is throwing an error.
library(meteoForecast)
mfService('gfs')
vars_available <- grepVar('wind', service = 'gfs')
> vars_available
[1] "u-component_of_wind_isobaric" "v-component_of_wind_height_above_ground" "u-component_of_wind_height_above_ground"
[4] "v-component_of_wind_isobaric"
getPoint(c(-2.61796, 53.89987), vars = 'u-component_of_wind_height_above_ground')
> length of 'dimnames' [2] not equal to array extent
The getPoint for the RAP and NAM models does not seem to be working:
v_wind <- getPoint(c(-112, 43), vars = 'V-component_of_wind',service='rap')
Error in pointNCDC(lon = lon, lat = lat, vars = vars, day = day, run = run, :
no data could be retrieved. Check date, coordinates and variable(s).
One suggestion: add an example with RAP and NAM to the R Documentation
http://previsaonumerica.cptec.inpe.br
ftp://ftp1.cptec.inpe.br/modelos/io/tempo/
Hi Oscar,
When I run the following line -
grepVar('temp', service = 'gfs', complete = TRUE)
I keep getting the error below.
Error in do.call(data, list(varsFile)) :
'what' must be a character string or a function
I am interested in having model forecast data for West Africa and was wondering if it is possible to have it using meteoforecast package? It could be GFS for example
Los departamentos de Administración web y Sistemas están trabajando en el proceso de actualización del servidor Thredds de la versión 4.2.2 a la versión 4.6.2. El paso a producción de esta nueva versión del Thredds está programado para finales del mes de septiembre de 2015.
Teniendo en cuenta que el salto en el cambio de versión supone importantes cambios y tratando de que ningún usuario quede sin servicio, ponemos a su disposición un entorno de pruebas con la nueva
versión para adaptar y comprobar sus servicios y productos dependientes del servidor Thredds de MeteoGalicia.El entorno de pruebas está disponible en la URL http://sor.meteogalicia.es/thredds/catalog.html
In GFS (for example) some variables have different vertical layers. Using getPoint
with them throws an error due to non-unique elements in the zoo
index:
tempK <- getPoint(c(101,6), vars = "Temperature", day = "2014-10-22", service ="gfs")
However this works:
tempK <- getPoint(c(101,6), vars = "Temperature_surface", day = "2014-10-22", service ="gfs")
(Reported by Jason B.)
This package depends on (depends, imports or suggests) raster and one or more of the retiring packages rgdal, rgeos or maptools (https://r-spatial.org/r/2022/04/12/evolution.html, https://r-spatial.org/r/2022/12/14/evolution2.html). Since raster 3.6.3
, all use of external FOSS library functionality has been transferred to terra, making the retiring packages very likely redundant. It would help greatly if you could remove dependencies on the retiring packages as soon as possible.
I can see in the serviceMap
that there is a larger Meteogalicia domain named MG36
, how can I use it for the function getPoint
?
This line 'data <- getPointDays(c(-8.618785,41.159542), vars = "temp", start = c("2012-01-01"), end=c("2012-12-30"))' gives the following error:
...
File available at C:\Users\rbessa\AppData\Local\Temp\RtmpKCHVxO\file2687d166999.csv
URL: http://mandeo.meteogalicia.es/thredds/ncss/grid/modelos/WRF_HIST/d02/2012/12/wrf_arw_det_history_d02_20121229_0000.nc4?var=temp&point=true&longitude=-8.618785&latitude=41.159542
File available at C:\Users\rbessa\AppData\Local\Temp\RtmpKCHVxO\file26817ff1bc2.csv
URL: http://mandeo.meteogalicia.es/thredds/ncss/grid/modelos/WRF_HIST/d02/2012/12/wrf_arw_det_history_d02_20121230_0000.nc4?var=temp&point=true&longitude=-8.618785&latitude=41.159542
Error in rbind(deparse.level, ...) : indexes overlap
Hola,
Estoy intentando descargar datos de NAM y RAP, pero me da el siguiente error (v.0.56):
grepVar('', service = 'nam')
probando la URL 'https://www.ncei.noaa.gov/thredds/wcs/model-nam218/202404/20240402/nam_218_20240402_0000_001.grb2?service=WCS&version=1.0.0&request=GetCapabilities'
Error in download.file(wcsURL, xmlFile) :
no fue posible abrir la URL 'https://www.ncei.noaa.gov/thredds/wcs/model-nam218/202404/20240402/nam_218_20240402_0000_001.grb2?service=WCS&version=1.0.0&request=GetCapabilities'
Además: Warning message:
In download.file(wcsURL, xmlFile) :
cannot open URL 'https://www.ncei.noaa.gov/thredds/wcs/model-nam218/202404/20240402/nam_218_20240402_0000_001.grb2?service=WCS&version=1.0.0&request=GetCapabilities': HTTP status was '400 Bad Request'
grepVar('', service = 'rap')
probando la URL 'https://www.ncei.noaa.gov/thredds/wcs/model-rap130/202404/20240402/rap_130_20240402_0000_001.grb2?service=WCS&version=1.0.0&request=GetCapabilities'
Error in download.file(wcsURL, xmlFile) :
no fue posible abrir la URL 'https://www.ncei.noaa.gov/thredds/wcs/model-rap130/202404/20240402/rap_130_20240402_0000_001.grb2?service=WCS&version=1.0.0&request=GetCapabilities'
Además: Warning message:
In download.file(wcsURL, xmlFile) :
cannot open URL 'https://www.ncei.noaa.gov/thredds/wcs/model-rap130/202404/20240402/rap_130_20240402_0000_001.grb2?service=WCS&version=1.0.0&request=GetCapabilities': HTTP status was '400 Bad Request'
Buenas tardes,
Antes de nada, felicitaros por la librería. Me parece muy útil!
Estaba intentando descargar los rasters la altura geopotencial a 500 hPa del GFS, pero no veo de que manera puedo seleccionar el nivel vertical de presión. Quizás no hay opción de descargar variables a distintos niveles de presión?
Gracias de antemano!
GFS, NAM and RAP models include the 00H "forecast" in the set of files. Only some variables are available, and some of them are only filled with zeros.
http://www.nws.noaa.gov/om/notification/tin14-46gfs_cca.htm
Effective on or about January 14, 2015, beginning with the 1200 Coordinated Universal Time (UTC) run, the National Centers for Environmental Prediction (NCEP) will upgrade the GFS Analysis and
Forecast System as follows:
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.