gdncvarputnum.f90

Path: gtdata/gtdata_netcdf/gdncvarputnum.f90
Last Update: Tue Jun 22 23:13:47 +0900 2010

GD_NC_VARIABLES ¤Î½ÐÎÏ

Put GD_NC_VARIABLES

Authors:Yasuhiro MORIKAWA, Eizi TOYODA
Version:$Id: gdncvarputnum.f90,v 1.4 2010-06-22 14:13:47 morikawa Exp $
Tag Name:$Name: gtool5-20100924 $
Copyright:Copyright (C) GFD Dennou Club, 2000-2005. All rights reserved.
License:See COPYRIGHT

Required files

Methods

Included Modules

dc_types gtdata_netcdf_types gtdata_netcdf_internal netcdf_f77 gtdata_netcdf_file_generic dc_trace

Public Instance methods

Subroutine :
var :type(GD_NC_VARIABLE), intent(in)
start(:) :integer, intent(in)
count(:) :integer, intent(in)
stride(:) :integer, intent(in)
imap(:) :integer, intent(in)
siz :integer, intent(in)
value(siz) :character(*), intent(in)
iostat :integer, intent(out)

[Source]

subroutine GDNcVarPutChar(var, start, count, stride, imap, siz, value, iostat)
  use dc_types, only: DP
  use gtdata_netcdf_types, only: GD_NC_VARIABLE
  use gtdata_netcdf_internal, only: GD_NC_VARIABLE_ENTRY, vtable_lookup
  use netcdf_f77, only: nf_noerr, nf_einval, nf_put_varm_text
  use gtdata_netcdf_file_generic, only: GDNcFileDataMode
  use dc_trace, only: BeginSub, EndSub, DbgMessage
  implicit none
  type(GD_NC_VARIABLE), intent(in):: var
  integer,           intent(in):: start(:)
  integer,           intent(in):: count(:)
  integer,           intent(in):: stride(:)
  integer,           intent(in):: imap(:)
  integer,           intent(in):: siz
  character(*), intent(in):: value(siz)
  integer, intent(out):: iostat
  integer:: ndims
  type(GD_NC_VARIABLE_ENTRY):: ent
  character(len = *), parameter:: subname = "GDNcVarPutChar"
continue
  call BeginSub(subname)
  iostat = vtable_lookup(var, ent)
  if (iostat /= nf_noerr) goto 999
  ndims = 0
  if (associated(ent%dimids)) ndims = size(ent%dimids)
  if (min(size(start), size(count), size(stride), size(imap)) < ndims) then
    iostat = nf_einval
    goto 999
  endif
  call DbgMessage("f=%d v=%d sta=%*d c=%*d str=%*d imap=%*d", i=(/ent%fileid, ent%varid, start, count, stride, imap/), n=(/ndims, ndims, ndims, ndims/))
  iostat = GDNcFileDataMode(ent%fileid)
  if (iostat /= nf_noerr) return
                      iostat = nf_put_varm_text(ent%fileid, ent%varid, start, count, stride, imap, value(1))
                    
999 continue
  call EndSub(subname, "iostat=%d", i=(/iostat/))
end subroutine GDNcVarPutChar
Subroutine :
var :type(GD_NC_VARIABLE), intent(in)
start(:) :integer, intent(in)
count(:) :integer, intent(in)
stride(:) :integer, intent(in)
imap(:) :integer, intent(in)
siz :integer, intent(in)
value(siz) :real(DP), intent(in)
iostat :integer, intent(out)

[Source]

subroutine GDNcVarPutDouble(var, start, count, stride, imap, siz, value, iostat)
  use dc_types, only: DP
  use gtdata_netcdf_types, only: GD_NC_VARIABLE
  use gtdata_netcdf_internal, only: GD_NC_VARIABLE_ENTRY, vtable_lookup
  use netcdf_f77, only: nf_noerr, nf_einval, nf_put_varm_double
  use gtdata_netcdf_file_generic, only: GDNcFileDataMode
  use dc_trace, only: BeginSub, EndSub, DbgMessage
  implicit none
  type(GD_NC_VARIABLE), intent(in):: var
  integer,           intent(in):: start(:)
  integer,           intent(in):: count(:)
  integer,           intent(in):: stride(:)
  integer,           intent(in):: imap(:)
  integer,           intent(in):: siz
  real(DP), intent(in):: value(siz)
  integer, intent(out):: iostat
  integer:: ndims
  type(GD_NC_VARIABLE_ENTRY):: ent
  character(len = *), parameter:: subname = "GDNcVarPutDouble"
continue
  call BeginSub(subname)
  iostat = vtable_lookup(var, ent)
  if (iostat /= nf_noerr) goto 999
  ndims = 0
  if (associated(ent%dimids)) ndims = size(ent%dimids)
  if (min(size(start), size(count), size(stride), size(imap)) < ndims) then
    iostat = nf_einval
    goto 999
  endif
  call DbgMessage("f=%d v=%d sta=%*d c=%*d str=%*d imap=%*d", i=(/ent%fileid, ent%varid, start, count, stride, imap/), n=(/ndims, ndims, ndims, ndims/))
  iostat = GDNcFileDataMode(ent%fileid)
  if (iostat /= nf_noerr) return
                      iostat = nf_put_varm_double(ent%fileid, ent%varid, start, count, stride, imap, value)
                    
