95 double precision valuer
112#include
"qaprint_c.inc"
132#include "implicit_f.inc"
135 logical RD_extract_file
137 character(len=*) :: step
139 rd_extract_file=.false.
141 call getenv (
'DO_QA', env )
144 if ( env /=
'ON' )
then
158 open (
lunitqa, file=
'RD-qa.extract', err=9010 )
163 if (step(1:len_trim(step)) ==
"engine")
then
189 1200
format(
'(g',i2,
'.',i1,
')')
202 write(*,*)
'Error opening extract file'
220#include "implicit_f.inc"
221 integer QAKEY_ENV_len, QAKEY_ENV_status, QAKEY_SPECIFIC_len, QAKEY_SPECIFIC_status, i, j, k
223 character(LEN=1039) QAKEY_ENV, QAKEY_SPECIFIC
224 character(64) temp_qakey
225 integer QAPRINT_LIMIT_ENV_len, QAPRINT_LIMIT_ENV_status
226 character(LEN=12) QAPRINT_LIMIT_ENV
231 qaprint_limit_env =
''
232 call get_environment_variable(
"QAPRINT_LIMIT",qaprint_limit_env,qaprint_limit_env_len,qaprint_limit_env_status,.true.)
233 if (qaprint_limit_env /=
'')
then
244 call get_environment_variable(
"QAKEY",qakey_env,qakey_env_len,qakey_env_status,.true.)
249 do i=1,len_trim(qakey_env)+1
250 if (qakey_env(i:i) ==
',' .OR. i == len_trim(qakey_env)+1)
then
251 if (temp_qakey /=
'')
then
255 IF (.NOT.
myqakey(temp_qakey))
THEN
260 print*,
"ERROR : THE QAKEY ", temp_qakey(1:len_trim(temp_qakey)),
" IS NOT AVAILABLE, ABORTING"
268 temp_qakey(k:k)=qakey_env(i:i)
273 call get_environment_variable(
"QAKEY_SPECIFIC",qakey_specific,qakey_specific_len,qakey_specific_status,.true.)
277 do i=1,len_trim(qakey_specific)+1
278 if (qakey_specific(i:i) ==
',' .OR. i == len_trim(qakey_specific)+1)
then
279 if (temp_qakey /=
'')
then
283 IF (.NOT.
myqakey(temp_qakey))
THEN
288 print*,
"ERROR : THE QAKEY ", temp_qakey(1:len_trim(temp_qakey)),
" IS NOT AVAILABLE, ABORTING"
296 temp_qakey(k:k)=qakey_specific(i:i)
320#include "implicit_f.inc"
321 character(len=*),
intent(in) :: textin
322 character(len=LEN_TRIM(textin)),
intent(out) :: textout
327 do i=1,len_trim(textout)
328 if (textout(i:i) ==
' ')
then
390#include "implicit_f.inc"
392 character(len=*) :: name
393 character(len=LEN_TRIM(name)) :: name2
395 double precision value
397 character *20 srvalue
403 character *40 qaprint_limit_char
404 character(len=512) :: warning_msg
406 qaprint_limit_char =
' '
408 if (
doqa /= 1 )
return
420 if (
value == 0.0)
then
427 if ( id > 99999 ) id = 90000 + mod(id,10000)
434 write (siid,
'(i6.6)') id
436 if ( id <= 999 ) intstart = 3
437 siid(intstart:intstart) =
'_'
444 if ( rvalue == 0.0 )
then
458 qaprint_limit_char = adjustl(qaprint_limit_char)
459 write (
lunitqa, 1002 )
qaid,
'QAPRINT_IS_LIMITED_TO_',qaprint_limit_char(1:len_trim(qaprint_limit_char)),
460 .
'_LINES_(use_variable_QAPRINT_LIMIT_in_QA.files_to_change_limit)', siid(intstart:6), simg(is:4), 0
462 print*,
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
463 write ( warning_msg, 1003 )
464 .
'WARNING : The QAPRINT max number of lines to be printed in the extract file has been reached ('
465 . ,qaprint_limit_char(1:len_trim(qaprint_limit_char)),
' lines).'
466 print*,warning_msg(1:len_trim(warning_msg))
467 print*,
'To change this limit please setenv the variable QAPRINT_LIMIT'
468 print*,
'in the related QA.filesxxx'
469 print*,
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
473 if (
value == 0.0)
then
474 write (
lunitqa, 1000 )
qaid, name2(1:len_trim(name2)), siid(intstart:6), simg(is:4), idin
476 write (
lunitqa, 1001 )
qaid, name2(1:len_trim(name2)), siid(intstart:6), simg(is:4), srvalue(1:
lastchar(srvalue))
480 1000
format( i10, 2x, a, a, a, i12 )
481 1001
format( i10, 2x, a, a, a, a )
482 1002
format( i10, 2x, a, a, a, a, a, i12 )
483 1003
format( a, a, a )
503#include "implicit_f.inc"
507 double precision value
508 double precision value2
511 character *20 srvalue
512 character *20 srvalue2
519 if (
doqa /= 1 )
return
524 if ( id > 99999 ) id = 90000 + mod(id,10000)
530 write (siid,
'(i6.6)') id
532 if ( id <= 999 ) intstart = 3
533 siid(intstart:intstart) =
'_'
540 if ( rvalue == 0.0 )
then
547 rvalue2 = real(value2)
548 if ( rvalue2 == 0.0 )
then
550 srvalue2 =
' 0.00000'
555 write (
lunitqa, 1000 )
qaid, name(1:len_trim(name)), siid(intstart:6), simg(is:4),
558 1000
format( i10, 2x, a, a, a, a, a )
574#include "implicit_f.inc"
593#include "implicit_f.inc"
599 write(
qa_storage(pos)%title,
'(A)')title(1:len_trim(title))
613#include "implicit_f.inc"
619 write(
qa_storage(pos)%title,
'(A)')title(1:len_trim(title))
638 subroutine qaclose ( )
bind ( C, name="qaclose_" )
639#include "implicit_f.inc"
642 if (
doqa /= 1 )
return
694#include "implicit_f.inc"
696 character (len=*) :: value
697 character *64 value_without_leading_blank
701 if (
doqa /= 1 )
return
706 if (value_without_leading_blank(1:len_trim(value_without_leading_blank)) == value(1:len_trim(
value)))
then
726#include "implicit_f.inc"
728 character *64 value, value_without_leading_blank
733 do i=1,
size(qakeylist_avail)
735 value_without_leading_blank=adjustl(qakeylist_avail(i))
736 len1=len_trim(value_without_leading_blank)
739 if (value_without_leading_blank(1:len1) == value(1:len2))
then
756#include "implicit_f.inc"
subroutine qasetr(pos, title, r)
@purpose write a real value in standard values array qa_storage
logical function myqakey(value)
@purpose Check if a given value is part of the values set by env variable Useful to make a condition ...
subroutine qaclose()
@purpose close QA extract fileCare when routine is called from Fortran (because of binding)
subroutine qaopen(step)
@purpose open QA extract file
subroutine qaprint2(name, idin, value, value2)
@purpose print one entry to QA extract file in an energy style ()
integer, parameter qaprint_limit_default
type(tqa_value), dimension(:), allocatable qa_storage
subroutine qagetqakeyenv()
@purpose get and store the possible values of the QAKEY env variable
subroutine qaprint(name, idin, value)
@purpose print one entry to QA extract file example of call for real print CALL QAPRINT('MY_LABEL',...
character(len=64), dimension(520) split_qakey_env
subroutine qaseti(pos, title, i)
@purpose write an integer value in standard values array qa_storage
subroutine blank2underscore(textin, textout)
@purpose replace blank char with _ for a given string
logical function is_value_in_qakeylist_avail(value)
@purpose Check if a given value is the predefined array of available qakeys Useful to check if a qake...
integer, parameter qaprint_limit_maxx
integer function lastchar(a)
subroutine qastatus(istatus)
@purpose get QA status