# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES.
# SPDX-FileCopyrightText: All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from collections.abc import Callable


class LexiconType(type):
    """Lexicon."""

    def __getitem__(cls, val: str) -> tuple[str, Callable]:
        """Retrieve variable name."""
        return cls.get_item(val)  # type: ignore[attr-defined]


E2STUDIO_VOCAB = {
    "u10m": "u-component (eastward, zonal) of wind at 10 m (m s-1)",
    "v10m": "v-component (northward, meridional) of wind at 10 m (m s-1)",
    "ws10m": "wind speed at 10 m (m s-1)",
    "u100m": "u-component of wind at 100 m (m s-1)",
    "v100m": "v-component of wind at 100 m (m s-1)",
    "t2m": "temperature at 2m (K)",
    "d2m": "dewpoint temperature at 2m (K)",
    "r2m": "relative humidity at 2 m (%)",
    "q2m": "specific humidity at 2 m (kg kg-1)",
    "sst": "Temperature of sea water near the surface (K)",
    "ssta": "Sea surface temperature anomaly relative to climatology (K)",
    "sstu": "Uncertainty estimate of the analysed sea surface temperature (K)",
    "sic": "sea ice concentration / sea ice area fraction (0 - 1)",
    "sp": "surface pressure (Pa)",
    "msl": "mean sea level pressure (Pa)",
    "tcwv": "total column water vapor / precipitable water (kg m-2)",
    "tclw": "total column liquid water / vertically integrated liquid (cloud) water path (kg m-2)",
    "tciw": "total column ice water / vertically integrated ice (cloud) water path (kg m-2)",
    "tcw": "total column water (kg m-2)",
    "tp": "total precipitation (m)",
    "tpp": "total precipitation probability",
    "tpi": "total precipitation index",
    "tp06": "total precipitation accumulated over past 6 hours (m)",
    "cp06": "convective precipitation accumulated over past 6 hours (m)",
    "tpf": "total precipitation flux (kg m-2 s-1)",
    "tcc": "total cloud cover (0 - 1)",
    "sd": "snow depth (m of water equivalent)",
    "sde": "snow depth (m)",
    "fg10m": "maximum 10 m wind gust since previous post-processing (m s-1)",
    "rlut": "outgoing longwave radiation (W m-2)",
    "rsut": "outgoing shortwave radiation (W m-2)",
    "rsds": "surface downwelling shortwave radiation (W m-2)",
    "refc": "Maximum/Composite radar reflectivity (dB)",
    "aerot": "aerosol optical thickness",
    "snowc": "snow coverage (%)",
    "csnow": "categorical snow",
    "cicep": "categorical (80, 90, or 100  percent chance of measurable precipitation (0.01 inch)) ice pellets",
    "cfrzr": "categorical (80, 90, or 100  percent chance of measurable precipitation (0.01 inch)) freezing rain",
    "crain": "categorical (80, 90, or 100  percent chance of measurable precipitation (0.01 inch)) rain",
    "tau300-700": "Geopotential thickness between 300 and 700 hPa levels (z300 - z700)",
    "tc_lat": "tropical cyclone center latitude position",
    "tc_lon": "tropical cyclone center longitude position",
    "tc_msl": "tropical cyclone center min mean sea level pressure (Pa)",
    "tc_w10m": "tropical cyclone center max wind speed at 10m (m s-1)",
    "lsm": "land-sea mask",
    "z": "geopotential at surface (orography) (m2 s-2)",
    "uvcossza": "cosine of solar zenith angle",
    "u50": "u-component of wind at 50 hPa (m s-1)",
    "u100": "u-component of wind at 100 hPa (m s-1)",
    "u150": "u-component of wind at 150 hPa (m s-1)",
    "u200": "u-component of wind at 200 hPa (m s-1)",
    "u250": "u-component of wind at 250 hPa (m s-1)",
    "u300": "u-component of wind at 300 hPa (m s-1)",
    "u400": "u-component of wind at 400 hPa (m s-1)",
    "u500": "u-component of wind at 500 hPa (m s-1)",
    "u600": "u-component of wind at 600 hPa (m s-1)",
    "u700": "u-component of wind at 700 hPa (m s-1)",
    "u850": "u-component of wind at 850 hPa (m s-1)",
    "u925": "u-component of wind at 925 hPa (m s-1)",
    "u1000": "u-component of wind at 1000 hPa (m s-1)",
    "v50": "v-component of wind at 50 hPa (m s-1)",
    "v100": "v-component of wind at 100 hPa (m s-1)",
    "v150": "v-component of wind at 150 hPa (m s-1)",
    "v200": "v-component of wind at 200 hPa (m s-1)",
    "v250": "v-component of wind at 250 hPa (m s-1)",
    "v300": "v-component of wind at 300 hPa (m s-1)",
    "v400": "v-component of wind at 400 hPa (m s-1)",
    "v500": "v-component of wind at 500 hPa (m s-1)",
    "v600": "v-component of wind at 600 hPa (m s-1)",
    "v700": "v-component of wind at 700 hPa (m s-1)",
    "v850": "v-component of wind at 850 hPa (m s-1)",
    "v925": "v-component of wind at 925 hPa (m s-1)",
    "v1000": "v-component of wind at 1000 hPa (m s-1)",
    "w50": "vertical wind at 50 hPa (Pa s-1)",
    "w100": "vertical wind at 100 hPa (Pa s-1)",
    "w150": "vertical wind at 150 hPa (Pa s-1)",
    "w200": "vertical wind at 200 hPa (Pa s-1)",
    "w250": "vertical wind at 250 hPa (Pa s-1)",
    "w300": "vertical wind at 300 hPa (Pa s-1)",
    "w400": "vertical wind at 400 hPa (Pa s-1)",
    "w500": "vertical wind at 500 hPa (Pa s-1)",
    "w600": "vertical wind at 600 hPa (Pa s-1)",
    "w700": "vertical wind at 700 hPa (Pa s-1)",
    "w850": "vertical wind at 850 hPa (Pa s-1)",
    "w925": "vertical wind at 925 hPa (Pa s-1)",
    "w1000": "vertical wind at 1000 hPa (Pa s-1)",
    "z50": "geopotential at 50 hPa (m2 s-2)",
    "z100": "geopotential at 100 hPa (m2 s-2)",
    "z150": "geopotential at 150 hPa (m2 s-2)",
    "z200": "geopotential at 200 hPa (m2 s-2)",
    "z250": "geopotential at 250 hPa (m2 s-2)",
    "z300": "geopotential at 300 hPa (m2 s-2)",
    "z400": "geopotential at 400 hPa (m2 s-2)",
    "z500": "geopotential at 500 hPa (m2 s-2)",
    "z600": "geopotential at 600 hPa (m2 s-2)",
    "z700": "geopotential at 700 hPa (m2 s-2)",
    "z850": "geopotential at 850 hPa (m2 s-2)",
    "z925": "geopotential at 925 hPa (m2 s-2)",
    "z1000": "geopotential at 1000 hPa (m2 s-2)",
    "t50": "temperature at 50 hPa (K)",
    "t100": "temperature at 100 hPa (K)",
    "t150": "temperature at 150 hPa (K)",
    "t200": "temperature at 200 hPa (K)",
    "t250": "temperature at 250 hPa (K)",
    "t300": "temperature at 300 hPa (K)",
    "t400": "temperature at 400 hPa (K)",
    "t500": "temperature at 500 hPa (K)",
    "t600": "temperature at 600 hPa (K)",
    "t700": "temperature at 700 hPa (K)",
    "t850": "temperature at 850 hPa (K)",
    "t925": "temperature at 925 hPa (K)",
    "t1000": "temperature at 1000 hPa (K)",
    "r50": "relative humidity at 50 hPa (%)",
    "r100": "relative humidity at 100 hPa (%)",
    "r150": "relative humidity at 150 hPa (%)",
    "r200": "relative humidity at 200 hPa (%)",
    "r250": "relative humidity at 250 hPa (%)",
    "r300": "relative humidity at 300 hPa (%)",
    "r400": "relative humidity at 400 hPa (%)",
    "r500": "relative humidity at 500 hPa (%)",
    "r600": "relative humidity at 600 hPa (%)",
    "r700": "relative humidity at 700 hPa (%)",
    "r850": "relative humidity at 850 hPa (%)",
    "r925": "relative humidity at 925 hPa (%)",
    "r1000": "relative humidity at 1000 hPa (%)",
    "q50": "specific humidity at 50 hPa (kg kg-1)",
    "q100": "specific humidity at 100 hPa (kg kg-1)",
    "q150": "specific humidity at 150 hPa (kg kg-1)",
    "q200": "specific humidity at 200 hPa (kg kg-1)",
    "q250": "specific humidity at 250 hPa (kg kg-1)",
    "q300": "specific humidity at 300 hPa (kg kg-1)",
    "q400": "specific humidity at 400 hPa (kg kg-1)",
    "q500": "specific humidity at 500 hPa (kg kg-1)",
    "q600": "specific humidity at 600 hPa (kg kg-1)",
    "q700": "specific humidity at 700 hPa (kg kg-1)",
    "q850": "specific humidity at 850 hPa (kg kg-1)",
    "q925": "specific humidity at 925 hPa (kg kg-1)",
    "q1000": "specific humidity at 1000 hPa (kg kg-1)",
    "vpd100": "vapor pressure deficit (hPa) at 100 hPa",
    "vpd200": "vapor pressure deficit (hPa) at 200 hPa",
    "vpd300": "vapor pressure deficit (hPa) at 300 hPa",
    "vpd400": "vapor pressure deficit (hPa) at 400 hPa",
    "vpd500": "vapor pressure deficit (hPa) at 500 hPa",
    "vpd600": "vapor pressure deficit (hPa) at 600 hPa",
    "vpd700": "vapor pressure deficit (hPa) at 700 hPa",
    "vpd850": "vapor pressure deficit (hPa) at 850 hPa",
    "vpd925": "vapor pressure deficit (hPa) at 925 hPa",
    "vpd1000": "vapor pressure deficit (hPa) at 1000 hPa",
    "ws100": "wind speed at 100 hPa (m s-1)",
    "ws200": "wind speed at 200 hPa (m s-1)",
    "ws300": "wind speed at 300 hPa (m s-1)",
    "ws400": "wind speed at 400 hPa (m s-1)",
    "ws500": "wind speed at 500 hPa (m s-1)",
    "ws600": "wind speed at 600 hPa (m s-1)",
    "ws700": "wind speed at 700 hPa (m s-1)",
    "ws850": "wind speed at 850 hPa (m s-1)",
    "ws925": "wind speed at 925 hPa (m s-1)",
    "ws1000": "wind speed at 1000 hPa (m s-1)",
    "skt": "skin temperature at surface (K)",
    "slor": "slope of sub-grid scale orography",
    "sdor": "standard deviation of sub-grid scale orography",
    "swvl1": "volumetric soil water layer 1 (m³/m³)",
    "swvl2": "volumetric soil water layer 2 (m³/m³)",
    "stl1": "soil temperature level 1 (K)",
    "stl2": "soil temperature level 2 (K)",
    "abi01c": "GOES ABI Channel 1 - Blue (0.47 µm)",
    "abi02c": "GOES ABI Channel 2 - Red (0.64 µm)",
    "abi03c": "GOES ABI Channel 3 - Vegetation (0.86 µm)",
    "abi04c": "GOES ABI Channel 4 - Cirrus (1.37 µm)",
    "abi05c": "GOES ABI Channel 5 - Snow/Ice (1.61 µm)",
    "abi06c": "GOES ABI Channel 6 - Cloud Particle Size (2.24 µm)",
    "abi07c": "GOES ABI Channel 7 - Shortwave Window (3.90 µm)",
    "abi08c": "GOES ABI Channel 8 - Upper-level Water Vapor (6.19 µm)",
    "abi09c": "GOES ABI Channel 9 - Mid-level Water Vapor (6.95 µm)",
    "abi10c": "GOES ABI Channel 10 - Lower-level Water Vapor (7.34 µm)",
    "abi11c": "GOES ABI Channel 11 - Cloud-top Phase (8.50 µm)",
    "abi12c": "GOES ABI Channel 12 - Ozone (9.61 µm)",
    "abi13c": "GOES ABI Channel 13 - Clean IR Longwave Window (10.35 µm)",
    "abi14c": "GOES ABI Channel 14 - IR Longwave Window (11.20 µm)",
    "abi15c": "GOES ABI Channel 15 - Dirty IR Longwave Window (12.30 µm)",
    "abi16c": "GOES ABI Channel 16 - CO2 Longwave IR (13.30 µm)",
    "viirs01i": "VIIRS I1 - Red (0.64 µm)",
    "viirs02i": "VIIRS I2 - Near-IR (0.864 µm)",
    "viirs03i": "VIIRS I3 - SWIR (1.58 µm)",
    "viirs04i": "VIIRS I4 - MWIR (3.74 µm)",
    "viirs05i": "VIIRS I5 - LWIR/Thermal (11.45 µm)",
    "viirs01m": "VIIRS M1 - Violet (0.412 µm)",
    "viirs02m": "VIIRS M2 - Blue (0.445 µm)",
    "viirs03m": "VIIRS M3 - Blue-Green (0.488 µm)",
    "viirs04m": "VIIRS M4 - Green (0.555 µm)",
    "viirs05m": "VIIRS M5 - Red (0.672 µm)",
    "viirs06m": "VIIRS M6 - Red Edge (0.746 µm)",
    "viirs07m": "VIIRS M7 - Near-IR (0.865 µm)",
    "viirs08m": "VIIRS M8 - Near-IR (1.24 µm)",
    "viirs09m": "VIIRS M9 - Cirrus (1.378 µm)",
    "viirs10m": "VIIRS M10 - SWIR (1.61 µm)",
    "viirs11m": "VIIRS M11 - SWIR (2.25 µm)",
    "viirs12m": "VIIRS M12 - MWIR (3.7 µm)",
    "viirs13m": "VIIRS M13 - MWIR (4.05 µm)",
    "viirs14m": "VIIRS M14 - LWIR (8.55 µm)",
    "viirs15m": "VIIRS M15 - LWIR (10.76 µm)",
    "viirs16m": "VIIRS M16 - LWIR (12.01 µm)",
    "s3sy01aod": "Sentinel-3 SYNERGY aerosol optical depth band 01 (440 nm)",
    "s3sy02aod": "Sentinel-3 SYNERGY aerosol optical depth band 02 (550 nm)",
    "s3sy03aod": "Sentinel-3 SYNERGY aerosol optical depth band 03 (670 nm)",
    "s3sy04aod": "Sentinel-3 SYNERGY aerosol optical depth band 04 (865 nm)",
    "s3sy05aod": "Sentinel-3 SYNERGY aerosol optical depth band 05 (1600 nm)",
    "s3sy06aod": "Sentinel-3 SYNERGY aerosol optical depth band 06 (2250 nm)",
    "s3sy01ssa": "Sentinel-3 SYNERGY single-scattering albedo band 01 (440 nm)",
    "s3sy02ssa": "Sentinel-3 SYNERGY single-scattering albedo band 02 (550 nm)",
    "s3sy03ssa": "Sentinel-3 SYNERGY single-scattering albedo band 03 (670 nm)",
    "s3sy04ssa": "Sentinel-3 SYNERGY single-scattering albedo band 04 (865 nm)",
    "s3sy05ssa": "Sentinel-3 SYNERGY single-scattering albedo band 05 (1600 nm)",
    "s3sy01sr": "Sentinel-3 SYNERGY nadir surface reflectance band 01 (440 nm)",
    "s3sy02sr": "Sentinel-3 SYNERGY nadir surface reflectance band 02 (550 nm)",
    "s3sy03sr": "Sentinel-3 SYNERGY nadir surface reflectance band 03 (670 nm)",
    "s3sy04sr": "Sentinel-3 SYNERGY nadir surface reflectance band 04 (865 nm)",
    "s3sy05sr": "Sentinel-3 SYNERGY nadir surface reflectance band 05 (1600 nm)",
    "lst": "land surface temperature from VIIRS thermal infrared channels (K)",
    "salb": "surface albedo - fraction of solar radiation reflected by Earth's surface (0 - 1)",
    "snc": "snow cover fraction - percentage of pixel covered by snow (0 - 1)",
    "afire": "active fire detection from VIIRS thermal anomaly algorithm",
    "fmask": "fire detection confidence mask - fire pixel classification quality",
    "mfrp": "fire radiative power (FRP) per pixel (MW)",
    "qa": "fire detection quality assurance (0 - 1)",
    "cmask": "cloud mask - clear/cloudy pixel classification from multispectral analysis",
    "cphase": "cloud phase - ice/water/mixed phase determination from IR channels",
    "cth": "cloud top height above sea level from IR temperature retrieval (m)",
    "cbh": "cloud base height above sea level from atmospheric profile analysis (m)",
    "cdcomp": "cloud optical depth and effective radius from visible/near-IR channels (day)",
    "cncomp": "cloud optical properties from thermal IR channels (night)",
    "ccl": "cloud cover fraction by atmospheric layers - low/mid/high clouds (0 - 1)",
    "aod": "aerosol optical depth at 550nm - atmospheric particulate loading",
    "vash": "volcanic ash detection and concentration from thermal IR signature",
    "hcc": "high cloud cover (0 - 1)",
    "mcc": "medium cloud cover (0 - 1)",
    "lcc": "low cloud cover (0 - 1)",
    "ssrd": "surface short-wave (solar) radiation downwards (J m-2) accumulated over a time period",
    "strd": "surface long-wave (thermal) radiation downwards (J m-2) accumulated over a time period",
    "ssrd06": "surface short-wave (solar) radiation downwards (J m-2) past 6 hours",
    "strd06": "surface long-wave (thermal) radiation downwards (J m-2) past 6 hours",
    "sf": "snowfall water equivalent (kg m-2)",
    "ro": "runoff water equivalent (surface plus subsurface) (kg m-2)",
}