999 continue
  call EndSub(subname, "iostat=%d", i=(/iostat/))
end subroutine GDNcVarPutDouble
Subroutine :
var :type(GD_NC_VARIABLE), intent(in)
start(:) :integer, intent(in)
count(:) :integer, intent(in)
stride(:) :integer, intent(in)
imap(:) :integer, intent(in)
siz :integer, intent(in)
value(siz) :integer, intent(in)
iostat :integer, intent(out)

[Source]

subroutine GDNcVarPutInt(var, start, count, stride, imap, siz, value, iostat)
  use dc_types, only: DP
  use gtdata_netcdf_types, only: GD_NC_VARIABLE
  use gtdata_netcdf_internal, only: GD_NC_VARIABLE_ENTRY, vtable_lookup
  use netcdf_f77, only: nf_noerr, nf_einval, nf_put_varm_int
  use gtdata_netcdf_file_generic, only: GDNcFileDataMode
  use dc_trace, only: BeginSub, EndSub, DbgMessage
  implicit none
  type(GD_NC_VARIABLE), intent(in):: var
  integer,           intent(in):: start(:)
  integer,           intent(in):: count(:)
  integer,           intent(in):: stride(:)
  integer,           intent(in):: imap(:)
  integer,           intent(in):: siz
  integer, intent(in):: value(siz)
  integer, intent(out):: iostat
  integer:: ndims
  type(GD_NC_VARIABLE_ENTRY):: ent
  character(len = *), parameter:: subname = "GDNcVarPutInt"
continue
  call BeginSub(subname)
  iostat = vtable_lookup(var, ent)
  if (iostat /= nf_noerr) goto 999
  ndims = 0
  if (associated(ent%dimids)) ndims = size(ent%dimids)
  if (min(size(start), size(count), size(stride), size(imap)) < ndims) then
    iostat = nf_einval
    goto 999
  endif
  call DbgMessage("f=%d v=%d sta=%*d c=%*d str=%*d imap=%*d", i=(/ent%fileid, ent%varid, start, count, stride, imap/), n=(/ndims, ndims, ndims, ndims/))
  iostat = GDNcFileDataMode(ent%fileid)
  if (iostat /= nf_noerr) return
                      iostat = nf_put_varm_int(ent%fileid, ent%varid, start, count, stride, imap, value)
                    
999 continue
  call EndSub(subname, "iostat=%d", i=(/iostat/))
end subroutine GDNcVarPutInt
Subroutine :
var :type(GD_NC_VARIABLE), intent(in)
start(:) :integer, intent(in)
count(:) :integer, intent(in)
stride(:) :integer, intent(in)
imap(:) :integer, intent(in)
siz :integer, intent(in)
value(siz) :real, intent(in)
iostat :integer, intent(out)

[Source]

subroutine GDNcVarPutReal(var, start, count, stride, imap, siz, value, iostat)
  use dc_types, only: DP
  use gtdata_netcdf_types, only: GD_NC_VARIABLE
  use gtdata_netcdf_internal, only: GD_NC_VARIABLE_ENTRY, vtable_lookup
  use netcdf_f77, only: nf_noerr, nf_einval, nf_put_varm_real
  use gtdata_netcdf_file_generic, only: GDNcFileDataMode
  use dc_trace, only: BeginSub, EndSub, DbgMessage
  implicit none
  type(GD_NC_VARIABLE), intent(in):: var
  integer,           intent(in):: start(:)
  integer,           intent(in):: count(:)
  integer,           intent(in):: stride(:)
  integer,           intent(in):: imap(:)
  integer,           intent(in):: siz
  real, intent(in):: value(siz)
  integer, intent(out):: iostat
  integer:: ndims
  type(GD_NC_VARIABLE_ENTRY):: ent
  character(len = *), parameter:: subname = "GDNcVarPutReal"
continue
  call BeginSub(subname)
  iostat = vtable_lookup(var, ent)
  if (iostat /= nf_noerr) goto 999
  ndims = 0
  if (associated(ent%dimids)) ndims = size(ent%dimids)
  if (min(size(start), size(count), size(stride), size(imap)) < ndims) then
    iostat = nf_einval
    goto 999
  endif
  call DbgMessage("f=%d v=%d sta=%*d c=%*d str=%*d imap=%*d", i=(/ent%fileid, ent%varid, start, count, stride, imap/), n=(/ndims, ndims, ndims, ndims/))
  iostat = GDNcFileDataMode(ent%fileid)
  if (iostat /= nf_noerr) return
                      iostat = nf_put_varm_real(ent%fileid, ent%varid, start, count, stride, imap, value)
                    
999 continue
  call EndSub(subname, "iostat=%d", i=(/iostat/))
end subroutine GDNcVarPutReal