Class ckd_module
In: radiation/ckd_module.f90

Methods

bandparam   ckd_input   ckdp   nband  

Included Modules

dc_types netcdf_wrapper gtool_history

Public Instance methods

bandparam
Derived Type :
imol :integer
ng :integer
nlnp :integer
nt :integer
wnbnds( 2 ) :real(DP)
weight( : ) :real(DP), pointer
lnac( :, :, : ) :real(DP), pointer
pfr( :, :, : ) :real(DP), pointer
g( : ) :real(DP), pointer
lnp( : ) :real(DP), pointer
t( : ) :real(DP), pointer
g_ll( : ) :real(DP), pointer
g_ul( : ) :real(DP), pointer
Subroutine :
ncfn :character(*), intent(in)

[Source]

  subroutine ckd_input( ncfn )

    use netcdf_wrapper, only : NWInqDimLen, NWGetAtt

    ! gtool データ入力
    ! Gtool data input
    !
    use gtool_history, only: HistoryGet


    character(*), intent(in) :: ncfn

    !
    ! local variables
    !
    character(STRING) :: comment
    character(STRING) :: name_weight
    character(STRING) :: name_g
    character(STRING) :: name_lnac
    character(STRING) :: name_pfr
    character(STRING) :: name_bnds

    integer           :: iband, ig

    logical           :: flag_mpi_init = .false.


    write( 6, * ) 'Read ', trim( ncfn )

    call NWGetAtt( ncfn, 'global', 'comment', comment )

    call NWGetAtt( ncfn, 'global', 'nband'  , nband   )


    allocate( ckdp( nband ) )

    do iband = 1, nband
      write( 6, * ) 'band ', iband 

      call NWGetAtt( ncfn, 'global', 'imol', ckdp(iband)%imol )

      write( name_bnds  , '(a,i4.4)' ) "wnbnds_", iband
      write( name_weight, '(a,i4.4)' ) "weight_", iband
      write( name_g     , '(a,i4.4)' ) "g_"     , iband
      write( name_lnac  , '(a,i4.4)' ) "lnac_"  , iband
      write( name_pfr   , '(a,i4.4)' ) "pfr_"   , iband

      call NWInqDimLen( ncfn, name_g, ckdp( iband ) % ng )
      call NWInqDimLen( ncfn, 't', ckdp( iband ) % nt )
      call NWInqDimLen( ncfn, 'lnp', ckdp( iband ) % nlnp )


      allocate( ckdp( iband ) % weight( ckdp( iband ) % ng   ), ckdp( iband ) % g     ( ckdp( iband ) % ng   ), ckdp( iband ) % lnp   ( ckdp( iband ) % nlnp ), ckdp( iband ) % t     ( ckdp( iband ) % nt   ) )

      allocate( ckdp( iband ) % lnac( ckdp(iband)%ng, ckdp(iband)%nlnp, ckdp(iband)%nt ) )
      allocate( ckdp( iband ) % pfr ( ckdp(iband)%ng, ckdp(iband)%nlnp, ckdp(iband)%nt ) )


      call HistoryGet( ncfn, name_weight, ckdp(iband)%weight, flag_mpi_split = flag_mpi_init )
      call HistoryGet( ncfn, name_g, ckdp(iband)%g, flag_mpi_split = flag_mpi_init )
      call HistoryGet( ncfn, 'lnp', ckdp(iband)%lnp, flag_mpi_split = flag_mpi_init )
      call HistoryGet( ncfn, 't', ckdp(iband)%t, flag_mpi_split = flag_mpi_init )
      call HistoryGet( ncfn, name_bnds, ckdp(iband)%wnbnds, flag_mpi_split = flag_mpi_init )
      call HistoryGet( ncfn, name_lnac, ckdp(iband)%lnac, flag_mpi_split = flag_mpi_init )
      call HistoryGet( ncfn, name_pfr, ckdp(iband)%pfr, flag_mpi_split = flag_mpi_init )


      write( 6, * ) 'band ', iband 
      write( 6, * ) '  wns  = ', ckdp(iband)%wnbnds(1)
      write( 6, * ) '  wne  = ', ckdp(iband)%wnbnds(2)
      write( 6, * ) '  ng   = ', ckdp(iband)%ng
      do ig = 1, ckdp(iband)%ng
        write( 6, * ) '     g(', ig, ') = ', ckdp(iband)%g(ig)
      end do
      write( 6, * ) '  nlnp = ', ckdp(iband)%nlnp
      write( 6, * ) '  nt   = ', ckdp(iband)%nt
    end do


  end subroutine ckd_input
ckdp
Variable :
ckdp( : ) :type(bandparam), allocatable, save
nband
Variable :
nband :integer , save