gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
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 90 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 406 of file gtool_history_internal.f90.

407 !
408 ! history 内から, name という名前の次元または変数を探査し,
409 ! var に GT_VARIABLE 変数を返す. 見つかって正常に
410 ! var が返る場合は stat には DC_NOERR が返り,
411 ! history 内から name が発見されない場合には, stat に
412 ! NF90_ENOTVAR が返る.
413 !
414 use dc_error, only: storeerror, dc_noerr, nf90_enotvar
415 use dc_types, only: string
417 implicit none
418 type(GT_HISTORY), intent(in):: history
419 character(len = *), intent(in):: name
420 type(GT_VARIABLE), intent(out):: var
421 logical, intent(out):: err
422 integer:: stat, ord
423 character(STRING) :: cause_c
424 character(len = *), parameter:: subname = 'lookup_var_or_dim'
425 continue
426 call beginsub(subname, 'name=<%c>', c1=trim(name))
427 cause_c = ""
428 stat = dc_noerr
429 var = lookup_variable(history, name, ord)
430 if (ord /= 0) then
431 stat = dc_noerr
432 goto 999
433 endif
434 var = lookup_dimension(history, name, ord)
435 if (ord /= 0) then
436 stat = dc_noerr
437 goto 999
438 endif
439 stat = nf90_enotvar
440 cause_c = "Any vars and dims are not found"
441999 continue
442 call storeerror(stat, subname, err, cause_c)
443 call endsub(subname, 'ord=%d (0:not found)', i=(/ord/))
Error handling module.
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
Error storage variables
Definition dc_error.f90:468
Debug tracing module.
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
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public string
Character length for 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: