ReFRACtor / ABSCO

Software that can generate a set of ABSoprtion COefficient tables that span the thermal IR to UV spectral range
Other
9 stars 4 forks source link

Update of RC_utils causes error in ABSCO_compute.py TAPE7 usage #16

Open mcduffie opened 2 years ago

mcduffie commented 2 years ago

The update of common/ to fix issues with RC_utils.py had caused other issues. ABSCO_compute.py needs to be updated since the structure of the dictionary returned by read_TAPE7 has changed. I now get this error:

Traceback (most recent call last):
  File "/home/mcduffie/refractor/absco/run_LBLRTM_ABSCO.py", line 108, in <module>
    kObj.calcABSCO(mol)
  File "/tb/sandbox2/mcduffie/refractor/absco/ABSCO_compute.py", line 709, in calcABSCO
    self.doXS[mol][iBand] else t7Dict['vmr'][self.iMol][0]
KeyError: 'vmr'

I think this change needs to be made in ABSCO_compute.py:

Change

          molDen = t7Dict['vmrXS'][0][0] if \
            self.doXS[mol][iBand] else t7Dict['vmr'][self.iMol][0]

to

          molDen = t7Dict['densities'][self.iMol][0]

Can you please confirm?

pernak18 commented 2 years ago

@mcduffie that works for line-by-line molecules, but not cross section species. with 82d0b6afabf078fb7fd0ba5306f2cd42a2975a0f, i extract both densities. the change needed to happen, because readXS is only for HITRAN ASCII files.

i still have to test. i used your notebook to generate a config file, but then i realized there are no XS species in it. i'll try to think of a good test case, but you are welcome to try out the commit in the meantime.

pernak18 commented 1 year ago

@mcduffie i just tested on H2O and HNO3 in the 350-400 cm-1 spectral range and discovered i needed to make some more small changes to RC_utils.readTAPE7 that have been committed and linked at c3370e452ee0874eba1c659d7af71b28c5197f98. now, i do generate an ABSCO LUT for each molecule/species, i.e., an LBL molecule and XS

pernak18 commented 1 year ago

@mcduffie have you tried the most recent commits? i know with the holidays and conferences you may have not tested on your end, but i just wanted you to know it's still on my radar

mcduffie commented 1 year ago

It appears to be working as expected, at least for a NIR case. I haven't tried a case that uses xsections.