aymeric-spiga / planetoplot

a cool python-based tool to plot stuff and explore data
https://github.com/aymeric-spiga/planetoplot/blob/master/README.md
GNU General Public License v2.0
10 stars 4 forks source link

accès distant netcdf python opendap #9

Open jvatantollone opened 6 years ago

jvatantollone commented 6 years ago

Le protocole OpeNDAP, m'a l'air tout a fait étudier pour.

http://docs.opendap.org/index.php/QuickStart

Avec la librairie PyDAP on peut faire tourner un serveur OpeNDAP sous le serveur Apache (1) et côté client on peut l'interroger en python gards ou ferret et notamment faire de la lecture on-the-fly (2)

1) https://pydap.readthedocs.io/en/latest/server.html#apache

2) https://publicwiki.deltares.nl/display/OET/Reading+data+from+OpenDAP+using+python

En couplant ça à PlanetoPlot y'a moyen de faire un truc pas mal.

aymeric-spiga commented 6 years ago

En fait je suis récemment tombé (voir #8) sur le package xarray qui serait parfait pour un certain nombre de choses que fait planetoplot ; et visiblement xarray gère le opendap en accès distant

aymeric-spiga commented 6 years ago

xarray est tellement puissant qu'à côté planetoplot fait très bricolo (ceci étant je n'ai jamais prétendu le contraire !). je suis en train d'apprendre xarray http://xarray.pydata.org/en/stable/index.html ce qui devrait rendre planetoplot à peu près obsolète. il y a juste la possibilité de CLI que n'a pas xarray sauf erreur de ma part, mais j'ai commencé à faire quelque chose pour ça https://github.com/aymeric-spiga/xarray-cli, voir aussi https://github.com/pydata/xarray/issues/2034 et opendap fonctionne voir l'exemple https://github.com/aymeric-spiga/xarray-cli/commit/f6b5d4a7c4febe112e116dd0235b730af8f42927