{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# CEMC格点数据平台\n", "\n", "CEMC 格点数据平台 (GODAS) 是 CEMC 研发的数值模式格点数据检索与访问平台,对接 CMA 二级存储,支持对长时间序列数据的访问。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 安装\n", "\n", "godas-client 正在开发中,暂不提供安装地址,可以在预配置环境中使用。\n", "\n", "如需安装请联系 cemc-oper 小组。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 准备\n", "\n", "导入需要的包" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "from godas_client.format.grib2 import load_field" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "设置绘图的数据参数,使用 CMA-GFS 2024 年 4 月 1 日 00 时次 024 时效数据。" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "system_name = \"CMA-GFS\"\n", "start_time = pd.to_datetime(\"2024-04-01 00:00:00\")\n", "forecast_time = pd.to_timedelta(\"24h\")\n", "\n", "data_type = \"cma_gfs\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 加载数据\n", "\n", "加载 2 米温度场" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "http://10.40.139.28:8000/enolhgfrusatzcyd.grib2\n", "200\n", "plguryvdcxknmhbi\n" ] }, { "data": { "text/html": [ "
<xarray.DataArray '2t' (latitude: 1440, longitude: 2880)> Size: 33MB\n", "array([[-26.00337891, -23.63337891, -23.66337891, ..., -23.67337891,\n", " -23.68337891, -23.63337891],\n", " [-25.83337891, -23.00337891, -22.98337891, ..., -23.00337891,\n", " -22.99337891, -23.00337891],\n", " [-25.72337891, -23.02337891, -23.02337891, ..., -23.01337891,\n", " -23.02337891, -23.02337891],\n", " ...,\n", " [-45.26337891, -44.88337891, -44.63337891, ..., -44.93337891,\n", " -44.75337891, -44.96337891],\n", " [-45.32337891, -45.26337891, -45.09337891, ..., -45.02337891,\n", " -45.17337891, -45.34337891],\n", " [-45.82337891, -46.24337891, -46.57337891, ..., -46.25337891,\n", " -46.22337891, -46.06337891]])\n", "Coordinates:\n", " time datetime64[ns] 8B 2024-04-01\n", " step timedelta64[ns] 8B 1 days\n", " valid_time datetime64[ns] 8B 2024-04-02\n", " heightAboveGround int64 8B 2\n", " * latitude (latitude) float64 12kB 89.94 89.81 ... -89.81 -89.94\n", " * longitude (longitude) float64 23kB 0.0 0.125 0.25 ... 359.8 359.9