MCT The Model Coupling Toolkit MCT Supported by
偶合器設計 – MCT介紹 • • The Model Coupling Toolkit (MCT) Supported by U. S. Department of Energy A set of open-source software tools for creating coupled models Fully parallel and can be used to couple message-passing parallel Be a model to create a parallel coupled model Available as a small library and a set of Fortran 90 modules MCT users: • CESM • E 3 SM • OASIS-MCT • COWAST • WRF/ROMS Hurricane model
偶合器設計 – 主驅動器 作 MPI初始化 call MPI_INIT(ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD, ncores, ierr) call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr) 0 1 2 3 4 5 6 7 MPI_COMM_WORLD = 0 ncores = 8 Rank = 0~7 0 1 2 3 4 5 6 7 0 0 1 1 MPI_COMM_WORLD = 0 ncores = 8 Rank = 0~7 Splitcomm = 3 分配計算資源 if (rank. lt. nprocs/2) then color = 0 else color = 1 endif call MPI_COMM_SPLIT(MPI_COMM_WORLD, color, 0, & splitcomm, ierr) 呼叫大氣與海洋模式 select case (color) case(0) call gfcst(splitcomm, ncomps, compid) case(1) call timcom_global(splitcomm, ncomps, compid) end select gfcst timcom_global ncomps = 2 Atm. ID=1 Ocn. ID=2 compid(1)=Atm. ID compid(2)=Ocn. ID
偶合器設計 – 大氣模式 作 取得MPI環境變數 call MPI_COMM_SIZE(splitcomm, nprocs, ierr) call MPI_COMM_RANK(splitcomm, myrank, ierr) 0 0 1 1 2 2 3 3 4 5 0 大氣模式 6 1 MPI_COMM_WORLD = 0 Splitcomm = 3 nprocs = 4 Myrank = 0~3 7 2 3 海洋模式 MCT初始化 call MCTWorld_init(ncomps, MPI_COMM_WORLD, & splitcomm, compid(1)) 0 1 2 偶合介面 3 ncomps = 2 Atm. ID=1 Ocn. ID=2 compid(1)=Atm. ID compid(2)=Ocn. ID 雖然組成模式跟偶合介面共用計算資源,但在進 行偶合資料傳輸或運算時,MCT會將變數存成一 維陣列來提升處理資料的效能。
37 偶合器設計 – local與global grid的對應關係 38 39 40 Global Grid 53 56 9 10 11 12 45 48 5 6 7 8 37 40 1 2 3 4 24 9 16 3 4 47 13 14 15 16 17 2 46 64 32 1 Local Grid in cpu rank 3 61 25 5 6 7 8 45 CPU rank 3中的 local grid 與 global grid的對應關係 48 53 54 55 使用MPI時會將global grid分拆到各計算核心時,每 個計算核心會有自己相對於全體的編號(ex: rank 0 -3)。 56 使用MCT時必須建立起每個計算核心中的local grid對 應到global grid的關係,並以一維陣列的結構儲存變數。 62 61 63 64
偶合器設計 – 資料傳輸通道 call Global. Seg. Map_init(Atm. GSMap, strt, leng, rank_root, splitcomm, compid(1)) Global. Seg. Map_init(Ocn. GSMap, strt, leng, rank_root, splitcomm, compid(1)) Router_init(compid(2), Atm. GSMap, splitcomm, atm_recv_ocn_Rout) Router_init(compid(2), Ocn. GSMap, splitcomm, atm_send_ocn_Rout) call Attr. Vect_init(Atm. AV, r. List=“sst", lsize=avsize) Attr. Vect_init(Ocn. AV, r. List=“wind: qflux: hflux: rs: ss: preci", lsize=avsize) MCT_Send(Ocn. AV, atm_send_ocn_Rout) MCT_Recv(Atm. AV, atm_recv_ocn_Rout) 大氣模式 0 1 2 海洋模式 3 atm_recv_ocn_Rout 偶合介面 atm_send_ocn_Rout 0 1 2 偶合介面 3
大氣與海洋的交換通量 風應力(dyne/cm^2) Wind stress 熱通量(Watt/m^2) Sensible heat + latent heat + net long wave + net short wave 質量通量(kg/M^2/sec) Precipitation + evaporation + river run-off
大氣與海洋的交換通量 -風應力(dyne/cm^2) CWBGFS model TIMCOM mdoel u 10 atm_u 10 v 10 atm_v 10 wind vector wind intensity sqrt(u 10^2+v 10^ 2) Air density slp/t 2/287. 05 : 海表面流速向量 www cd_mom, f(www) Drag Coef. rho_air : 海表面風應力向量 : 海表面空氣密度,由海表壓力與溫度計算 : 阻力係數,風速與大氣穩度函數 : 10米高風速向量
大氣與海洋的交換通量 -質量通量(kg/M^2/sec) CWBGFS model TIMCOM mdoel precipitation prec totalp : 降雨(mm/sec) evaporation River run-off -qflux/hltm evapo : 海表面鹽度 : 水的密度,1000(kg/m^3) qflux : 潛熱流 : 水氣潛熱,2. 5 e 6(J/Kg) corrected normal year forcing version 2. 0* *http: //data 1. gfdl. noaa. gov/nomads/forms/core/COREv 2/CNYF_v 2. htm
定性分析 – outgoing longwave radiation new. SAS tietke 顏色分布為 10 S-10 N的平均值
定性分析 – heat flux Latent heat sensible heat 紅色為雨量
定性分析 – heat flux Net longwave radiation Net shortwave radiation 紅色為雨量
定量分析 – R. M. S score=avg(cpl-gfs) 500 mb height Sea level pressure 850 mb temperature new. SAS 20 N – 80 N tietke 10 S – 10 N new. SAS tietke -6. 30 5. 00 2. 08 3. 64 -0. 38 0. 44 -0. 23 -0. 05 -0. 38 0. 05 -0. 14 -0. 07
Thanks for Your Attention
- Slides: 27