IGMBaseLib 1.0

src/io/netcdf/IcGrid_ncGridLoader.f90

Go to the documentation of this file.
00001 
00020 module IcGrid_ncGridLoader
00021 
00022   ! モジュール引用 ; Use statement
00023   !
00024 
00025   ! 種類型パラメータ
00026   ! Kind type parameter
00027   !
00028   use dc_types, only: TOKEN, &
00029     &                 STRING 
00030 
00031   ! メッセージ出力
00032   ! Message dump
00033   !
00034   use dc_message, only: MessageNotify
00035 
00036 
00037   ! 正二十面体格子データの管理
00038   ! Manager of icosahedral grid
00039   !
00040   use IcGrid2D_FVM_Manager, only: &
00041     & IcGrid2D_FVM, malloc_GP_array, malloc_CV_array
00042 
00043   ! NetCDF からの正二十面格子格子データおよび物理場データの読み込み
00044   ! Reading icosahedral grid and physical field data from NetCDF
00045   !
00046   use IcGrid_ncReader_mod, only: &
00047     & IcGrid_ncReader, &
00048     & IcGrid_ncReader_Init, open_ncfile, read_GridData, close_ncfile
00049 
00050   ! 各種正二十面体格子の生成
00051   ! Construction of various icosahedral grids
00052   !
00053   use IcGrid2D_FVM_Builder, only: &
00054     & calc_CV_vertex, calc_CV_Area
00055 
00056   ! 宣言文 ; Declaration statement
00057   !
00058   implicit none
00059   private
00060 
00061   ! 公開手続き
00062   ! Public procedure
00063   !
00064   public :: load_gridData
00065 
00066   ! 公開変数
00067   ! Public variables
00068   !
00069 
00070 contains
00071 
00072 ! 
00089 subroutine load_gridData( &
00090   & ncfile_name, &  ! (in)
00091   & icgrid       &  ! (inout)
00092   & )
00093 
00094   ! 宣言文 ; Declaration statement
00095   !
00096   character(*), intent(in) :: ncfile_name
00097   type(IcGrid2D_FVM), intent(inout) :: icgrid
00098   
00099   ! 作業変数
00100   ! Work variables
00101   !
00102   type(IcGrid_ncReader) :: gridReader
00103 
00104   ! 実行文 ; Executable statement
00105   !
00106 
00107   call MessageNotify( 'M', 'IGMBaseLib IO::IcGrid_ncGridLoader::load_gridData',  &
00108     & 'Load IcGrid data from the NetCDF file `%c` ...', &
00109     & c1=trim(ncfile_name) )
00110 
00111   ! 正二十面体格子の格子点およびコントロールボリュームの座標情報を保持する配列のメモリを確保する.
00112   call malloc_GP_array(icgrid)
00113   call malloc_CV_array(icgrid)
00114 
00115 
00116   ! 次に, 格子座標データを格納した netCDF ファイルから格子座標データを読み取る.
00117   ! 読み取った格子座標情報は, IcGrid2D_FVM クラスのオブジェクトに保持される.
00118   call IcGrid_ncReader_Init(gridReader, icgrid)
00119   call open_ncFile(gridReader, ncfile_name)
00120   call read_GridData(gridReader)
00121   call close_ncFile(gridReader)
00122 
00123   ! 各格子点に付随するコントールボリュームの頂点座標および
00124   ! コントールボリュームの面積を求める. 
00125   call calc_CV_vertex(icgrid)
00126   call calc_CV_Area(icgrid)
00127   
00128 end subroutine load_gridData
00129 
00130 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00131 !
00132 ! 非公開手続き
00133 !
00134 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00135 
00136 end module IcGrid_ncGridLoader
 All Classes Namespaces Files Functions Variables