|
subroutine | get_float_val_array (fval, filename, argname, size, echo) |
|
subroutine | get_string_val_array (sval, filename, argname, size, echo) |
|
subroutine | get_logical_val_array (cval, filename, argname, size, echo) |
|
subroutine | get_integer_val_array (ival, filename, argname, size, echo) |
|
Definition at line 50 of file mod_newinp.f90.
◆ get_float_val_array()
subroutine input_util::get_val_array::get_float_val_array |
( |
real(sp), dimension(size), intent(out) |
fval, |
|
|
character(len=*), intent(in) |
filename, |
|
|
character(len=*), intent(in) |
argname, |
|
|
integer, intent(in) |
size, |
|
|
logical, intent(in), optional |
echo |
|
) |
| |
Definition at line 301 of file mod_newinp.f90.
303 character(len=*),
intent(in ) :: filename
304 character(len=*),
intent(in ) :: argname
305 integer,
intent(in) :: SIZE
306 real(sp),
dimension(size),
intent(out) :: fval
307 logical,
optional,
intent(in) :: echo
311 character(len=80) :: argval
312 character(len=80) :: argtype
317 real(sp) :: REALVEC(150)
319 if(dbg_set(dbg_sbr))
write(
ipt,*)
"Start:Get_Float_Val_Array " 322 if(.not.check_exist(filename))
then 323 call error(
'Get_Val',
'halt',
'error reading: '//trim(argname), &
324 'file: '//trim(filename)//
' does not exist')
328 iscan = scan_file3(filename,argname,fvec = realvec,nsze = ntemp)
330 WRITE(
ipt,*)
'ERROR READING: ',trim(argname),
': ',iscan
331 call error(
'Get_Val',
'halt',
'error reading variable: '//trim(argname), &
332 'does not exist in file: '//trim(filename))
336 WRITE(*,*)
'EXPECTED SIZE:',
SIZE 337 WRITE(*,*)
'AND READ: ',realvec(1:ntemp)
338 call error(
'Get_Val',
'warning',
'warning reading variable: '//trim(argname), &
339 'number of specified size in : '//trim(filename)//
' in not eq& 340 &ual to expected size,specified size is used in the model ')
341 ELSEIF(ntemp < size)
THEN 342 WRITE(*,*)
'EXPECTED SIZE:',
SIZE 343 WRITE(*,*)
'AND READ: ',realvec
344 call error(
'Get_Val',
'halt',
'error reading variable: '//trim(argname), &
345 'number of specified size in : '//trim(filename)//
' in not eq& 346 &ual to expected size ')
349 fval(1:size)= realvec(1:size)
352 if(
present(echo))
then 354 write(*,
'(A20,<size>F10.4)')trim(argname)//
': ',fval(1:size)
358 if(dbg_set(dbg_sbr))
write(
ipt,*)
"End: Get_Float_Val_Array "
◆ get_integer_val_array()
subroutine input_util::get_val_array::get_integer_val_array |
( |
integer, dimension(size), intent(out) |
ival, |
|
|
character(len=*), intent(in) |
filename, |
|
|
character(len=*), intent(in) |
argname, |
|
|
integer, intent(in) |
size, |
|
|
logical, intent(in), optional |
echo |
|
) |
| |
Definition at line 370 of file mod_newinp.f90.
372 character(len=*),
intent(in ) :: filename
373 character(len=*),
intent(in ) :: argname
374 integer,
intent(in) :: SIZE
375 integer,
dimension(size),
intent(out) :: ival
376 logical,
optional,
intent(in) :: echo
380 character(len=80) :: argval
381 character(len=80) :: argtype
386 real(sp) :: REALVEC(150)
388 if(dbg_set(dbg_sbr))
write(
ipt,*)
"Start: Get_Integer_Val_Array" 391 if(.not.check_exist(filename))
then 392 call error(
'Get_Val',
'halt',
'error reading: '//trim(argname), &
393 'file: '//trim(filename)//
' does not exist')
397 iscan = scan_file3(filename,argname,fvec = realvec,nsze = ntemp)
399 WRITE(
ipt,*)
'ERROR READING',trim(argname),
': ',iscan
400 call error(
'Get_Val',
'halt',
'error reading variable: '//trim(argname), &
401 'does not exist in file: '//trim(filename))
405 WRITE(*,*)
'EXPECTED SIZE:',
SIZE 406 WRITE(*,*)
'AND READ: ',realvec(1:ntemp)
407 call error(
'Get_Val',
'warning',
'warning reading variable: '//trim(argname), &
408 'number of specified size in : '//trim(filename)//
' in not eq& 409 &ual to expected size,specified size is used in the model ')
410 ELSEIF(ntemp < size)
THEN 411 WRITE(*,*)
'EXPECTED SIZE:',
SIZE 412 WRITE(*,*)
'AND READ: ',realvec
413 call error(
'Get_Val',
'halt',
'error reading variable: '//trim(argname), &
414 'number of specified size in : '//trim(filename)//
' in not eq& 415 &ual to expected size ')
418 ival(1:size)= realvec(1:size)
421 if(
present(echo))
then 423 write(*,
'(A20,<size>I10)')trim(argname)//
': ',ival(1:size)
427 if(dbg_set(dbg_sbr))
write(
ipt,*)
"End: Get_Integer_Val_Array"
◆ get_logical_val_array()
subroutine input_util::get_val_array::get_logical_val_array |
( |
logical, dimension(size), intent(out) |
cval, |
|
|
character(len=*), intent(in) |
filename, |
|
|
character(len=*), intent(in) |
argname, |
|
|
integer, intent(in) |
size, |
|
|
logical, intent(in), optional |
echo |
|
) |
| |
Definition at line 438 of file mod_newinp.f90.
440 character(len=*),
intent(in ) :: filename
441 character(len=*),
intent(in ) :: argname
442 integer,
intent(in) :: SIZE
443 logical,
dimension(size),
intent(out) :: cval
444 logical,
optional,
intent(in) :: echo
448 character(len=80) :: argval
449 character(len=80) :: argtype
454 character(len=80),
dimension(100):: CHARVEC
456 if(dbg_set(dbg_sbr))
write(
ipt,*)
"Start: Get_Logical_Val_Array" 459 if(.not.check_exist(filename))
then 460 call error(
'Get_Val',
'halt',
'error reading: '//trim(argname), &
461 'file: '//trim(filename)//
' does not exist')
465 iscan = scan_file3(filename,argname,cvec = charvec,nsze = ntemp)
467 WRITE(
ipt,*)
'ERROR READING:',trim(argname),
': ',iscan
468 call error(
'Get_Val',
'halt',
'error reading variable: '//trim(argname), &
469 'does not exist in file: '//trim(filename))
473 WRITE(*,*)
'EXPECTED SIZE:',
SIZE 474 WRITE(*,*)
'AND READ: ',charvec(1:ntemp)
475 call error(
'Get_Val',
'warning',
'warning reading variable: '//trim(argname), &
476 'number of specified size in : '//trim(filename)//
' in not eq& 477 &ual to expected size,specified size is used in the model ')
478 ELSEIF(ntemp < size)
THEN 479 WRITE(*,*)
'EXPECTED SIZE:',
SIZE 480 WRITE(*,*)
'AND READ: ',charvec
481 call error(
'Get_Val',
'halt',
'error reading variable: '//trim(argname), &
482 'number of specified size in : '//trim(filename)//
' in not eq& 483 &ual to expected size ')
487 IF((trim(charvec(i))==
"T" .OR. trim(charvec(i))==
"F").and.(len(trim(charvec(i)))==1))
THEN 488 if(trim(charvec(i)) ==
"T")cval(i)=.true.
489 if(trim(charvec(i)) ==
"F")cval(i)=.false.
494 if(
present(echo))
then 496 write(*,
'(A20,<size>L10)')trim(argname)//
': ',cval(1:size)
500 if(dbg_set(dbg_sbr))
write(
ipt,*)
"End: Get_Logical_Val_Array"
◆ get_string_val_array()
subroutine input_util::get_val_array::get_string_val_array |
( |
character(len=*), dimension(size), intent(out) |
sval, |
|
|
character(len=*), intent(in) |
filename, |
|
|
character(len=*), intent(in) |
argname, |
|
|
integer, intent(in) |
size, |
|
|
logical, intent(in), optional |
echo |
|
) |
| |
Definition at line 515 of file mod_newinp.f90.
517 character(len=*),
intent(in ) :: filename
518 character(len=*),
intent(in ) :: argname
519 integer,
intent(in) :: SIZE
520 character(len=*),
dimension(size),
intent(out) :: sval
521 logical,
optional,
intent(in) :: echo
525 character(len=80) :: argval
526 character(len=80) :: argtype
531 character(len=80),
dimension(100):: CHARVEC
533 if(dbg_set(dbg_sbr))
write(
ipt,*)
"Start: Get_String_Val_Array" 536 if(.not.check_exist(filename))
then 537 call error(
'Get_Val',
'halt',
'error reading: '//trim(argname), &
538 'file: '//trim(filename)//
' does not exist')
542 iscan = scan_file3(filename,argname,cvec = charvec,nsze = ntemp)
544 WRITE(
ipt,*)
'ERROR READING:',trim(argname),
': ',iscan
545 call error(
'Get_Val',
'halt',
'error reading variable: '//trim(argname), &
546 'does not exist in file: '//trim(filename))
550 WRITE(*,*)
'EXPECTED SIZE:',
SIZE 551 WRITE(*,*)
'AND READ: ',charvec(1:ntemp)
552 call error(
'Get_Val',
'warning',
'warning reading variable: '//trim(argname), &
553 'number of specified size in : '//trim(filename)//
' in not eq& 554 &ual to expected size,specified size is used in the model ')
555 ELSEIF(ntemp < size)
THEN 556 WRITE(*,*)
'EXPECTED SIZE:',
SIZE 557 WRITE(*,*)
'AND READ: ',charvec
558 call error(
'Get_Val',
'halt',
'error reading variable: '//trim(argname), &
559 'number of specified size in : '//trim(filename)//
' in not eq& 560 &ual to expected size ')
564 sval(1:size)= charvec(1:size)
567 if(
present(echo))
then 569 write(*,
'(A20,<size>A10)')trim(argname)//
': ',sval(1:size)
573 if(dbg_set(dbg_sbr))
write(
ipt,*)
"End: Get_String_Val_Array"
The documentation for this interface was generated from the following file: