[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-google-deepmind--graphcast":3,"tool-google-deepmind--graphcast":65},[4,23,32,40,49,57],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":22},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85092,2,"2026-04-10T11:13:16",[13,14,15,16,17,18,19,20,21],"图像","数据工具","视频","插件","Agent","其他","语言模型","开发框架","音频","ready",{"id":24,"name":25,"github_repo":26,"description_zh":27,"stars":28,"difficulty_score":29,"last_commit_at":30,"category_tags":31,"status":22},5784,"funNLP","fighting41love\u002FfunNLP","funNLP 是一个专为中文自然语言处理（NLP）打造的超级资源库，被誉为\"NLP 民工的乐园”。它并非单一的软件工具，而是一个汇集了海量开源项目、数据集、预训练模型和实用代码的综合性平台。\n\n面对中文 NLP 领域资源分散、入门门槛高以及特定场景数据匮乏的痛点，funNLP 提供了“一站式”解决方案。这里不仅涵盖了分词、命名实体识别、情感分析、文本摘要等基础任务的标准工具，还独特地收录了丰富的垂直领域资源，如法律、医疗、金融行业的专用词库与数据集，甚至包含古诗词生成、歌词创作等趣味应用。其核心亮点在于极高的全面性与实用性，从基础的字典词典到前沿的 BERT、GPT-2 模型代码，再到高质量的标注数据和竞赛方案，应有尽有。\n\n无论是刚刚踏入 NLP 领域的学生、需要快速验证想法的算法工程师，还是从事人工智能研究的学者，都能在这里找到急需的“武器弹药”。对于开发者而言，它能大幅减少寻找数据和复现模型的时间；对于研究者，它提供了丰富的基准测试资源和前沿技术参考。funNLP 以开放共享的精神，极大地降低了中文自然语言处理的开发与研究成本，是中文 AI 社区不可或缺的宝藏仓库。",79857,1,"2026-04-08T20:11:31",[19,14,18],{"id":33,"name":34,"github_repo":35,"description_zh":36,"stars":37,"difficulty_score":29,"last_commit_at":38,"category_tags":39,"status":22},5773,"cs-video-courses","Developer-Y\u002Fcs-video-courses","cs-video-courses 是一个精心整理的计算机科学视频课程清单，旨在为自学者提供系统化的学习路径。它汇集了全球知名高校（如加州大学伯克利分校、新南威尔士大学等）的完整课程录像，涵盖从编程基础、数据结构与算法，到操作系统、分布式系统、数据库等核心领域，并深入延伸至人工智能、机器学习、量子计算及区块链等前沿方向。\n\n面对网络上零散且质量参差不齐的教学资源，cs-video-courses 解决了学习者难以找到成体系、高难度大学级别课程的痛点。该项目严格筛选内容，仅收录真正的大学层级课程，排除了碎片化的简短教程或商业广告，确保用户能接触到严谨的学术内容。\n\n这份清单特别适合希望夯实计算机基础的开发者、需要补充特定领域知识的研究人员，以及渴望像在校生一样系统学习计算机科学的自学者。其独特的技术亮点在于分类极其详尽，不仅包含传统的软件工程与网络安全，还细分了生成式 AI、大语言模型、计算生物学等新兴学科，并直接链接至官方视频播放列表，让用户能一站式获取高质量的教育资源，免费享受世界顶尖大学的课堂体验。",79792,"2026-04-08T22:03:59",[18,13,14,20],{"id":41,"name":42,"github_repo":43,"description_zh":44,"stars":45,"difficulty_score":46,"last_commit_at":47,"category_tags":48,"status":22},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,3,"2026-04-04T04:44:48",[17,13,20,19,18],{"id":50,"name":51,"github_repo":52,"description_zh":53,"stars":54,"difficulty_score":46,"last_commit_at":55,"category_tags":56,"status":22},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",75832,"2026-04-17T21:58:25",[19,13,20,18],{"id":58,"name":59,"github_repo":60,"description_zh":61,"stars":62,"difficulty_score":29,"last_commit_at":63,"category_tags":64,"status":22},3215,"awesome-machine-learning","josephmisiti\u002Fawesome-machine-learning","awesome-machine-learning 是一份精心整理的机器学习资源清单，汇集了全球优秀的机器学习框架、库和软件工具。面对机器学习领域技术迭代快、资源分散且难以甄选的痛点，这份清单按编程语言（如 Python、C++、Go 等）和应用场景（如计算机视觉、自然语言处理、深度学习等）进行了系统化分类，帮助使用者快速定位高质量项目。\n\n它特别适合开发者、数据科学家及研究人员使用。无论是初学者寻找入门库，还是资深工程师对比不同语言的技术选型，都能从中获得极具价值的参考。此外，清单还延伸提供了免费书籍、在线课程、行业会议、技术博客及线下聚会等丰富资源，构建了从学习到实践的全链路支持体系。\n\n其独特亮点在于严格的维护标准：明确标记已停止维护或长期未更新的项目，确保推荐内容的时效性与可靠性。作为机器学习领域的“导航图”，awesome-machine-learning 以开源协作的方式持续更新，旨在降低技术探索门槛，让每一位从业者都能高效地站在巨人的肩膀上创新。",72149,"2026-04-03T21:50:24",[20,18],{"id":66,"github_repo":67,"name":68,"description_en":69,"description_zh":70,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":69,"owner_location":69,"owner_email":69,"owner_twitter":69,"owner_website":80,"owner_url":81,"languages":82,"stars":91,"forks":92,"last_commit_at":93,"license":94,"difficulty_score":95,"env_os":96,"env_gpu":97,"env_ram":98,"env_deps":99,"category_tags":113,"github_topics":114,"view_count":10,"oss_zip_url":69,"oss_zip_packed_at":69,"status":22,"created_at":117,"updated_at":118,"faqs":119,"releases":153},8675,"google-deepmind\u002Fgraphcast","graphcast",null,"GraphCast 是由 Google DeepMind 开源的先进气象预测模型，旨在利用人工智能技术进行中短期天气预报。它主要解决了传统数值天气预报计算成本高、耗时长的痛点，能够基于历史大气数据快速生成高精度的全球天气序列预测，甚至在某些指标上超越了传统的物理模拟方法。\n\n这款工具特别适合气象领域的研究人员、数据科学家以及具备机器学习背景的开发者使用。用户不仅可以加载官方提供的预训练权重直接进行推理评估，还能利用其模块化代码架构，基于 ERA5 等数据集从头训练或微调模型，以探索更复杂的气象应用场景。\n\nGraphCast 的核心技术亮点在于其独特的图神经网络（GNN）架构。它将地球球面网格转化为多面体网格结构，通过消息传递机制高效地捕捉大气变量在空间上的复杂依赖关系。此外，项目还包含了其进阶版本 GenCast，引入了扩散模型技术来实现集合预报，进一步提升了预测的不确定性量化能力。整套代码基于 JAX 框架编写，提供了从数据预处理、模型训练到自回归推理的完整流程，是研究 AI 驱动气象科学的宝贵资源。","# Google DeepMind GraphCast and GenCast\n\nThis package contains example code to run and train the weather models used in the research papers [GraphCast](https:\u002F\u002Fwww.science.org\u002Fdoi\u002F10.1126\u002Fscience.adi2336) and [GenCast](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.15796).\n\nIt also provides pretrained model weights, normalization statistics and example input data on [Google Cloud Bucket](https:\u002F\u002Fconsole.cloud.google.com\u002Fstorage\u002Fbrowser\u002Fdm_graphcast).\n\nFull model training requires downloading the\n[ERA5](https:\u002F\u002Fwww.ecmwf.int\u002Fen\u002Fforecasts\u002Fdatasets\u002Freanalysis-datasets\u002Fera5)\ndataset, available from [ECMWF](https:\u002F\u002Fwww.ecmwf.int\u002F). This can best be\naccessed as Zarr from [Weatherbench2's ERA5 data](https:\u002F\u002Fweatherbench2.readthedocs.io\u002Fen\u002Flatest\u002Fdata-guide.html#era5).\n\nData for operational fine-tuning can similarly be accessed at [Weatherbench2's HRES 0th frame data](https:\u002F\u002Fweatherbench2.readthedocs.io\u002Fen\u002Flatest\u002Fdata-guide.html#ifs-hres-t-0-analysis).\n\nThese datasets may be governed by separate terms and conditions or license provisions. Your use of such third-party materials is subject to any such terms and you should check that you can comply with any applicable restrictions or terms and conditions before use.\n\n## Overview of files common to models\n\n*   `autoregressive.py`: Wrapper used to run (and train) the one-step predictions\n    to produce a sequence of predictions by auto-regressively feeding the\n    outputs back as inputs at each step, in JAX a differentiable way.\n*   `checkpoint.py`: Utils to serialize and deserialize trees.\n*   `data_utils.py`: Utils for data preprocessing.\n*   `deep_typed_graph_net.py`: General purpose deep graph neural network (GNN)\n    that operates on `TypedGraph`'s where both inputs and outputs are flat\n    vectors of features for each of the nodes and edges.\n*   `grid_mesh_connectivity.py`: Tools for converting between regular grids on a\n    sphere and triangular meshes.\n*   `icosahedral_mesh.py`: Definition of an icosahedral multi-mesh.\n*   `losses.py`: Loss computations, including latitude-weighting.\n*   `mlp.py`: Utils for building MLPs with norm conditioning layers.\n*   `model_utils.py`: Utilities to produce flat node and edge vector features\n    from input grid data, and to manipulate the node output vectors back\n    into a multilevel grid data.\n*   `normalization.py`: Wrapper used to normalize inputs according to historical\n    values, and targets according to historical time differences.\n*   `predictor_base.py`: Defines the interface of the predictor, which models\n    and all of the wrappers implement.\n*   `rollout.py`: Similar to `autoregressive.py` but used only at inference time\n    using a python loop to produce longer, but non-differentiable trajectories.\n*   `typed_graph.py`: Definition of `TypedGraph`'s.\n*   `typed_graph_net.py`: Implementation of simple graph neural network\n    building blocks defined over `TypedGraph`'s that can be combined to build\n    deeper models.\n*   `xarray_jax.py`: A wrapper to let JAX work with `xarray`s.\n*   `xarray_tree.py`: An implementation of tree.map_structure that works with\n    `xarray`s.\n\n## GenCast: Diffusion-based ensemble forecasting for medium-range weather\n\nThis package provides four pretrained models:\n\n1.  `GenCast 0p25deg \u003C2019`, GenCast model at 0.25deg resolution with 13\npressure levels and a 6 times refined icosahedral mesh. This model is trained on\nERA5 data from 1979 to 2018 (inclusive), and can be causally evaluated on 2019\nand later years. This model was described in the paper\n`GenCast: Diffusion-based ensemble forecasting for medium-range weather`\n(https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.15796)\n\n2.  `GenCast 0p25deg Operational \u003C2022`, GenCast model at 0.25deg resolution, with 13 pressure levels and a 6\ntimes refined icosahedral mesh. This model is trained on ERA5 data from\n1979 to 2018, and fine-tuned on HRES-fc0 data from\n2016 to 2021 and can be causally evaluated on 2022 and later years.\nThis model can make predictions in an operational setting (i.e., initialised\nfrom HRES-fc0)\n\n3.  `GenCast 1p0deg \u003C2019`, GenCast model at 1deg resolution, with 13 pressure\nlevels and a 5 times refined icosahedral mesh. This model is\ntrained on ERA5 data from 1979 to 2018, and can be causally evaluated on 2019 and later years.\nThis model has a smaller memory footprint than the 0.25deg models\n\n4. `GenCast 1p0deg Mini \u003C2019`, GenCast model at 1deg resolution, with 13 pressure levels and a\n4 times refined icosahedral mesh. This model is trained on ERA5 data\nfrom 1979 to 2018, and can be causally evaluated on 2019 and later years.\nThis model has the smallest memory footprint of those provided and has been\nprovided to enable low cost demonstrations (for example, it is runnable in a free Colab notebook).\nWhile its performance is reasonable, it is not representative of the performance\nof the GenCast models (1-3) above. For reference, a scorecard comparing its performance to ENS can be found in [docs\u002F](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fblob\u002Fmain\u002Fdocs\u002FGenCast_1p0deg_Mini_ENS_scorecard.png). Note that in this scorecard,\nGenCast Mini only uses 8 member ensembles (vs. ENS' 50) so we use the fair (unbiased)\nCRPS to allow for fair comparison.\n\nThe best starting point is to open `gencast_mini_demo.ipynb` in [Colaboratory](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fdeepmind\u002Fgraphcast\u002Fblob\u002Fmaster\u002Fgencast_mini_demo.ipynb), which gives an\nexample of loading data, generating random weights or loading a `GenCast 1p0deg Mini \u003C2019`\nsnapshot, generating predictions, computing the loss and computing gradients.\nThe one-step implementation of GenCast architecture is provided in\n`gencast.py` and the relevant data, weights and statistics are in the `gencast\u002F`\nsubdir of the Google Cloud Bucket.\n\n### Instructions for running GenCast on Google Cloud compute\n\n[cloud_vm_setup.md](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fblob\u002Fmain\u002Fdocs\u002Fcloud_vm_setup.md)\ncontains detailed instructions on launching a Google Cloud TPU VM. This provides\na means of running models (1-3) in the separate `gencast_demo_cloud_vm.ipynb` through [Colaboratory](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fdeepmind\u002Fgraphcast\u002Fblob\u002Fmaster\u002Fgencast_demo_cloud_vm.ipynb).\n\nThe document also provides [instructions](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fblob\u002Fmain\u002Fdocs\u002Fcloud_vm_setup.md#running-inference-on-gpu) for running GenCast on a GPU. This requires using a different attention implementation.\n\n### Brief description of relevant library files\n\n*   `denoiser.py`: The GenCast denoiser for one step predictions.\n*   `denoisers_base.py`: Defines the interface of the denoiser.\n*   `dpm_solver_plus_plus_2s.py`: Sampler using DPM-Solver++ 2S from [1].\n*   `gencast.py`: Combines the GenCast model architecture, wrapped as a\n    denoiser, with a sampler to generate predictions.\n*   `nan_cleaning.py`: Wraps a predictor to allow it to work with data\n    cleaned of NaNs. Used to remove NaNs from sea surface temperature.\n*   `samplers_base.py`: Defines the interface of the sampler.\n*   `samplers_utils.py`: Utility methods for the sampler.\n*   `sparse_transformer.py`: General purpose sparse transformer that\n    operates on `TypedGraph`'s where both inputs and outputs are flat vectors of\n    features for each of the nodes and edges. `predictor.py` uses one of these\n    for the mesh GNN.\n*   `sparse_transformer_utils.py`: Utility methods for the sparse\n    transformer.\n*   `transformer.py`: Wraps the mesh transformer, swapping the leading\n    two axes of the nodes in the input graph.\n\n[1] DPM-Solver++: Fast Solver for Guided Sampling of Diffusion Probabilistic\n  Models, https:\u002F\u002Farxiv.org\u002Fabs\u002F2211.01095\n\n## GraphCast: Learning skillful medium-range global weather forecasting\n\nThis package provides three pretrained models:\n\n1.  `GraphCast`, the high-resolution model used in the GraphCast paper (0.25 degree\nresolution, 37 pressure levels), trained on ERA5 data from 1979 to 2017,\n\n2.  `GraphCast_small`, a smaller, low-resolution version of GraphCast (1 degree\nresolution, 13 pressure levels, and a smaller mesh), trained on ERA5 data from\n1979 to 2015, useful to run a model with lower memory and compute constraints,\n\n3.  `GraphCast_operational`, a high-resolution model (0.25 degree resolution, 13\npressure levels) pre-trained on ERA5 data from 1979 to 2017 and fine-tuned on\nHRES data from 2016 to 2021. This model can be initialized from HRES data (does\nnot require precipitation inputs).\n\nThe best starting point is to open `graphcast_demo.ipynb` in [Colaboratory](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fdeepmind\u002Fgraphcast\u002Fblob\u002Fmaster\u002Fgraphcast_demo.ipynb), which gives an\nexample of loading data, generating random weights or load a pre-trained\nsnapshot, generating predictions, computing the loss and computing gradients.\nThe one-step implementation of GraphCast architecture, is provided in\n`graphcast.py` and the relevant data, weights and statistics are in the `graphcast\u002F`\nsubdir of the Google Cloud Bucket.\n\nWARNING: For backwards compatibility, we have also left GraphCast data in the top level of the bucket. These will eventually be deleted in favour of the `graphcast\u002F` subdir.\n\n### Brief description of relevant library files:\n\n*   `casting.py`: Wrapper used around GraphCast to make it work using\n    BFloat16 precision.\n*   `graphcast.py`: The main GraphCast model architecture for one-step of\n    predictions.\n*   `solar_radiation.py`: Computes Top-Of-the-Atmosphere (TOA) incident solar\n    radiation compatible with ERA5. This is used as a forcing variable and thus\n    needs to be computed for target lead times in an operational setting.\n\n## Dependencies.\n\n[Chex](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fchex),\n[Dask](https:\u002F\u002Fgithub.com\u002Fdask\u002Fdask),\n[Dinosaur](https:\u002F\u002Fgithub.com\u002Fgoogle-research\u002Fdinosaur),\n[Haiku](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fdm-haiku),\n[JAX](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fjax),\n[JAXline](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fjaxline),\n[Jraph](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fjraph),\n[Numpy](https:\u002F\u002Fnumpy.org\u002F),\n[Pandas](https:\u002F\u002Fpandas.pydata.org\u002F),\n[Python](https:\u002F\u002Fwww.python.org\u002F),\n[SciPy](https:\u002F\u002Fscipy.org\u002F),\n[Tree](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Ftree),\n[Trimesh](https:\u002F\u002Fgithub.com\u002Fmikedh\u002Ftrimesh),\n[XArray](https:\u002F\u002Fgithub.com\u002Fpydata\u002Fxarray) and\n[XArray-TensorStore](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxarray-tensorstore).\n\n\n## License and Disclaimers\n\nThe Colab notebooks and the associated code are licensed under the Apache License, Version 2.0. You may obtain a copy of the License at: https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0.\n\nThe model weights are made available for use under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). You may obtain a copy of the License at: https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-nc-sa\u002F4.0\u002F.\n\nThis is not an officially supported Google product.\n\nUnless required by applicable law or agreed to in writing, all software and materials distributed here under the Apache 2.0 or CC-BY-NC-SA 4.0 licenses are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the licenses for the specific language governing permissions and limitations under those licenses.\n\nGenCast and GraphCast are part of an experimental research project. You are solely responsible for determining the appropriateness of using or distributing GenCast, GraphCast or any outputs generated and assume all risks associated with your use or distribution of GenCast, GraphCast and outputs and your exercise of rights and permissions granted by Google to you under the relevant License. Use discretion before relying on, publishing, downloading or otherwise using GenCast, GraphCast or any outputs generated. GenCast, GraphCast or any outputs generated (i) are not based on data published by; (ii) have not been produced in collaboration with; and (iii) have not been endorsed by any government meteorological agency or department and in no way replaces official alerts, warnings or notices published by such agencies.\n\nCopyright 2024 DeepMind Technologies Limited.\n\n\n## Citations\n\nIf you use this work, consider citing our papers ([blog post](https:\u002F\u002Fdeepmind.google\u002Fdiscover\u002Fblog\u002Fgraphcast-ai-model-for-faster-and-more-accurate-global-weather-forecasting\u002F), [Science](https:\u002F\u002Fwww.science.org\u002Fdoi\u002F10.1126\u002Fscience.adi2336), [arXiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2212.12794), [arxiv GenCast](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.15796)):\n\n```latex\n@article{lam2023learning,\n  title={Learning skillful medium-range global weather forecasting},\n  author={Lam, Remi and Sanchez-Gonzalez, Alvaro and Willson, Matthew and Wirnsberger, Peter and Fortunato, Meire and Alet, Ferran and Ravuri, Suman and Ewalds, Timo and Eaton-Rosen, Zach and Hu, Weihua and others},\n  journal={Science},\n  volume={382},\n  number={6677},\n  pages={1416--1421},\n  year={2023},\n  publisher={American Association for the Advancement of Science}\n}\n```\n\n\n```latex\n@article{price2023gencast,\n  title={GenCast: Diffusion-based ensemble forecasting for medium-range weather},\n  author={Price, Ilan and Sanchez-Gonzalez, Alvaro and Alet, Ferran and Andersson, Tom R and El-Kadi, Andrew and Masters, Dominic and Ewalds, Timo and Stott, Jacklynn and Mohamed, Shakir and Battaglia, Peter and Lam, Remi and Willson, Matthew},\n  journal={arXiv preprint arXiv:2312.15796},\n  year={2023}\n}\n```\n\n## Acknowledgements\n\nThe (i) GenCast and GraphCast communicate with and\u002For reference with the following separate libraries and packages and the colab notebooks include a few examples of ECMWF’s ERA5 and HRES data that can be used as input to the models.\nData and products of the European Centre for Medium-range Weather Forecasts (ECMWF), as modified by Google.\nModified Copernicus Climate Change Service information 2023. Neither the European Commission nor ECMWF is responsible for any use that may be made of the Copernicus information or data it contains.\nECMWF HRES datasets\nCopyright statement: Copyright \"© 2023 European Centre for Medium-Range Weather Forecasts (ECMWF)\".\nSource: www.ecmwf.int\nLicense Statement: ECMWF open data is published under a Creative Commons Attribution 4.0 International (CC BY 4.0). https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby\u002F4.0\u002F\nDisclaimer: ECMWF does not accept any liability whatsoever for any error or omission in the data, their availability, or for any loss or damage arising from their use.\n\nUse of the third-party materials referred to above may be governed by separate terms and conditions or license provisions. Your use of the third-party materials is subject to any such terms and you should check that you can comply with any applicable restrictions or terms and conditions before use.\n\n\n## Contact\n\nFor feedback and questions, contact us at gencast@google.com. Any information collected via email will be used in accordance with [Google's privacy policy](http:\u002F\u002Fpolicies.google.com\u002Fprivacy).\n","# Google DeepMind GraphCast 和 GenCast\n\n本软件包包含用于运行和训练研究论文 [GraphCast](https:\u002F\u002Fwww.science.org\u002Fdoi\u002F10.1126\u002Fscience.adi2336) 和 [GenCast](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.15796) 中所用天气模型的示例代码。\n\n此外，它还在 [Google Cloud Bucket](https:\u002F\u002Fconsole.cloud.google.com\u002Fstorage\u002Fbrowser\u002Fdm_graphcast) 上提供了预训练的模型权重、归一化统计信息以及示例输入数据。\n\n完整模型训练需要下载 [ERA5](https:\u002F\u002Fwww.ecmwf.int\u002Fen\u002Fforecasts\u002Fdatasets\u002Freanalysis-datasets\u002Fera5) 数据集，该数据集可从 [ECMWF](https:\u002F\u002Fwww.ecmwf.int\u002F) 获取。最佳方式是从 [Weatherbench2 的 ERA5 数据](https:\u002F\u002Fweatherbench2.readthedocs.io\u002Fen\u002Flatest\u002Fdata-guide.html#era5) 以 Zarr 格式访问。\n\n用于业务级微调的数据同样可以在 [Weatherbench2 的 HRES 第 0 步数据](https:\u002F\u002Fweatherbench2.readthedocs.io\u002Fen\u002Flatest\u002Fdata-guide.html#ifs-hres-t-0-analysis) 中获取。\n\n这些数据集可能受单独的条款与条件或许可协议约束。您对第三方材料的使用须遵守相关条款，并应在使用前确认自己能够遵守所有适用的限制或条款与条件。\n\n## 模型通用文件概述\n\n*   `autoregressive.py`: 用于运行（及训练）单步预测的封装器，通过在每一步将输出作为输入自回归地反馈，以 JAX 的可微分方式生成一系列预测。\n*   `checkpoint.py`: 用于序列化和反序列化树结构的工具。\n*   `data_utils.py`: 数据预处理工具。\n*   `deep_typed_graph_net.py`: 一种通用的深度图神经网络 (GNN)，作用于 `TypedGraph`，其输入和输出均为节点和边的特征向量。\n*   `grid_mesh_connectivity.py`: 用于在球面上的规则网格与三角形网格之间进行转换的工具。\n*   `icosahedral_mesh.py`: 二十面体多层网格的定义。\n*   `losses.py`: 损失计算，包括纬度加权。\n*   `mlp.py`: 带有归一化条件层的多层感知机构建工具。\n*   `model_utils.py`: 从输入网格数据生成扁平化的节点和边特征向量，并将节点输出向量重新转换为多层级网格数据的实用工具。\n*   `normalization.py`: 用于根据历史值对输入进行归一化、根据历史时间差对目标进行归一化的封装器。\n*   `predictor_base.py`: 定义了预测器的接口，所有模型和封装器均需实现该接口。\n*   `rollout.py`: 类似于 `autoregressive.py`，但仅在推理时使用 Python 循环来生成更长的、不可微轨迹。\n*   `typed_graph.py`: `TypedGraph` 的定义。\n*   `typed_graph_net.py`: 在 `TypedGraph` 上定义的简单图神经网络构建模块的实现，这些模块可以组合起来构建更深层次的模型。\n*   `xarray_jax.py`: 使 JAX 能够与 `xarray` 配合使用的封装器。\n*   `xarray_tree.py`: 一种适用于 `xarray` 的 tree.map_structure 实现。\n\n## GenCast：基于扩散的中程天气集合预报\n\n本软件包提供了四个预训练模型：\n\n1.  `GenCast 0.25° \u003C2019`，分辨率为 0.25°、具有 13 层气压且采用 6 倍细化的二十面体网格的 GenCast 模型。该模型使用 1979 年至 2018 年（含）的 ERA5 数据进行训练，可在 2019 年及之后的年份上进行因果评估。该模型在论文《GenCast：基于扩散的中程天气集合预报》（https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.15796）中有所介绍。\n\n2.  `GenCast 0.25° 运营版 \u003C2022`，分辨率为 0.25°、具有 13 层气压且采用 6 倍细化的二十面体网格的 GenCast 模型。该模型使用 1979 年至 2018 年的 ERA5 数据进行训练，并在 2016 年至 2021 年的 HRES-fc0 数据上进行了微调，可在 2022 年及以后的年份上进行因果评估。该模型可在实际业务环境中进行预测（即从 HRES-fc0 初始化）。\n\n3.  `GenCast 1.0° \u003C2019`，分辨率为 1°、具有 13 层气压且采用 5 倍细化的二十面体网格的 GenCast 模型。该模型使用 1979 年至 2018 年的 ERA5 数据进行训练，可在 2019 年及以后的年份上进行因果评估。该模型的内存占用比 0.25° 版本更小。\n\n4.  `GenCast 1.0° Mini \u003C2019`，分辨率为 1°、具有 13 层气压且采用 4 倍细化的二十面体网格的 GenCast 模型。该模型使用 1979 年至 2018 年的 ERA5 数据进行训练，可在 2019 年及以后的年份上进行因果评估。该模型是所提供的版本中内存占用最小的，专为低成本演示而设计（例如，可在免费的 Colab 笔记本中运行）。尽管其性能尚可，但并不代表上述 GenCast 模型（1–3）的典型表现。作为参考，一份将其性能与 ENS 对比的成绩单可在 [docs\u002F](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fblob\u002Fmain\u002Fdocs\u002FGenCast_1p0deg_Mini_ENS_scorecard.png) 中找到。请注意，在该成绩单中，GenCast Mini 仅使用 8 个成员的集合（而 ENS 使用 50 个），因此我们采用公平（无偏）的 CRPS 来确保比较的公正性。\n\n最佳的入门方式是在 [Colaboratory](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fdeepmind\u002Fgraphcast\u002Fblob\u002Fmaster\u002Fgencast_mini_demo.ipynb) 中打开 `gencast_mini_demo.ipynb`，其中展示了如何加载数据、生成随机权重或加载 `GenCast 1.0° Mini \u003C2019` 快照、生成预测、计算损失并求取梯度。GenCast 架构的单步实现位于 `gencast.py` 中，相关数据、权重和统计信息则存放在 Google Cloud Bucket 的 `gencast\u002F` 子目录下。\n\n### 在 Google Cloud 计算平台上运行 GenCast 的说明\n\n[cloud_vm_setup.md](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fblob\u002Fmain\u002Fdocs\u002Fcloud_vm_setup.md) 包含启动 Google Cloud TPU VM 的详细步骤。这使得用户可以通过 [Colaboratory](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fdeepmind\u002Fgraphcast\u002Fblob\u002Fmaster\u002Fgencast_demo_cloud_vm.ipynb) 在独立的 `gencast_demo_cloud_vm.ipynb` 中运行模型（1–3）。\n\n该文档还提供了在 GPU 上运行 GenCast 的 [说明](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fblob\u002Fmain\u002Fdocs\u002Fcloud_vm_setup.md#running-inference-on-gpu)。这需要使用不同的注意力机制实现。\n\n### 相关库文件简述\n\n*   `denoiser.py`: GenCast 去噪器，用于单步预测。\n*   `denoisers_base.py`: 定义去噪器的接口。\n*   `dpm_solver_plus_plus_2s.py`: 使用来自 [1] 的 DPM-Solver++ 2S 采样器。\n*   `gencast.py`: 将 GenCast 模型架构封装为去噪器，并结合采样器生成预测结果。\n*   `nan_cleaning.py`: 包装预测器，使其能够处理已清除 NaN 值的数据。用于去除海面温度中的 NaN 值。\n*   `samplers_base.py`: 定义采样器的接口。\n*   `samplers_utils.py`: 采样器的实用方法。\n*   `sparse_transformer.py`: 通用稀疏 Transformer，作用于 `TypedGraph`，其输入和输出均为节点和边特征的扁平化向量。`predictor.py` 在网格 GNN 中使用了此类模型。\n*   `sparse_transformer_utils.py`: 稀疏 Transformer 的实用方法。\n*   `transformer.py`: 包装网格 Transformer，交换输入图中节点的前两个轴。\n\n[1] DPM-Solver++：扩散概率模型引导采样的快速求解器，https:\u002F\u002Farxiv.org\u002Fabs\u002F2211.01095\n\n## GraphCast：学习高超的中期全球天气预报\n\n本包提供三种预训练模型：\n\n1.  `GraphCast`，即 GraphCast 论文中使用的高分辨率模型（0.25 度分辨率，37 层气压），基于 1979 年至 2017 年的 ERA5 数据训练而成。\n\n2.  `GraphCast_small`，是 GraphCast 的小型低分辨率版本（1 度分辨率，13 层气压，较小的网格），基于 1979 年至 2015 年的 ERA5 数据训练，适用于内存和计算资源有限的情况。\n\n3.  `GraphCast_operational`，一种高分辨率模型（0.25 度分辨率，13 层气压），先基于 1979 年至 2017 年的 ERA5 数据进行预训练，再用 2016 年至 2021 年的 HRES 数据进行微调。该模型可从 HRES 数据初始化，无需降水输入。\n\n最佳入门方式是在 [Colaboratory](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fdeepmind\u002Fgraphcast\u002Fblob\u002Fmaster\u002Fgraphcast_demo.ipynb) 中打开 `graphcast_demo.ipynb`，其中展示了如何加载数据、生成随机权重或加载预训练快照、生成预测、计算损失以及梯度。GraphCast 架构的单步实现位于 `graphcast.py` 中，相关数据、权重和统计信息则存放在 Google Cloud 存储桶的 `graphcast\u002F` 子目录下。\n\n警告：为保持向后兼容性，我们仍将 GraphCast 数据保留在存储桶的根目录中。这些数据最终将被删除，以支持 `graphcast\u002F` 子目录。\n\n### 相关库文件简述：\n\n*   `casting.py`: 用于包装 GraphCast，使其以 BFloat16 精度运行。\n*   `graphcast.py`: GraphCast 主要模型架构，用于单步预测。\n*   `solar_radiation.py`: 计算与 ERA5 兼容的大气顶层 (TOA) 入射太阳辐射。该变量用作强迫项，因此在实际业务场景中需要针对不同的预报时效进行计算。\n\n## 依赖项。\n\n[Chex](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fchex),\n[Dask](https:\u002F\u002Fgithub.com\u002Fdask\u002Fdask),\n[Dinosaur](https:\u002F\u002Fgithub.com\u002Fgoogle-research\u002Fdinosaur),\n[Haiku](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fdm-haiku),\n[JAX](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fjax),\n[JAXline](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fjaxline),\n[Jraph](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Fjraph),\n[Numpy](https:\u002F\u002Fnumpy.org\u002F),\n[Pandas](https:\u002F\u002Fpandas.pydata.org\u002F),\n[Python](https:\u002F\u002Fwww.python.org\u002F),\n[SciPy](https:\u002F\u002Fscipy.org\u002F),\n[Tree](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Ftree),\n[Trimesh](https:\u002F\u002Fgithub.com\u002Fmikedh\u002Ftrimesh),\n[XArray](https:\u002F\u002Fgithub.com\u002Fpydata\u002Fxarray) 和\n[XArray-TensorStore](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxarray-tensorstore)。\n\n\n## 许可与免责声明\n\nColab 笔记本及其相关代码采用 Apache License, Version 2.0 许可证授权。许可证副本可在以下网址获取：https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0。\n\n模型权重根据 Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) 许可证条款提供使用。许可证副本可在以下网址获取：https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-nc-sa\u002F4.0\u002F。\n\n本项目并非 Google 官方支持的产品。\n\n除非适用法律要求或另有书面约定，否则在此依据 Apache 2.0 或 CC-BY-NC-SA 4.0 许可证分发的所有软件和材料均按“现状”提供，不附带任何明示或暗示的保证或条件。具体权利和限制请参阅相应许可证文本。\n\nGenCast 和 GraphCast 属于一项实验性研究项目。您需自行判断是否适合使用或分发 GenCast、GraphCast 或其生成的任何输出，并承担因使用或分发这些内容而产生的所有风险。同时，您应谨慎对待 GenCast、GraphCast 及其生成的任何输出，避免盲目依赖、发布、下载或以其他方式使用。GenCast、GraphCast 或其生成的任何输出 (i) 并非基于任何政府气象机构发布的数据；(ii) 未与任何政府气象机构合作产生；(iii) 未获得任何政府气象机构的认可，绝不能替代这些机构发布的官方警报、警告或通知。\n\n版权所有 © 2024 DeepMind Technologies Limited。\n\n\n## 引用\n\n如果您使用本工作，请考虑引用我们的论文（[博客文章](https:\u002F\u002Fdeepmind.google\u002Fdiscover\u002Fblog\u002Fgraphcast-ai-model-for-faster-and-more-accurate-global-weather-forecasting\u002F)、[Science](https:\u002F\u002Fwww.science.org\u002Fdoi\u002F10.1126\u002Fscience.adi2336)、[arXiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2212.12794)、[arXiv GenCast](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.15796))：\n\n```latex\n@article{lam2023learning,\n  title={Learning skillful medium-range global weather forecasting},\n  author={Lam, Remi and Sanchez-Gonzalez, Alvaro and Willson, Matthew and Wirnsberger, Peter and Fortunato, Meire and Alet, Ferran and Ravuri, Suman and Ewalds, Timo and Eaton-Rosen, Zach and Hu, Weihua and others},\n  journal={Science},\n  volume={382},\n  number={6677},\n  pages={1416--1421},\n  year={2023},\n  publisher={American Association for the Advancement of Science}\n}\n```\n\n\n```latex\n@article{price2023gencast,\n  title={GenCast: Diffusion-based ensemble forecasting for medium-range weather},\n  author={Price, Ilan and Sanchez-Gonzalez, Alvaro and Alet, Ferran and Andersson, Tom R and El-Kadi, Andrew and Masters, Dominic and Ewalds, Timo and Stott, Jacklynn and Mohamed, Shakir and Battaglia, Peter and Lam, Remi and Willson, Matthew},\n  journal={arXiv preprint arXiv:2312.15796},\n  year={2023}\n}\n```\n\n## 致谢\n\n(i) GenCast 和 GraphCast 与以下独立的库和软件包进行通信和\u002F或引用；Colab 笔记本中包含若干个 ECMWF 的 ERA5 和 HRES 数据示例，这些数据可用作模型的输入。\n\n欧洲中期天气预报中心（ECMWF）的数据和产品，经谷歌修改而成。  \n哥白尼气候变化服务信息已作修改，2023 年。欧盟委员会和 ECMWF 对任何可能使用该哥白尼信息或其所含数据的行为概不负责。\n\nECMWF HRES 数据集  \n版权声明：版权所有 © 2023 欧洲中期天气预报中心（ECMWF）。  \n来源：www.ecmwf.int  \n许可声明：ECMWF 开放数据根据知识共享署名 4.0 国际许可协议（CC BY 4.0）发布。https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby\u002F4.0\u002F  \n免责声明：对于数据中的任何错误或遗漏、数据的可用性，以及因使用这些数据而引起的任何损失或损害，ECMWF 概不承担任何责任。\n\n上述第三方材料的使用可能受单独的条款与条件或许可规定约束。您对第三方材料的使用须遵守相关条款，且在使用前应确认自己能够遵守所有适用的限制或条款与条件。\n\n\n## 联系方式\n\n如需反馈或有任何问题，请发送邮件至 gencast@google.com。通过电子邮件收集的任何信息将按照 [Google 隐私政策](http:\u002F\u002Fpolicies.google.com\u002Fprivacy) 处理。","# GraphCast & GenCast 快速上手指南\n\n本指南基于 Google DeepMind 开源的天气预测模型 GraphCast 和 GenCast，帮助开发者快速在本地或云端环境中运行预训练模型。\n\n## 1. 环境准备\n\n### 系统要求\n*   **操作系统**: Linux (推荐) 或 macOS。Windows 用户建议使用 WSL2 或 Docker。\n*   **硬件**:\n    *   **CPU**: 支持 AVX 指令集。\n    *   **GPU\u002FTPU**: 推荐使用 NVIDIA GPU (需安装 CUDA) 或 Google Cloud TPU 以获得最佳推理速度。\n    *   **内存**: 运行高分辨率模型（0.25°）建议至少 32GB RAM；运行 `GenCast Mini` 或 `GraphCast_small` 可降低至 16GB。\n*   **Python**: 3.9 或更高版本。\n\n### 前置依赖\n项目主要依赖 JAX 生态及相关科学计算库：\n*   JAX, Haiku, Chex, Dinosaur, Jraph\n*   XArray, Dask, Pandas, NumPy, SciPy\n*   Trimesh\n\n> **注意**：国内用户若遇到 PyPI 下载缓慢，建议在安装命令中指定清华或阿里镜像源。\n\n## 2. 安装步骤\n\n### 步骤一：克隆代码仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast.git\ncd graphcast\n```\n\n### 步骤二：创建虚拟环境并安装依赖\n推荐使用 `venv` 或 `conda` 隔离环境。以下以 `pip` 为例（包含国内镜像加速）：\n\n```bash\npython -m venv venv\nsource venv\u002Fbin\u002Factivate  # Windows 用户使用: venv\\Scripts\\activate\n\n# 安装核心依赖 (使用清华镜像加速)\npip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n\n# 如果 requirements.txt 未包含所有特定版本，手动安装关键库\npip install jax[cpu] chex dm-haiku dinosaur jraph xarray dask pandas scipy trimesh tree -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n*注：若需使用 GPU，请将 `jax[cpu]` 替换为对应的 `jax[cuda12_pip]` (根据 CUDA 版本调整)。*\n\n### 步骤三：获取预训练权重与数据\n模型权重、归一化统计信息及示例数据存储在 Google Cloud Bucket。\n*   **手动下载**: 访问 [Google Cloud Console](https:\u002F\u002Fconsole.cloud.google.com\u002Fstorage\u002Fbrowser\u002Fdm_graphcast) 下载所需模型文件夹（如 `graphcast\u002F` 或 `gencast\u002F`）到本地项目目录。\n*   **程序加载**: 代码示例中通常配置了直接从 GCS 加载的逻辑，但需确保网络通畅或配置好 `gcloud` 认证。\n\n## 3. 基本使用\n\n最快捷的上手方式是使用官方提供的 Jupyter Notebook 示例。\n\n### 方案 A：使用 Google Colab (推荐初学者)\n无需本地配置环境，直接在浏览器运行。\n\n1.  **GraphCast 演示**:\n    打开 [graphcast_demo.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fdeepmind\u002Fgraphcast\u002Fblob\u002Fmaster\u002Fgraphcast_demo.ipynb)\n    *   功能：加载数据、载入预训练权重、生成单步预测、计算损失与梯度。\n\n2.  **GenCast Mini 演示** (低资源消耗):\n    打开 [gencast_mini_demo.ipynb](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fdeepmind\u002Fgraphcast\u002Fblob\u002Fmaster\u002Fgencast_mini_demo.ipynb)\n    *   功能：演示基于扩散模型的集合预报，适合免费版 Colab 运行。\n\n### 方案 B：本地运行示例代码\n\n确保已下载权重文件至对应子目录（如 `graphcast\u002F`），然后运行以下 Python 脚本逻辑：\n\n```python\nimport xarray\nimport jax\nfrom graphcast import graphcast, checkpoint, data_utils, normalization\n\n# 1. 加载示例输入数据 (需先下载示例数据或使用 ERA5 格式数据)\n# 假设 inputs 是一个包含时间、纬度、经度及气象变量的 xarray Dataset\ninputs = ... \n\n# 2. 初始化模型参数\n# 加载预训练权重快照\nparams = checkpoint.load(\"path\u002Fto\u002Fgraphcast_params.pkl\")\n\n# 3. 构建模型实例\nmodel = graphcast.GraphCast(\n    mesh_size=6, # 根据具体模型版本调整\n    # ... 其他参数需与预训练权重匹配\n)\n\n# 4. 执行预测 (单步)\n# 注意：实际使用时通常配合 autoregressive.py 进行多步自回归预测\npredictions = model.apply(params, inputs)\n\nprint(\"预测完成:\", predictions)\n```\n\n### 可用预训练模型概览\n\n| 模型名称 | 分辨率 | 特点 | 适用场景 |\n| :--- | :--- | :--- | :--- |\n| **GraphCast** | 0.25° | 高精度，37 个气压层 | 科研、高精度预报 |\n| **GraphCast_small** | 1.0° | 低显存占用，13 个气压层 | 资源受限环境测试 |\n| **GraphCast_operational** | 0.25° | 经 HRES 微调，支持业务初始化 | 接近业务场景的模拟 |\n| **GenCast 1p0deg Mini** | 1.0° | 最小显存占用，扩散模型 | 快速演示、集合预报学习 |\n\n> **提示**: 完整训练需自行下载 [ERA5](https:\u002F\u002Fwww.ecmwf.int\u002Fen\u002Fforecasts\u002Fdatasets\u002Freanalysis-datasets\u002Fera5) 数据集，并通过 WeatherBench2 格式转换为 Zarr 存储。","某省级气象中心的预报团队正面临台风路径预测的紧急任务，需要在极短时间内生成高精度的中期天气集合预报以指导防灾减灾。\n\n### 没有 graphcast 时\n- 依赖传统数值天气预报模式，单次运行需在超级计算机上耗时数小时，难以满足突发天气的即时响应需求。\n- 确定性预报无法有效量化不确定性，面对复杂大气系统时，缺乏多场景推演能力，导致决策风险较高。\n- 模型分辨率受限，难以捕捉小尺度极端天气特征，且随着预报时效延长，误差累积迅速，准确率大幅下降。\n- 运维成本高昂，需要维护庞大的物理方程组代码库及专用硬件设施，迭代更新新算法的周期长达数月。\n\n### 使用 graphcast 后\n- 利用预训练的 GenCast 模型，在单块 GPU 上即可在几分钟内完成未来 10 天的全球高分辨率集合预报，响应速度提升百倍。\n- 基于扩散模型的生成式架构天然支持集合预报，能一次性输出多种可能的天气演变路径，清晰展示台风登陆的概率分布。\n- 0.25 度的高分辨率网格结合图神经网络技术，精准还原了气压场与风场的细微结构，显著降低了中长期预报的累积误差。\n- 直接调用 Google DeepMind 提供的预训练权重与标准化接口，团队无需从头训练，仅需少量本地数据进行微调即可部署业务。\n\ngraphcast 将原本需要超算集群跑半天的任务压缩至分钟级，同时通过概率化预测大幅提升了极端天气应对的科学性与安全性。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgoogle-deepmind_graphcast_dab6fa36.png","google-deepmind","Google DeepMind","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fgoogle-deepmind_06b1dd17.png","","https:\u002F\u002Fwww.deepmind.com\u002F","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind",[83,87],{"name":84,"color":85,"percentage":86},"Python","#3572A5",81.7,{"name":88,"color":89,"percentage":90},"Jupyter Notebook","#DA5B0B",18.3,6597,860,"2026-04-17T14:14:53","Apache-2.0",5,"Linux","运行大型模型（0.25 度分辨率）需要 Google Cloud TPU VM 或配备特定 Attention 实现的 GPU；小型模型（GenCast Mini）可在免费 Colab 笔记本中运行。具体显存和 CUDA 版本未说明，但需支持 JAX。","未说明（大型模型需要高内存，小型模型 GenCast Mini 专为低资源演示设计）",{"notes":100,"python":101,"dependencies":102},"1. 核心框架为 JAX 而非 PyTorch。2. 完整训练需下载 ERA5 数据集（受单独条款约束）。3. 提供多种预训练模型，其中'GenCast 1p0deg Mini'和'GraphCast_small'适用于低算力环境或免费 Colab。4. 在 GPU 上运行 GenCast 需要使用不同的 Attention 实现。5. 模型权重采用 CC BY-NC-SA 4.0 许可（非商业用途）。6. 数据存储在 Google Cloud Bucket 中。","未说明",[103,104,105,106,107,108,109,110,111,112],"JAX","Haiku","Chex","Dask","XArray","Numpy","Pandas","SciPy","Trimesh","Jraph",[18],[115,116],"weather","weather-forecast","2026-03-27T02:49:30.150509","2026-04-18T09:19:34.819740",[120,125,130,135,140,144,148],{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},39035,"GenCast 或 GraphCast 是否必须在 GPU\u002FTPU 上运行？在 AMD CPU 上运行遇到报错怎么办？","模型默认会尝试使用 GPU，如果未安装 CUDA-enabled jaxlib，会自动回退到 CPU。如果在 CPU 上运行遇到特定报错（如 stack trace），这通常与 JAX 的精度问题或 bug 有关。临时解决方案是将代码中的 `jnp.where` 替换为 `jnp.maximum`，或者尝试将计算重写为平方差形式 `(x2 - x1)(x2 + x1)`。维护者确认 `jnp.maximum` 通常开销更小且能解决该问题。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fissues\u002F113",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},39036,"如何评估模型在特定局部区域（如北美）的性能？","可以通过添加特定的经纬度点来筛选数据，然后仅在这些点上测量误差。具体做法是利用 xarray 或其他数据处理库，根据经纬度范围对预测结果和真实值进行切片（slice），然后计算切片后数据的误差指标。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fissues\u002F46",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},39037,"为什么模型预测的近地表温度（T1000, T2m）没有显示出预期的昼夜变化周期？","这通常是因为加载了错误的检查点（checkpoint），导致模型使用的是随机权重而非训练好的权重。请确保在 Colab 或代码中明确指定并强制加载正确的预训练检查点文件，而不是依赖可能出错的下拉菜单自动选择。加载正确权重后，昼夜循环应能正常显示。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fissues\u002F183",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},39038,"如何在 GPU 上实现确定性（可复现）的推理结果？","在 GPU 上完全消除非确定性较难，但可以尝试以下方法：1. 禁用 JIT 编译（`jax.disable_jit()`）；2. 启用 64 位浮点数（设置 `jax_enable_x64=true`），以防归一化过程中的精度损失导致差异；3. 如果速度不是首要考虑因素，切换到 CPU 运行可获得完全确定的结果。注意即使设置了相同的 JAX seed，GPU 的非确定性操作仍可能导致微小差异。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fissues\u002F79",{"id":141,"question_zh":142,"answer_zh":143,"source_url":139},39039,"如何获取单个时间步的损失（loss）值以便进行可视化分析？","默认的 loss 计算函数通常返回时间窗口内的平均值。要获取单个时间步的损失，需要修改 `loss.py` 文件中的代码，找到计算损失的部分，将其改为输出每个时间步的独立损失值，而不是对整个时间段求平均。这样可以生成随时间步变化的损失曲线图。",{"id":145,"question_zh":146,"answer_zh":147,"source_url":134},39040,"如何将 GraphCast 的预测步长从默认的 40 步扩展到更长（如 240 步\u002F60 天）？需要注意什么？","扩展预测步长需要：1. 使用 xarray 库创建包含更多时间步的 `targets_template`；2. 正确处理随时间变化的强迫变量（forcings，如 TOA 太阳辐射），需调用 `data_utils.py` 中的相关函数为新的时间点生成强迫数据；3. 确保区分时间相关变量和常数输入变量。注意不要简单重复强迫数据，而应根据具体时间重新计算，以避免形状不匹配或物理意义错误。",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},39041,"初次训练时 Loss 和梯度值波动较大是否正常？训练后推理结果为噪声怎么办？","训练初期 Loss 和梯度波动是可能的，但如果训练多个 epoch（如 16 个）后推理结果仍是噪声，可能存在工作流问题。常见原因包括：1. 优化器状态未在适当时候重置（参考 Issue #154）；2. 训练轮数不足；3. 数据预处理或强迫变量设置错误。建议检查优化器初始化逻辑，并确认是否加载了正确的检查点进行推理验证。","https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgraphcast\u002Fissues\u002F119",[154,159,163],{"id":155,"version":156,"summary_zh":157,"released_at":158},314951,"v0.2","* 定期维护更新。","2026-03-30T18:02:13",{"id":160,"version":161,"summary_zh":157,"released_at":162},314952,"v0.1.1","2024-10-09T11:41:17",{"id":164,"version":165,"summary_zh":166,"released_at":167},314953,"v0.1","初始发布。","2023-10-31T15:24:42"]