!c Description:
!c  NetCDF ファイルの作成
!c
!c Current Code Owner: 
!c   sugiyama@gfd-dennou.org
!c
!c Histry: 
!c   Version    Date          Comment
!c   -------    ----------    --------
!c   1.0        2003-02-20    作成
!c
!c Copyright (C) SUGIYAMA Ko-ichiro, 2003, All rights reserved

module interface_netcdf_create
  interface 

     subroutine netcdf_create(file, ncid)
       integer, intent(out)           :: ncid
       character(*), intent(in)       :: file
     end subroutine netcdf_create
     
  end interface
end module interface_netcdf_create


subroutine netcdf_create(file, ncid)
  use netcdf
  use interface_netcdf_err
  
  implicit none  
  integer, intent(out)           :: ncid
  character(*), intent(in)       :: file
  
  integer                   :: status


  status = nf90_create(trim(file), NF90_NOCLOBBER, ncid)
  if(status /= nf90_noerr) call netcdf_err(status)
  
end subroutine netcdf_create
