TALK=T;RUN(1,1)
  DISPLAY
  The purpose of creation of this case is a demonstration
  of the transfer objects feature.

  This example explores the distribution of pollution on a
  reasonablylarge region of ground. The use of transfer objects
  permits the calculation of unidirectional flow on small parts,
  one after another.

  The solved area in this example is divided into four parts.
  The solution in each part is made in a separate run.

               ---------------------
               !         !         !
               !         !         !
               ! 3rd run ! 4th run !
               !         !         !
       W1      !         !         !
       -->     ----------+----------
               !         !         !
               !         !         !
               ! 1st run ! 2nd run !
               !         !         !
        X !    !         !         !
          !    ---------------------
          !              ^
          !----- Z      /!\
                         !
                         !U1

  HIGHTRO1
  and EASTTRO1 transfer objects on the high and
  east boundaries are formed at the end of the first run by means
  of two '(export' In-Form statements.

  They store values of outlet mass flux and concentration on these
  boundaries to transfer them to the second and third runs.

  The second run reads the information at the low boundary from the
  HIGHTRO1
   object by means of '(import' In-Form statements and
  at the end of calculation dumps it at the east boundary in the
  EASTTRO2
   object.

  The third run reads the
  EASTTRO1
   object and forms the
  HIGHTRO3
   object.

  The fourth run reads the information from
  HIGHTRO3
  and EASTTRO2 import transfer objects at the low and west
  boundaries.

  In general there can be any number of transfer objects.

  Each run simulates the distribution of pollution in one part.

  The wind profile at inlet boundaries is set by means of
  
  In-Form statements as a logarithmic velocity profile.

  The ground relief (HIG variable) is calculated by this
  
  In-Form formula.

  The MARK variable
  defined
  by In-Form is used for the image of ground relief in Photon.

  The ground roughness is simulated by a change of air density
  driven by the height of an atmospheric layer. Density of air is
  calculated
  by barom$
