Skip to main content

Gasous Absorption Transmissions at Instrument Averaged Bands

Project description

GATIAB

image image image

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 one the following commands:

$ conda install -c conda-forge gatiab
$ pip install gatiab
$ 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, rsrf)
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.1.1.tar.gz (58.5 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.1.1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gatiab-1.1.1.tar.gz
  • Upload date:
  • Size: 58.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for gatiab-1.1.1.tar.gz
Algorithm Hash digest
SHA256 9f7892ef28ce94a73682777c0cab655d0690305346d30e252ecb8141456a5824
MD5 0bd212567959505d008ea7864617ca2f
BLAKE2b-256 75893f0e98b19e19d2e68bf4e24329688233ceab0a53895243205cb26ad8481e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gatiab-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for gatiab-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12dfe20285fc1aedf2381e8fb8bf3454f7325340a7ca396c1b68ac6832473e52
MD5 4ad71fa99fdab290f41284c6c99800b9
BLAKE2b-256 feae5e57de7c0809152ed629457e2de296c7381c34f39b5a3485872050078dba

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