亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? phys_grid.f90

?? CCSM Research Tools: Community Atmosphere Model (CAM)
?? F90
?? 第 1 頁 / 共 5 頁
字號:
#include <misc.h>module phys_grid!----------------------------------------------------------------------- ! ! Purpose: Definition of physics computational horizontal grid.!! Method: Variables are private; interface routines used to extract!         information for use in user code.! ! Entry points:!      phy_grid_init       initialize chunk'ed data structure!!      get_chunk_indices_p get local chunk index range!      get_ncols_p         get number of columns for a given chunk!      get_xxx_all_p       get global indices or coordinates for a given!                          chunk!      get_xxx_vec_p       get global indices or coordinates for a subset!                          of the columns in a chunk!      get_xxx_p           get global indices or coordinates for a single!                          column!      where xxx is!       lat                for global latitude index!       lon                for global longitude index!       rlat               for latitude coordinate (in radians)!       rlon               for longitude coordinate (in radians)!!      get_chunk_coord_p   get local chunk and column indices!                          for given (lon,lat) coordinates!!      scatter_field_to_chunk!                          distribute longitude/latitude field!                          to decomposed chunk data structure!      gather_chunk_to_field!                          reconstruct longitude/latitude field!                          from decomposed chunk data structure!!      read_chunk_from_field!                          read and distribute longitude/latitude field!                          to decomposed chunk data structure!      write_field_from_chunk!                          write longitude/latitude field!                          from decomposed chunk data structure!!      block_to_chunk_send_pters!                          return pointers into send buffer where data!                          from decomposed longitude/latitude fields should!                          be copied to!      block_to_chunk_recv_pters!                          return pointers into receive buffer where data!                          for decomposed chunk data structures should!                          be copied from!      transpose_block_to_chunk!                          transpose buffer containing decomposed !                          longitude/latitude fields to buffer!                          containing decomposed chunk data structures!!      chunk_to_block_send_pters!                          return pointers into send buffer where data!                          from decomposed chunk data structures should!                          be copied to!      chunk_to_block_recv_pters!                          return pointers into receive buffer where data!                          for decomposed longitude/latitude fields should!                          be copied from!      transpose_chunk_to_block!                          transpose buffer containing decomposed!                          chunk data structures to buffer!                          containing decomposed longitude/latitude fields!!      chunk_index         identify whether index is for a latitude or!                          a chunk!! Author: John Drake and Patrick Worley! !-----------------------------------------------------------------------   use precision   use ppgrid, only: pcols, pver, begchunk, endchunk   use pmgrid, only: plon, plat, beglat, endlat#if ( defined SPMD )   use spmd_dyn, only: proc, npes   use mpishorthand#endif   save#if ( ! defined SPMD )   integer :: npes = 1#endif   integer :: nlthreads                ! number of local OpenMP threads   integer, dimension(:), allocatable, private :: npthreads                                       ! number of OpenMP threads per process   integer :: ngthreads                ! total number of threads! chunk data structures   type chunk     integer  :: ncols                 ! number of vertical columns     integer  :: lon(pcols)            ! global longitude indices     integer  :: lat(pcols)            ! global latitude indices     integer  :: owner                 ! id of process where chunk assigned     integer  :: lchunk                ! local chunk index   end type chunk   integer :: nchunks                  ! global chunk count   type (chunk), dimension(:), allocatable, private :: chunks                                         ! global computational grid   integer, private :: nlchunks        ! local chunk count   integer, dimension(:), allocatable, private :: lchunks                                        ! local chunks   type knuhc     integer  :: chunkid               ! chunk id     integer  :: col                   ! column index in chunk   end type knuhc   type (knuhc), dimension(:,:), allocatable, private :: knuhcs                                       ! map from global (lon,lat) coordinates                                       ! to chunk'ed grid! column mapping data structures   type column_map     integer  :: chunk                 ! global chunk index     integer  :: ccol                  ! column ordering in chunk   end type column_map   integer :: ngcols                   ! global column count   integer :: nlcols                   ! local column count   type (column_map), dimension(:), allocatable, private :: pgcols                                       ! ordered list of columns (for use in gather/scatter)                                       ! NOTE: consistent with local ordering! column remap data structures   integer, dimension(:), allocatable, private :: gs_col_num                                       ! number of columns scattered to each process in                                       ! field_to_chunk scatter   integer, dimension(:), allocatable, private :: gs_col_offset                                       ! offset of columns (-1) in pgcols scattered to                                       ! each process in field_to_chunk scatter   integer, dimension(:), allocatable, private :: btofc_blk_num                                       ! number of grid points scattered to each process in                                       ! block_to_chunk alltoallv, and gathered from each                                       ! process in chunk_to_block alltoallv   integer, dimension(:), allocatable, private :: btofc_chk_num                                       ! number of grid points gathered from each process in                                       ! block_to_chunk alltoallv, and scattered to each                                       ! process in chunk_to_block alltoallv   type btofc_pters     integer :: ncols                  ! number of columns in block     integer :: nlvls                  ! number of levels in columns     integer, dimension(:,:), pointer :: pter    end type btofc_pters   type (btofc_pters), dimension(:), allocatable, private :: btofc_blk_offset                                       ! offset in btoc send array (-1) where                                        ! (blockid, bcid, k) column should be packed in                                       ! block_to_chunk alltoallv, AND                                       ! offset in ctob receive array (-1) from which                                       ! (blockid, bcid, k) column should be unpacked in                                       ! chunk_to_block alltoallv   type (btofc_pters), dimension(:), allocatable, private :: btofc_chk_offset                                       ! offset in btoc receive array (-1) from which                                       ! (lchnk, i, k) data should be unpacked in                                       ! block_to_chunk alltoallv, AND                                       ! offset in ctob send array (-1) where                                       ! (lchnk, i, k) data should be packed in                                       ! chunk_to_block alltoallv   integer :: block_buf_nrecs          ! number of local grid points (lon,lat,lev)                                       ! in dynamics decomposition (including level 0)   integer :: chunk_buf_nrecs          ! number of local grid points (lon,lat,lev)                                       ! in physics decomposition (including level 0)! miscellaneous phys_grid data   real(r8) :: clat_p(plat)            ! physics grid latitudes (radians)   integer  :: nlon_p(plat)            ! num longitudes per latitude   real(r8) :: clon_p(plon,plat)       ! physics grid longitudes (radians)   logical :: physgrid_set = .false.   ! flag indicates physics grid has been set   logical :: local_dp_map = .false.   ! flag indicates that mapping between dynamics                                        ! and physics decompositions does not require                                        ! interprocessor communicationcontains!========================================================================   subroutine phys_grid_init(opt, chunks_per_thread)!----------------------------------------------------------------------- ! ! Purpose: Physics mapping initialization routine:  ! ! Method: ! ! Author: John Drake and Patrick Worley! !-----------------------------------------------------------------------   use precision   use pmgrid, only: iam, plev, plond, platd   use pspect, only: pmmax, pnmax   use rgrid, only: nlon   use commap, only: clat, clon   use dyn_grid, only: get_block_coord_cnt_d, get_block_coord_d, &                       get_block_col_cnt_d, get_block_lvl_cnt_d, &                       get_lon_d, get_lat_d, get_block_bounds_d, &                       get_block_owner_d, get_block_levels_d   implicit none!!------------------------------Arguments--------------------------------!   integer, intent(in)  :: chunks_per_thread ! target number of chunks                                         !  per thread   integer, intent(in)  :: opt           ! grid optimization option                                         ! -1: each chunk is a latitude line                                         !  0: chunks do not cross latitude boundaries!!---------------------------Local workspace-----------------------------!   integer :: i, j, jb, k, lchnk, p      ! loop indices   integer :: tchunks                    ! target number of chunks per thread   integer :: cbeg                       ! beginning longitude index for                                          !  current chunk   integer :: cid                        ! chunk id   integer :: pchunkid                   ! chunk global ordering   integer :: begpchunk, endpchunk       ! segment of chunk global ordering on                                          !  a given process   integer :: plchunks                   ! number of chunks for a given process   integer :: curgcol                    ! current global column index   integer :: firstblock, lastblock      ! global block indices   integer :: blksiz                     ! current block size   integer :: glbcnt, curcnt             ! running grid point counts   integer :: curp                       ! current process id   integer :: block_cnt                  ! number of blocks containing data                                         ! for a given vertical column   integer :: numlvl                     ! number of vertical levels in block                                          ! column   integer :: levels(plev+1)             ! vertical level indices   integer :: owner_d                    ! processor owning given block column   integer :: owner_p                    ! processor owning given chunk column   integer :: ncol                       ! number of columns in current chunk   integer :: blockids(plev+1)           ! block indices   integer :: bcids(plev+1)              ! block column indices   integer :: glon, glat                 ! global (lon,lat) indices   integer :: ntmp1, ntmp2               ! work variables!-----------------------------------------------------------------------!! Initialize physics grid, using dynamics grid!   do j=1,plat      clat_p(j) = clat(j)      nlon_p(j) = nlon(j)      do i=1,nlon(j)         clon_p(i,j) = clon(i,j)      enddo   enddo!! Determine total number of columns and block index bounds!   ngcols = 0   do j=1,plat      ngcols = ngcols + nlon_p(j)   enddo   call get_block_bounds_d(firstblock,lastblock)!! Option -1: each latitude line is a single chunk, same as 1D dynamics decompositions.!               if (opt == -1) then!! Check that pcols == plon!      if (pcols /= plon) then         write(6,*) "PHYS_GRID_INIT error: opt -1 specified, but PCOLS /= PLON"         call endrun()      endif!! Determine total number of chunks!      nchunks = plat!! Allocate and initialize chunks and knuhcs data structures!      allocate ( chunks(1:nchunks) )      allocate ( knuhcs(1:plond, 1:platd) )      cid = 0      do j=1,plat         chunks(j)%ncols = nlon_p(j)         do i=1,chunks(j)%ncols            chunks(j)%lon(i) = i            chunks(j)%lat(i) = j            knuhcs(i,j)%chunkid = j            knuhcs(i,j)%col = i         enddo      enddo!! Determine parallel decomposition (assuming 1D latitude decomposition in dynamics)!      do j=1,plat#if (defined SPMD)         chunks(j)%owner = proc(j)#else         chunks(j)%owner = 0#endif      enddo!! (including allocating and initializing data structures for gather/scatter)!        allocate ( pgcols(1:ngcols) )      allocate ( gs_col_num(0:npes-1) )      allocate ( gs_col_offset(0:npes) )      pchunkid = 0      endpchunk = 0      curgcol = 0      do p=0,npes-1         gs_col_offset(p) = curgcol + 1         begpchunk = endpchunk + 1         plchunks = 0         gs_col_num(p) = 0         do cid=1,nchunks            if (chunks(cid)%owner == p) then               pchunkid = pchunkid + 1               plchunks = plchunks + 1               do i=1,chunks(cid)%ncols                  curgcol = curgcol + 1                  pgcols(curgcol)%chunk = cid                  pgcols(curgcol)%ccol = i                  gs_col_num(p) = gs_col_num(p) + 1               enddo            endif         enddo         endpchunk = begpchunk + plchunks - 1      enddo      gs_col_offset(npes) = curgcol + 1      do j=1,plat         chunks(j)%lchunk = j      enddo      nlchunks = endlat-beglat+1      nlcols = gs_col_num(iam)!! Local chunk indices are identical to global latitudes {beglat,...,endlat}!      begchunk = beglat      endchunk = endlat      allocate ( lchunks(begchunk:endchunk) )      do j=begchunk,endchunk         lchunks(j) = j      enddo!! Set flag indicating columns in physics and dynamics ! decompositions reside on the same processors!      local_dp_map = .true. !   else!! Option == 0: split local longitude/latitude blocks into chunks,!               while attempting to create load-balanced chunks! Option == 1: load balance chunks and assignment, attempting to!                also minimize communication costs! Option == 2: split local longitude/latitude blocks into chunks,!               assigning columns using block ordering! Option == 3: split indiviudal longitude/latitude blocks into chunks,!               assigning columns using block ordering (default)!! Allocate and initialize chunks and knuhcs data structures.!      call create_chunks(opt, chunks_per_thread)!! Assign chunks to processes.!      call assign_chunks(opt)!! Determine whether dynamics and physics decompositions! are colocated, not requiring any interprocessor communication! in the coupling.      local_dp_map = .true.         do cid=1,nchunks         do i=1,chunks(cid)%ncols            glon = chunks(cid)%lon(i)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜乳av一区二区| 亚洲精品久久久蜜桃| 另类小说色综合网站| 欧美一级在线视频| 国产在线国偷精品产拍免费yy| 日韩亚洲欧美中文三级| 国产麻豆成人精品| 国产精品国产精品国产专区不蜜| 91蜜桃免费观看视频| 亚洲一区在线电影| 日韩一区二区三区视频| 黄色成人免费在线| 亚洲欧洲精品成人久久奇米网| 欧洲中文字幕精品| 奇米精品一区二区三区在线观看| 久久久午夜电影| 99精品久久只有精品| 午夜激情综合网| 精品国产3级a| 91免费视频网| 美国十次了思思久久精品导航| 国产精品丝袜久久久久久app| 欧美这里有精品| 久久福利视频一区二区| 亚洲天天做日日做天天谢日日欢| 在线成人av影院| 成人免费视频caoporn| 亚洲第一二三四区| 久久综合色鬼综合色| av在线不卡网| 欧美日韩一区成人| 久久影院视频免费| 国产制服丝袜一区| 亚洲黄网站在线观看| 日韩一区二区三区三四区视频在线观看| 国内外成人在线| 一区二区三区日韩精品视频| 精品国产伦一区二区三区免费 | 日韩亚洲国产中文字幕欧美| 国产成人精品一区二区三区网站观看| 一区二区三区中文字幕在线观看| 欧美不卡在线视频| 欧美视频中文一区二区三区在线观看| 国产一区二区三区免费播放| 亚洲一区二区三区免费视频| 国产欧美1区2区3区| 欧美一区二区三区播放老司机 | 91蜜桃免费观看视频| 国产一区二区三区高清播放| 午夜精品一区二区三区三上悠亚| 91免费观看视频在线| 久久久久综合网| 欧美日韩一区二区三区在线看| 国产成人午夜视频| 日本美女一区二区三区视频| 亚洲黄色免费电影| 国产精品理论在线观看| 久久免费美女视频| 日韩一区二区三区在线| 欧美日韩不卡视频| 欧美视频在线观看一区二区| 99久久综合色| 成人深夜视频在线观看| 国精产品一区一区三区mba视频| 日本在线不卡视频一二三区| 亚洲最大色网站| 亚洲日本韩国一区| 亚洲欧美精品午睡沙发| 亚洲欧洲成人精品av97| **欧美大码日韩| 日韩理论片网站| 国产精品另类一区| 中文字幕一区二区视频| 中文字幕一区免费在线观看 | 欧美日韩一区二区在线视频| 欧美在线观看18| 日本韩国一区二区三区视频| 成人h动漫精品| 色综合婷婷久久| 中文字幕视频一区| 制服丝袜一区二区三区| 欧洲中文字幕精品| 91日韩精品一区| 99精品久久只有精品| 91麻豆精品在线观看| 亚洲丝袜制服诱惑| 一区二区三区精品在线| 精品免费视频.| 蜜臀av一区二区三区| 一区二区三区欧美亚洲| 伊人性伊人情综合网| 亚洲国产日产av| 日韩成人免费电影| 国产麻豆视频一区| 99久久99久久精品免费看蜜桃| 色综合视频一区二区三区高清| 欧美性一级生活| 日韩一区二区三区电影在线观看| 欧美成人国产一区二区| 国产亚洲一区字幕| 亚洲免费在线播放| 日韩综合在线视频| 精品国产91洋老外米糕| |精品福利一区二区三区| 精品粉嫩aⅴ一区二区三区四区| 国产欧美精品一区二区三区四区| 亚洲一区精品在线| 国产成人综合自拍| 欧美一级精品大片| 亚洲综合在线视频| 国产999精品久久久久久| 在线成人小视频| 亚洲风情在线资源站| 寂寞少妇一区二区三区| 91在线国内视频| 欧美日韩亚州综合| 精品剧情在线观看| 亚洲精品写真福利| 九九精品一区二区| 97久久超碰精品国产| 日韩欧美精品三级| 亚洲精品亚洲人成人网| 国产一区二区三区综合 | 91香蕉视频黄| 欧美日韩亚洲综合在线| 久久久久99精品国产片| 亚洲一二三区不卡| 成人小视频免费观看| 91精品国产色综合久久ai换脸 | 成人精品国产免费网站| 欧美高清视频www夜色资源网| 欧美高清在线视频| 日本va欧美va精品| 色综合久久99| 中文字幕免费不卡在线| 美女被吸乳得到大胸91| 欧美中文字幕一区| 亚洲欧美中日韩| 狠狠色丁香久久婷婷综合丁香| 色综合久久天天| 国产欧美日韩在线| 精久久久久久久久久久| 欧美高清一级片在线| 一区二区三区在线播| 成人午夜视频福利| 久久一区二区三区国产精品| 日日夜夜免费精品| 欧美日韩黄视频| 亚洲一区二区在线免费观看视频| 成人性生交大合| 久久久av毛片精品| 激情偷乱视频一区二区三区| 欧美精品三级日韩久久| 一级中文字幕一区二区| 99热精品一区二区| 国产精品久久久久久亚洲伦| 国产传媒久久文化传媒| 久久嫩草精品久久久久| 精品无人区卡一卡二卡三乱码免费卡| 91麻豆精品国产91久久久久久| 香蕉成人啪国产精品视频综合网| 91色在线porny| 日韩毛片精品高清免费| 91视频在线观看| 一区二区三区中文在线| 欧亚一区二区三区| 亚洲一区二区欧美日韩| 欧美日韩一区高清| 日韩国产精品大片| 欧美电影免费观看完整版| 免播放器亚洲一区| 亚洲精品一区二区三区99| 国模无码大尺度一区二区三区| 久久婷婷综合激情| 成人午夜私人影院| 亚洲精选在线视频| 欧美日韩中文字幕一区二区| 日韩在线卡一卡二| 日韩精品专区在线影院重磅| 国内一区二区视频| 国产精品欧美久久久久无广告| 色婷婷av久久久久久久| 亚洲国产精品一区二区久久恐怖片| 欧美日韩中文字幕一区二区| 首页国产欧美久久| 欧美本精品男人aⅴ天堂| 国产成人综合精品三级| 亚洲日本中文字幕区| 欧美美女一区二区在线观看| 久久精品99国产精品| 欧美国产禁国产网站cc| 91成人免费网站| 麻豆专区一区二区三区四区五区| 久久色在线视频| 91视视频在线观看入口直接观看www| 性欧美大战久久久久久久久| 久久久国产精品午夜一区ai换脸 | 欧美主播一区二区三区| 久久精品国产久精国产| 国产精品三级久久久久三级|