Path: | anvarputnum.f90 |
Last Update: | Thu Aug 23 03:34:25 +0900 2007 |
Authors: | Yasuhiro MORIKAWA, Eizi TOYODA |
Version: | $Id: anvarputnum.f90,v 1.3 2007-08-22 18:34:25 morikawa Exp $ |
Tag Name: | $Name: gt4f90io-20080603 $ |
Copyright: | Copyright (C) GFD Dennou Club, 2000-2005. All rights reserved. |
License: | See COPYRIGHT |
Subroutine : | |
var : | type(AN_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) |
subroutine ANVarPutDouble(var, start, count, stride, imap, siz, value, iostat) use dc_types, only: DP use an_types, only: AN_VARIABLE use an_vartable, only: an_variable_entry, vtable_lookup use netcdf_f77, only: nf_noerr, nf_einval, nf_put_varm_Double use an_file, only: anfiledatamode use dc_trace, only: BeginSub, EndSub, DbgMessage implicit none type(AN_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(an_variable_entry):: ent character(len = *), parameter:: subname = "ANVarPutDouble" 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 = anfiledatamode(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 ANVarPutDouble
Subroutine : | |
var : | type(AN_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) |
subroutine ANVarPutInt(var, start, count, stride, imap, siz, value, iostat) use dc_types, only: DP use an_types, only: AN_VARIABLE use an_vartable, only: an_variable_entry, vtable_lookup use netcdf_f77, only: nf_noerr, nf_einval, nf_put_varm_Int use an_file, only: anfiledatamode use dc_trace, only: BeginSub, EndSub, DbgMessage implicit none type(AN_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(an_variable_entry):: ent character(len = *), parameter:: subname = "ANVarPutInt" 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 = anfiledatamode(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 ANVarPutInt
Subroutine : | |
var : | type(AN_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) |
subroutine ANVarPutReal(var, start, count, stride, imap, siz, value, iostat) use dc_types, only: DP use an_types, only: AN_VARIABLE use an_vartable, only: an_variable_entry, vtable_lookup use netcdf_f77, only: nf_noerr, nf_einval, nf_put_varm_Real use an_file, only: anfiledatamode use dc_trace, only: BeginSub, EndSub, DbgMessage implicit none type(AN_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(an_variable_entry):: ent character(len = *), parameter:: subname = "ANVarPutReal" 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 = anfiledatamode(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 ANVarPutReal