https://confluence.ecmwf.int//display/WEBAPI/Access+ECMWF+Public+Datasets
最近看到有人在问,我就简单说一下我的用欧洲中心的资料驱动WRF的一些经验,算是抛砖引玉,有什么不对的地方还请大家指出。
首先是欧洲中心资料的下载,现在一般用的是ERA-Interim,下载地址为http://apps.ecmwf.int/datasets/data/interim_full_daily/ ,具体的下载步骤论坛上有相关帖子,非常详细,在此就不多赘述了。
除了直接在官网上下载,也可以用脚本下载。论坛上也有如何利用python脚本进行下载的帖子,也非常详细。在这个网站上https://software.ecmwf.int/wiki/ ... ta+servers+in+batch 也包括了Perl和Java脚本如何下载。
在下载下来的数据里,是包括高空(ERA-Int_pl_)和地面(ERA-Int_sfc_)两部分的。因此,我们在ungrib解码时也要解码两次。以1992年5月份的资料为例——ERA-Int_pl_19920501_19920531.grb和ERA-Int_sfc_19920501_19920531.grb:
链接Vtable: ln -sf ungrib/Variable_Tables**/Vtable.ECMWF **Vtable
链接高空数据: ./link_grib.csh ./DATA/ERA-Interim/ERA-Int_pl_19920501_19920531.grb
编辑namelist.wps: prefix = '3D',
运行ungrib: ./ungrib.exe
链接地面数据: ./link_grib.csh ./DATA/ERA-Interim/ERA-Int_sfc_19920501_19920531.grb
编辑namelist.wps: prefix = 'SFC',
运行ungrib: ./ungrib.exe
编辑namelist.wps里metgrid部分: fg_name = '3D','SFC' 并运行./metgrid.exe,后续部分跟用其余资料一致。
实际上,在使用ERA-Interim资料时,wrf自带的Vtable不止有Vtable.ECMWF,也有 Vtable.ERA-interim.pl 和 Vtable.ERA-interim.ml,其中Vtable.ERA-interim.pl对应的是气压层的ERA-Interim资料, Vtable.ERA-interim.ml对应的是模式层的ERA-Interim资料。
想更深入的了解可以看看这个网站:http://www.geomar.de/mitarbeiter/fb1/me/jharlass/wrf/erai/
下载脚本
#!/usr/bin/env python
#
# (C) Copyright 2012-2013 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.
#
from ecmwfapi import ECMWFDataServer
import calendar as cal
# To run this example, you need an API key
# available from https://api.ecmwf.int/v1/key/
server = ECMWFDataServer()
dayformat='%04d%02d%02d'
year=2015
month=4
day0=25
day1=30
def select_days(x,y):
return min(x,y)
for mon in range(month,month+1):
day_end=cal.monthrange(year, mon)[1]
the_day=select_days(day1,day_end)
for a_day in range(day0,the_day+1):
time0= dayformat%(year,mon,a_day)
#time1= dayformat%(year,mon,a_day)
aline=time0
#aline=time0+'_'+time1
server.retrieve({
'dataset' : "interim",
'step' : "0",
'stream' : "oper",
'class' : "ei",
'number' : "all",
'levtype' : "sfc",
'date' : time0+"/to/"+time0,
'time' : "00/06/12/18",
"area" : "50/90/10/145",
'type' : "an",
'param' : "134.128/151.128/235.128/167.128/165.128/166.128/168.128/34.128/31.128/141.128/139.128/170.128/183.128/236.128/39.128/40.128/41.128/42.128/33.128",
'grid' : "0.25/0.25",
'target' : "ERA-Int_sfc_"+aline+".grib"
})
http://bbs.06climate.com/forum.php?mod=viewthread&tid=24435
http://bbs.06climate.com/forum.php?mod=viewthread&tid=13288&extra=&page=1