气象数据获取因其数据源多、请求规则不一,格式复杂、体积庞大,所以经常成为气象小白的噩梦。这里收集了一些常用气象数据下载方法及下载的代码,供大家参考
目录
7. NCEP-DOE Reanalysis 2 再分析数据
中国气象数据网是官网平台,需要注册才能使用,分普通用户,个人实名用户,科研用户。数据种类很丰富,唯一的不足是下载需要权限。当然,很多气象数据的密级为秘密,大家在使用分享时一定要注意哦!网站也提供接口服务,可以免费使用7天。
数据下载:
国家气象科学数据中心
“The Global Historical Climatology Network (GHCN) is an integrated database of climate summaries from land surface stations across the globe that have been subjected to a common suite of quality assurance reviews. The data are obtained from more than 20 sources. Some data are more than 175 years old while others are less than an hour old. GHCN is the official archived dataset, and it serves as a replacement product for older NCEI-maintained datasets that are designated for daily temporal resolution (i.e., DSI 3200, DSI 3201, DSI 3202, DSI 3205, DSI 3206, DSI 3208, DSI 3210, etc.).” From Global Historical Climatology Network (GHCN): https://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/global-historical-climatology-network-ghcn
数据是按站点存放的,可以根据需求下载需要的数据。在数据下载链接的根目录下,“readme.txt”文件对数据的存在格式等进行了说明。准实时更新~
数据下载:
ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/
数据读取示例:
https://github.com/BeiTown/WeatherAnalysis
批量下载数据代码:
使用Python下载NOAA气象数据
探空站一般是为探测高空气象要素而建立的,通过探空气球来收集每天8点和20点的高空气象数据,遇到特殊天气(台风等)会进行加密观测。可以获近地层、850、700、500、200百帕的温度、温度露点差、位势高度、风速风向等气象要素。探空数据在天气预报有着重要的指示作用,可以分析出高空引导气流的位置、强度,及到达本地的时间和对当地天气的影响情况。
数据来自怀俄明大学:http://weather.uwyo.edu/upperair/seasia.html
我国的探空站表格:http://data.cma.cn/article/showPDFFile.html?file=/pic/static/doc/B/B.0011.0001C/UPAR_CHN_MUL_STATION.pdf
批量下载数据代码:
全球探空数据批量下载数据代码
大佬将中国环境监测总站的全国城市空气质量实时发布平台的数据爬下来分享,免费下载,每周更新~
网址:https://quotsoft.net/air/
全国国控监测点数据 CSV格式 https://quotsoft.net/air/data/china_sites_[日期].csv
全国城市数据 CSV格式 https://quotsoft.net/air/data/china_cities_[日期].csv
北京PM2.5/PM10/AQI数据 CSV格式 https://quotsoft.net/air/data/beijing_all_[日期].csv
北京SO2/NO2/O3/CO数据 CSV格式 https://quotsoft.net/air/data/beijing_extra_[日期].csv
例如:
https://quotsoft.net/air/data/china_sites_20200820.csv
填写日期即可
网站:http://www.pm25.in
批量下载数据代码:
MODIS数据目前比较全面的是在 LAADS(https://ladsweb.modaps.eosdis.nasa.gov/search/) 或者地理空间云(http://http//www.gscloud.cn/)
进入以后注册NASA账户,记得申请apikey
这个网站下载推荐python脚本方法
我常用的下载命令:
python laads-data-download.py -s https://ladsweb.modaps.eosdis.nasa.gov/archive/orders/501412572 -d E:\temp\ -t <这里写apikey,不要两侧的括号>
数据下载自NCAR:https://rda.ucar.edu/
需要自行注册账户,最好是edu结尾的邮箱。
NCEP的FNL资料:http://rda.ucar.edu/data/ds083.2
空间分辨率:1°×1°
时间分辨率:逐6小时
批量下载数据代码:
NCEP-DOE Reanalysis 2 is an improved version of the NCEP Reanalysis I model that fixed errors and updated paramterizations of physical processes.
这个数据比较好下,页面点一下就好了。
数据下载:https://psl.noaa.gov/data/gridded/data.ncep.reanalysis2.html
空间分辨率:2.5°×2.5°
时间分辨率:逐6小时
时间尺度:1979/01/01 to 2020/07/31
批量下载数据代码:
ERA-Interim is a global atmospheric reanalysis that is available from 1 January 1979 to 31 August 2019. It has been superseded by the ERA5 reanalysis.
The data assimilation system used to produce ERA-Interim is based on a 2006 release of the IFS (Cy31r2). The system includes a 4-dimensional variational analysis (4D-Var) with a 12-hour analysis window. The spatial resolution of the data set is approximately 80 km (T255 spectral) on 60 levels in the vertical from the surface up to 0.1 hPa.
For a detailed documentation of the ERA-Interim Archive see Berrisford et al. (2011).
An open-access journal article describing the ERA-Interim reanalysis is available from the Quarterly Journal of the Royal Meteorological Society. Additional details of the modelling and data assimilation system used to produce ERA-Interim can be found in the IFS documentation Cy31r1. We are aware of several quality issues with ERA-Interim data.
数据下载:
批量下载数据代码:
A first segment of the ERA5 dataset is now available for public use (1979 to within 5 days of real time). ERA5 provides hourly estimates of a large number of atmospheric, land and oceanic climate variables. The data cover the Earth on a 30km grid and resolve the atmosphere using 137 levels from the surface up to a height of 80km. ERA5 includes information about uncertainties for all variables at reduced spatial and temporal resolutions.
Quality-assured monthly updates of ERA5 are published within 3 months of real time. Preliminary daily updates of the dataset are available to users within 5 days of real time.
The entire ERA5 dataset from 1950 to present is expected to be available for use in 2020.
ERA5 combines vast amounts of historical observations into global estimates using advanced modelling and data assimilation systems.
ERA5 replaces the ERA-Interim reanalysis which stopped being produced on 31 August 2019. You can read about the key characteristics of ERA5 and important changes relative to ERA-Interim.
步骤:
1、注册账号,最好是edu结尾的邮箱
2、获取api秘钥,存在工作区下的.cdsapirc
3、检索数据
4、构建下载脚本,主要参数如下,支持grib格式和nc格式
数据下载:
批量下载数据代码:
The Global Forecast System (GFS) has been in NWS operations since 1980 and is continuously improved by the Global Climate and Weather Modeling Branch which conducts a program of research and development in support of the Environmental Modeling Center (EMC) (www.emc.ncep.noaa.gov) of the National Centers for Environmental Prediction (NCEP) (www.ncep.noaa.gov).
空间分辨率:0.25°×0.25°
时间分辨率:1h
数据下载:
下载代码:
GitHub
葵8数据下载需要注册,科研用途免费,通过也很快的。
JAXA Himawari Monitor:https://www.eorc.jaxa.jp/ptree/index.html
批量下载数据代码:
网址:https://jra.kishou.go.jp/JRA-55/index_en.html#
网站:Tropospheric Emission Monitoring Internet Service
该网站上有很多关于空气污染监测、气候变化、紫外辐射相关的遥感产品,这里以Clear sky UV index为例提供一种批量下载方式。
批量下载数据代码:
台风历史轨迹数据除了BST以外,还可以通过温州台风网进行查询。两者数据略有差异,BST是之后对历史台风路径进行校正后发布的,其经纬度、强度、气压具有更高的可靠性,但是时间分辨率为6小时,部分3小时,这一点不如观测数据,温州台风网的数据是实时发布数据的记录,时间分辨率最高达1小时,对于台风轨迹具有更加精细化的表述。
批量下载数据代码:
官网:https://www.wcrp-climate.org/wgcm-cmip
CMIP是国际耦合模式比较计划(Coupled Model Intercomparison Project)的缩写,最早是在 1995 年由世界气候研究计划(WCRP)下属的耦合模式工作组(WGCM)主持开展的。自 CMIP 诞生以来,一直致力于促进气候模式的发展和完善,并支持气候变化的评估和预估工作。目前已开展了 5 次耦合模式比较计划,当前正在进行的是第 6 次耦合模式比较计划,即 CMIP6。基于 CMIP 计划的气候变化研究,是气候评估和谈判的重要基础,也为 IPCC 气候变化评估报告的撰写提供了参考价值。
批量下载数据代码:
15.1 常用气象数据下载——探空资料
15.2 气象数据下载——2345天气王
15.3 我国地级市/县级市数据获取与处理
15.4 天气雷达基本反射率图像下载
15.5 利用Python的requests和json包获取台风数据
15.6 新一代DEM数据(NASADEM)批量下载与可视化
15.9 CFS预报数据下载&驱动WRF
15.10 气象数据下载——深圳市自动气象站监测
15.11 沿海数据信息计划(CDIP)
我试图获取一个长度在1到10之间的字符串,并输出将字符串分解为大小为1、2或3的连续子字符串的所有可能方式。例如:输入:123456将整数分割成单个字符,然后继续查找组合。该代码将返回以下所有数组。[1,2,3,4,5,6][12,3,4,5,6][1,23,4,5,6][1,2,34,5,6][1,2,3,45,6][1,2,3,4,56][12,34,5,6][12,3,45,6][12,3,4,56][1,23,45,6][1,2,34,56][1,23,4,56][12,34,56][123,4,5,6][1,234,5,6][1,2,345,6][1,2,3,456][123
如何在buildr项目中使用Ruby?我在很多不同的项目中使用过Ruby、JRuby、Java和Clojure。我目前正在使用我的标准Ruby开发一个模拟应用程序,我想尝试使用Clojure后端(我确实喜欢功能代码)以及JRubygui和测试套件。我还可以看到在未来的不同项目中使用Scala作为后端。我想我要为我的项目尝试一下buildr(http://buildr.apache.org/),但我注意到buildr似乎没有设置为在项目中使用JRuby代码本身!这看起来有点傻,因为该工具旨在统一通用的JVM语言并且是在ruby中构建的。除了将输出的jar包含在一个独特的、仅限ruby
我主要使用Ruby来执行此操作,但到目前为止我的攻击计划如下:使用gemsrdf、rdf-rdfa和rdf-microdata或mida来解析给定任何URI的数据。我认为最好映射到像schema.org这样的统一模式,例如使用这个yaml文件,它试图描述数据词汇表和opengraph到schema.org之间的转换:#SchemaXtoschema.orgconversion#data-vocabularyDV:name:namestreet-address:streetAddressregion:addressRegionlocality:addressLocalityphoto:i
在rails源中:https://github.com/rails/rails/blob/master/activesupport/lib/active_support/lazy_load_hooks.rb可以看到以下内容@load_hooks=Hash.new{|h,k|h[k]=[]}在IRB中,它只是初始化一个空哈希。和做有什么区别@load_hooks=Hash.new 最佳答案 查看rubydocumentationforHashnew→new_hashclicktotogglesourcenew(obj)→new_has
我正在编写一个小脚本来定位aws存储桶中的特定文件,并创建一个临时验证的url以发送给同事。(理想情况下,这将创建类似于在控制台上右键单击存储桶中的文件并复制链接地址的结果)。我研究过回形针,它似乎不符合这个标准,但我可能只是不知道它的全部功能。我尝试了以下方法:defauthenticated_url(file_name,bucket)AWS::S3::S3Object.url_for(file_name,bucket,:secure=>true,:expires=>20*60)end产生这种类型的结果:...-1.amazonaws.com/file_path/file.zip.A
有没有办法在这个简单的get方法中添加超时选项?我正在使用法拉第3.3。Faraday.get(url)四处寻找,我只能先发起连接后应用超时选项,然后应用超时选项。或者有什么简单的方法?这就是我现在正在做的:conn=Faraday.newresponse=conn.getdo|req|req.urlurlreq.options.timeout=2#2secondsend 最佳答案 试试这个:conn=Faraday.newdo|conn|conn.options.timeout=20endresponse=conn.get(url
我的主要目标是能够完全理解我正在使用的库/gem。我尝试在Github上从头到尾阅读源代码,但这真的很难。我认为更有趣、更温和的踏脚石就是在使用时阅读每个库/gem方法的源代码。例如,我想知道RubyonRails中的redirect_to方法是如何工作的:如何查找redirect_to方法的源代码?我知道在pry中我可以执行类似show-methodmethod的操作,但我如何才能对Rails框架中的方法执行此操作?您对我如何更好地理解Gem及其API有什么建议吗?仅仅阅读源代码似乎真的很难,尤其是对于框架。谢谢! 最佳答案 Ru
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub
有时我需要处理键/值数据。我不喜欢使用数组,因为它们在大小上没有限制(很容易不小心添加超过2个项目,而且您最终需要稍后验证大小)。此外,0和1的索引变成了魔数(MagicNumber),并且在传达含义方面做得很差(“当我说0时,我的意思是head...”)。散列也不合适,因为可能会不小心添加额外的条目。我写了下面的类来解决这个问题:classPairattr_accessor:head,:taildefinitialize(h,t)@head,@tail=h,tendend它工作得很好并且解决了问题,但我很想知道:Ruby标准库是否已经带有这样一个类? 最佳
我有一个存储主机名的Ruby数组server_names。如果我打印出来,它看起来像这样:["hostname.abc.com","hostname2.abc.com","hostname3.abc.com"]相当标准。我想要做的是获取这些服务器的IP(可能将它们存储在另一个变量中)。看起来IPSocket类可以做到这一点,但我不确定如何使用IPSocket类遍历它。如果它只是尝试像这样打印出IP:server_names.eachdo|name|IPSocket::getaddress(name)pnameend它提示我没有提供服务器名称。这是语法问题还是我没有正确使用类?输出:ge