gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Public Member Functions | List of all members
gtool_history_internal::lookup_dimension Interface Reference

Public Member Functions

type(gt_variable) function lookup_dimension (history, dimname, ord)
 

Detailed Description

Definition at line 87 of file gtool_history_internal.f90.

Constructor & Destructor Documentation

◆ lookup_dimension()

type(gt_variable) function gtool_history_internal::lookup_dimension::lookup_dimension ( type(gt_history), intent(in)  history,
character(len = *), intent(in)  dimname,
integer, intent(out), optional  ord 
)

Definition at line 361 of file gtool_history_internal.f90.

362 !
363 ! history 内の dimname という変数名を持つ次元の GT_VARIABLE
364 ! 変数を返す. dimname 末尾の空白は無視される.
365 !
366 use gtdata_generic, only: inquire
367 use dc_types, only: string
370 implicit none
371 type(GT_HISTORY), intent(in):: history
372 character(len = *), intent(in):: dimname
373 integer, intent(out), optional:: ord
374 integer:: ordwork
375 character(len = STRING):: name, cause_c
376 integer:: i, stat
377 character(len = *), parameter:: subname = 'lookup_dimension'
378 continue
379 call beginsub(subname, 'dimname=%c', c1=trim(dimname))
380 stat = dc_noerr
381 if (present(ord)) ord = 0
382 ordwork = 0
383 if (associated(history % dimvars)) then
384 do, i = 1, size(history % dimvars)
385 call inquire(history % dimvars(i), name=name)
386 if (name == trim(dimname)) then
387 result = history % dimvars(i)
388 if (present(ord)) ord = i
389 stat = dc_noerr
390 cause_c = ""
391 goto 999
392 endif
393 enddo
394 endif
395 if (present(ord)) then
396 ord = 0
397 else
398 stat = gt_ebaddimname
399 cause_c = dimname
400 endif
401999 continue
402 call storeerror(stat, subname, cause_c=cause_c)
403 if (present(ord)) ordwork = ord
404 call endsub(subname, 'ord=%d (0:not found)', i=(/ordwork/))
エラー処理用モジュール
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_noerr
エラー等を保持
Definition dc_error.f90:468
integer, parameter, public gt_ebaddimname
Definition dc_error.f90:511
デバッグ時の追跡用モジュール
Definition dc_trace.f90:150
subroutine, public dbgmessage(fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:661
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:457
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:580
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_noerr, dc_trace::endsub(), dc_error::gt_ebaddimname, dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function:

The documentation for this interface was generated from the following file: