ESO Logo   TAP queries to the asm.meteo_paranal table

This section of the "ESO Science Archive Programmatic: HOWTOs" shows how to programmatically use the asm.meteo_paranal table via TAP (tap_obs) to programmatically get meteorological Paranl data. After illustrating the columns of that table, a query examples is provided.

Usage: You can access this file either as a static HTML page (download it here), or as an interactive jupyter notebook (download it here) which you can download and run on your machine (instructions). To interact with the jupyter notebook (if you have download it): move up and down the various cells using the arrow keys, execute the code by pressing CTRL+ENTER; you can also modify the code and execute it at will.

In [1]:
# Initialisations
import os 
import sys

import pyvo
import requests
#import cgi
import numpy as np

from astropy.visualization import astropy_mpl_style
import matplotlib.pyplot as plt

#import pandas

from astropy import table
from astropy.coordinates import SkyCoord
from astropy.units import Quantity

from pyvo.dal import tap

# The ESO TAP service offering ASM data tables:
ESO_TAP_OBS = "https://archive.eso.org/tap_obs"

# Instantiate the tap service:
tapobs = tap.TAPService(ESO_TAP_OBS)
In [2]:
# Note: The names of the fields of the ASM  do not coincide with the column names in the TAP table.
# Let's check the column names, units, and descriptions of the "asm.meteo_paranal" table:

query = "SELECT column_name, unit, description FROM TAP_SCHEMA.columns where table_name='asm.meteo_paranal' order by 1"
res = tapobs.search(query=query)
res.to_table().show_in_notebook(show_row_index=False)
WARNING: AstropyDeprecationWarning: show_in_notebook() is deprecated as of 6.1 and to create
         interactive tables it is recommended to use dedicated tools like:
         - https://github.com/bloomberg/ipydatagrid
         - https://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html#datatable
         - https://dash.plotly.com/datatable [warnings]
Out[2]:
Table length=113
column_nameunitdescription
integrationsTimebin [s] used for measurement of ambient data sample.
midpoint_dateMidpoint (time) of the measurement.
presqnhhPaAir Pressure Normalised: 1 minute average pressure normalised to sea level [hPa]. (sci. param.)
presqnh_devhPaAir Pressure Normalised RMS: 1 minute RMS pressure normalized to sea level [hPa]. (eng. param.)
presqnh_insthPaAir Pressure Normalised instantanous: Pressure normalized to sea level at the end of the averaging period [hPa]. (eng. param.)
presqnh_maxhPaAir Pressure Normalised max: 1 minute maximum pressure normalized to sea level [hPa]. (eng. param.)
presqnh_minhPaAir Pressure Normalised min: 1 minute minimum pressure normalized to sea level [hPa]. (eng. param.)
press_0mhPaAir Pressure: Temporal (1 minute) mean of observatory site ambient baromeric air pressure measured at 0m above the VLT platform during measurement period [hPa]. (sci. param.)
press_0m_devhPaAir Pressure RMS: 1 minute RMS surface pressure variation at 0m above the VLT platform [hPa]. (eng. param.)
press_0m_insthPaAir Pressure instantanous: pressure at 0m above the VLT platform at the end of the averaging period [hPa]. (eng. param.)
press_0m_maxhPaAir Pressure max: 1 minute maximum surface pressure at 0m above the VLT platform [hPa]. (eng. param.)
press_0m_minhPaAir Pressure min: 1 minute minimum surface pressure at 0m above the VLT platform [hPa]. (eng. param.)
prestrend_0mhPaAir Pressure 3h trend: Surface pressure trend over 3 hours at 0m above the VLT platform [hPa]. (eng. param.)
rain_m20m%Rain intensity: 1 minute average rain percentage measured 20m below the VLT platform [%]. (sci. param.)
rain_m20m_dev%Rain Intensity RMS: 1 minute RMS rain percentage 20m below the VLT platform [%]. (eng. param.)
rain_m20m_inst%Rain Intensity instantanous : Rain percentage 20m below the VLT platform at the end of the averaging period [%]. (eng. param.)
rain_m20m_max%Rain Intensity max: 1 minute maximum rain percentage 20m below the VLT platform [%]. (eng. param.)
rain_m20m_min%Rain Intensity min: 1 minute minimum rain percentage 20m below the VLT platform [%]. (eng. param.)
rhum_2m%Relative Humidity: Temporal (1 minute) mean of observatory site ambient relative humidity measured at sensor position 2m above the VLT platform during measurement period [%]. (sci. param.)
rhum_2m_dev%Humidity RMS: 1 minute RMS relative humidity measured at 2m above the VLT platform [%]. (eng. param.)
rhum_2m_inst%Humidity instantanous: 1 minute relative humidity measured at 2m above the VLT platform at the end of the averaging period [%]. (eng. param.)
rhum_2m_max%Humidity max: 1 minute maximum relative humidity measured at 2m above the VLT platform [%]. (eng. param.)
rhum_2m_min%Humidity min: 1 minute minimum relative humidity measured at 2m above the VLT platform [%]. (eng. param.)
rhum_30m%Relative Humidity: Temporal (1 minute) mean of observatory site ambient relative humidity measured at sensor position 30m above the VLT platform during measurement period [%]. (sci. param.)
rhum_30m_dev%Humidity RMS: 1 minute RMS relative humidity measured at 30m above the VLT platform [%]. (eng. param.)
rhum_30m_inst%Humidity instantanous: 1 minute relative humidity measured at 30m above the VLT platform at the end of the averaging period [%]. (eng. param.)
rhum_30m_max%Humidity max: 1 minute maximum relative humidity measured at 30m above the VLT platform [%]. (eng. param.)
rhum_30m_min%Humidity min: 1 minute minimum relative humidity measured at 30m above the VLT platform [%]. (eng. param.)
rhum_m20m%Relative Humidity: Temporal (1 minute) mean of observatory site ambient relative humidity measured at sensor position 20m below the VLT platform during measurement period [%]. (sci. param.)
rhum_m20m_dev%Humidity RMS: 1 minute RMS relative humidity measured at 20m below the VLT platform [%]. (eng. param.)
rhum_m20m_inst%Humidity instantanous: 1 minute relative humidity measured at 20m below the VLT platform at the end of the averaging period [%]. (eng. param.)
rhum_m20m_max%Humidity max: 1 minute maximum relative humidity measured at 20m below the VLT platform [%]. (eng. param.)
rhum_m20m_min%Humidity min: 1 minute minimum relative humidity measured at 20m below the VLT platform [%]. (eng. param.)
start_dateThe start time of the measurement.
temp_0mCelsiusAmbient Temperature: Temporal (1 minute) mean of site ambient temperature measured at 0m above the VLT platform [degC]. (sci. param.)
temp_0m_devCelsiusAir Temperature RMS: 1 minute RMS air temperature variation at 0m above the VLT platform below VLT platform [degC]. (eng. param.)
temp_0m_instCelsiusAir Temperature Instantanous : 1 minute air temperature at 0m above the VLT platform measured at the end of the averaging period [degC]. (eng. param.)
temp_0m_maxCelsiusAir Temperature max: 1 minute maximum air temperature at 0m above the VLT platform [degC]. (eng. param.)
temp_0m_minCelsiusAir Temperature min: 1 minute minimum air temperature at 0m above the VLT platform [degC]. (eng. param.)
temp_2mCelsiusAmbient Temperature: Temporal (1 minute) mean of site ambient temperature measured at 2m above the VLT platform [degC]. (sci. param.)
temp_2m_devCelsiusAir Temperature RMS: 1 minute RMS air temperature variation at 2m above the VLT platform below VLT platform [degC]. (eng. param.)
temp_2m_instCelsiusAir Temperature Instantanous : 1 minute air temperature at 2m above the VLT platform measured at the end of the averaging period [degC]. (eng. param.)
temp_2m_maxCelsiusAir Temperature max: 1 minute maximum air temperature at 2m above the VLT platform [degC]. (eng. param.)
temp_2m_minCelsiusAir Temperature min: 1 minute minimum air temperature at 2m above the VLT platform [degC]. (eng. param.)
temp_30mCelsiusAmbient Temperature: Temporal (1 minute) mean of site ambient temperature measured at 30m above the VLT platform [degC]. (sci. param.)
temp_30m_devCelsiusAir Temperature RMS: 1 minute RMS air temperature variation at 30m above the VLT platform below VLT platform [degC]. (eng. param.)
temp_30m_instCelsiusAir Temperature Instantanous : 1 minute air temperature at 30m above the VLT platform measured at the end of the averaging period [degC]. (eng. param.)
temp_30m_maxCelsiusAir Temperature max: 1 minute maximum air temperature at 30m above the VLT platform [degC]. (eng. param.)
temp_30m_minCelsiusAir Temperature min: 1 minute minimum air temperature at 30m above the VLT platform [degC]. (eng. param.)
temp_m20mCelsiusAmbient Temperature: Temporal (1 minute) mean of site ambient temperature measured at 20m below the VLT platform [degC]. (sci. param.)
temp_m20m_devCelsiusAir Temperature RMS: 1 minute RMS air temperature variation 20m below the VLT platform [degC]. (eng. param.)
temp_m20m_instCelsiusAir Temperature Instantanous : 1 minute air temperature 20m below the VLT platform measured at the end of the averaging period [degC]. (eng. param.)
temp_m20m_maxCelsiusAir Temperature max: 1 minute maximum air temperature 20m below the VLT platform [degC]. (eng. param.)
temp_m20m_minCelsiusAir Temperature min: 1 minute minimum air temperature 20m below the VLT platform [degC]. (eng. param.)
tempdew_2mCelsiusDew Temperature: Temporal (1 minute) mean of observatory site ambient dew temperature measured at sensor position 2m above the VLT platform during measurement period [degC]. (sci. param.)
tempdew_2m_devCelsiusDew Temperature RMS: 1 minute RMS dew temperature at 2m above the VLT platform [degC]. (eng. param.)
tempdew_2m_instCelsiusDew Temperature instantanous: 1 minute dew temperature at 2m above the VLT platform measured at the end of the averaging period [degC]. (eng. param.)
tempdew_2m_maxCelsiusDew Temperature max: 1 minute maximum dew temperature at 2m above the VLT platform [degC]. (eng. param.)
tempdew_2m_minCelsiusDew Temperature min: 1 minute minimum dew temperature at 2m above the VLT platform [degC]. (eng. param.)
tempdew_30mCelsiusDew Temperature: Temporal (1 minute) mean of observatory site ambient dew temperature measured at sensor position 30m above the VLT platform during measurement period [degC]. (sci. param.)
tempdew_30m_devCelsiusDew Temperature RMS: 1 minute RMS dew temperature at 30m above the VLT platform [degC]. (eng. param.)
tempdew_30m_instCelsiusDew Temperature instantanous: 1 minute dew temperature at 30m above the VLT platform measured at the end of the averaging period [degC]. (eng. param.)
tempdew_30m_maxCelsiusDew Temperature max: 1 minute maximum dew temperature at 30m above the VLT platform [degC]. (eng. param.)
tempdew_30m_minCelsiusDew Temperature min: 1 minute minimum dew temperature at 30m above the VLT platform [degC]. (eng. param.)
tempdew_m20mCelsiusDew Temperature: Temporal (1 minute) mean of observatory site ambient dew temperature measured at sensor position 20m below the VLT platform during measurement period [degC]. (sci. param.)
tempdew_m20m_devCelsiusDew Temperature RMS: 1 minute RMS dew temperature at 20m below the VLT platform [degC]. (eng. param.)
tempdew_m20m_instCelsiusDew Temperature instantanous: 1 minute dew temperature at 20m below the VLT platform measured at the end of the averaging period [degC]. (eng. param.)
tempdew_m20m_maxCelsiusDew Temperature max: 1 minute maximum dew temperature at 20m below the VLT platform [degC]. (eng. param.)
tempdew_m20m_minCelsiusDew Temperature min: 1 minute minimum dew temperature at 20m below the VLT platform [degC]. (eng. param.)
validTrue if a valid measurement, False otherwise.
wind_dir_10mdegWind Direction (0/360): 1 minute average wind direction at 10m above the VLT platform counted clockwise from North (standard) [deg]. (sci. param.)
wind_dir_10m_180degWind Direction (180/-180): 1 minute average wind direction at 10m and 10m above the VLT platform counted clockwise from North (with 180 degree negative offset for display purposes) [deg]. (sci. param.)
wind_dir_10m_180_instdegWind Direction instantanous : Wind direction at 10m above the VLT platform at the end of the averaging period [deg]. (eng. param.)
wind_dir_10m_180_maxdegWind Direction max: 1 minute maximum wind direction at 10m above the VLT platform [deg]. (eng. param.)
wind_dir_10m_180_mindegWind Direction min: 1 minute minimum wind direction at 10m above the VLT platform [deg]. (eng. param.)
wind_dir_10m_devdegWind Direction RMS: 1 minute RMS air wind direction at 10m above the VLT platform [deg]. (eng. param.)
wind_dir_10m_instdegWind Direction instantanous : Wind direction at 10m above the VLT platform at the end of the averaging period [deg]. (eng. param.)
wind_dir_10m_maxdegWind Direction max: 1 minute maximum wind direction at 10m above the VLT platform [deg]. (eng. param.)
wind_dir_10m_mindegWind Direction min: 1 minute minimum wind direction at 10m above the VLT platform [deg]. (eng. param.)
wind_dir_30mdegWind Direction (0/360): 1 minute average wind direction at 30m above the VLT platform counted clockwise from North (standard) [deg]. (sci. param.)
wind_dir_30m_180degWind Direction (180/-180): 1 minute average wind direction at 30m above the VLT platform counted clockwise from North (with 180 degree negative offset for display purposes) [deg]. (sci. param.)
wind_dir_30m_180_instdegWind Direction instantanous : Wind direction at 30m above the VLT platform at the end of the averaging period [deg]. (eng. param.)
wind_dir_30m_180_maxdegWind Direction max: 1 minute maximum wind direction at 30m above the VLT platform [deg]. (eng. param.)
wind_dir_30m_180_mindegWind Direction min: 1 minute minimum wind direction at 30m above the VLT platform [deg]. (eng. param.)
wind_dir_30m_devdegWind Direction RMS: 1 minute RMS air wind direction at 30m above the VLT platform [deg]. (eng. param.)
wind_dir_30m_instdegWind Direction instantanous : Wind direction at 30m above the VLT platform at the end of the averaging period [deg]. (eng. param.)
wind_dir_30m_maxdegWind Direction max: 1 minute maximum wind direction at 30m above the VLT platform [deg]. (eng. param.)
wind_dir_30m_mindegWind Direction min: 1 minute minimum wind direction at 30m above the VLT platform [deg]. (eng. param.)
wind_speed_10mm.s**(-1)Wind Speed: 1 minute average wind speed at sensor position 10m [m.s**(-1)]. (sci. param.)
wind_speed_10m_devm.s**(-1)Wind Speed RMS: 1 minute RMS wind speed at 10m above ground [m.s**(-1)]. (eng. param.)
wind_speed_10m_instm.s**(-1)Wind Speed instantanous : Wind speed at 10m above ground, at the end of the averaging period [m.s**(-1)]. (eng. param.)
wind_speed_10m_maxm.s**(-1)Wind Speed max: 1 minute maximum wind speed at 10m above ground [m.s**(-1)]. (eng. param.)
wind_speed_10m_minm.s**(-1)Wind Speed min: 1 minute minimum wind speed at 10m above ground [m.s**(-1)]. (eng. param.)
wind_speed_30mm.s**(-1)Wind Speed: 1 minute average wind speed at sensor position 30m above the VLT platform [m.s**(-1)]. (sci. param.)
wind_speed_30m_devm.s**(-1)Wind Speed RMS: 1 minute RMS wind speed at 30m above the VLT platform [m.s**(-1)]. (eng. param.)
wind_speed_30m_instm.s**(-1)Wind Speed instantanous : Wind speed at 30m above the VLT platform, at the end of the averaging period [m.s**(-1)]. (eng. param.)
wind_speed_30m_maxm.s**(-1)Wind Speed max: 1 minute maximum wind speed at 30m above the VLT platform [m.s**(-1)]. (eng. param.)
wind_speed_30m_minm.s**(-1)Wind Speed min: 1 minute minimum wind speed at 30m above the VLT platform [m.s**(-1)]. (eng. param.)
wind_speedu_20mm.s**(-1)Wind Speed component U: Temporal mean of observatory site ambient wind speed U vector component, where U is horizontal and points to 330 degree measured at sensor position 20m above ground during measurement period [m.s**(-1)]. (sci. param.)
wind_speedu_20m_devm.s**(-1)Wind Speed component U RMS: 1 minute RMS horizontal wind speed U component (into 330 degree) at 20m above ground [m.s**(-1)]. (eng. param.)
wind_speedu_20m_instm.s**(-1)Wind Speed component U instantaneous: Horizontal wind speed U component (into 330 degree) at 20m above ground at the end of the averaging period [m.s**(-1)]. (eng. param.)
wind_speedu_20m_maxm.s**(-1)Wind Speed component U max: 1 minute maximum horizontal wind speed U component (into 330 degree) at 20m above ground [m.s**(-1)]. (eng. param.)
wind_speedu_20m_minm.s**(-1)Wind Speed component U min: 1 minute minimum horizontal wind speed U component (into 330 degree) at 20m above ground [m.s**(-1)]. (eng. param.)
wind_speedv_20mm.s**(-1)Wind Speed component V: Temporal mean of observatory site ambient wind speed V vector component, where V is horizontal and points to 240 degree measured at sensor position 20m above ground during measurement period [m.s**(-1)]. (sci. param.)
wind_speedv_20m_devm.s**(-1)Wind Speed component V RMS: 1 minute RMS horizontal wind speed V component (into 240 degree) at 20m above ground [m.s**(-1)]. (eng. param.)
wind_speedv_20m_instm.s**(-1)Wind Speed component V instantaneous: Horizontal wind speed V component (into 240 degree) at 20m above ground at the end of the averaging period [m.s**(-1)]. (eng. param.)
wind_speedv_20m_maxm.s**(-1)Wind Speed component V max: 1 minute maximum horizontal wind speed V component (into 240 degree) at 20m above ground [m.s**(-1)]. (eng. param.)
wind_speedv_20m_minm.s**(-1)Wind Speed component V min: 1 minute minimum horizontal wind speed V component (into 240 degree) at 20m above ground [m.s**(-1)]. (eng. param.)
wind_speedw_20mm.s**(-1)Wind Speed component W: Temporal mean of observatory site ambient wind speed W vector component, where W is vertically pointing upwards, measured at sensor position 20m above ground during measurement period [m.s**(-1)]. (sci. param.)
wind_speedw_20m_devm.s**(-1)Wind Speed component W RMS: 1 minute RMS vertical wind speed W component at 20m above ground [m.s**(-1)]. (eng. param.)
wind_speedw_20m_instm.s**(-1)Wind Speed component W instantaneous: Vertical wind speed W component at 20m above ground at the end of the averaging period [m.s**(-1)]. (eng. param.)
wind_speedw_20m_maxm.s**(-1)Wind Speed component W max: 1 minute maximum vertical wind speed W component at 20m above ground [m.s**(-1)]. (eng. param.)
wind_speedw_20m_minm.s**(-1)Wind Speed component W min: 1 minute minimum vertical wind speed W component at 20m above ground [m.s**(-1)]. (eng. param.)
In [3]:
# The following code queries for the average temperature, relative humidity, wind direction and speed at 30m over the Paranal platform
# the instantaneous pressure 0m over the platform, and the average relativhe humidity at 2m,
# in a given interval of time (start_date).

