!  DO NOT EDIT THIS FILE
!  But edit spaceparams.tmpl and/or makeincludes.F90
!  compile makeincludes.F90 and run the compilate
!  Compiling and running is taken care of by the Makefile
        allocate(s%x          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%y          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%xz         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%yz         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%xu         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%yu         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%xv         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%yv         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dsu        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dsv        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dsz        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dsc        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dnu        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dnv        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dnz        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dnc        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dsdnui     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dsdnvi     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dsdnzi     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%alfaz      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%alfau      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%alfav      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%sdist      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ndist      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%xyzs01     (2                                                              ))
        allocate(s%xyzs02     (2                                                              ))
        allocate(s%xyzs03     (2                                                              ))
        allocate(s%xyzs04     (2                                                              ))
        allocate(s%zb         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%zb0        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%theta      (s%ntheta                                                       ))
        allocate(s%thetamean  (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Fx         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Fy         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Sxy        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Syy        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Sxx        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%n          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%H          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%cgx        (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%cgy        (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%cx         (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%cy         (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%ctheta     (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%ee         (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%thet       (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%costh      (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%sinth      (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%sigt       (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%rr         (s%nx+1         ,s%ny+1         ,s%ntheta                       ))
        allocate(s%k          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%c          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%cg         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%sigm       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%wm         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%hh         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%zs         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%zs0        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%tideinpt   (s%tidelen                                                      ))
        allocate(s%tideinpz   (s%tidelen      ,par%tideloc                                    ))
        allocate(s%windinpt   (s%windlen                                                      ))
        allocate(s%windvelts  (s%windlen                                                      ))
        allocate(s%winddirts  (s%windlen                                                      ))
        allocate(s%windxts    (s%windlen                                                      ))
        allocate(s%windyts    (s%windlen                                                      ))
        allocate(s%windsu     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%windnv     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dzsdt      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dzsdx      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dzsdy      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dzbdx      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dzbdy      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dzbdt      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%uu         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vu         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%uv         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vv         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%qx         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%qy         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%sedero     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dcbdx      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dcbdy      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dcsdx      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dcsdy      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ui         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vi         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%E          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%R          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%urms       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%D          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Qb         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ust        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%tm         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ueu        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vev        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vmagu      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vmageu     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vmagv      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vmagev     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%u          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%v          (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ue         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ve         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%hold       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%wetu       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%wetv       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%wetz       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%hu         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%hv         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%hum        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%hvm        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vmag       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ccg        (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%ccbg       (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%uwf        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vwf        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ustr       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%usd        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%bi         (s%ny+1                                                         ))
        allocate(s%DR         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%umean      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vmean      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ur         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%D50        (par%ngd                                                        ))
        allocate(s%D90        (par%ngd                                                        ))
        allocate(s%sedcal     (par%ngd                                                        ))
        allocate(s%ucrcal     (par%ngd                                                        ))
        allocate(s%Tsg        (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%Susg       (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%Svsg       (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%Subg       (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%Svbg       (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%ceqbg      (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%ceqsg      (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%ua         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%BR         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%kb         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Tbore      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dzav       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%maxzs      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%minzs      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%L1         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Sk         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%As         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwhead     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwheadb    (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwlevel    (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwheight   (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwbottom   (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwu        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwv        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwqx       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwqy       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gww        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gwcurv     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dinfil     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%infil      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gw0back    (2              ,s%ny+1                                         ))
        allocate(s%kturb      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ero        (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%depo_im    (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%depo_ex    (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%nd         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%pbbed      (s%nx+1         ,s%ny+1         ,max(par%nd,2)  ,par%ngd        ))
        allocate(s%dzbed      (s%nx+1         ,s%ny+1         ,max(par%nd,2)                  ))
        allocate(s%z0bed      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ureps      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vreps      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%urepb      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vrepb      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%umwci      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vmwci      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%rolthick   (s%nx+1         ,s%ny+1                                         ))
        allocate(s%zswci      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%pres       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%wb         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ws         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%taubx      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%tauby      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Df         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Dp         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Sutot      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Svtot      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%cctot      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%wi         (2              ,s%ny+1                                         ))
        allocate(s%zi         (2              ,s%ny+1                                         ))
        allocate(s%nuh        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%cf         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%D50top     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%D90top     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%structdepth(s%nx+1         ,s%ny+1                                         ))
        allocate(s%zs0fac     (s%nx+1         ,s%ny+1         ,2                              ))
        allocate(s%tdisch     (par%ntdischarge                                                ))
        allocate(s%pdisch     (par%ndischarge ,4                                              ))
        allocate(s%pntdisch   (par%ndischarge                                                 ))
        allocate(s%qdisch     (par%ntdischarge,par%ndischarge                                 ))
        allocate(s%idrift     (par%ndrifter                                                   ))
        allocate(s%jdrift     (par%ndrifter                                                   ))
        allocate(s%tdriftb    (par%ndrifter                                                   ))
        allocate(s%tdrifte    (par%ndrifter                                                   ))
        allocate(s%runup      (s%ny+1                                                         ))
        allocate(s%Hrunup     (s%ny+1                                                         ))
        allocate(s%xHrunup    (s%ny+1                                                         ))
        allocate(s%istruct    (s%ny+1                                                         ))
        allocate(s%iwl        (s%ny+1                                                         ))
        allocate(s%strucslope (s%ny+1                                                         ))
        allocate(s%Dc         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ph         (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dobs       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%sig2prior  (s%nx+1         ,s%ny+1                                         ))
        allocate(s%zbobs      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%shobs      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%bwalpha    (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dcmdo      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%dassim     (s%nx+1         ,s%ny+1                                         ))
        allocate(s%cobs       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%shipxCG    (par%nship                                                      ))
        allocate(s%shipyCG    (par%nship                                                      ))
        allocate(s%shipzCG    (par%nship                                                      ))
        allocate(s%shipFx     (par%nship                                                      ))
        allocate(s%shipFy     (par%nship                                                      ))
        allocate(s%shipFz     (par%nship                                                      ))
        allocate(s%shipMx     (par%nship                                                      ))
        allocate(s%shipMy     (par%nship                                                      ))
        allocate(s%shipMz     (par%nship                                                      ))
        allocate(s%shipphi    (par%nship                                                      ))
        allocate(s%shipchi    (par%nship                                                      ))
        allocate(s%shippsi    (par%nship                                                      ))
        allocate(s%Dveg       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Fvegu      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%Fvegv      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ududx      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vdvdy      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%udvdx      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%vdudy      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%viscu      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%viscv      (s%nx+1         ,s%ny+1                                         ))
        allocate(s%masserror1 (s%nx+1         ,s%ny+1                                         ))
        allocate(s%masserror2 (s%nx+1         ,s%ny+1                                         ))
        allocate(s%ero_scarp  (s%nx+1         ,s%ny+1         ,par%ngd                        ))
        allocate(s%gMnc       (s%nx+1         ,s%ny+1                                         ))
        allocate(s%gMc        (s%nx+1         ,s%ny+1                                         ))
        allocate(s%tau_bottom (s%nx+1         ,s%ny+1                                         ))
!directions for vi vim: filetype=fortran : syntax=fortran
