dataImages
Este proyecto consiste en generar imágenes desde ficheros GRIB2 del proyecto AEWAM
A diferencia de las imágenes que se generan actualmente la idea es poder cambiar la zona de recorte y la resolución a voluntad, interpolando datos de ser necesario.
De momento se ha desarrollado el script:
- visor.py - Saca metadatos del fichero y muestra el area del fichero GRIB sobre un mapa del mundo
Dejo unas cuantas cosas antiguas para trabajar con imágenes
- png2ppm - convierte PNG a PPM
- ppm2png - convierte PPM a PNG
- channels.py - extrae los 3 canales de una imagen PPM
- combinar.py - combina 3 canales PGM en un fichero PPM
Notas
- Las imagenes tienen 1321 x1561 pixeles y coordenadas:
- Rango de latitudes: -5.0 (Africa) a 60.0 (sur escandinavia)
- Rango de longitudes: -40.0 (venezuela) a 15.0 (sicilia)
- Paso en latitud: 0.04166699999999679 grados/pixel que es aprox. 1/24 grados/pixel <-> 24 pixels/grado
- Paso en longitud: 0.0416666666666643 grados/pixel que tb es aprox. 1/24 grados/pixel <-> 24 pixels/grado
- El mundo tiene 360 grados de longitud y 180 de latitud. Luego su tamaño en pixels sera
- 360*24 = 8640 pixeles de ancho
- 180*24 = 4320 pixeles de alto
- El nombre de los ficheros es un timestamp.
- Por ejemplo MPP20231011000039 significa 2023/10/11 Pasada 00:00 Alcance H+39
- Las ecCode tools permiten ver el interior del GRIB
- Haciendo grib_ls -p date.time.step [fichero] obtenemos un listado del contenido
Contenido de los GRIB
Las 27 capas que hay en los grib son:
- hmax Maximum individual wave height
- mp1 Mean wave period based on first moment
- mp2 Mean wave period based on second moment
- mpts Mean period of total swell
- mpww Mean period of wind waves
- mwp Mean wave period
- mwp1 Mean wave period of first swell partition
- mwp2 Mean wave period of second swell partition
- mwp3 Mean wave period of third swell partition
- pp1d Peak period of 1D spectra
- shts Significant height of total swell ***
- mdts Mean direction of total swell ***
- shww Significant height of wind waves ***
- mdww Mean direction of wind waves ***
- swh Significant height of combined wind waves and swell ***
- mwd Mean wave direction ***
- swh1 Significant wave height of first swell partition ***
- mwd1 Mean wave direction of first swell partition ***
- swh2 Significant wave height of second swell partition ***
- mwd2 Mean wave direction of second swell partition ***
- swh3 Significant wave height of third swell partition ***
- mwd3 Mean wave direction of third swell partition ***
- tmax Period corresponding to maximum individual wave height
- wefxm Wave energy flux magnitude ***
- wefxd Wave energy flux mean direction ***
- wind 10 metre wind speed ***
- dwi 10 metre wind direction ***