query = """select start_date, temp_30m, rhum_30m, rhum_2m, rain_m20m, 
                  press_0m_inst, wind_dir_30m, wind_speed_30m
           from asm.meteo_paranal
           where start_date between '2025-05-01T21:00:00' and '2025-05-02T10:00:00'
        """

res = tapobs.search(query=query)

print(res.to_table()) # to_table() turns the "res" pyvo table in a astropy table, nicer to print out.
     start_date      temp_30m rhum_30m ... wind_dir_30m wind_speed_30m
                     Celsius     %     ...     deg        m.s**(-1)   
-------------------- -------- -------- ... ------------ --------------
2025-05-01T21:00:41Z    14.78       15 ...          346           8.43
2025-05-01T21:01:41Z    14.76       16 ...          341           7.88
2025-05-01T21:02:41Z    14.72       15 ...          358           8.57
2025-05-01T21:03:43Z    14.76       16 ...          344           7.63
2025-05-01T21:04:43Z    14.74       17 ...          341           8.07
2025-05-01T21:05:43Z    14.76       15 ...          346           9.05
2025-05-01T21:06:43Z    14.71       16 ...          345            8.9
2025-05-01T21:07:42Z    14.66       15 ...          348           9.48
2025-05-01T21:08:43Z    14.67       18 ...          344           9.25
                 ...      ...      ... ...          ...            ...
