Define roughness by frghns.f

Dear Experts,
I try to define roughness by frghns.f and define a roughness between L1 to L1 region.
but when I wanna compile code I received this error:
Error: Operands of comparison operator ‘.eq.’ at (1) are INTEGER(4)/CHARACTER(2)
I found this is related to the name after .EQ. but I do not know how to handle it?
When I write the name without ’ and " the code will compile but when I write without Quotation means variable no string as the name of the region.

frghns.f (1.2 KB)
test.flair (6.1 KB)

also I read this topic.
but it does not work for me

best regards
Mohammad

Dear @rezaei.m.p,

The error is caused by this line:

  IF ( MREG .EQ. 'L1'  .AND. NEWREG .EQ. 'L2') THEN 

MREG and NEWREG are integer numbers that identify your region and you are comparing them to 2 strings (which in Fortran are CHARACTER type variables). The compiler is complaining about it.

As it is explained in the manual for the frghns user routine, you can use the the GEOR2N subroutine to obtain the name of a region, once you know its numerical identifier.