Skip to main content

Gasous Absorption Transmissions at Instrument Averaged Bands

Project description

GATIAB

GATIAB (Gasous Absorption Transmissions at Instrument Averaged Bands).
This module provides gaseous transmissions base on CKDMIP idealized Look-Up tables and sensor spectral response functions.

Mustapha Moulana
HYGEOS


CKDMIP data

The CKDMIP (the Correlated K-Distribution Model Intercomparison Project) Idealized Look-Up tables are necessary to use the gatiab module. See: Hogan et al. -> https://gmd.copernicus.org/articles/13/6501/2020/

The CKDMIP documentation and data are available here: https://confluence.ecmwf.int/display/CKDMIP

AFGL atmophere LUTs

The gatiab module needs afgl atmosphere profils. Those atmophere look-up tables can be dowloaded from SMART-G (Speed-up Monte Carlo Advanced Radiative Transfer Code using GPU) -> https://github.com/hygeos/smartg

The SMART-G makefile can be used:

$ make auxdata_atm

Installation

The module can be installed using the following command:

$ pip install git+https://github.com/hygeos/gatiab.git

Testing

Example of pytest.ini file:

[pytest]
addopts=
    --dir-ckdmip="/path/to/ckdmip/dir/"
    --dir-atm="path/to/atm/dir/"
    -s -v

Run the command pytest tests/ to check that everything is running correctly.

Exemples

from gatiab import ckdmip2od, Gatiab
import xarray as xr
import glob

# Specify the ckdmip and atmophere directory paths
dir_ckdmip = "path/to/ckdmip/dir/" 
dir_atm = "path/to/atm/dir/"

# First create optical depth LUTs of a given atmosphere
# wavenumber units -> cm-1
ds = ckdmip2od(gas='O3', dir_ckdmip=dir_ckdmip, dir_atm=dir_atm, atm='afglus',
               wvn_min = 4000., wvn_max=26000., save=True)

# Second we need the instrument spectral response
# Here we use the LUTs we have created for testing of Sentinel 3A OLCI
# Other SRF intruments -> https://nwp-saf.eumetsat.int/site/software/rttov/download/coefficients/spectral-response-functions/
rsrf_files = sorted(glob.glob("./tests/S3A_OLCI_rsrf/*.nc"))
nbands = len(rsrf_files)
rsrf = [] # iband list with relative spectral response as function of wavelength
srf_wvl = [] # iband list with wavelength in nanometer
for i in range (0, nbands):
    with xr.open_dataset(rsrf_files[i]) as ds:
        rsrf.append(ds['rsrf'].values)
        srf_wvl.append(ds['wvl'].values)

# Third compute the gas transmission as function of gas content, airmass, ground pressure and wavelength
gt = Gatiab(ds)
gt.print_gas_content() # print the standard afgl total column content of O3

gas_content = np.array([250., 300., 350.]) # in DU
air_mass = np.array([3., 4., 5.])
p0 = gt.od['P_hl'][-2:].data*1e-2 # ground pressure in hectopascal
ds_gt = gt.calc(gas_content, air_mass, p0, srf_wvl_r, rsrf_r)
print(ds_gt)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gatiab-1.0.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gatiab-1.0.1-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file gatiab-1.0.1.tar.gz.

File metadata

  • Download URL: gatiab-1.0.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for gatiab-1.0.1.tar.gz
Algorithm Hash digest
SHA256 42fe225cc06a2900ad67cdd9182611355084fd6d24c45854fb61bfde8e152f18
MD5 19172399bf32549c7334fe0e601459db
BLAKE2b-256 ca9facbafd6d3cd02f66b9dd06cf6addf594a843bef770764cf1f94faa75bd0c

See more details on using hashes here.

File details

Details for the file gatiab-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gatiab-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for gatiab-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25959f154ee429befc22da63c57c291925e5ec1ad053bec2216a97431ca3b555
MD5 ef1e9563e737d6a0a3f06365758e50c4
BLAKE2b-256 3d56d9862b10d262001a963101940c18205c7264dcf32d88019004bbbf95742b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page