From f8af925821fd97772520f36fe88b79f8df27ba03 Mon Sep 17 00:00:00 2001 From: Merdele <93083395+Merdele@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:29:11 +0800 Subject: [PATCH] Update processor.py the val calculated by the end flag did not make sense as it was creating a pressure value of ~102 at a higher altitude, which was greater than the previous value of 100 at a lower altitude --- src/pyaps3/processor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pyaps3/processor.py b/src/pyaps3/processor.py index ef6e5d5..a4d4439 100644 --- a/src/pyaps3/processor.py +++ b/src/pyaps3/processor.py @@ -116,7 +116,7 @@ def intP2H(lvls,hgt,gph,tmp,vpr,cdic,verbose=False): hy = np.concatenate((hy,[val]),axis=0) if (eFlag == True): - val = hy[0] - (hx[0] - hx[1]) * (hy[0] - hy[1])/(hx[1]-hx[2]) + val = hy[0] + (hx[0] - hx[1]) * (hy[0] - hy[1])/(hx[1]-hx[2]) #changed from 1 to 0 (-1 should also work), CL hy = np.concatenate(([val],hy),axis=0) @@ -135,7 +135,7 @@ def intP2H(lvls,hgt,gph,tmp,vpr,cdic,verbose=False): hy = np.concatenate((hy,[val]),axis=0) if (eFlag == True): - val = hy[0] - (hx[0] - hx[1]) * (hy[0] - hy[1])/(hx[1]-hx[2]) + val = hy[0] + (hx[0] - hx[1]) * (hy[0] - hy[1])/(hx[1]-hx[2]) #changed from 1 to 0 (-1 should also work), CL hy = np.concatenate(([val],hy),axis=0) @@ -153,7 +153,7 @@ def intP2H(lvls,hgt,gph,tmp,vpr,cdic,verbose=False): hy = np.concatenate((hy,[val]),axis=0) if (eFlag == True): - val = hy[0] - (hx[0] - hx[1]) * (hy[0] - hy[1])/(hx[1]-hx[2]) + val = hy[0] + (hx[0] - hx[1]) * (hy[0] - hy[1])/(hx[1]-hx[2]) #changed from 1 to 0 (-1 should also work), CL hy = np.concatenate(([val],hy),axis=0)