Hi Jack, I received word back from the GEMPAK/NAWIPS developers at NCEP, and they confirmed that the definition for sigma is correct, and attached their notes for review. Best, Michael James Unidata > Hi Michael, > Hmmm. I'm still not sure. I've attached a more complete write up of my > thinking. If you could take a look and let me know what you think, that > would be great. > > Thanks, > Jack > > -----Original Message----- > From: Unidata GEMPAK Support [mailto:address@hidden] > Sent: Wednesday, September 22, 2010 10:02 AM > To: Dostalek, Jack > Cc: address@hidden > Subject: [GEMPAK #MJB-537359]: Error in dfgwfs? > > Jack, > > The definition of sigma in dfgwfs includes the factor of 2 (or sqrt of 2) > that would conventionally be expressed inside the weighting function. > > sgma = (float)nwl / ( PI * sqrt ( 2.0 ) ); > > which results in > > sig2 = sgma**2 = nwl**2 / 2 * PI**2 > > therefore the factor of 2 is included in sig2 the variable aa: > > aa = 1. / ( sig2 * PI ); > > which is expressed in the weighting function (with sig2 rather than 2 * sig2): > > w[iw-1][jw-1] = aa * exp ( - ( x*x + y*y ) / sig2 ); > > > > if the factor of 2 were not included in sgma, it would be accounted for in aa > and w as: > > aa = 1. / ( 2 ** sig2 * PI ); > > which is expressed in the weighting function: > > w[iw-1][jw-1] = aa * exp ( - ( x*x + y*y ) / 2 ** sig2 ); > > so essentially we're only changing the definition of sgma in dfgwfs.f to > include the factor of 2 so we don't need to account for it in aa and w. > > I did a quick napkin run-down of the terms and the math seems correct. Do > you agree? > > Michael James > Unidata > > > > Hi, > > > > I was looking at the code for the Gaussian smoother in GEMPAK called dfgwfs > > and came across what might be an error, but I wanted to run it by you to > > make sure. The weighting function used is: > > > > > > > > Where and N is the number of grid points in a wavelength. I'm wondering > > if ? should be given instead by . This value for sigma seems to be correct > > given your definition of W. Would someone please take a look? > > > > > > > > Thanks, > > > > Jack > > > > > > > > Jack Dostalek > > > > Cooperative Institute for Research in the Atmosphere > > > > Colorado State University > > > > Foothills Campus > > > > 1375 Campus Delivery > > > > Fort Collins, CO 80523-1375 > > > > (970) 491-8326 > > > > address@hidden > > > > > > > > > > > > > > > > > > > > > Ticket Details > =================== > Ticket ID: MJB-537359 > Department: Support GEMPAK > Priority: Normal > Status: Open > > > > __________ Information from ESET NOD32 Antivirus, version of virus signature > database 5470 (20100922) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > __________ Information from ESET NOD32 Antivirus, version of virus signature > database 5476 (20100924) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > __________ Information from ESET NOD32 Antivirus, version of virus signature > database 5476 (20100924) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > Ticket Details =================== Ticket ID: MJB-537359 Department: Support GEMPAK Priority: Critical Status: Open
Attachment:
gaussian_weighted_filter_notes.pdf
Description: Adobe PDF document