diff --git a/src/intercal/cris.py b/src/intercal/cris.py index 5beb6ad5b9dbd62309c8788fe963d1355475dc15..3b38ccb097958188f639a2acb91e8d9917062d3e 100644 --- a/src/intercal/cris.py +++ b/src/intercal/cris.py @@ -4,7 +4,14 @@ import numpy as np def low_res_wavenumbers(): return np.concatenate([wn_low_res[b] for b in ['lw', 'mw', 'sw']]) +def full_res_wavenumbers(): + return np.concatenate([wn_full_res[b] for b in ['lw', 'mw', 'sw']]) + wn_low_res = {'lw': np.linspace(648.75, 1096.25, 717), 'mw': np.linspace(1207.5, 1752.5, 437), 'sw': np.linspace(2150, 2555, 163)} +wn_full_res = {'lw': np.linspace(648.75, 1096.25, 717), + 'mw': np.linspace(1207.5, 1752.5, 869), + 'sw': np.linspace(2150, 2555, 637)} + diff --git a/src/intercal/hs2modis.py b/src/intercal/hs2modis.py index 30bbd7cc88c8b3f6dc1ad4efee9b7ddc75d79c3d..62dfea1098b528cd156527545aa2bbb4d2860b45 100644 --- a/src/intercal/hs2modis.py +++ b/src/intercal/hs2modis.py @@ -61,12 +61,12 @@ def read_airs_chan_data(filename): class Cris2Modis(object): - def __init__(self, srf_path): - - self.srf_catalog = ModisSrfCatalog(srf_path) + def __init__(self, srf_path, shift_id=0, fsr=False): + self.srf_catalog = ModisSrfCatalog(srf_path, shift_id=shift_id) + self.fsr = fsr def __call__(self, band, rad_lw, rad_mw, rad_sw): - + nu = self.cris_wavenumber_domain() rad_nu = np.concatenate([rad_lw, rad_mw, rad_sw], axis=-1) @@ -81,7 +81,13 @@ class Cris2Modis(object): def cris_wavenumber_domain(self): - return np.concatenate([np.linspace(648.75, 1096.25, 717), + if self.fsr: + return np.concatenate([np.linspace(648.75, 1096.25, 717), + np.linspace(1207.5, 1752.5, 869), + np.linspace(2150, 2555, 637)], + axis=-1) + else: + return np.concatenate([np.linspace(648.75, 1096.25, 717), np.linspace(1207.5, 1752.5, 437), np.linspace(2150, 2555, 163)], axis=-1) diff --git a/src/intercal/modis_srf.py b/src/intercal/modis_srf.py index 903a45ba73b46eed43bf5cb5119d356bc414b329..888d5786c6d672d22537afe23d3aaa4e54e5183a 100644 --- a/src/intercal/modis_srf.py +++ b/src/intercal/modis_srf.py @@ -4,11 +4,19 @@ from pyhdf import SD from intercal.srf import WavelengthSrf from intercal.util import wn2wl -# Spectral shifts from Eva Borbas 2017/06/15 +# Spectral shifts from Eva Borbas 2017/06/15 & 2023/02/15 +""" + shift_id: + 0: no shifts + 1: Aqua C5/6 + 2: Terra C5/6 + 3: Aqua C6.1 + 4: Terra C6.1 +""" shifts = [ {}, { - # Just for Aqua + # Just for Aqua C5/6 27: 5.0, 28: 2.0, 30: 0.0, @@ -17,13 +25,32 @@ shifts = [ 36: 1.0 }, { - # Just for Terra + # Just for Terra C5/6 27: 4.0, 28: 2.0, 30: 1.0, 34: 0.8, 35: 0.8, 36: 1.0 + }, + { + # Just for Aqua C6.1 + 27: 3.0, + 28: 1.0, + 30: -1.0, + 34: 0.8, + 35: 0.8, + 36: 1.0 + }, + { + # Just for Terra C6.1 + 25: 2.0, + 27: 0.0, + 28: 2.0, + 30: 1.0, + 34: 0.8, + 35: 0.8, + 36: 1.0 } ] diff --git a/src/setup.py b/src/setup.py index c89762a2e3718ff68c9c50d7f335827d2997c3ca..b721ad05473abe509f276054f655cc99a2aec0d9 100644 --- a/src/setup.py +++ b/src/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup(name='intercal', - version='0.1.6', + version='0.1.7', packages=find_packages(), package_data={'intercal': ['*.nc']}, install_requires=['numpy', 'netcdf4', 'python-hdf4', 'h5py'],