Skip to content

Commit

Permalink
added hapi approximation to GAAS
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieCallahan committed Jan 22, 2024
1 parent 977bb1d commit 9e10021
Show file tree
Hide file tree
Showing 4 changed files with 323 additions and 311 deletions.
10 changes: 5 additions & 5 deletions example_ocl.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import published_validation.hapiValidationFunctions as hvf
import gaas_ocl as gs

startWavenum = 7200
endWavenum = 7600
wavenumStep = 0.001 #wavenums per simulation step
mol = 'CH4' #'O3', 'N2O', 'CO', 'CH4', 'O2', 'NO', 'SO2', 'NO2', 'NH3', 'HNO3'
startWavenum = 7300
endWavenum = 7400
wavenumStep = 0.01 #wavenums per simulation step
mol = 'H2O' #'O3', 'N2O', 'CO', 'CH4', 'O2', 'NO', 'SO2', 'NO2', 'NH3', 'HNO3'
iso = 1 #isotopologue num
T = 296 #K
P = 1.0 #atm
Expand Down Expand Up @@ -89,7 +89,7 @@ def getError(nus_h,coefs_h,nus_g,coefs_g):

ax1.plot(nus,coefs)
ax1.plot(nus_h,coefs_h)
plt.xlim(7425,7455)
# plt.xlim(7425,7455)
ax1.legend(("GAAS","HAPI"))
ax1.set_ylabel("Absorbance")

Expand Down
4 changes: 2 additions & 2 deletions hapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17824,9 +17824,9 @@ def hum1_wei(x,y,n=24):
cerf = 1j*z/sqrt(pi)/(z**2-0.5)
"""

# mask = abs(x)+y<15.0
mask = abs(x)+y<15.0
#Adjusted to remove the approximation for comparison with GAAS
mask = (np.zeros_like(x) == 0) #array of "True"
# mask = (np.zeros_like(x) == 0) #array of "True"
if any(mask):
w24 = weideman(x[mask],y[mask],n)
place(cerf,mask,w24)
Expand Down
Loading

0 comments on commit 9e10021

Please sign in to comment.