gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
gtool_history_internal::lookup_var_or_dim Interface Reference

Public Member Functions

subroutine lookup_var_or_dim (history, name, var, err)

Detailed Description

Definition at line 91 of file gtool_history_internal.f90.

Constructor & Destructor Documentation

◆ lookup_var_or_dim()

subroutine gtool_history_internal::lookup_var_or_dim::lookup_var_or_dim ( type(gt_history), intent(in) history,
character(len = *), intent(in) name,
type(gt_variable), intent(out) var,
logical, intent(out) err )

Definition at line 413 of file gtool_history_internal.f90.

414 !
415 ! history 内から, name という名前の次元または変数を探査し,
416 ! var に GT_VARIABLE 変数を返す. 見つかって正常に
417 ! var が返る場合は stat には DC_NOERR が返り,
418 ! history 内から name が発見されない場合には, stat に
419 ! NF90_ENOTVAR が返る.
420 !
421 use dc_error, only: storeerror, dc_noerr, nf90_enotvar
422 use dc_types, only: string
424 implicit none
425 type(GT_HISTORY), intent(in):: history
426 character(len = *), intent(in):: name
427 type(GT_VARIABLE), intent(out):: var
428 logical, intent(out):: err
429 integer:: stat, ord
430 character(STRING) :: cause_c
431 character(len = *), parameter:: subname = 'lookup_var_or_dim'
432 continue
433 call beginsub(subname, 'name=<%c>', c1=trim(name))
434 cause_c = ""
435 stat = dc_noerr
436 var = lookup_variable(history, name, ord)
437 if (ord /= 0) then
438 stat = dc_noerr
439 goto 999
440 endif
441 var = lookup_dimension(history, name, ord)
442 if (ord /= 0) then
443 stat = dc_noerr
444 goto 999
445 endif
446 stat = nf90_enotvar
447 cause_c = "Any vars and dims are not found"
448999 continue
449 call storeerror(stat, subname, err, cause_c)
450 call endsub(subname, 'ord=%d (0:not found)', i=(/ord/))
エラー処理用モジュール
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
デバッグ時の追跡用モジュール
Definition dc_trace.f90:150
subroutine, public dbgmessage(fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:680
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599
種別型パラメタを提供します。
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::storeerror(), and dc_types::string.

Here is the call graph for this function:

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