OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
generate_gas_transmittance_tables Namespace Reference

Functions

def gaussian (x, mu, sig)
 
def get_hico_Rsr (all_wl)
 
def read_sensor_RSR (sensor)
 
def read_TPVMR ()
 
def read_gas_abscf ()
 
def read_gas_abscf_co2 ()
 
def read_gas_abscf_o2 ()
 
def read_gas_abscf_n2o ()
 
def read_gas_abscf_co ()
 
def read_gas_abscf_ch4 ()
 
def LBL_trans_H2O (waveno, A, dp, vmrm, wv)
 
def LBL_trans_O2 (waveno, A)
 
def LBL_trans_N2O (waveno, A)
 
def LBL_trans_CO (waveno, A)
 
def LBL_trans_CO2 (waveno, A, CO2)
 
def LBL_trans_CH4 (waveno, A)
 
def calc_wv_trans_sensor (waveno, T, wavelength, Rsr, bands, wv)
 
def calc_trans_sensor (waveno, T, wavelength, Rsr, bands)
 
def create_nc (sensor, ofile, waterVapor, bands, models, history=None)
 
def write_transmittance (ncid, product, transmittance)
 
def close_nc (ncid)
 
def main ()
 

Variables

 sensors = collections.defaultdict(dict)
 

Function Documentation

◆ calc_trans_sensor()

def generate_gas_transmittance_tables.calc_trans_sensor (   waveno,
  T,
  wavelength,
  Rsr,
  bands 
)
Calculate the  transmittance within a sensor band after applying sensor RSR
    Input: wave number, LBL transmittance, RSR wavelength, RSR, band centers, water vapor
    Output: water vapor transmittance per sensor band, Interpolated RSR to LBL wavelength,
            LBL wavelength, testing variable (to be removed)

Definition at line 407 of file generate_gas_transmittance_tables.py.

◆ calc_wv_trans_sensor()

def generate_gas_transmittance_tables.calc_wv_trans_sensor (   waveno,
  T,
  wavelength,
  Rsr,
  bands,
  wv 
)
Calculate the water vapor transmittance within a sensor band after applying sensor RSR
    Input: wave number, LBL transmittance, RSR wavelength, RSR, band centers, water vapor
    Output: water vapor transmittance per sensor band, Interpolated RSR to LBL wavelength,
            LBL wavelength, testing variable (to be removed)

Definition at line 383 of file generate_gas_transmittance_tables.py.

◆ close_nc()

def generate_gas_transmittance_tables.close_nc (   ncid)

Definition at line 506 of file generate_gas_transmittance_tables.py.

◆ create_nc()

def generate_gas_transmittance_tables.create_nc (   sensor,
  ofile,
  waterVapor,
  bands,
  models,
  history = None 
)
This function opens and defines products for output as a netcdf file

Definition at line 429 of file generate_gas_transmittance_tables.py.

◆ gaussian()

def generate_gas_transmittance_tables.gaussian (   x,
  mu,
  sig 
)
Calculate gaussian filter
    Input: wavelength, band cetner, FWHM
    Output: Guassian filter

Definition at line 82 of file generate_gas_transmittance_tables.py.

◆ get_hico_Rsr()

def generate_gas_transmittance_tables.get_hico_Rsr (   all_wl)
Calculate HICO RSR - for testing and comparing to operational code
    Input: Wavelength (nm) at which the RSR will be calculates,
           for this exercise, use the water vapor tx wavelength
    Output: hico band center, RSR

Definition at line 90 of file generate_gas_transmittance_tables.py.

◆ LBL_trans_CH4()

def generate_gas_transmittance_tables.LBL_trans_CH4 (   waveno,
  A 
)
Calculate LBL CH4 transmittance
    Input: wave number, absorption coefficients, delta-pressure,
    volume mixing ratio (ppm), water vapor amount (cm)
    Output: LBL water vapor transmittance

Definition at line 361 of file generate_gas_transmittance_tables.py.

◆ LBL_trans_CO()

def generate_gas_transmittance_tables.LBL_trans_CO (   waveno,
  A 
)
Calculate LBL CO transmittance
    Input: wave number, absorption coefficients, delta-pressure,
    volume mixing ratio (ppm), water vapor amount (cm)
    Output: LBL water vapor transmittance

Definition at line 317 of file generate_gas_transmittance_tables.py.

◆ LBL_trans_CO2()

def generate_gas_transmittance_tables.LBL_trans_CO2 (   waveno,
  A,
  CO2 
)
Calculate LBL CO2 transmittance
    Input: wave number, absorption coefficients, delta-pressure,
    volume mixing ratio (ppm), water vapor amount (cm)
    Output: LBL water vapor transmittance

