Skip to content

Commit

Permalink
Merge pull request #25 from SatCloP/rose_update
Browse files Browse the repository at this point in the history
Add R23 and R24 absorption model, minor fixes
  • Loading branch information
slarosa authored Jul 12, 2024
2 parents 7f385de + aee0be6 commit 56ebc30
Show file tree
Hide file tree
Showing 15 changed files with 990 additions and 772 deletions.
Binary file modified pyrtlib/_lineshape/h2o_lineshape.nc
Binary file not shown.
8 changes: 4 additions & 4 deletions pyrtlib/_lineshape/h2oll.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@
xh = mtx[:, 9]
shs = mtx[:, 10] / 1000.0
xhs = mtx[:, 11]
if H2OAbsModel.model in ['R19', 'R19SD', 'R20', 'R20SD', 'R21SD', 'R22SD']:
if H2OAbsModel.model in ['R19', 'R19SD', 'R20', 'R20SD', 'R21SD', 'R22SD', 'R23', 'R23SD', 'R24']:
aair = mtx[:, 12]
aself = mtx[:, 13]
if H2OAbsModel.model in ['R19SD', 'R20SD', 'R21SD', 'R22SD']:
if H2OAbsModel.model in ['R19SD', 'R20SD', 'R21SD', 'R22SD', 'R23', 'R23SD', 'R24']:
w2 = mtx[:, 14] / 1000.0
if H2OAbsModel.model in ['R19SD', 'R20SD', 'R22SD']:
if H2OAbsModel.model in ['R19SD', 'R20SD', 'R22SD', 'R23', 'R23SD', 'R24']:
w2s = mtx[:, 15] / 1000.0
if H2OAbsModel.model in ['R21SD', 'R22SD']:
if H2OAbsModel.model in ['R21SD', 'R22SD', 'R23', 'R23SD', 'R24']:
xw2 = mtx[:, 15]
w2s = mtx[:, 16] / 1000.0
xw2s = mtx[:, 17]
Expand Down
Binary file modified pyrtlib/_lineshape/o2_lineshape.nc
Binary file not shown.
4 changes: 3 additions & 1 deletion pyrtlib/_lineshape/o2ll.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@
w300 = d.variables['w300'][:].data
if O2AbsModel.model in ['R98', 'R03', 'R17', 'R18', 'R19', 'R19SD']:
v = d.variables['v'][:].data
if O2AbsModel.model in ['R98', 'R03', 'R17', 'R18', 'R19', 'R19SD', 'R23', 'R24']:
y300 = d.variables['y300'][:].data
else:
if O2AbsModel.model not in ['R98', 'R03', 'R17', 'R18', 'R19', 'R19SD', 'R23', 'R24']:
y0 = d.variables['y0'][:].data
if O2AbsModel.model in ['R16', 'R20', 'R20SD', 'R21', 'R22', 'R23', 'R24']:
y1 = d.variables['y1'][:].data
g0 = d.variables['g0'][:].data
g1 = d.variables['g1'][:].data
Expand Down
Binary file modified pyrtlib/_lineshape/o3_lineshape.nc
Binary file not shown.
198 changes: 173 additions & 25 deletions pyrtlib/absorption_model.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyrtlib/rt_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def clearsky_absorption(p: np.ndarray, t: np.ndarray, e: np.ndarray, frq: np.nda
raise ValueError(
'No model avalaible with this name: {} . Sorry...'.format('model'))

if isinstance(o3n, np.ndarray) and O3AbsModel.model in ['R18', 'R21', 'R21SD', 'R22', 'R22SD']:
if isinstance(o3n, np.ndarray) and O3AbsModel.model in ['R18', 'R21', 'R21SD', 'R22', 'R22SD', 'R23', 'R23SD', 'R24']:
aO3[i] = O3AbsModel().o3_absorption(t[i], p[i], frq, o3n[i], amu)

adry[i] = aO2[i] + aN2[i] + aO3[i]
Expand Down
Loading

0 comments on commit 56ebc30

Please sign in to comment.