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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gatiab-1.0.2.tar.gz.
File metadata
- Download URL: gatiab-1.0.2.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
076f480b4559ac71a8142ce413ddb2ad55243bfe36eb83002b84397716aa2d0f
|
|
| MD5 |
d627c54f9c0af36f18cde0d15f19a44e
|
|
| BLAKE2b-256 |
42106331e75b214cdc85375f8c38a86f92a8ce38adbbcdaae62826762bc15ef9
|
File details
Details for the file gatiab-1.0.2-py3-none-any.whl.
File metadata
- Download URL: gatiab-1.0.2-py3-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82daba73128e7dca79d4c6dfb7accf4b2a0aa709b1644ee965e9fecf1721935e
|
|
| MD5 |
93d57b90369b8baf5dd768f075a85df9
|
|
| BLAKE2b-256 |
3106ece8eeee55721d287391dd1ca71fab3efe7f0c84880d36a295cf09e3d65e
|