Я использовал скрипт python для загрузки некоторых параметров из набора данных повторного анализа ERA-Interim. Он работал нормально со всеми другими параметрами, кроме поверхностного снегопада и общего количества осадков. Выдает ошибку
ecmwfapi.api.APIException: u'ecmwf.API ошибка 1: ОШИБКА 6 (MARS_EXPECTED_FIELDS): ожидается 62, получено 0 '
Я проверил на их сайте, и данные должны быть полностью доступны. Я не понимаю, в чем здесь проблема. Ниже приведен скрипт для загрузки данных о снегопаде. Пожалуйста, дайте мне знать, если что-то пойдет не так. Спасибо.
#!/usr/bin/env python
import calendar
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
def retrieve_interim():
"""
A function to demonstrate how to iterate efficiently over several years and months etc
for a particular interim_request.
Change the variables below to adapt the iteration to your needs.
You can use the variable 'target' to organise the requested data in files as you wish.
In the example below the data are organised in files per month. (eg "interim_daily_201510.grb")
"""
yearStart = 1984
yearEnd = 1989
monthStart = 1
monthEnd = 12
startDate = '%04d%02d%02d' % (yearStart, monthStart, 1)
lastDate = '%04d%02d%02d' % (yearEnd, monthEnd, 31)
target = "sf_daily_%04dto%04d.nc" % (yearStart, yearEnd)
requestDates = (startDate + "/TO/" + lastDate)
interim_request(requestDates, target)
def interim_request(requestDates, target):
"""
An ERA interim request for analysis pressure level data.
Change the keywords below to adapt it to your needs.
(eg to add or to remove levels, parameters, times etc)
Request cost per day is 112 fields, 14.2326 Mbytes
"""
server.retrieve({
"class": "ei",
"stream": "oper",
"type": "an",
"dataset": "interim",
"date": requestDates,
"expver": "1",
"levtype": "sfc",
#"levelist": "1000",
"param": "sf",
"target": target,
"time": "00/12",
"grid": "0.75/0.75",
"format": "netcdf"
})
if __name__ == '__main__':
retrieve_interim()