Definition at line 339 of file generate_gas_transmittance_tables.py.

◆ LBL_trans_H2O()

def generate_gas_transmittance_tables.LBL_trans_H2O (   waveno,
  A,
  dp,
  vmrm,
  wv 
)
Calculate LBL water vapor transmittance
    Input: wave number, absorption coefficients, delta-pressure,
    volume mixing ratio (ppm), water vapor amount (cm)
    Output: LBL water vapor transmittance

Definition at line 252 of file generate_gas_transmittance_tables.py.

◆ LBL_trans_N2O()

def generate_gas_transmittance_tables.LBL_trans_N2O (   waveno,
  A 
)
Calculate LBL N2O transmittance
    Input: wave number, absorption coefficients, delta-pressure,
    volume mixing ratio (ppm), water vapor amount (cm)
    Output: LBL water vapor transmittance

Definition at line 295 of file generate_gas_transmittance_tables.py.

◆ LBL_trans_O2()

def generate_gas_transmittance_tables.LBL_trans_O2 (   waveno,
  A 
)
Calculate LBL O2 transmittance
    Input: wave number, absorption coefficients, delta-pressure,
    volume mixing ratio (ppm), water vapor amount (cm)
    Output: LBL water vapor transmittance

Definition at line 272 of file generate_gas_transmittance_tables.py.

◆ main()

def generate_gas_transmittance_tables.main ( )
Primary driver of the program; get command line arguments, check the files
specified and kick off the processing

Definition at line 510 of file generate_gas_transmittance_tables.py.

◆ read_gas_abscf()

def generate_gas_transmittance_tables.read_gas_abscf ( )
Reads gas (water vapor) absorption coeff. from a nc file in /common
    Input: None
    Output: waveno, A

Definition at line 186 of file generate_gas_transmittance_tables.py.

◆ read_gas_abscf_ch4()

def generate_gas_transmittance_tables.read_gas_abscf_ch4 ( )
Reads gas (CH4) absorption coeff. from a nc file in /common
    Input: None
    Output: waveno, A

Definition at line 241 of file generate_gas_transmittance_tables.py.

◆ read_gas_abscf_co()

def generate_gas_transmittance_tables.read_gas_abscf_co ( )
Reads gas (CO) absorption coeff. from a nc file in /common
    Input: None
    Output: waveno, A

Definition at line 230 of file generate_gas_transmittance_tables.py.

◆ read_gas_abscf_co2()

def generate_gas_transmittance_tables.read_gas_abscf_co2 ( )
Reads gas (CO2) absorption coeff. from a nc file in /common
    Input: None
    Output: waveno, A

Definition at line 197 of file generate_gas_transmittance_tables.py.

◆ read_gas_abscf_n2o()

def generate_gas_transmittance_tables.read_gas_abscf_n2o ( )
Reads gas (N2O) absorption coeff. from a nc file in /common
    Input: None
    Output: waveno, A

Definition at line 219 of file generate_gas_transmittance_tables.py.

◆ read_gas_abscf_o2()

def generate_gas_transmittance_tables.read_gas_abscf_o2 ( )
Reads gas (O2) absorption coeff. from a nc file in /common
    Input: None
    Output: waveno, A

Definition at line 208 of file generate_gas_transmittance_tables.py.

◆ read_sensor_RSR()

def generate_gas_transmittance_tables.read_sensor_RSR (   sensor)
Reads a sensor spectral response (RSR) from the OCW through https
    Input: Sensor name (string)
    Output: normalized Rsr (numpy 2-d array - wavelength x sensor band),
            wavelength,
            sensor band labels,

Definition at line 125 of file generate_gas_transmittance_tables.py.

◆ read_TPVMR()

def generate_gas_transmittance_tables.read_TPVMR ( )
Reads temprature, pressure, and vmr profiles from nc file in /common for
    models: 0:Tropical,1:Mid Latitude Summer,2:Mid Latitude Winter,
    3:Subarctic Summer,4:Subarctic Winter,5:US Standard 1962,6:User Defined Model
    Input: None
    Output: dp, vmrm

Definition at line 165 of file generate_gas_transmittance_tables.py.

◆ write_transmittance()

def generate_gas_transmittance_tables.write_transmittance (   ncid,
  product,
  transmittance 
)

Definition at line 503 of file generate_gas_transmittance_tables.py.

Variable Documentation

◆ sensors

sensors = collections.defaultdict(dict)

TODO: use $OCDATAROOT/common/SensorInfo.json as starter dict read file.

parse file sensors = json.loads(sensorDefs) print(sensors)

Definition at line 38 of file generate_gas_transmittance_tables.py.