From 73b7ecf4c5dd14357ae7434a2f744b56caf5d4af Mon Sep 17 00:00:00 2001 From: a-urq Date: Fri, 29 Mar 2024 19:36:15 -0500 Subject: [PATCH] Changed sigma from 1.6 to 1.1 to more accurately match the final paper rather than the preprint. --- bin/com/ameliaWx/ecape4j/Ecape.class | Bin 20179 -> 20704 bytes src/com/ameliaWx/ecape4j/Ecape.java | 67 ++++++++++++++++++++++++--- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/bin/com/ameliaWx/ecape4j/Ecape.class b/bin/com/ameliaWx/ecape4j/Ecape.class index b37d154aa50a78b5dca29644ebdcdf239456fd2c..d0ab55d9896c4a3ac85c0ce5b55754a447346c6b 100644 GIT binary patch delta 8516 zcmcgxd2|$2*1z|?>Q1LqNoVOK)gfDFqmxc2BtW!T10;kH2)nEzA%qx05)45EghoLH z1r*B_Ma2bN#zD*oaba=abyVC}{MV$t=Bv+I6a-r5NTjw~8cx%OQ)eeR#*pBUOKOud+~D_&J?-0t+Beb zqoI8XlfyT=Vs=GEenkZR!IWT0xvZmUaq)=u_PQ10nwEAr=>$!1GP8_e@uxLcv@M&z zxIt%)ZRY&Q9LEWc(AmL}=9WnRkZ7G_6f;+Q!};TyS{v%x!z>{P$Lbu%@l0C#lsYKN z?yIP%&aY5++&U+6($&t)C_`rteZZ8qtkraBeMTt>`skd>X-u}JrL}dn81JjdpJgw9 za)YH02+Cfavp5@fmNuu;6Lp@%lRNk8 z0bY16x9Z%+&`MnWviA0d){d!7Ee+$F7B6nXzF@AgN<{3_Ho8fn4xK)yFBCdor*G+2 zg)Y!}1$}`TTH2tyDIIkkP4$(n4egC9)ZJA&UuaH@N#ZqTV@!_yQk^g3By(#_E^jpV z#bi2K_zIma;F;O7)JZLTm7;F#jB~lzev6Vg$;^x0Wxrpii}|nS8?gh^ zAJn;%lbE8K>KjJ4*VT74wY4ga59z#@lRER_QrP~MQv2KH=y<>Ok2lh9CQT z*>>6Vnt3R`MEgPKf0#eV?~f2t7aIL;KAf;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( zG^~nehN6lDc%~KHW130ctTdb^gGs3tcNEgGVw~M*4)x$)j2?q;f>zHCcE$50pWW*W z)orSOiolVi38EZ=jBf__Df|TK=u9hVltMp&=ITJISpJ+85l+L zDNF<#=gUS#gqS%A8A({{%#1Xl++&v)NS8k&fG<(L{MER#+?AwgG48v@2?RUw3W6*1qDydppQ|#Ndap9DGCDMH zzZLH%xH86Qs??(^aA(!kcZw`^=g4$(WGgi8w7eQ#RM{}0%W}6vWGm~#vl{CfP@5XA zESZ^9wQ+F7cuX+SxLg?*-Dz@EhsjpF^>J6ZVsoxMW>sWDn@SUwR+0H zHD8-&)C~1zs=X-@;{S_7pvwtx2=&J4nW5gEO+KqbwI=_Z2K|?*|FGp z4RtC)@t@{aM-*0dN4qF6B8SEKo5`vzrYLO*C2PwlU0Y6B+6|Pet)M>IN~*;7@tWWC zc;F?>BvEAgmC(%h08)fxlDQ{A2xtVF`@jw?N2{-5JDGf<7|2TLct_eB$c7g?i8ugI zd-s&lI!yQDHD5=(&NiPR!rO!)x`y56YxG&N+{<)}+Phb+SitoUkxhH#s*sJtS%O-0 z3?TXdDdpl!)`Oyml+YJ4sG{D61ttXfw2;wn`2GG}SjF8K?g@(1o`f%+!b0pJkM>6@ z(w-ro)<*rbXQ^C!j)rM_X`I$hGqwHHpuIrLaPMmEWmApo%)PrFM;QTXxE==@0cyBj z3@{aPQB4OS^uSvKAqzr&D<38X0S4pURjwEe6iVYLLzDr9AvNei9Rzp7A-GKp0SY${ z@FK}#i^O3pjy|0dDeW2o)9}vKczDEP{-dzxb=dO;?0FOR9D_Z_Vb9yJ=Uv$IC)jfW m_PhssPQsp3u;(=F`2hADgFPSp-|QLn|6>p1& pressure[0] && parcelPressure >= 10000) { - double envTemperature = revLinearInterp(height, temperature, parcelHeight); + double envTemperature = revLinearInterp(height, temperature, parcelHeight + parcelOrigin[1]); double parcelSaturationQv = (1 - parcelQt) * rSat(parcelTemperature, parcelPressure, 1); @@ -503,7 +511,7 @@ private static double[] computeCapeLfcEl(double[] zParcel, double[] tParcel, dou } if(lfc == -1024) { - lfc = zParcel[zParcel.length - 1]; + lfc = zParcel[0]; } return new double[] {integratedPositiveBuoyancy, lfc, el}; @@ -970,6 +978,8 @@ private static double[][] calcMseHat(double[] pressure, double[] height, double[ ret[0][i] = parcelOriginHeight + i * MSEHAT_DZ; ret[1][i] = mseRunningAvg; + +// System.out.printf("%5.0f m\t%f.0 J/kg\t%f.0 J/kg\n", ret[0][i], ret[1][i], mseAtZ); } return ret; @@ -998,6 +1008,9 @@ private static double calcNcape(double[] pressure, double[] height, double[] tem } double ncape = 0.0; + +// System.out.println("NCAPE-LFC: " + lfc + " m"); +// System.out.println("NCAPE-EL: " + el + " m"); for (double z = lfc; z < el; z += NCAPE_DZ) { double hHatAtZ = linearInterp(hHat[0], hHat[1], z); @@ -1008,7 +1021,11 @@ private static double calcNcape(double[] pressure, double[] height, double[] tem double integrand = -g / (c_pd * temperatureAtZ) * (hHatAtZ - hStarAtZ); ncape += integrand * NCAPE_DZ; + +// if(z % 500 == 0) System.out.printf("%5.0f m\t%f5.1 K\t%f.0 J/kg\t%f.0 J/kg\t%f.0 J/kg\t%f.0 J/kg\n", z, temperatureAtZ, hHatAtZ, hStarAtZ, integrand, ncape); } + +// System.out.println("Final NCAPE: " + ncape + " J/kg"); return ncape; } @@ -1247,4 +1264,42 @@ private static double revLinearInterp(double[] inputArr, double[] outputArr, dou return -1024.0; } } + + // inputArr assumed to already be sorted and increasing + private static double logInterp(double[] inputArr, double[] outputArr, double input) { + if (input < inputArr[0]) { + return outputArr[0]; + } else if (input >= inputArr[inputArr.length - 1]) { + return outputArr[outputArr.length - 1]; + } else { + for (int i = 0; i < inputArr.length - 1; i++) { + if (i + 1 == outputArr.length) { + return outputArr[outputArr.length - 1]; + } + + double input1 = inputArr[i]; + double input2 = inputArr[i + 1]; + + if (input == input1) { + return outputArr[i]; + } else if (input < input2) { + double logInput1 = Math.log(input1); + double logInput2 = Math.log(input2); + double logInput = Math.log(input); + + double output1 = outputArr[i]; + double output2 = outputArr[i + 1]; + + double weight1 = (logInput2 - logInput) / (logInput2 - logInput1); + double weight2 = (logInput - logInput1) / (logInput2 - logInput1); + + return output1 * weight1 + output2 * weight2; + } else { + continue; + } + } + + return -1024.0; + } + } }