logo资料库

Voigt线型函数拟合.pdf

第1页 / 共19页
第2页 / 共19页
第3页 / 共19页
第4页 / 共19页
第5页 / 共19页
第6页 / 共19页
第7页 / 共19页
第8页 / 共19页
资料共19页,剩余部分请下载后查看
RAPIDAPPROXIMATIONTOTHEVOIGT/FADDEEVAFUNCTION ANDITSDERIVATIVES R.J.WELLS Atmospheric,OceanicandPlanetaryPhysics, ClarendonLaboratory,ParksRoad,Oxford,OXPU,U.K. Abstract|ExistingalgorithmsforthecalculationoftheVoigt/Faddeevafunctionare adaptedtoproduceamethodwhichismoreecientforatmosphericline-by-linecalculations. Theapproachallowsgreatercomputationalspeedtobeobtainedifthemaximumrelative errorcriteriacanberelaxed.Asupplementaryalgorithmtocalculatethepartialderivatives oftheVoigtfunctionsimultaneouslywiththeFaddevafunctionisalsospecied. INTRODUCTION Thereisanextensiveliteraturediscussingthefunctionw(z)ofthecomplexvariablez=x+iy w(z)=iZexp(t) ztdt=exp(z)erfc(iz)=K(x;y)+iL(x;y): w(z)isvariouslydescribedastheFaddeevafunction,thecomplexprobabilityfunctionandthe plasmadispersionfunction.Usinglogarithmicaxes,FigureshowsK(x;y)andFigureshows L(x;y)for:x,:y.Notethatintheupperhalfplane,y, K(x;y)=K(x;y),L(x;y)=L(x;y),
w(z)toasingleFortranstatementbutthiscodehassomeproblemswithbothexecutioneciency andaccuracy.Humlcekremarkedthatbyre-codingthecomputationinREALarithmeticsome speedincreaseforhiscodemightbeobtained.ThisapproachisimplementedinSEASCRAPE whichiswritteninC,alanguagethatlacksanativecomplexnumberdatatype.Also,Humlcek emphasisedthatanalternativealgorithmcouldbesignicantlyfasterinRegionIV{oneofhis fourdivisionsofthedomain.Humlcekhadalreadypublishedacode(CPF)forthisalgorithm whichclaimedarelativeerroroflessthanxforKandxforL.Thedenitionof relativeerrorisambiguouswherefunctionsapproachzerobutaroundx=:,y=theclaim forLiscertainlyoptimistic.TheWalgorithmgivesmuchbetterapproximationstoLinthis region.AfurtheradvantageoftheHumlcekalgorithmsisthattheygeneratebothK(x;y)and L(x;y).EdwardsandStrowhaveshownthatthephenomenonoflinemixingcanhaveasignif- icanteectonlineshapesinthestrongcarbondioxideQ-branchesusedbysatelliteinstruments foratmospherictemperaturesounding.StrowandGentry modelthiseectusingL(x;y). Algorithmsusedfortheretrievalofatmosphericprolesfromremotely-sensedmeasurements @K@xand@K@y.Heinzelgaverecurrencerela- requiretheestimationofthepartialderivatives tionsforthepartialderivativesuptordorderandnotedtheirapplicationinastrophysics.In particular, @K(x;y) =(xL(x;y)+yK(x;y)p): @L(x;y) and =(yL(x;y)xK(x;y)) @x @x Schreierdrawsattentiontothenumericalproblemswhichcanarisewhentakingthedierence betweentwonumbersofapproximatelyequalmagnitude.Thisoccurswhere@K@xand@K@y. McLeanetalpublishedCcodeforbothKanditspartialderivativesbutdidnotdiscussthe accuracyofthederivatives. CHOICEOFALGORITHMS SchreiertestedtheaccuracyofvariousalgorithmsusingthecodegivenbyArmstrongas areference.Armstrongclaimsanabsoluteaccuracyof-digitsinthethsignicantgure forhiscode.ShipponyandReadandLetherandWenstonhavealsopublishedalgorithms fortheaccuratecalculationofK.Usinginformalpseudo-code,Ref.speciesaalgorithm whichusesmidpointquadraturewithcorrectiontermscapableofcalculatingK(x;y)tovery highaccuracy.Inaddition,afewvaluesaretabulatedtosignicantguresandthisprovides ausefulspotcheckbothonaccuracyclaimsandonnewcodeimplementations.Theexistenceof manytypographicalerrorsintheliteratureonthistopic,(seeforexampleThompson'sequations ()and()andHui'sfootnote),furtherdemonstratethevalueofreferencetabulationssuch asthatinAbromowitzandStegun. Refs,anddonotprovideanalgorithmfortheaccuratecalculationofL(x;y). However,G.P.MPoppeandC.M.J.WijersgivecodeforbothK(x;y)andL(x;y)basedon seriesexpansionwhichtheyclaimtobeaccuratetodecimaldigits. ItisinterestingtocompareresultsofthevariousalgorithmsforK(x;y)inaregionnearthe xaxiswherethecalculationisnotoriouslydicult. 
x=:,y= .x .x . x . x .x -.x .x .x x=:,y= .x .x .x .x .x -. x .x .x Armstrongetal. HumlcekCPF  HumlcekW  Hui LetherandWenston McLeanetal. PoppeandWijers ShipponyandRead Constraintsonthedomainofvalidityofanycodeareinevitablyimposedbythenumerical representationofoatingpointnumbersusedinaparticularimplementation.Thesecontraints areoftennotcorrectlystatedorrecognised,perhapsbecausethealgorithmhasbeendesigned foralimiteddomainfoundinoneparticularphysicalproblem.(e.g.Armstrong'scodegenerates incorrectresultsfornegativex.)However,evenifallowanceismadeforthis,someaccuracy claimsaredemonstrablyspurious. Inthiswork,forjxjand. TheutilisationoftheHumlcekWalgorithminaninfra-redline-by-lineatmosphericlimb radiancetransmittancecalculationwasstudiedindetail.Theobservedrangeofxandyvalues usedwasmuchgreaterthananticipated:
FigureshowsacontourplotoftherelativeerrorinK,jKKrefj=Kref,whereK(x;y)= yx+y.ThecontourdrawnwithasolidlinemarkstheboundaryoftheregionwhereKhas p arelativeerrorlessthan.Othercontoursareshownbydottedlines.Thedashedlinesare x=:yandx=+y:ywhichprovidereadily-calculatedapproximationsto xx+y.The thisboundary.FigureisasimilarplotofjLLrefj=LrefwhereL(x;y)=p dashedlineisx=:ywhichcanbeusedasaboundarytoensuretherelativeerrorson bothK(x;y)andL(x;y)arelessthan.Similarplotscanbeusedtodemonstratethatfor R,theregionwheretherelativeerrorsonbothK(x;y)andL((x;y)arebothlessthan Risboundedbythelinex=:exp(:R)y. Likewise,FigureisaplotofjKKrefj=KrefwhereK(x;y)=K(x;y)calculatedusingthe WalgorithmforRegionI.Theshort-dashedlinesarex=:yandx=:y:y whicharesuggestedrevisedboundaries.Thelong-dashedlineinbothFiguresandisx= y,theRegionIboundaryusedbyHumlcek.FigureisaplotofjLLrefj=Lrefwhere L(x;y)=L(x;y)calculatedusingtheWalgorithmforRegionI.Notethelargerelativeerror forx,y<.(Thecontourintheguredeliberatelyexageratestheareaconcerned). Inthissectionofthedomaintheuseofacomputationally-demandingalgorithmwillhavelittle ornoimpactontheeciencyofline-by-lineapplications.Theshort-dashedlineisx=:y asinFigure.ItcanbedemonstratedthatforRandy>,theregionwhere therelativeerrorsonbothK(x;y)andL(x;y)arelessthanRisboundedbytheline x=:exp(:R)y. FigureisaplotofjKKrefj=KrefwhereK(x;y)=K(x;y)calculatedusingtheW algorithmforRegionII.Theshort-dashedlineisx=:yandthelong-dashedlineisagainthe Humlcekboundary,x=:y.Boththeseboundariesincludeanareaneartheyaxiswherethe relativeerrorisgreaterthan.FigureisaplotofjLLrefj=LrefwhereL(x;y)=L(x;y) calculatedusingtheWalgorithmforRegionIIwiththeHumlcekboundaryshownwithalong- dashedlineandx=:ywithashortdashedline.Inthiscasenoattempthasbeenmadeto parameterisethepositionofthenewboundaryintermsoftherequiredrelativeerror.Instead asingleboundarywaschosensuchthattherelativeerroronbothK(x;y)andL(x;y)isless thanfory>. Figure isaplotofjKKrefj=KrefwhereK(x;y)=K(x;y)calculatedusingtheW algorithmforRegionIII.Thelong-dashedlinesareagaintheHumlcekboundaries,x=:y and: x=:+y.Theshort-dashedlinesarex=:y,x=:yandx=: y:, thersttwoofwhich,togetherwiththeyaxisenclosearegionwheretherelativeerrorofKis lessthan.FigureisaplotofjLLrefj=LrefwhereL(x;y)=L(x;y)calculatedusing theWalgorithmforRegionIIIwiththeHumlcekboundariesshownbylong-dashedlines.The short-dashedlines,x=:yandx=: y:withtheyaxisenclosearegionwherethe relativeerrorinbothKandLislessthan. TheHUMLIKsubroutine(withR=andthecalculationofLremoved)wasusedinplace ofcodebasedonSchreierforsomeline-by-linecalculations.Executiontimewasapproximately halvedwithoutlossofaccuracyintheresult. Thecodeisdeliberatelywrittensothatitcaneasilybetranslatedwithoutlossofeciency intootherlanguagesbythoseunfamiliarwithFortran.The'&'characterisusedonlyasa statementcontinuationcharacter.Commentsareintroducedeitherbya'*'characterincolumn ora'!'characterincolumn.Upperandlowercasecharactersareregardedasequivalent. Linescontainingexecutablestatementsinlowercasecanberemovedforgreaterexecutionspeedif thecalculationofLisnotrequired.Onsomesystems,extendedprecisionarithmeticisnoslower thansingleprecision.However,itshouldbenotedthatre-codinginextendedprecisionand increasingtheprecisionoftheconstantsusedinthecodedoesnotgiveasignicantimprovement intheaccuracyoftheresults. 
CALCULATIONOFDERIVATIVES AFORTRANsubroutine(HUMDEV)tocalculateK,L,@K@xand@K@yisgiveninAppendix II.Wherepossiblethisusestherecurrencerelationshipstocalculatethederivativeseciently fromKandL.However,smallerrorsinKandLcancauselargeerrorsintheresultsproduced bytherecurrenceexpressions.Also,inregionswherethemagnitudeofthederivativesaresmall (signicantlywherejxj+y>)itisnecessarytodierentiateappropriateexpressionsforK explicitlytoavoidnumericalroundingerrors.Thisimposesasubstantialcomputationburden. Figureisacontourplot,usinglogarithmicaxes,of@K@x,onthedomain:x, :y.Theregionwherej@K@xj<isshaded.Notethat@K(x;y) @x =@K(x;y) , @x @K(;y) @x =and:<@K@x<:. Similarly,Figureisaplotof@K@y,for:x,:y.Theregionwhere @y =@K(x;y) j@K@yj<isshaded.Notethat@K(x;y) and:<@K@y<:. @y TostudytheaccuracyoftheHUMDEVcodeitwasnecessarytoestablishasetofreference values.Thenumericaldierentionroutine(DFRIDR)speciedbyPressetalwasadaptedto usethesamenumericalprecissionasthecodeusedtocalculateKref.Thiscodewasthenused and@Kref@y withanerrorestimateeverywherelessthan.Afewvalues togenerate@Kref@x of@Kref@x and@Kref@x aregivenforreferencetogetherwithcorrespondingvaluesgeneratedbythe HUMDEVcode,theresultsofevalutaingtherecurrencerelationsonKrefandLrefinsingle precisionandtheresultsofusingtherecurrencerelationsusingwithKandLcalculatedbythe HUMLIKalgorithm. x=:;y=x=:  ;y=:x=;y= : x=;y= @Kref@x -. x -.x -. -. HUMDEV@K@x -. x -.x -. -. -. x (yLrefxKref) -. -. . -. x -.x -. -. (yLxK) @Kref@y -. x -.x .x -. HUMDEV@K@y -. x -.x .x -. (xLref+yKrefp)-. -. x -.x . (xL+yKp) -.x -. -. -. Overthedomainshowninguresand,therelativeerrorin@K@xcalculatedwiththe HUMDEVislessthanandtheabsoluteerrorin@K@yislessthanx. CONCLUSION AnalgorithmhasbeendevelopedwhichallowstherapidcalculationoftheVoigt/Faddeeva functionforywithrelativeerrorchosenbetweenand.Asupplementaryalgorithm additionallygenerates@K@xand@K@ywithadequateaccuracyforuseinatmosphericline-by-line calculation.AlthoughspeciedinFORTRANthecodecanbeeasilytranslatedtoother computerlanguages. Acknowledgements|IamverygratefultoDrL.Sparksforhiscommentsandsupport. 



分享到:
收藏