目录
NOAA
NOAA一般指美国国家海洋和大气管理局,主要关注地球的大气和海洋变化,提供对灾害天气的预警,提供海图和空图,管理对海洋和沿海资源的利用和保护,研究如何改善对环境的了解和防护。
NOAA中主要包括大气,海洋,气象等众多的数据,本次主要在下载应用于定量遥感的大气数据,全部为文本数据。
NOAA数据列表,有点古老了,转载:
Datasets | Areal Coverage | Grid Size | Time Step | Time Coverage | Levels |
---|---|---|---|---|---|
CMAP Precipitation | Global | 2.5°x2.5° | Monthly,Pentad | 1979- | None |
COBE-SST | Global | 1.0°x1.0° | Monthly | 1891-present | None |
COBE-SST2 Sea Surface Temperature | Global | 1.0°x1.0° | Monthly | 1850-2012 | None |
CPC .25x.25 Daily US Unified Precipitation | U.S. | .25°x.25° | Daily | 1948-2006 | None |
CPC Soil Moisture | Global | 2.5°x2.5° | Monthly | 1948-present | None |
CRU Air Temperature and Combined Air Temperature/Marine Anomalies V3 | Global | 5.0°x5.0° | Monthly | 1850-present | None |
CRU Air Temperature and Combined Air Temperature/Marine Anomalies V4 | Global | 5.0°x5.0° | Monthly | 1850-2013 | None |
Dai Palmer Drought Severity Index | Global: 58S-76N | 2.5°x2.5° | Monthly | 1850-2014 | None |
GFS Model Output | Global | 2.5°x2.5° | 2X Daily | 1979-present | varied levels |
GHCN Version 3 Land Temperature Dataset | Global | 5.0°x5.0° | Monthly | 1900-present | None |
GHCN version 2 Land Precipitation Dataset | Global | 5.0°x5.0° | Monthly | 1900-present | None |
NOAA GHCN_CAMS Land Temperature Analysis | Global | 0.5°x0.5° | Monthly | 1948-present | None |
GISS surface temperature analysis | Global | 1.0°x1.0° | Monthly | 1880-present | None |
Global Precipitation Climatology Centre (GPCC) | Global | 0.5°x0.5°,1.0°x1.0°, 2.5°x2.5° | Monthly | 1901-present | None |
GPCP V2.3 Precipitation | Global | 2.5°x2.5° | Monthly | 1979-2013 | None |
ICOADS | Global | 2.0°x2.0°,1.0°x1.0° | Monthly | 1800-present | None |
Interpolated OLR | Global | 2.5°x2.5° | Daily,Monthly | 1979-near present | None |
Kaplan SST | Global | 5.0°x5.0° | Monthly | 1856-present | None |
Livneh daily CONUS near-surface gridded meteorological and derived hydrometeorological data.正在上传…重新上传取消 | CONUS | 0.06°x0.06° | Daily, Monthly | 1915-2011 | None |
MSU | Global | 2.5°x2.5° | Daily, Monthly | 1979-1996 | None |
NCEP Operational Analysis | Global | 2.5°x2.5° | Daily | 1979-present | None |
NCEP Marine | Global | 2.0°x2.0° | Monthly | 1991-present | None |
NCEP/NCAR Reanalysis | Global | 2.5°x2.5°, T42 Gaussian, T62 spectral | 4X Daily, Daily, Monthly | 1948-present | 17 pressure levels, 28 spectral |
NCEP/NCAR Reanalysis Products Derived at PSD | Global | 2.5°x2.5°, T62 Gaussian | Daily, Monthly | 1948-present | 17 pressure levels, 28 spectral |
NCEP/DOE Reanalysis II | Global | 2.5°x2.5° | 4X Daily, Daily, Monthly | 1979-Dec 2012 | 17 Pressure levels |
NOAA Extended Reconstructed SST V3b | Global | 1.0°x1.0° | Monthly | 1854-present | None |
NOAA Extended Reconstructed SST V4 正在上传…重新上传取消 | Global | 1.0°x1.0° | Monthly | 1854-present | None |
NOAA's Outgoing Longwave Radiation–Daily Climate Data Record (OLR–Daily CDR): PSD Interpolated Version 正在上传…重新上传取消 | Global | 1.0°x1.0° | Daily | 1979-2012 | None |
NOAA High-resolution Blended Analysis of Daily SST and Ice. | Global | .25°x.25° | Daily | 1981-present | None |
NOAA Global Surface Temperature (NOAAGlobalTemp) | Global | 5.0°x5.0° | Daily | 1880-present | None |
NOAA Optimum Interpolation (OI) SST V2 | Global | 1.0°x1.0° | Monthly,Weekly | 1981-present | None |
NODC (Levitus) World Ocean Atlas 1994 | Global | 1.0°x1.0° | Monthly,Annual | Climo | None |
NODC (Levitus) World Ocean Atlas 1998 | Global | 1.0°x1.0° | Monthly,Annual | Climo | None |
NOAA's Precipitation Reconstruction (PREC) | Global | 2.5°x2.5° | Monthly | 1979-present | None |
NOAA's Precipitation Reconstruction over Land (PREC/L) | Global | 2.5°x2.5° | Monthly | 1948-present | None |
North American Regional Reanalysis (NARR) | Northern Hemisphere | 32km grids | 8X Daily, Daily, Monthly | 1979-Dec 2012 | 28 Pressure |
Northern Hemisphere EASE-Grid Snow Cover and Sea Ice Extent | Northern Hemisphere | 1.0°x1.0° | Monthly | 1971-1995 | None |
NOAA-CIRES 20th Century Reanalysis (V2) | Global | 2.5°x2.5° | 4X Daily | 1871-2012 | 24 pressure levels |
NOAA-CIRES 20th Century Reanalysis (V2c) 正在上传…重新上传取消 | Global | 2.5°x2.5° | 4X Daily | 1851-2014 | 24 pressure levels |
U. of Delaware Precipitation and Air Temperature | Global Land | 0.5°x0.5° | Monthly | 1900-2014 | None |
Uninterpolated OLR | Global | 2.5°x2.5° | Daily | 1991-present | None |
下载网址为:
网页数据说明:
网页数据显示为纯文本,
服务器只响应一个document文本
而且网页就是下载页面,对爬虫等没有任何的限制
两种方式比较:
爬虫要设置请求网址,很麻烦,如果请求网址是乱序的,根本无法处理
FTP好用,简单,不过偶尔可能卡顿
爬虫(requests)
import requests
import os
def download():
"""下载网址为: https://gml.noaa.gov/aftp/data/radiation/surfrad/aod/fpk"""
# 前闭后开,后面 + 1
for year in range(1997, 2021 + 1):
for month in range(1, 12 + 1):
for day in range(1, 31 + 1):
# 文件名拼接, 样例为:fpk_19970406.aod
# y = str(year)[2:]
if month < 10:
m = '0' + str(month)
else:
m = str(month)
if day < 10:
d = '0' + str(day)
else:
d = str(day)
time = str(year) + str(m) + str(d)
file_name = "fpk_" + time + ".aod"
# 文件存储地址
file_path = os.path.join("./data/aod/fpk/", str(year) + '/', file_name)
# 网页请求地址
html_path = os.path.join("https://gml.noaa.gov/aftp/data/radiation/surfrad/aod/fpk/", str(year) + '/',
file_name)
print(file_path)
print(html_path)
response = requests.get(html_path)
print(response.status_code)
# 有些数据缺失,故对响应状态进行判断
if response.status_code != 404:
(filepath, tempfilename) = os.path.split(file_path)
if not os.path.exists(filepath):
os.makedirs(filepath)
with open(file_path, "w") as file:
file_data = response.content.decode('gbk')
# print(file_data)
if file_data:
file.write(file_data)
def main():
download()
if __name__ == '__main__':
main()
FTP(ftplib)
import os.path
from ftplib import FTP
from pathlib import Path
def main():
for year in range(1997, 2021 + 1):
html_str = os.path.join("/data/radiation/surfrad/aod/gwn/", str(year))
file_path = os.path.join("D:/js/python/code/data/aod/gwn/", str(year))
print(html_str)
print(file_path)
if not os.path.exists(file_path):
os.makedirs(file_path)
ftp = FTP("ftp.gml.noaa.gov")
ftp.login()
# https://gml.noaa.gov/aftp/data/radiation/surfrad/aod/gwn/
# ftp.cwd('/data/radiation/surfrad/aod/gwn/')
ftp.cwd(html_str)
# Get all files
files = ftp.nlst()
# Download all the files to C:\Temp
for file in files:
print("Downloading..." + file)
# ftp.retrbinary(f'RETR {file}', open(str(Path(r'C:\Users\z6q6k6\Desktop\aaa') / file), 'wb').write)
ftp.retrbinary(f'RETR {file}', open(str(Path(file_path) / file), 'wb').write)
ftp.close()
if __name__ == '__main__':
main()
迅雷
先使用chrome插件Link Grabber来将所有链接提取出来,再利用迅雷下载。