etric formula by means of In-Form.

  The last, fifth, run  simulates the flow in the whole region
  without partitioning. It will be useful as a comparison
  to the previous runs.

  The Q1 contains PHOTON USE commands
  ENDDIS
  PHOTON USE
  p
  phi1
  1 5 1;;

  VI -1 1 1
  gr ou y 1
  SURF MARK Y .99
  SURF MARK X .99
  SURF MARK Z .99
  msg First run: ground geometry
  pause
  p
  phi1;;;

  vi y
  gr ou y 1
  con rho1 y m fi;.001
  msg density contours
  pause
  con cl;red
  ve y 1 sh
  msg velocity vectors
  pause
  con cl;red
  set con scale range on
  con conc y 1 fi;0 0.0028;.001
  set con scale range off
  msg concentration contours
  pause
  p
  phi2
  1 5 1;;

  VI -1 1 1
  gr ou y 1
  SURF MARK Y .99
  SURF MARK X .99
  SURF MARK Z .99
  msg Second run: ground geometry
  pause
  p
  phi2;;;

  vi y
  gr ou y 1
  con rho1 y m fi;.001
  msg density contours
  pause
  con cl;red
  ve y 1 sh
  msg velocity vectors
  pause
  con cl;red
  set con scale range on
  con conc y 1 fi;0 0.0028;.001
  set con scale range off
  msg concentration contours
  pause
  p
  phi3
  1 5 1;;

  VI -1 1 1
  gr ou y 1
  SURF MARK Y .99
  SURF MARK X .99
  SURF MARK Z .99
  msg Third run: ground geometry
  pause
  p
  phi3;;;

  vi y
  gr ou y 1
  con rho1 y m fi;.001
  msg density contours
  pause
  con cl;red
  ve y 1 sh
  msg velocity vectors
  pause
  con cl;red
  set con scale range on
  con conc y 1 fi;0 0.0028;.001
  set con scale range off
  msg concentration contours
  pause
  p
  phi4
  1 5 1;;

  VI -1 1 1
  gr ou y 1
  SURF MARK Y .99
  SURF MARK X .99
  SURF MARK Z .99
  msg Fourth run: ground geometry
  pause
  p
  phi4;;;

  vi y
  gr ou y 1
  con rho1 y m fi;.001
  msg density contours
  pause
  con cl;red
  ve y 1 sh
  msg velocity vectors
  pause
  con cl;red
  set con scale range on
  con conc y 1 fi;0 0.0028;.001
  set con scale range off
  msg concentration contours
  pause
  p
  phi5
  1 5 1;;

  VI -1 1 1
  gr ou y 1
  SURF MARK Y .99
  SURF MARK X .99
  SURF MARK Z .99
  msg Fifth run: ground geometry
  pause
  p
  phi5;;;

  vi y
  gr ou y 1
  con rho1 y m fi;.001
  msg density contours
  pause
  con cl;red
  ve y 1 sh
  msg velocity vectors
  pause
  con cl;red
  set con scale range on
  con conc y 1 fi;0 0.0028;.001
  set con scale range off
  msg concentration contours
  ENDUSE
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 ************************************************************
 
 TEXT(ATMOSPHERIC B.L., first run             )
 
 ************************************************************
 ************************************************************
 
 IRUNN = 1 ;LIBREF = 14
 ************************************************************
  Group 2. Time dependence
 STEADY = T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES = T
 NX = 25
 XULAST =5000.
 XFRAC(1)=0.04 ;XFRAC(2)=0.08
 XFRAC(3)=0.12 ;XFRAC(4)=0.16
 XFRAC(5)=0.2 ;XFRAC(6)=0.24
 XFRAC(7)=0.28 ;XFRAC(8)=0.32
 XFRAC(9)=0.36 ;XFRAC(10)=0.4
 XFRAC(11)=0.44 ;XFRAC(12)=0.48
 XFRAC(13)=0.52 ;XFRAC(14)=0.56
 XFRAC(15)=0.6 ;XFRAC(16)=0.64
 XFRAC(17)=0.68 ;XFRAC(18)=0.72
 XFRAC(19)=0.76 ;XFRAC(20)=0.8
 XFRAC(21)=0.84 ;XFRAC(22)=0.88
 XFRAC(23)=0.92 ;XFRAC(24)=0.96
 XFRAC(25)=1.
 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NY = 20
 YVLAST =1000.
 YFRAC(1)=2.5E-03 ;YFRAC(2)=0.01
 YFRAC(3)=0.0225 ;YFRAC(4)=0.04
 YFRAC(5)=0.0625 ;YFRAC(6)=0.09
 YFRAC(7)=0.1225 ;YFRAC(8)=0.16
 YFRAC(9)=0.2025 ;YFRAC(10)=0.25
 YFRAC(11)=0.3025 ;YFRAC(12)=0.36
 YFRAC(13)=0.4225 ;YFRAC(14)=0.49
 YFRAC(15)=0.5625 ;YFRAC(16)=0.64
 YFRAC(17)=0.7225 ;YFRAC(18)=0.81
 YFRAC(19)=0.9025 ;YFRAC(20)=1.
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 PARAB = F
 NZ = 25
 ZWLAST =5000.
 ZFRAC(1)=0.04 ;ZFRAC(2)=0.08
 ZFRAC(3)=0.12 ;ZFRAC(4)=0.16
 ZFRAC(5)=0.2 ;ZFRAC(6)=0.24
 ZFRAC(7)=0.28 ;ZFRAC(8)=0.32
 ZFRAC(9)=0.36 ;ZFRAC(10)=0.4
 ZFRAC(11)=0.44 ;ZFRAC(12)=0.48
 ZFRAC(13)=0.52 ;ZFRAC(14)=0.56
 ZFRAC(15)=0.6 ;ZFRAC(16)=0.64
 ZFRAC(17)=0.68 ;ZFRAC(18)=0.72
 ZFRAC(19)=0.76 ;ZFRAC(20)=0.8
 ZFRAC(21)=0.84 ;ZFRAC(22)=0.88
 ZFRAC(23)=0.92 ;ZFRAC(24)=0.96
 ZFRAC(25)=1.
 ************************************************************
  Group 6. Body-Fitted Coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS = T
 NAME(1)=P1 ;NAME(3)=U1
 NAME(5)=V1 ;NAME(7)=W1
 NAME(12)=KE ;NAME(13)=EP
 NAME(144)=RHO1 ;NAME(145)=MARK
 NAME(146)=HIG ;NAME(147)=EL1
 NAME(148)=ENUT ;NAME(149)=EPKE
 NAME(150)=CONC
    * 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,N,N,N,Y)
 SOLUTN(V1,Y,Y,N,N,N,Y)
 SOLUTN(W1,Y,Y,N,N,N,Y)
 SOLUTN(KE,Y,Y,N,N,N,N)
 SOLUTN(EP,Y,Y,N,N,N,N)
 SOLUTN(RHO1,Y,N,N,N,N,Y)
 SOLUTN(MARK,Y,N,N,N,N,Y)
 SOLUTN(HIG,Y,N,N,N,N,Y)
 SOLUTN(EL1,Y,N,N,N,N,Y)
 SOLUTN(ENUT,Y,N,N,N,N,Y)
 SOLUTN(EPKE,Y,N,N,N,N,Y)
 SOLUTN(CONC,Y,Y,N,N,N,Y)
 DEN1 = 144
 VIST = 148
 LEN1 = 147
 ************************************************************
  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(W1,Y,Y,Y,Y,Y,Y)
 TERMS(KE,N,Y,Y,Y,Y,N)
 TERMS(EP,N,Y,Y,Y,Y,N)
 TERMS(CONC,N,Y,Y,Y,Y,Y)
 DIFCUT =0.5 ;ZDIFAC =1.
 GALA = F ;ADDDIF = F
 NEWENT = 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 =1.189 ;TMP1 =0.
 EL1 = GRND4
 TSURR =0. ;TEMP0 =273.
 PRESS0 =1.0E+05
 DVO1DT =3.41E-03 ;DRH1DP =0.
 EMISS =0. ;SCATT =0.
 RADIA =0. ;RADIB =0.
 EL1A =0. ;EL1B =0.
 EL1C =0.
 ENUL =1.544E-05 ;ENUT = GRND3
 ENUTA =0. ;ENUTB =0.
 ENUTC =0.
 IENUTA = 0
 PRNDTL(U1)=1. ;PRNDTL(V1)=1.
 PRNDTL(W1)=1. ;PRNDTL(KE)=1.
 PRNDTL(EP)=1. ;PRNDTL(CONC)=1.
 PRT(U1)=1. ;PRT(V1)=1.
 PRT(W1)=1. ;PRT(KE)=1.
 PRT(EP)=1.314 ;PRT(CONC)=1.
 CP1 =1005. ;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(W1)=1.0E-10
 FIINIT(KE)=1.0E-10 ;FIINIT(EP)=1.0E-10
 FIINIT(RHO1)=1.0E-10 ;FIINIT(MARK)=1.0E-10
 FIINIT(HIG)=1.0E-10 ;FIINIT(EL1)=1.0E-10
 FIINIT(ENUT)=1.0E-10 ;FIINIT(EPKE)=1.0E-10
 FIINIT(CONC)=1.0E-10
   No PATCHes yet used for this Group
 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(KESOURCE,PHASEM, 0, 0, 0, 0, 0, 0, 1, 1)
 COVAL(KESOURCE,KE , GRND4 , GRND4 )
 COVAL(KESOURCE,EP , GRND4 , GRND4 )
 
 PATCH(HOUT ,HIGH , 1, 25, 1, 20, 25, 25, 1, 1)
 COVAL(HOUT ,P1 ,5.0E-04 ,0. )
 
 PATCH(EOUT ,EAST , 25, 25, 1, 20, 1, 25, 1, 1)
 COVAL(EOUT ,P1 ,5.0E-04 ,0. )
 
 PATCH(NOUT ,NORTH , 1, 25, 20, 20, 1, 25, 1, 1)
 COVAL(NOUT ,P1 ,5.0E-04 ,0. )
 COVAL(NOUT ,U1 ,In-Form:source - see Grp 19)
 COVAL(NOUT ,W1 ,In-Form:source - see Grp 19)
 
 PATCH(SOURCE ,CELL , 1, 7, 1, 1, 1, 4, 1, 1)
 COVAL(SOURCE ,CONC, FIXFLU ,1. )
 
 PATCH(GROUND ,SWALL , 1, 25, 1, 1, 1, 25, 1, 1)
 COVAL(GROUND ,U1 , GRND5 ,0. )
 COVAL(GROUND ,W1 , GRND5 ,0. )
 COVAL(GROUND ,KE , GRND5 , GRND5 )
 COVAL(GROUND ,EP , GRND5 , GRND5 )
 
 PATCH(LINLET ,LOW , 1, 25, 1, 20, 1, 1, 1, 1)
 COVAL(LINLET ,P1 ,In-Form:source - see Grp 19)
 COVAL(LINLET ,U1 ,In-Form:source - see Grp 19)
 COVAL(LINLET ,W1 ,In-Form:source - see Grp 19)
 COVAL(LINLET ,KE ,In-Form:source - see Grp 19)
 COVAL(LINLET ,EP ,In-Form:source - see Grp 19)
 
 PATCH(WINLET ,WEST , 1, 1, 1, 20, 1, 25, 1, 1)
 COVAL(WINLET ,P1 ,In-Form:source - see Grp 19)
 COVAL(WINLET ,U1 ,In-Form:source - see Grp 19)
 COVAL(WINLET ,W1 ,In-Form:source - see Grp 19)
 COVAL(WINLET ,KE ,In-Form:source - see Grp 19)
 COVAL(WINLET ,EP ,In-Form:source - see Grp 19)
 
 PATCH(HPAT ,HIGH , 1, 25, 1, 20, 25, 25, 1, 1)
 
 PATCH(EPAT ,EAST , 25, 25, 1, 20, 1, 25, 1, 1)
 XCYCLE = F
 WALLA =0.02 ;WALLB =0.
 EGWF = T
 WALLCO = GRND5
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP = 150 ;ISWC1 = 1
 LITHYD = 1 ;LITFLX = 1 ;LITC = 1 ;ITHC1 = 1
 SELREF = T
 RESFAC =1.0E-04
 ************************************************************
  Group 16. Terminate Iterations
 LITER(P1)=20 ;LITER(U1)=10
 LITER(V1)=10 ;LITER(W1)=10
 LITER(KE)=20 ;LITER(EP)=20
 LITER(CONC)=20
 ENDIT(P1)=1.0E-03 ;ENDIT(U1)=1.0E-03
 ENDIT(V1)=1.0E-03 ;ENDIT(W1)=1.0E-03
 ENDIT(KE)=1.0E-03 ;ENDIT(EP)=1.0E-03
 ENDIT(CONC)=1.0E-03
 ************************************************************
  Group 17. Relaxation
 RELAX(P1,LINRLX,1.)
 RELAX(U1,FALSDT,1.)
 RELAX(V1,FALSDT,1.)
 RELAX(W1,FALSDT,1.)
 RELAX(KE,LINRLX,0.5)
 RELAX(EP,LINRLX,0.5)
 RELAX(RHO1,LINRLX,1.)
 RELAX(MARK,LINRLX,1.)
 RELAX(HIG,LINRLX,1.)
 RELAX(EL1,LINRLX,1.)
 RELAX(ENUT,LINRLX,1.)
 RELAX(EPKE,LINRLX,1.)
 RELAX(CONC,FALSDT,1.0E+09)
 KELIN = 0
 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(W1)=1.0E+06 ;VARMIN(W1)=-1.0E+06
 VARMAX(KE)=1.0E+10 ;VARMIN(KE)=1.0E-10
 VARMAX(EP)=1.0E+10 ;VARMIN(EP)=1.0E-10
 VARMAX(RHO1)=1.0E+10 ;VARMIN(RHO1)=-1.0E+10
 VARMAX(MARK)=1.0E+10 ;VARMIN(MARK)=-1.0E+10
 VARMAX(HIG)=1.0E+10 ;VARMIN(HIG)=-1.0E+10
 VARMAX(EL1)=1.0E+10 ;VARMIN(EL1)=-1.0E+10
 VARMAX(ENUT)=1.0E+10 ;VARMIN(ENUT)=-1.0E+10
 VARMAX(EPKE)=1.0E+10 ;VARMIN(EPKE)=-1.0E+10
 VARMAX(CONC)=1.0E+10 ;VARMIN(CONC)=0.
 ************************************************************
  Group 19. Data transmitted to GROUND
 GENK = T
 PARSOL = F
 CONWIZ = T
 ISG52 = 2
 ISG62 = 1
 SPEDAT(SET,DOMAIN,PHASE_1_MAT,I,0)
 SPEDAT(SET,SOURCE,R1!LINLET,C,=1.189*EXP((YG+HIG[&1])/(-8000))*0.$)
 SPEDAT(SET,SOURCE,R1!LINLET,C,616595*YG^0.21)
 SPEDAT(SET,SOURCE,U1!LINLET,C,=0.616595*YG^0.21!ONLYMS)
 SPEDAT(SET,SOURCE,W1!LINLET,C,=0.616595*YG^0.21!ONLYMS)
 SPEDAT(SET,SOURCE,KE!LINLET,C,=0.029928!ONLYMS)
 SPEDAT(SET,SOURCE,EP!LINLET,C,=2.074951E-03/(YG-0.)!ONLYMS)
 SPEDAT(SET,SOURCE,R1!WINLET,C,=1.189*EXP((YG+HIG[&1])/(-8000))*0.$)
 SPEDAT(SET,SOURCE,R1!WINLET,C,616595*YG^0.21)
 SPEDAT(SET,SOURCE,U1!WINLET,C,=0.616595*YG^0.21!ONLYMS)
 SPEDAT(SET,SOURCE,W1!WINLET,C,=0.616595*YG^0.21!ONLYMS)
 SPEDAT(SET,SOURCE,KE!WINLET,C,=0.029928!ONLYMS)
 SPEDAT(SET,SOURCE,EP!WINLET,C,=2.074951E-03/(YG-0.)!ONLYMS)
 SPEDAT(SET,SOURCE,U1!NOUT,C,=0.616595*YG^0.21!ONLYMS)
 SPEDAT(SET,SOURCE,W1!NOUT,C,=0.616595*YG^0.21!ONLYMS)
 SPEDAT(SET,STORED,HIG!GROUND,C,=100.*(1-(0.+XG)/1.0E+04)*(1-(0.+Z$)
 SPEDAT(SET,STORED,HIG!GROUND,C,G)/1.0E+04)*(2.+SIN(6*(0.+XG)/1.0E$)
 SPEDAT(SET,STORED,HIG!GROUND,C,+04)+SIN(24*(0.+ZG)/1.0E+04))!TSTS$)
 SPEDAT(SET,STORED,HIG!GROUND,C,TR)
 SPEDAT(SET,STORED,MARK,C,=1!IF(YG.GT.HIG[&1])!TSTSTR)
 SPEDAT(SET,PROPERTY,RHO1,C,=1.189*EXP((YG+HIG[&1])/(-8000)))
 SPEDAT(SET,EXPORT,HPAT,C,HIGHTRO1)
 SPEDAT(SET,EXPORT,EPAT,C,EASTTRO1)
 ************************************************************
  Group 20. Preliminary Printout
 DISTIL = T ;NULLPR = F
 NDST = 0
 DSTTOL =1.0E-02
 EX(P1)=1362. ;EX(U1)=1.32
 EX(V1)=0.186 ;EX(W1)=1.289
 EX(KE)=0.04055 ;EX(EP)=5.847E-04
 EX(RHO1)=1.12 ;EX(MARK)=0.6183
 EX(HIG)=7.655 ;EX(EL1)=108.800003
 EX(ENUT)=13.56 ;EX(EPKE)=1.0E-10
 EX(CONC)=3.035E-05
 ************************************************************
  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,N,Y,Y,Y,Y)
 OUTPUT(U1,Y,N,Y,Y,Y,Y)
 OUTPUT(V1,Y,N,Y,Y,Y,Y)
 OUTPUT(W1,Y,N,Y,Y,Y,Y)
 OUTPUT(KE,Y,N,Y,Y,Y,Y)
 OUTPUT(EP,Y,N,Y,Y,Y,Y)
 OUTPUT(RHO1,Y,N,Y,N,N,N)
 OUTPUT(MARK,Y,N,Y,N,N,N)
 OUTPUT(HIG,Y,N,Y,N,N,N)
 OUTPUT(EL1,Y,N,Y,N,N,N)
 OUTPUT(ENUT,Y,N,Y,N,N,N)
 OUTPUT(EPKE,Y,N,Y,N,N,N)
 OUTPUT(CONC,Y,N,Y,Y,Y,Y)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON = 12 ;IYMON = 10 ;IZMON = 23
 NPRMON = 100000 ;NPRMNT = 1 ;TSTSWP = -1
 UWATCH = T ;USTEER = T
 HIGHLO = F
 ************************************************************
  Group 23.Field Print-Out & Plot Control
 NPRINT = 100000 ;NUMCLS = 5
 NXPRIN = -1 ;IXPRF = 1 ;IXPRL = 10000
 NYPRIN = -1 ;IYPRF = 1 ;IYPRL = 10000
 NZPRIN = -1 ;IZPRF = 1 ;IZPRL = 10000
 XZPR = F ;YZPR = F
 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
   No PATCHes yet used for this Group
 ************************************************************
  Group 24. Dumps For Restarts
 SAVE = T ;NOWIPE = F
 NSAVE =phi1
STOP