Subroutine's built-in variable

Dear experts,
Built-in subroutine’s variables, just like MREGNEWREGMMATWVLNGT,some variables does not defined in “.f” file(abscff.f、wvlnsh.f、mgdraw.f), so does these variables integer or character and if I need GEON2R/GEOR2N to transfer it?
what is the number’s value after transerred?
Looking forward to your help.

Dear Xiong,

the variables of the subroutines (and functions) use implicit declaration by default:

  • If the variable starts with the letter I, J, K, L, M or N then it is an integer.
  • Otherwise, it is declared as a double precision number.

Other variable types are explicitly declared.

The procedures GEON2R and GEOR2N only convert a region name to the assigned region number and vice versa.

Cheers,
David

Dear@horvathd ,
Thank you for your reply,
I want a region name assigned to a integer variable and use GEON2R to convert it, then I cite the converted result elsewhere, so what is the converted region number? Or this region number have no pratical sense and I should define GEOR2N again when I need elsewhere?

Dear Xiong,

have a look at the following code snippet:

logical, save :: lfirst = .true.
integer, save :: reg_number
integer :: ierr

if (lfirst) then
   call geon2r(’TARGET ’, reg_number, ierr)
   lfirst = .false.
end if

With this the region number of the region TARGET is stored in the variable reg_number, which can be used later in the user routine.

Cheers,
David

Dear@horvathd ,
Thank you for your reply, I understand it clearly.