Skip to content

Commit

Permalink
31 increase the pwv range in grid (#32)
Browse files Browse the repository at this point in the history
* correct a bug which has been introduced previouslu where the PWV value was overwritten to 0 in libradtran input file.

* correct bug on mol_modify for PWV in libsimulateVisible.py
  • Loading branch information
sylvielsstfr authored Aug 27, 2024
1 parent 4376fbc commit 0686fe2
Show file tree
Hide file tree
Showing 10 changed files with 186 additions and 716 deletions.
89 changes: 18 additions & 71 deletions docs/notebooks/libradtranpy/visible/SimuRT_AbsPattern.ipynb

Large diffs are not rendered by default.

151 changes: 27 additions & 124 deletions docs/notebooks/libradtranpy/visible/SimuRT_MultiSitesAbsO2Pattern.ipynb

Large diffs are not rendered by default.

151 changes: 27 additions & 124 deletions docs/notebooks/libradtranpy/visible/SimuRT_MultiSitesScattPattern.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

89 changes: 18 additions & 71 deletions docs/notebooks/libradtranpy/visible/SimuRT_One.ipynb

Large diffs are not rendered by default.

96 changes: 19 additions & 77 deletions docs/notebooks/libradtranpy/visible/SimuRT_ScattPattern.ipynb

Large diffs are not rendered by default.

58 changes: 18 additions & 40 deletions docs/notebooks/libradtranpy/visible/SimuRT_clouds.ipynb

Large diffs are not rendered by default.

97 changes: 18 additions & 79 deletions docs/notebooks/libradtranpy/visible/SimuRT_vs_Airmass.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/libradtranpy/libsimulateThermal.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,9 @@ def ProcessSimulation(airmass_num,pwv_num,oz_num,press_num,prof_str='us',proc_st
if runtype=='no_absorption':
uvspec.inp["no_absorption"] = ''

# set up the ozone value
# set up the ozone value
# Notice we have mol_modify key twice in libradtran input file,
# But same key in uvspec.inp dictionary would overwrite pwv
uvspec.inp["mol_modify"] = pwv_str
uvspec.inp["mol_modify2"] = oz_str

Expand Down
14 changes: 10 additions & 4 deletions src/libradtranpy/libsimulateVisible.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
:author: sylvielsstfr
:creation date: November 2nd 2016
:last update: February 20th 2024
:update: February 20th 2024
:last update : August 27th 2024
"""

import os
Expand Down Expand Up @@ -272,6 +273,8 @@ def ProcessSimulation(airmass_num, pwv_num, oz_num, press_num, aer_num, angstrom

# water vapor
pwv_str='H2O '+str(pwv_num)+ ' MM'
# try to solve the dictionnary with two identical keys
pwv_str2 = ' '+str(pwv_num)+ ' MM'

# Ozone
oz_str='O3 '+str(oz_num)+ ' DU'
Expand Down Expand Up @@ -311,9 +314,12 @@ def ProcessSimulation(airmass_num, pwv_num, oz_num, press_num, aer_num, angstrom
if runtype=='no_absorption':
uvspec.inp["no_absorption"] = ''

# set up the ozone value
uvspec.inp["mol_modify"] = pwv_str
uvspec.inp["mol_modify"] = oz_str #### BUGUGUGUGUGUGUGUG
# set up the PWV and ozone value
# Notice we have mol_modify key twice in libradtran input file, both for PWV and OZ
# But same key in uvspec.inp dictionary would overwrite pwv
#uvspec.inp["mol_modify"] = pwv_str # OLD
uvspec.inp["mol_modify H2O"] = pwv_str2
uvspec.inp["mol_modify"] = oz_str #### BUGUGUGUGUGUGUGUG ==> No because overwrite pwv. UVspec3 manage the same tag for PWV and OZ

# rescale pressure if reasonable pressure values are provided
if press_num > 200. and press_num < 1080.:
Expand Down

0 comments on commit 0686fe2

Please sign in to comment.