GithubHelp home page GithubHelp logo

oscarperpinan / meteoforecast Goto Github PK

View Code? Open in Web Editor NEW
50.0 50.0 25.0 688 KB

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

R 100.00%

meteoforecast's People

Contributors

hzambran avatar marcelopinho avatar mondorescue avatar oscarperpinan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meteoforecast's Issues

Resolution=36 projection is wrong

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

OpenMeteo has been closed

IMPORTANT NOTICE : Due to insufficient funding, the Open Meteo Forecast project will be shutdown on March 1st.

Get Variables

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

GFS system has been modified

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:

  • Changes to the model components
  • Increases in horizontal resolution
  • Addition of 0.25 degree gridded output
  • Addition of new product fields
  • Change to product naming convention
  • Changes in product timeliness
  • Changes to downstream model impacts

Please remove dependencies on **rgdal**, **rgeos**, and/or **maptools**

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.

Larger meteogalicia domain

I can see in the serviceMap that there is a larger Meteogalicia domain named MG36, how can I use it for the function getPoint?

trouble downloading variables with vertical layers with getRaster

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)

Descargar un nivel concreto de presión

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!

NOMADS web services have transitioned to use of HTTPS and HSTS.

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:

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

in my web browser (Google Chrome), it redirects me to

https://nomads.ncdc.noaa.gov/thredds/wcs/gfs-004/201702/20170202/gfs_4_20170202_0000_000.grb2?service=WCS&version=1.0.0&request=GetCapabilities

Can the URL that grepVars use be changed from http to https?

Thanks

GFS service not working (no applicable method for index)

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"

Package status

Has someone taken over maintenance of this package? Is it still working for the 4 data sources listed in the doco:

  • GFS
  • MeteoGalicia
  • NAM
  • RAP

Thanks!

indexes overlap error

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

Get forecasts from RAP and NAM

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

Variables with vertical layers

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.)

Check MeteoGalicia with the new version of Thredds server

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

Select spatial resolution

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.

length of 'dimnames' [2] not equal to array extent

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

other domains

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.