2000-2020年中国地面气象数据:从NOAA到分省面板

最近看到 Mukherjee et al. (2021, JFE) 的文章,受到了点启发,想找中国的云层数据来试试,但是没有质量特别高的数据,只好老老实实按照这篇论文中的做法从NOAA 下数据洗出来。

数据来源

数据源为 NCDC(美国国家气候数据中心,National Climatic Data Center),隶属于NOAA(美国国家海洋及大气管理局,National Oceanic and Atmospheric Administration)。

数据来自NCDC的公开FTP服务器中的 ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-lite/。

为了方便查看,文章中提到的所有数据源文件都可以在我的百度网盘分享链接里找到。

链接: https://pan.baidu.com/s/1GraMF6SgSg3DBIPxVNlgQQ 密码: l8j9

分析样本为 2000-2020 年间中国的地面气象数据 (每三小时记录一次)。
在这里插入图片描述

原始数据结构

以2020年为例,文件命名方式为 气象站id - 99999 (NCDC WBAN Number) - 年份。
先看一个样例文件,该文件有 9 列,其变量按顺序分别为 观测年份,观测月份,观测日期,观测小时,空气温度,露点温度,海平面气压,风向,风速,云层厚度,液体渗透深度(1小时),液体渗透深度(6小时)。
image-20210610102217295
详细变量说明如下:

Introduction


The ISD-Lite data contain a fixed-width formatted subset of the complete Integrated Surface Data (ISD) for a select number of observational elements. The data are typically stored in a single file corresponding to the ISD data, i.e. one file per station per year. For more information on the ISD-Lite format, consult the ISD-Lite technical document.


Data Format


Field 1: Pos 1-4, Length 4: Observation Year
Year of observation, rounded to nearest whole hour


Field 2: Pos 6-7, Length 2: Observation Month
Month of observation, rounded to nearest whole hour


Field 3: Pos 9-11, Length 2: Observation Day
Day of observation, rounded to nearest whole hour


Field 4: Pos 12-13, Length 2: Observation Hour
Hour of observation, rounded to nearest whole hour


Field 5: Pos 14-19, Length 6: Air Temperature
The temperature of the air
UNITS: Degrees Celsius
SCALING FACTOR: 10
MISSING VALUE: -9999


Field 6: Pos 20-24, Length 6: Dew Point Temperature
The temperature to which a given parcel of air must be cooled at constant pressure and water vapor content in order for saturation to occur.
UNITS: Degrees Celsius
SCALING FACTOR: 10
MISSING VALUE: -9999


Field 7: Pos 26-31, Length 6: Sea Level Pressure
The air pressure relative to Mean Sea Level (MSL).
UNITS: Hectopascals
SCALING FACTOR: 10
MISSING VALUE: -9999


Field 8: Pos 32-37, Length 6: Wind Direction
The angle, measured in a clockwise direction, between true north and the direction from which the wind is blowing.
UNITS: Angular Degrees
SCALING FACTOR: 1
MISSING VALUE: -9999
*NOTE: Wind direction for calm winds is coded as 0.

Field 9: Pos 38-43, Length 6: Wind Speed Rate
The rate of horizontal travel of air past a fixed point.
UNITS: meters per second
SCALING FACTOR

### 美国气候数据概述 美国国家海洋及大气管理局(NOAA)下的美国国家气候数据中心(NCDC),提供了详尽的气象记录,包括但不限于温度、降水等重要参数。对于希望获取具体站点历史天气状况的研究者而言,可以通过访问FTP服务器`ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-lite/`来下载所需资料[^1]。 针对更广泛的地理范围内的气候变化趋势分析需求,则有专门设计用于反映全美范围内长期气象特征变化规律的数据集——NOAA每月美国气候网格数据集(NClimGrid)[^2]。此数据集不仅涵盖了过去多间全国各地逐日乃至逐月的最大最小气温及降水量信息,而且采用了精细至约0.04度经纬度间隔的空间分辨率进行表达,从而使得研究者能够更加精准地把握不同区域内气候条件随时间演变的情况。 为了便于实际操作中的应用开发或者大规模数据分析任务执行,在Linux环境下利用命令行工具如wget可以直接从官方提供的链接地址处批量抓取目标文件夹内指定类型的文档;而在编程语言方面,Python作为一种强大而灵活的选择同样适用于实现自动化脚本完成相同功能[^3]。 ```bash # 使用 wget 命令下载 NCDC 数据 $ wget -r -c ftp://ftp.ncdc.noaa.gov/pub/data/noaa/ ``` ```python import ftplib def download_ncdc_data(): server = 'ftp.ncdc.noaa.gov' path = '/pub/data/noaa/' with ftplib.FTP(server) as ftp: ftp.login() # Anonymously login to the FTP site. ftp.cwd(path) files = ftp.nlst() for file_name in files[:5]: # Download only first five files as an example. local_file_path = f"./{file_name}" with open(local_file_path, "wb") as local_file: ftp.retrbinary(f"RETR {file_name}", local_file.write) download_ncdc_data() ```
评论 50
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值