INTEGER FUNCTION INSPFL(IFLAG, FLAG)

IFLAG  - Integer - input    - Flag array element
FLAG   - Char*1  - output   - Flag
INSPFL - Integer - returned - Interpreted code

 FLAG        Meaning       INSPFL  values and meaning
----------------------------------------------------------------------------
   S           sea         1...9   (useful to mark different sea areas)
                           1       is standard model area sea

   L          land         0       plain land
                           1...12  Passive boundary condition number.

   A      active boundary  0       Storage reference unresolved.
                           1...    Elevation or current storage ref.number.

   a      active boundary  1...16  Passive boundary condition number.
   b         "       "     1...9   Cell marked for mismatch/required update.

   O        out of area    0       Storage reference unresolved.
                           1...    Elevation or current storage ref.number.

   p         "      "      1...9   Cell marked for mismatch/required update.

 + - l m   land, update    1...9   Cell marked for mismatch/required update.
 < > s t    sea, update    1...9   Cell marked for mismatch/required update.


Typical use:

      SUBROUTINE EXAMPLE (FLM,M,N,TYP)
      CHARACTER FLAG*1,TYP*1
      INTEGER FLM(M,N)
      COMPLEX ZZARR,ZT
      COMMON /COZ/    ZZARR(1000)

      IF (TYP.EQ.'Z') THEN
         MM=M-1
         NN=N-1
      ELSE
         MM=M
         NN=N
      ENDIF

      DO J=1,NN
        DO I=1,MM
           IFL=INSPFL(FLM(I,J),FLAG)
           IF (FLAG.EQ.'A') THEN
              ZT=ZZARR(IFL)
C Tide value on active boundary
      ...

-