gtvargetnum.f90

Path: src/gtvargetnum.f90
Last Update: Thu Sep 08 22:21:49 JST 2005
    Copyright (C) GFD Dennou Club, 2000-2005. All rights reserved.

Get GT_VARIABLES

Cautions

This file is created by "gtvargettype.m4" by m4 command using "intrinsic_types.m4". Don‘t edit each files directly.

[JAPANESE]

この f90 ファイルは gtvargettype.m4 から m4 コマンドを用いて生成 されています. f90 ファイルを直接編集しないで下さい. なお, m4 コマンドからの生成の際には intrinsic_types.m4 をインクルード しています.

Overview

This subroutines integrated "gtdata_generic" module, and provided as generic name "Get".

[JAPANESE]

このサブルーチン群は gtdata_generic モジュールで集約され, 総称名称 "Get" としてユーザに提供される.

Methods

Included Modules

gtdata_types gt_map an_generic dc_types dc_trace dc_error

Public Instance methods

var :type(gt_variable), intent(inout)
value(*) :real(DP), intent(out)
nvalue :integer(INTK), intent(in)
err :logical, intent(out), optional

[Source]




  subroutine GTVarGetDouble(var, value, nvalue, err)

      implicit none
      type(gt_variable), intent(inout)        :: var
      real(DP), intent(out)    :: value(*)
      integer(INTK),      intent(in)           :: nvalue
      logical,           intent(out), optional:: err

      integer(INTK)                            :: class, cid, stat
      integer(INTK)                  , pointer :: specs(:, :)
      character(len = *), parameter:: subname = 'GTVarGetDouble'
  continue

      call var_class(var, class, cid)
      call BeginSub(subname)
      call gtvar_dump(var)
      call map_to_internal_specs(var, specs)
      if (class == vtb_class_netcdf) then
          call get(an_variable(cid), start=specs(:, 1), count=specs(:, 2),  stride=specs(:, 3), imap=specs(:, 4), siz=nvalue, value=value,  iostat=stat)
      else
          stat = GT_EFAKE
      endif
      if (associated(specs)) deallocate(specs)
      call StoreError(stat, subname, err)
      call EndSub(subname, 'stat=%d', i=(/stat/))
  end subroutine GTVarGetDouble
var :type(gt_variable), intent(inout)
value(*) :real(SP), intent(out)
nvalue :integer(INTK), intent(in)
err :logical, intent(out), optional

[Source]

  subroutine GTVarGetReal(var, value, nvalue, err)

      implicit none
      type(gt_variable), intent(inout)        :: var
      real(SP), intent(out)    :: value(*)
      integer(INTK),      intent(in)           :: nvalue
      logical,           intent(out), optional:: err

      integer(INTK)                            :: class, cid, stat
      integer(INTK)                  , pointer :: specs(:, :)
      character(len = *), parameter:: subname = 'GTVarGetReal'
  continue

      call var_class(var, class, cid)
      call BeginSub(subname)
      call gtvar_dump(var)
      call map_to_internal_specs(var, specs)
      if (class == vtb_class_netcdf) then
          call get(an_variable(cid), start=specs(:, 1), count=specs(:, 2),  stride=specs(:, 3), imap=specs(:, 4), siz=nvalue, value=value,  iostat=stat)
      else
          stat = GT_EFAKE
      endif
      if (associated(specs)) deallocate(specs)
      call StoreError(stat, subname, err)
      call EndSub(subname, 'stat=%d', i=(/stat/))
  end subroutine GTVarGetReal

[Validate]