# GFS Graphcast 測試記錄 :::info [TOC] ::: ## GFS 模型運行 ### 安裝 ```cmd= git clone https://github.com/NOAA-EMC/graphcast.git ``` 透過上述指令將gfs model的執行腳本、套件進行抓取 ### 資料製作 ```cmd= python gdas_utility.py startdate enddate --level 13 --source s3 --output /path/to/output --download /path/to/download --method wgrib2 --keep no ``` 在抓取下來的資料夾中,進入到NCEP資料夾執行上述指令,製作GDS model執行的nc file * startdate / enddate : 定義起始時間以及終止時間,格式為yyyymmddhh * -l / --level : 選定對應graphcast level 的資料 (可選:17、37) * -s / --source : 選定以s3或nomads去抓取gdas data * -m / -–method : 選定抓取資料的方式 (可選: wgrib2 、 pygrib) * -o / -–output: 選定抓取的檔案存放路徑 * -d / -–download: 選定抓取的grib檔案存放路徑 * -k / -–keep: 決定抓取的grib在轉檔後是否要留下 (可選: yes、no) ### 運行模型 ```cmd= python run_graphcast.py --input /input/filename/with/path --output /path/to/output --weights /path/to/weights --length forecast_length ``` * -i / -–input: 指定nc檔案的路徑 * -o / -–output: 指定模型輸出結果存放位置 * -w / -–weights: 指定graphcast模型權重、正規化等權值檔案的位置(檔案須從Google Bucket自行抓取,放入指定路徑,路徑/params放模型權重、路徑/stats放正規化權值) * -l / -–length: 選定預測時常,1單位為6小時,舉例來說,要預測連續10天,輸入 -l 40 * -p / -–pressure: 指定模型的氣壓層數,預設為13 (可選:17、37) ### 問題 * 使用文件提供的方法抓取的nc檔案,在運行grphcast時會遇到keyerror的錯誤,但無法確認實際資料缺漏 ![image](https://hackmd.io/_uploads/ByfQC_0rC.png) ### 安裝說明原網址 https://graphcastgfs.readthedocs.io/en/latest/introduction.html --- ## NC轉GRIB運行Graphcast ### 問題 * 使用台灣杉3號上的cdo module 去執行nc轉grib的任務,但檔案在轉格式時,會出現變數資料結構沒有被支援,導致資料轉檔時出現缺漏的問題。 * 當前測試過TWCC上不同version的cdo模組,都會遇到相同問題 ![image](https://hackmd.io/_uploads/B1oYT_ABR.png)