爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 7919|回复: 19

[源代码] 风场高斯滤波

[复制链接]

新浪微博达人勋

发表于 2014-9-16 11:05:33 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
高斯滤波是一种线性平滑滤波过程。通俗的讲,高斯滤波就是对整幅图像进行加权平均的过程,每一个像素点的值,都由其本身和邻域内的其他像素值经过加权平均后得到。该代码是对风场进行滤波。未测试,得来不易,仅供收藏。


Gaussfilter-UV.f (4.89 KB, 下载次数: 114)
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-9-19 09:39:47 | 显示全部楼层
谢谢版主共享精神
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-3-18 21:08:19 | 显示全部楼层
感谢楼主的分享~~~~~
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-4-1 10:11:17 | 显示全部楼层
程序中对u,v,风都是进行的经向滤波,没有纬向的,是怎么考虑的呢?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-4-1 15:43:48 | 显示全部楼层

感谢楼主的分享~~~~~
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-4-1 15:45:53 | 显示全部楼层

感谢楼主的分享~~~~~
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-4-1 15:48:27 | 显示全部楼层

感谢楼主的分享~~~~~
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-4-2 06:49:31 | 显示全部楼层
本帖最后由 东风 于 2015-4-2 06:53 编辑

RIP里面提供了一个非常强大的平滑函数,其平滑效果远远超过grads的9点平滑。
smooth.f的说明如下,通过numpass控制平滑算法,其中3XX的平滑为Cressman平滑算法。

    subroutine smooth(pslab,work,numpas,mabpl,njx,niy)
c
c   This is a smoothing routine, with several choices:
c
c   If numpas is between 1 and 99, then a 9-point weighted smoother is
c   applied numpas times.  The smoother follows equation 11-107 in
c   Haltiner and Williams. One pass completely removes 2-delta-x waves
c   on the interior.  On the outer row and column, and near missing
c   data points, smoothing is carried out in a manner that preserves
c   the domain average value of the field.
c
c   If numpas is between 101 and 199, then a smoother-desmoother is
c   applied (numpas-100) times.  One pass removes a large fraction
c   of the 2-delta-x component, but is not as harsh on longer
c   wavelengths as the 9-point smoother
c
c   If numpas is between 201 and 299, then the smoother-desmoother is
c   applied (numpas-200) times, and, after each pass, the data field
c   is forced to be non-negative.
c
c   If numpas is between 301 and 399, then a weighted
c   smoother is applied, in which the smoothed value
c   is given by a weighted average of values at
c   surrounding grid points.  The weighting function
c   is the Cressman weighting function:
c
c               w = ( D**2 - d**2 ) / ( D**2 + d**2 )
c
c   In the above, d is the distance (in grid increments)
c   of the neighboring point to the smoothing point, and
c   D is the radius of influence [in grid increments,
c   given by (numpas-300)].
c
c   If numpas is between 401 and 499, then the smoothing
c   is similar for numpas=301-399, except the weighting
c   function is the circular apperture diffraction function
c   (following a suggestion of Barnes et al. 1996):
c
c               w = bessel(3.8317*d/D)/(3.8317*d/D)
c
c   If numpas is between 501 and 599, then the smoothing
c   is similar for numpas=301-399, except the weighting
c   function is the product of the rectangular
c   apperture diffraction function in the x and y directions
c   (the function used in Barnes et al. 1996):
c
c               w = [sin(pi*x/D)/(pi*x/D)]*[sin(pi*y/D)/(pi*y/D)]
c
c   Note, the first index of pslab varies along the abcissa
c   (or x), and the second index varies along the ordinate (or y).
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-5-11 17:14:15 | 显示全部楼层
不论这样先下载收藏,感谢~
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-5-16 09:28:43 | 显示全部楼层
很不错,有用啊
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表