2025-05-02T09:50:41Z    14.85       13 ...            2            4.9
2025-05-02T09:51:41Z    14.89       13 ...          346           6.05
2025-05-02T09:52:41Z    14.99       13 ...          340           5.47
2025-05-02T09:53:41Z    14.95       13 ...          352           5.28
2025-05-02T09:54:41Z    14.94       13 ...          351            5.8
2025-05-02T09:55:40Z     15.0       13 ...          349           5.95
2025-05-02T09:56:40Z    15.02       13 ...          358           5.38
2025-05-02T09:57:40Z    15.01       13 ...          356           5.65
2025-05-02T09:58:40Z    15.03       13 ...            1            5.9
2025-05-02T09:59:40Z    14.94       13 ...          360           5.33
Length = 780 rows
In [4]:
# Histograms of rel.humidity at 30m and 2m, and of the wind direction and speed
fig, axs = plt.subplots(1, 4) #, tight_layout=True)
fig.set_size_inches(14, 2)
# N is the count in each bin, bins is the lower-limit of the bin
N, bins, patches = axs[0].hist(res['rhum_30m'], bins=10)
_, bins2, patches2 = axs[1].hist(res['rhum_2m'], bins=10)
_, _, _ = axs[2].hist(res['wind_dir_30m'], bins=10)
_, _, _ = axs[3].hist(res['wind_speed_30m'], bins=10) 

axs[0].set_title('rel.hum. 30m')
axs[1].set_title('rel.hum. 2m')
axs[2].set_title('wind dir 30m')
axs[3].set_title('wind speed 30m')
axs[0].set_xlabel('%')
axs[1].set_xlabel('%')
axs[2].set_xlabel('deg')
axs[3].set_xlabel(r'm/s') 
Out[4]:
Text(0.5, 0, 'm/s')
No description has been provided for this image