TALK=T;RUN(1,1)
  PHOTON USE
  p;parphi
  50 50 1

  set ref vec .1
  *  view z
  msg water levels at successive times. Press any key to pause
  do kk=1,m
  con p1 z kk fi;1
  enddo
  pause;cl
  msg x-direction velocity contours. Press any key to pause
  do kk=1,m
  con u1 z kk fi;1000
  enddo
  pause;cl
  msg y-direction velocity contours. Press any key to pause
  do kk=1,m
  con v1 z kk fi;1000
  enddo
  pause;cl

  msg pollutant contours. Press any key to pause
  do kk=1,m
  con pol z kk fi;01
  enddo
  pause;cl

  ENDUSE
  DISPLAY
  The transient flow into and out of a harbour is simulated by means
  of the shallow-water compressible-flow analogy.

  This is effected by:

   * setting RHO2 = -rhonom, as a signal to GXRHO
     (in file GXDEBS.HTM); and
   * by changing PRESS0 from the value set in the SEASURF PIL
     fragment, namely :  9.81 * ZWLAST * RHONOM
     to               :  9.81 * DZUPPER * RHONOM
     where DZUPPER is the depth of the upper cells.


  ENDDIS
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 ************************************************************
 
 TEXT(Pollutant Flow In A Tidal Harbour       )
 
 ************************************************************
 ************************************************************
 
 IRUNN = 1 ;LIBREF = 0
 ************************************************************
  Group 2. Time dependence
 STEADY = F
    * Set overall time and no. of steps
 TFIRST =0. ;TLAST =4.32E+04
 FSTEP = 1 ;LSTEP = 200
 TFRAC(1)=5.0E-03 ;TFRAC(2)=1.0E-02
 TFRAC(3)=0.015 ;TFRAC(4)=0.02
 TFRAC(5)=0.025 ;TFRAC(6)=0.03
 TFRAC(7)=0.035 ;TFRAC(8)=0.04
 TFRAC(9)=0.045 ;TFRAC(10)=0.05
 TFRAC(11)=0.055 ;TFRAC(12)=0.06
 TFRAC(13)=0.065 ;TFRAC(14)=0.07
 TFRAC(15)=0.075 ;TFRAC(16)=0.08
 TFRAC(17)=0.085 ;TFRAC(18)=0.09
 TFRAC(19)=0.095 ;TFRAC(20)=0.1
 TFRAC(21)=0.105 ;TFRAC(22)=0.11
 TFRAC(23)=0.115 ;TFRAC(24)=0.12
 TFRAC(25)=0.125 ;TFRAC(26)=0.13
 TFRAC(27)=0.135 ;TFRAC(28)=0.14
 TFRAC(29)=0.145 ;TFRAC(30)=0.15
 TFRAC(31)=0.155 ;TFRAC(32)=0.16
 TFRAC(33)=0.165 ;TFRAC(34)=0.17
 TFRAC(35)=0.175 ;TFRAC(36)=0.18
 TFRAC(37)=0.185 ;TFRAC(38)=0.19
 TFRAC(39)=0.195 ;TFRAC(40)=0.2
 TFRAC(41)=0.205 ;TFRAC(42)=0.21
 TFRAC(43)=0.215 ;TFRAC(44)=0.22
 TFRAC(45)=0.225 ;TFRAC(46)=0.23
 TFRAC(47)=0.235 ;TFRAC(48)=0.24
 TFRAC(49)=0.245 ;TFRAC(50)=0.25
 TFRAC(51)=0.255 ;TFRAC(52)=0.26
 TFRAC(53)=0.265 ;TFRAC(54)=0.27
 TFRAC(55)=0.275 ;TFRAC(56)=0.28
 TFRAC(57)=0.285 ;TFRAC(58)=0.29
 TFRAC(59)=0.295 ;TFRAC(60)=0.3
 TFRAC(61)=0.305 ;TFRAC(62)=0.31
 TFRAC(63)=0.315 ;TFRAC(64)=0.32
 TFRAC(65)=0.325 ;TFRAC(66)=0.33
 TFRAC(67)=0.335 ;TFRAC(68)=0.34
 TFRAC(69)=0.345 ;TFRAC(70)=0.35
 TFRAC(71)=0.355 ;TFRAC(72)=0.36
 TFRAC(73)=0.365 ;TFRAC(74)=0.37
 TFRAC(75)=0.375 ;TFRAC(76)=0.38
 TFRAC(77)=0.385 ;TFRAC(78)=0.39
 TFRAC(79)=0.395 ;TFRAC(80)=0.4
 TFRAC(81)=0.405 ;TFRAC(82)=0.41
 TFRAC(83)=0.415 ;TFRAC(84)=0.42
 TFRAC(85)=0.425 ;TFRAC(86)=0.43
 TFRAC(87)=0.435 ;TFRAC(88)=0.44
 TFRAC(89)=0.445 ;TFRAC(90)=0.45
 TFRAC(91)=0.455 ;TFRAC(92)=0.46
 TFRAC(93)=0.465 ;TFRAC(94)=0.47
 TFRAC(95)=0.475 ;TFRAC(96)=0.48
 TFRAC(97)=0.485 ;TFRAC(98)=0.49
 TFRAC(99)=0.495 ;TFRAC(100)=0.5
 TFRAC(101)=0.505 ;TFRAC(102)=0.51
 TFRAC(103)=0.515 ;TFRAC(104)=0.52
 TFRAC(105)=0.525 ;TFRAC(106)=0.53
 TFRAC(107)=0.535 ;TFRAC(108)=0.54
 TFRAC(109)=0.545 ;TFRAC(110)=0.55
 TFRAC(111)=0.555 ;TFRAC(112)=0.56
 TFRAC(113)=0.565 ;TFRAC(114)=0.57
 TFRAC(115)=0.575 ;TFRAC(116)=0.58
 TFRAC(117)=0.585 ;TFRAC(118)=0.59
 TFRAC(119)=0.595 ;TFRAC(120)=0.6
 TFRAC(121)=0.605 ;TFRAC(122)=0.61
 TFRAC(123)=0.615 ;TFRAC(124)=0.62
 TFRAC(125)=0.625 ;TFRAC(126)=0.63
 TFRAC(127)=0.635 ;TFRAC(128)=0.64
 TFRAC(129)=0.645 ;TFRAC(130)=0.65
 TFRAC(131)=0.655 ;TFRAC(132)=0.66
 TFRAC(133)=0.665 ;TFRAC(134)=0.67
 TFRAC(135)=0.675 ;TFRAC(136)=0.68
 TFRAC(137)=0.685 ;TFRAC(138)=0.69
 TFRAC(139)=0.695 ;TFRAC(140)=0.7
 TFRAC(141)=0.705 ;TFRAC(142)=0.71
 TFRAC(143)=0.715 ;TFRAC(144)=0.72
 TFRAC(145)=0.725 ;TFRAC(146)=0.73
 TFRAC(147)=0.735 ;TFRAC(148)=0.74
 TFRAC(149)=0.745 ;TFRAC(150)=0.75
 TFRAC(151)=0.755 ;TFRAC(152)=0.76
 TFRAC(153)=0.765 ;TFRAC(154)=0.77
 TFRAC(155)=0.775 ;TFRAC(156)=0.78
 TFRAC(157)=0.785 ;TFRAC(158)=0.79
 TFRAC(159)=0.795 ;TFRAC(160)=0.8
 TFRAC(161)=0.805 ;TFRAC(162)=0.81
 TFRAC(163)=0.815 ;TFRAC(164)=0.82
 TFRAC(165)=0.825 ;TFRAC(166)=0.83
 TFRAC(167)=0.835 ;TFRAC(168)=0.84
 TFRAC(169)=0.845 ;TFRAC(170)=0.85
 TFRAC(171)=0.855 ;TFRAC(172)=0.86
 TFRAC(173)=0.865 ;TFRAC(174)=0.87
 TFRAC(175)=0.875 ;TFRAC(176)=0.88
 TFRAC(177)=0.885 ;TFRAC(178)=0.89
 TFRAC(179)=0.895 ;TFRAC(180)=0.9
 TFRAC(181)=0.905 ;TFRAC(182)=0.91
 TFRAC(183)=0.915 ;TFRAC(184)=0.92
 TFRAC(185)=0.925 ;TFRAC(186)=0.93
 TFRAC(187)=0.935 ;TFRAC(188)=0.94
 TFRAC(189)=0.945 ;TFRAC(190)=0.95
 TFRAC(191)=0.955 ;TFRAC(192)=0.96
 TFRAC(193)=0.965 ;TFRAC(194)=0.97
 TFRAC(195)=0.975 ;TFRAC(196)=0.98
 TFRAC(197)=0.985 ;TFRAC(198)=0.99
 TFRAC(199)=0.995 ;TFRAC(200)=1.
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES = T
 NX = 40
 XULAST =100.
 XFRAC(1)=0.025 ;XFRAC(2)=0.05
 XFRAC(3)=0.075 ;XFRAC(4)=0.1
 XFRAC(5)=0.125 ;XFRAC(6)=0.15
 XFRAC(7)=0.175 ;XFRAC(8)=0.2
 XFRAC(9)=0.225 ;XFRAC(10)=0.25
 XFRAC(11)=0.275 ;XFRAC(12)=0.3
 XFRAC(13)=0.325 ;XFRAC(14)=0.35
 XFRAC(15)=0.375 ;XFRAC(16)=0.4
 XFRAC(17)=0.425 ;XFRAC(18)=0.45
 XFRAC(19)=0.475 ;XFRAC(20)=0.5
 XFRAC(21)=0.525 ;XFRAC(22)=0.55
 XFRAC(23)=0.575 ;XFRAC(24)=0.6
 XFRAC(25)=0.625 ;XFRAC(26)=0.65
 XFRAC(27)=0.675 ;XFRAC(28)=0.7
 XFRAC(29)=0.725 ;XFRAC(30)=0.75
 XFRAC(31)=0.775 ;XFRAC(32)=0.8
 XFRAC(33)=0.825 ;XFRAC(34)=0.85
 XFRAC(35)=0.875 ;XFRAC(36)=0.9
 XFRAC(37)=0.925 ;XFRAC(38)=0.95
 XFRAC(39)=0.975 ;XFRAC(40)=1.
 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NY = 40
 YVLAST =100.
 YFRAC(1)=0.025 ;YFRAC(2)=0.05
 YFRAC(3)=0.075 ;YFRAC(4)=0.1
 YFRAC(5)=0.125 ;YFRAC(6)=0.15
 YFRAC(7)=0.175 ;YFRAC(8)=0.2
 YFRAC(9)=0.225 ;YFRAC(10)=0.25
 YFRAC(11)=0.275 ;YFRAC(12)=0.3
 YFRAC(13)=0.325 ;YFRAC(14)=0.35
 YFRAC(15)=0.375 ;YFRAC(16)=0.4
 YFRAC(17)=0.425 ;YFRAC(18)=0.45
 YFRAC(19)=0.475 ;YFRAC(20)=0.5
 YFRAC(21)=0.525 ;YFRAC(22)=0.55
 YFRAC(23)=0.575 ;YFRAC(24)=0.6
 YFRAC(25)=0.625 ;YFRAC(26)=0.65
 YFRAC(27)=0.675 ;YFRAC(28)=0.7
 YFRAC(29)=0.725 ;YFRAC(30)=0.75
 YFRAC(31)=0.775 ;YFRAC(32)=0.8
 YFRAC(33)=0.825 ;YFRAC(34)=0.85
 YFRAC(35)=0.875 ;YFRAC(36)=0.9
 YFRAC(37)=0.925 ;YFRAC(38)=0.95
 YFRAC(39)=0.975 ;YFRAC(40)=1.
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 PARAB = F
 NZ = 1
 ZWLAST =2.
 ZFRAC(1)=1.
 ************************************************************
  Group 6. Body-Fitted Coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS = T
 NAME(1)=P1 ;NAME(3)=U1
 NAME(5)=V1 ;NAME(148)=POL
 NAME(149)=PRPS ;NAME(150)=RHO1
    * Y in SOLUTN argument list denotes:
    * 1-stored 2-solved 3-whole-field
    * 4-point-by-point 5-explicit 6-harmonic averaging 
 SOLUTN(P1,Y,Y,Y,N,N,Y)
 SOLUTN(U1,Y,Y,Y,N,N,Y)
 SOLUTN(V1,Y,Y,Y,N,N,Y)
 SOLUTN(POL,Y,Y,N,N,N,Y)
 SOLUTN(PRPS,Y,N,N,N,N,Y)
 SOLUTN(RHO1,Y,N,N,N,N,Y)
 DEN1 = 150
 PRPS = 149
 ************************************************************
  Group 8. Terms & Devices
    * Y in TERMS argument list denotes:
    * 1-built-in source 2-convection 3-diffusion 4-transient
    * 5-first phase variable 6-interphase transport         
 TERMS(P1,Y,Y,Y,N,Y,Y)
 TERMS(U1,Y,Y,Y,Y,Y,Y)
 TERMS(V1,Y,Y,Y,Y,Y,Y)
 TERMS(POL,N,Y,Y,Y,Y,Y)
 DIFCUT =0.5 ;ZDIFAC =1.
 GALA = F ;ADDDIF = F
 NEWRH1 = T
 ISOLX = -1 ;ISOLY = -1 ;ISOLZ = -1
 ************************************************************
  Group 9. Properties used if PRPS is not
  stored, and where PRPS = -1.0 if it is!
 RHO1 = GRND3 ;TMP1 =0.
 EL1 =0.
 TSURR =0. ;TEMP0 =0.
 PRESS0 =1.962E+04
 DVO1DT =0. ;DRH1DP = GRND3
 RHO1A =7.139215 ;RHO1B =0.5
 RHO1C =0.
 EMISS =0. ;SCATT =0.
 RADIA =0. ;RADIB =0.
 ENUL =1.0E-05 ;ENUT =0.
 PRNDTL(U1)=1. ;PRNDTL(V1)=1.
 PRNDTL(POL)=1.
 PRT(U1)=1. ;PRT(V1)=1.
 PRT(POL)=1.
 CP1 =1. ;CP2 =1.
 ************************************************************
  Group 10.Inter-Phase Transfer Processes
 ************************************************************
  Group 11.Initial field variables (PHIs)
 FIINIT(P1)=1.0E-10 ;FIINIT(U1)=1.0E-10
 FIINIT(V1)=1.0E-10 ;FIINIT(POL)=1.0E-10
 FIINIT(PRPS)=-1. ;FIINIT(RHO1)=1000.
 
 PATCH(SEAWALL ,INIVAL, 20, 20, 8, 32, 1, 1, 1, 200)
 INIT(SEAWALL ,PRPS,0. ,198. )
 
 PATCH(JETTY ,INIVAL, 30, 30, 32, 40, 1, 1, 1, 200)
 INIT(JETTY ,PRPS,0. ,198. )
 
 PATCH(ISLAND ,INIVAL, 32, 36, 8, 16, 1, 1, 1, 200)
 INIT(ISLAND ,PRPS,0. ,198. )
 INIADD = F
 FSWEEP = 1
 NAMFI =CHAM
 ************************************************************
  Group 12. Patchwise adjustment of terms
  Patches for this group are printed with those
  for Group 13.
  Their names begin either with GP12 or &
 ************************************************************
  Group 13. Boundary & Special Sources
 
 PATCH(TIMINLET,WEST , 1, 1, 1, 40, 1, 1, 1, 200)
 COVAL(TIMINLET,P1 , FIXVAL , GRND3 )
 
 PATCH(BOTTOM ,HWALL , 1, 40, 1, 40, 1, 1, 1, 200)
 COVAL(BOTTOM ,U1 ,1. ,0. )
 COVAL(BOTTOM ,V1 ,1. ,0. )
 
 PATCH(POLLUTNT,CELL , 30, 30, 20, 21, 1, 1, 1, 200)
 COVAL(POLLUTNT,POL , FIXFLU ,100. )
 XCYCLE = F
 EGWF = T
 WALLCO = GRND2
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP = 10 ;ISWC1 = 1
 LITHYD = 1 ;LITFLX = 1 ;LITC = 1 ;ITHC1 = 1
 SELREF = T
 RESFAC =1.0E-04
 ************************************************************
  Group 16. Terminate Iterations
 LITER(P1)=50 ;LITER(U1)=10
 LITER(V1)=10 ;LITER(POL)=20
 ENDIT(P1)=1.0E-03 ;ENDIT(U1)=1.0E-03
 ENDIT(V1)=1.0E-03 ;ENDIT(POL)=1.0E-03
 ************************************************************
  Group 17. Relaxation
 RELAX(P1,LINRLX,1.)
 RELAX(U1,FALSDT,4.32)
 RELAX(V1,FALSDT,4.32)
 RELAX(POL,FALSDT,1.0E+09)
 RELAX(PRPS,LINRLX,1.)
 RELAX(RHO1,LINRLX,1.)
 OVRRLX =0.
 EXPERT = F ;NNORSL = F
 ************************************************************
  Group 18. Limits
 VARMAX(P1)=1.0E+10 ;VARMIN(P1)=-1.0E+10
 VARMAX(U1)=1.0E+06 ;VARMIN(U1)=-1.0E+06
 VARMAX(V1)=1.0E+06 ;VARMIN(V1)=-1.0E+06
 VARMAX(POL)=1.0E+10 ;VARMIN(POL)=-1.0E+10
 VARMAX(PRPS)=1.0E+10 ;VARMIN(PRPS)=-1.0E+10
 VARMAX(RHO1)=5000. ;VARMIN(RHO1)=200.
 ************************************************************
  Group 19. Data transmitted to GROUND
 PARSOL = F
 IDISPB = 1 ;IDISPC = 200
 ITIMA = 200 ;ITIMB = 1 ;ITIMC = 200
 ISG62 = 1
 TIMA =4905.
 SPEDAT(SET,GXMONI,TRANSIENT,L,F)
 SPEDAT(SET,MATERIAL,198,L,T)
 ************************************************************
  Group 20. Preliminary Printout
 ************************************************************
  Group 21. Print-out of Variables
 INIFLD = F ;SUBWGR = F
    * Y in OUTPUT argument list denotes:
    * 1-field 2-correction-eq. monitor 3-selective dumping      
    * 4-whole-field residual 5-spot-value table 6-residual table
 OUTPUT(P1,Y,Y,Y,Y,Y,Y)
 OUTPUT(U1,Y,Y,Y,Y,Y,Y)
 OUTPUT(V1,Y,Y,Y,Y,Y,Y)
 OUTPUT(POL,Y,N,Y,Y,Y,Y)
 OUTPUT(PRPS,Y,N,Y,N,N,N)
 OUTPUT(RHO1,Y,N,Y,N,N,N)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON = 30 ;IYMON = 30 ;IZMON = 1
 NPRMON = 100000 ;NPRMNT = 1 ;TSTSWP = -2
 UWATCH = T ;USTEER = T
 HIGHLO = F
 ************************************************************
  Group 23.Field Print-Out & Plot Control
 NPRINT = 100000 ;NUMCLS = 5
 NTPRIN = 100000 ;ISTPRF = 1 ;ISTPRL = 100000
 NXPRIN = -1 ;IXPRF = 1 ;IXPRL = 10000
 NYPRIN = -1 ;IYPRF = 1 ;IYPRL = 10000
 IPLTF = 1 ;IPLTL = -1 ;NPLT = 1
 ISWPRF = 1 ;ISWPRL = 100000
 ITABL = 3 ;IPROF = 1
 ABSIZ =0.5 ;ORSIZ =0.4
 NTZPRF = 1 ;NCOLPF = 50
 ICHR = 2 ;NCOLCO = 45 ;NROWCO = 20
 
 PATCH(TIMPLT1 ,PROFIL, 1, 1, 1, 1, 1, 1, 1, 200)
 PLOT(TIMPLT1 ,P1 ,0. ,0. )
 PLOT(TIMPLT1 ,U1 ,0. ,0. )
 PLOT(TIMPLT1 ,RHO1,0. ,0. )
 
 PATCH(TIMPLT2 ,PROFIL, 40, 40, 1, 1, 1, 1, 1, 200)
 PLOT(TIMPLT2 ,P1 ,0. ,0. )
 PLOT(TIMPLT2 ,RHO1,0. ,0. )
 
 PATCH(TIMPLT3 ,PROFIL, 30, 30, 1, 1, 1, 1, 1, 200)
 PLOT(TIMPLT3 ,P1 ,0. ,0. )
 PLOT(TIMPLT3 ,U1 ,0. ,0. )
 PLOT(TIMPLT3 ,RHO1,0. ,0. )
 ************************************************************
  Group 24. Dumps For Restarts
 SAVE = T ;NOWIPE = F
 NSAVE =CHAM
 IDISPA = 25 ;IDISPB = 1 ;IDISPC = 200
STOP