!  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
      case(  1)
        allocate(s%x(s%nx+1,s%ny+1))
      case(  2)
        allocate(s%y(s%nx+1,s%ny+1))
      case(  3)
        allocate(s%xz(s%nx+1,s%ny+1))
      case(  4)
        allocate(s%yz(s%nx+1,s%ny+1))
      case(  5)
        allocate(s%xu(s%nx+1,s%ny+1))
      case(  6)
        allocate(s%yu(s%nx+1,s%ny+1))
      case(  7)
        allocate(s%xv(s%nx+1,s%ny+1))
      case(  8)
        allocate(s%yv(s%nx+1,s%ny+1))
      case(  9)
        allocate(s%dsu(s%nx+1,s%ny+1))
      case( 10)
        allocate(s%dsv(s%nx+1,s%ny+1))
      case( 11)
        allocate(s%dsz(s%nx+1,s%ny+1))
      case( 12)
        allocate(s%dsc(s%nx+1,s%ny+1))
      case( 13)
        allocate(s%dnu(s%nx+1,s%ny+1))
      case( 14)
        allocate(s%dnv(s%nx+1,s%ny+1))
      case( 15)
        allocate(s%dnz(s%nx+1,s%ny+1))
      case( 16)
        allocate(s%dnc(s%nx+1,s%ny+1))
      case( 17)
        allocate(s%dsdnui(s%nx+1,s%ny+1))
      case( 18)
        allocate(s%dsdnvi(s%nx+1,s%ny+1))
      case( 19)
        allocate(s%dsdnzi(s%nx+1,s%ny+1))
      case( 20)
        allocate(s%alfaz(s%nx+1,s%ny+1))
      case( 21)
        allocate(s%alfau(s%nx+1,s%ny+1))
      case( 22)
        allocate(s%alfav(s%nx+1,s%ny+1))
      case( 23)
        allocate(s%sdist(s%nx+1,s%ny+1))
      case( 24)
        allocate(s%ndist(s%nx+1,s%ny+1))
      case( 39)
        allocate(s%xyzs01(2))
      case( 40)
        allocate(s%xyzs02(2))
      case( 41)
        allocate(s%xyzs03(2))
      case( 42)
        allocate(s%xyzs04(2))
      case( 45)
        allocate(s%zb(s%nx+1,s%ny+1))
      case( 46)
        allocate(s%zb0(s%nx+1,s%ny+1))
      case( 47)
        allocate(s%theta(s%ntheta))
      case( 48)
        allocate(s%theta_s(s%ntheta_s))
      case( 54)
        allocate(s%thetamean(s%nx+1,s%ny+1))
      case( 55)
        allocate(s%Fx(s%nx+1,s%ny+1))
      case( 56)
        allocate(s%Fy(s%nx+1,s%ny+1))
      case( 57)
        allocate(s%Sxy(s%nx+1,s%ny+1))
      case( 58)
        allocate(s%Syy(s%nx+1,s%ny+1))
      case( 59)
        allocate(s%Sxx(s%nx+1,s%ny+1))
      case( 60)
        allocate(s%n(s%nx+1,s%ny+1))
      case( 61)
        allocate(s%H(s%nx+1,s%ny+1))
      case( 62)
        allocate(s%cgx(s%nx+1,s%ny+1,s%ntheta))
      case( 63)
        allocate(s%cgy(s%nx+1,s%ny+1,s%ntheta))
      case( 64)
        allocate(s%cx(s%nx+1,s%ny+1,s%ntheta))
      case( 65)
        allocate(s%cy(s%nx+1,s%ny+1,s%ntheta))
      case( 66)
        allocate(s%ctheta(s%nx+1,s%ny+1,s%ntheta))
      case( 67)
        allocate(s%ee(s%nx+1,s%ny+1,s%ntheta))
      case( 68)
        allocate(s%thet(s%nx+1,s%ny+1,s%ntheta))
      case( 69)
        allocate(s%costh(s%nx+1,s%ny+1,s%ntheta))
      case( 70)
        allocate(s%sinth(s%nx+1,s%ny+1,s%ntheta))
      case( 71)
        allocate(s%sigt(s%nx+1,s%ny+1,s%ntheta))
      case( 72)
        allocate(s%rr(s%nx+1,s%ny+1,s%ntheta))
      case( 73)
        allocate(s%cgx_s(s%nx+1,s%ny+1,s%ntheta_s))
      case( 74)
        allocate(s%cgy_s(s%nx+1,s%ny+1,s%ntheta_s))
      case( 75)
        allocate(s%ctheta_s(s%nx+1,s%ny+1,s%ntheta_s))
      case( 76)
        allocate(s%ee_s(s%nx+1,s%ny+1,s%ntheta_s))
      case( 77)
        allocate(s%thet_s(s%nx+1,s%ny+1,s%ntheta_s))
      case( 78)
        allocate(s%costh_s(s%nx+1,s%ny+1,s%ntheta_s))
      case( 79)
        allocate(s%sinth_s(s%nx+1,s%ny+1,s%ntheta_s))
      case( 80)
        allocate(s%k(s%nx+1,s%ny+1))
      case( 81)
        allocate(s%c(s%nx+1,s%ny+1))
      case( 82)
        allocate(s%cg(s%nx+1,s%ny+1))
      case( 83)
        allocate(s%sigm(s%nx+1,s%ny+1))
      case( 84)
        allocate(s%wm(s%nx+1,s%ny+1))
      case( 85)
        allocate(s%hh(s%nx+1,s%ny+1))
      case( 86)
        allocate(s%zs(s%nx+1,s%ny+1))
      case( 87)
        allocate(s%zs0(s%nx+1,s%ny+1))
      case( 88)
        allocate(s%tideinpt(s%tidelen))
      case( 89)
        allocate(s%tideinpz(s%tidelen,par%tideloc))
      case( 90)
        allocate(s%windinpt(s%windlen))
      case( 91)
        allocate(s%windvelts(s%windlen))
      case( 92)
        allocate(s%winddirts(s%windlen))
      case( 93)
        allocate(s%windxts(s%windlen))
      case( 94)
        allocate(s%windyts(s%windlen))
      case( 95)
        allocate(s%windsu(s%nx+1,s%ny+1))
      case( 96)
        allocate(s%windnv(s%nx+1,s%ny+1))
      case( 97)
        allocate(s%dzsdt(s%nx+1,s%ny+1))
      case( 98)
        allocate(s%dzsdx(s%nx+1,s%ny+1))
      case( 99)
        allocate(s%dzsdy(s%nx+1,s%ny+1))
      case(100)
        allocate(s%dzbdx(s%nx+1,s%ny+1))
      case(101)
        allocate(s%dzbdy(s%nx+1,s%ny+1))
      case(102)
        allocate(s%dzbdt(s%nx+1,s%ny+1))
      case(103)
        allocate(s%dzbnow(s%nx+1,s%ny+1))
      case(104)
        allocate(s%uu(s%nx+1,s%ny+1))
      case(105)
        allocate(s%vu(s%nx+1,s%ny+1))
      case(106)
        allocate(s%uv(s%nx+1,s%ny+1))
      case(107)
        allocate(s%vv(s%nx+1,s%ny+1))
      case(108)
        allocate(s%qx(s%nx+1,s%ny+1))
      case(109)
        allocate(s%qy(s%nx+1,s%ny+1))
      case(110)
        allocate(s%sedero(s%nx+1,s%ny+1))
      case(111)
        allocate(s%dcbdx(s%nx+1,s%ny+1))
      case(112)
        allocate(s%dcbdy(s%nx+1,s%ny+1))
      case(113)
        allocate(s%dcsdx(s%nx+1,s%ny+1))
      case(114)
        allocate(s%dcsdy(s%nx+1,s%ny+1))
      case(115)
        allocate(s%ui(s%nx+1,s%ny+1))
      case(116)
        allocate(s%vi(s%nx+1,s%ny+1))
      case(117)
        allocate(s%E(s%nx+1,s%ny+1))
      case(118)
        allocate(s%R(s%nx+1,s%ny+1))
      case(119)
        allocate(s%urms(s%nx+1,s%ny+1))
      case(120)
        allocate(s%D(s%nx+1,s%ny+1))
      case(121)
        allocate(s%Qb(s%nx+1,s%ny+1))
      case(122)
        allocate(s%ust(s%nx+1,s%ny+1))
      case(123)
        allocate(s%ueu(s%nx+1,s%ny+1))
      case(124)
        allocate(s%vev(s%nx+1,s%ny+1))
      case(125)
        allocate(s%vmagu(s%nx+1,s%ny+1))
      case(126)
        allocate(s%vmageu(s%nx+1,s%ny+1))
      case(127)
        allocate(s%vmagv(s%nx+1,s%ny+1))
      case(128)
        allocate(s%vmagev(s%nx+1,s%ny+1))
      case(129)
        allocate(s%u(s%nx+1,s%ny+1))
      case(130)
        allocate(s%v(s%nx+1,s%ny+1))
      case(131)
        allocate(s%ue(s%nx+1,s%ny+1))
      case(132)
        allocate(s%ve(s%nx+1,s%ny+1))
      case(133)
        allocate(s%hold(s%nx+1,s%ny+1))
      case(134)
        allocate(s%wetu(s%nx+1,s%ny+1))
      case(135)
        allocate(s%wetv(s%nx+1,s%ny+1))
      case(136)
        allocate(s%wetz(s%nx+1,s%ny+1))
      case(137)
        allocate(s%wete(s%nx+1,s%ny+1))
      case(138)
        allocate(s%hu(s%nx+1,s%ny+1))
      case(139)
        allocate(s%hv(s%nx+1,s%ny+1))
      case(140)
        allocate(s%hum(s%nx+1,s%ny+1))
      case(141)
        allocate(s%hvm(s%nx+1,s%ny+1))
      case(142)
        allocate(s%vmag(s%nx+1,s%ny+1))
      case(143)
        allocate(s%ccg(s%nx+1,s%ny+1,par%ngd))
      case(144)
        allocate(s%uwf(s%nx+1,s%ny+1))
      case(145)
        allocate(s%vwf(s%nx+1,s%ny+1))
      case(146)
        allocate(s%ustr(s%nx+1,s%ny+1))
      case(147)
        allocate(s%usd(s%nx+1,s%ny+1))
      case(148)
        allocate(s%bi(s%ny+1))
      case(149)
        allocate(s%DR(s%nx+1,s%ny+1))
      case(150)
        allocate(s%umean(s%nx+1,s%ny+1))
      case(151)
        allocate(s%vmean(s%nx+1,s%ny+1))
      case(152)
        allocate(s%ur(s%nx+1,s%ny+1))
      case(154)
        allocate(s%D15(par%ngd))
      case(155)
        allocate(s%D50(par%ngd))
      case(156)
        allocate(s%D90(par%ngd))
      case(157)
        allocate(s%sedcal(par%ngd))
      case(158)
        allocate(s%ucrcal(par%ngd))
      case(159)
        allocate(s%Tsg(s%nx+1,s%ny+1,par%ngd))
      case(160)
        allocate(s%Susg(s%nx+1,s%ny+1,par%ngd))
      case(161)
        allocate(s%Svsg(s%nx+1,s%ny+1,par%ngd))
      case(162)
        allocate(s%Subg(s%nx+1,s%ny+1,par%ngd))
      case(163)
        allocate(s%Svbg(s%nx+1,s%ny+1,par%ngd))
      case(164)
        allocate(s%ceqbg(s%nx+1,s%ny+1,par%ngd))
      case(165)
        allocate(s%ceqsg(s%nx+1,s%ny+1,par%ngd))
      case(166)
        allocate(s%ua(s%nx+1,s%ny+1))
      case(167)
        allocate(s%BR(s%nx+1,s%ny+1))
      case(168)
        allocate(s%kb(s%nx+1,s%ny+1))
      case(169)
        allocate(s%Tbore(s%nx+1,s%ny+1))
      case(170)
        allocate(s%dzav(s%nx+1,s%ny+1))
      case(171)
        allocate(s%maxzs(s%nx+1,s%ny+1))
      case(172)
        allocate(s%minzs(s%nx+1,s%ny+1))
      case(173)
        allocate(s%L1(s%nx+1,s%ny+1))
      case(174)
        allocate(s%Sk(s%nx+1,s%ny+1))
      case(175)
        allocate(s%As(s%nx+1,s%ny+1))
      case(176)
        allocate(s%gwhead(s%nx+1,s%ny+1))
      case(177)
        allocate(s%gwheadb(s%nx+1,s%ny+1))
      case(178)
        allocate(s%gwlevel(s%nx+1,s%ny+1))
      case(179)
        allocate(s%gwheight(s%nx+1,s%ny+1))
      case(180)
        allocate(s%gwbottom(s%nx+1,s%ny+1))
      case(181)
        allocate(s%gwu(s%nx+1,s%ny+1))
      case(182)
        allocate(s%gwv(s%nx+1,s%ny+1))
      case(183)
        allocate(s%gwqx(s%nx+1,s%ny+1))
      case(184)
        allocate(s%gwqy(s%nx+1,s%ny+1))
      case(185)
        allocate(s%gww(s%nx+1,s%ny+1))
      case(186)
        allocate(s%gwcurv(s%nx+1,s%ny+1))
      case(187)
        allocate(s%dinfil(s%nx+1,s%ny+1))
      case(188)
        allocate(s%infil(s%nx+1,s%ny+1))
      case(189)
        allocate(s%gw0back(2,s%ny+1))
      case(190)
        allocate(s%kturb(s%nx+1,s%ny+1))
      case(191)
        allocate(s%ero(s%nx+1,s%ny+1,par%ngd))
      case(192)
        allocate(s%depo_im(s%nx+1,s%ny+1,par%ngd))
      case(193)
        allocate(s%depo_ex(s%nx+1,s%ny+1,par%ngd))
      case(194)
        allocate(s%nd(s%nx+1,s%ny+1))
      case(195)
        allocate(s%pbbed(s%nx+1,s%ny+1,par%nd,par%ngd))
      case(196)
        allocate(s%dzbed(s%nx+1,s%ny+1,par%nd))
      case(197)
        allocate(s%z0bed(s%nx+1,s%ny+1))
      case(198)
        allocate(s%ureps(s%nx+1,s%ny+1))
      case(199)
        allocate(s%vreps(s%nx+1,s%ny+1))
      case(200)
        allocate(s%urepb(s%nx+1,s%ny+1))
      case(201)
        allocate(s%vrepb(s%nx+1,s%ny+1))
      case(202)
        allocate(s%umwci(s%nx+1,s%ny+1))
      case(203)
        allocate(s%vmwci(s%nx+1,s%ny+1))
      case(204)
        allocate(s%rolthick(s%nx+1,s%ny+1))
      case(205)
        allocate(s%zswci(s%nx+1,s%ny+1))
      case(206)
        allocate(s%pres(s%nx+1,s%ny+1))
      case(207)
        allocate(s%dU(s%nx+1,s%ny+1))
      case(208)
        allocate(s%dV(s%nx+1,s%ny+1))
      case(209)
        allocate(s%wb(s%nx+1,s%ny+1))
      case(210)
        allocate(s%ws(s%nx+1,s%ny+1))
      case(211)
        allocate(s%wscrit(s%nx+1,s%ny+1))
      case(212)
        allocate(s%bedfriccoef(s%nx+1,s%ny+1))
      case(213)
        allocate(s%taubx(s%nx+1,s%ny+1))
      case(214)
        allocate(s%tauby(s%nx+1,s%ny+1))
      case(215)
        allocate(s%Df(s%nx+1,s%ny+1))
      case(216)
        allocate(s%Dp(s%nx+1,s%ny+1))
      case(217)
        allocate(s%Sutot(s%nx+1,s%ny+1))
      case(218)
        allocate(s%Svtot(s%nx+1,s%ny+1))
      case(219)
        allocate(s%cctot(s%nx+1,s%ny+1))
      case(220)
        allocate(s%wi(2,s%ny+1))
      case(221)
        allocate(s%dUi(2,s%ny+1))
      case(222)
        allocate(s%zi(2,s%ny+1))
      case(223)
        allocate(s%nuh(s%nx+1,s%ny+1))
      case(224)
        allocate(s%cf(s%nx+1,s%ny+1))
      case(225)
        allocate(s%cfu(s%nx+1,s%ny+1))
      case(226)
        allocate(s%cfv(s%nx+1,s%ny+1))
      case(227)
        allocate(s%D50top(s%nx+1,s%ny+1))
      case(228)
        allocate(s%D90top(s%nx+1,s%ny+1))
      case(229)
        allocate(s%structdepth(s%nx+1,s%ny+1))
      case(230)
        allocate(s%zs0fac(s%nx+1,s%ny+1,2))
      case(231)
        allocate(s%tdisch(par%ntdischarge))
      case(232)
        allocate(s%pdisch(par%ndischarge,4))
      case(233)
        allocate(s%pntdisch(par%ndischarge))
      case(234)
        allocate(s%qdisch(par%ntdischarge,par%ndischarge))
      case(235)
        allocate(s%idrift(par%ndrifter))
      case(236)
        allocate(s%jdrift(par%ndrifter))
      case(237)
        allocate(s%tdriftb(par%ndrifter))
      case(238)
        allocate(s%tdrifte(par%ndrifter))
      case(239)
        allocate(s%runup(s%ny+1))
      case(240)
        allocate(s%Hrunup(s%ny+1))
      case(241)
        allocate(s%xHrunup(s%ny+1))
      case(242)
        allocate(s%istruct(s%ny+1))
      case(243)
        allocate(s%iwl(s%ny+1))
      case(244)
        allocate(s%strucslope(s%ny+1))
      case(245)
        allocate(s%Dc(s%nx+1,s%ny+1))
      case(246)
        allocate(s%ph(s%nx+1,s%ny+1))
      case(248)
        allocate(s%dobs(s%nx+1,s%ny+1))
      case(249)
        allocate(s%sig2prior(s%nx+1,s%ny+1))
      case(250)
        allocate(s%zbobs(s%nx+1,s%ny+1))
      case(251)
        allocate(s%shobs(s%nx+1,s%ny+1))
      case(252)
        allocate(s%bwalpha(s%nx+1,s%ny+1))
      case(253)
        allocate(s%dcmdo(s%nx+1,s%ny+1))
      case(254)
        allocate(s%dassim(s%nx+1,s%ny+1))
      case(255)
        allocate(s%cobs(s%nx+1,s%ny+1))
      case(256)
        allocate(s%shipxCG(par%nship))
      case(257)
        allocate(s%shipyCG(par%nship))
      case(258)
        allocate(s%shipzCG(par%nship))
      case(259)
        allocate(s%shipFx(par%nship))
      case(260)
        allocate(s%shipFy(par%nship))
      case(261)
        allocate(s%shipFz(par%nship))
      case(262)
        allocate(s%shipMx(par%nship))
      case(263)
        allocate(s%shipMy(par%nship))
      case(264)
        allocate(s%shipMz(par%nship))
      case(265)
        allocate(s%shipphi(par%nship))
      case(266)
        allocate(s%shipchi(par%nship))
      case(267)
        allocate(s%shippsi(par%nship))
      case(268)
        allocate(s%Dveg(s%nx+1,s%ny+1))
      case(269)
        allocate(s%Fvegu(s%nx+1,s%ny+1))
      case(270)
        allocate(s%Fvegv(s%nx+1,s%ny+1))
      case(271)
        allocate(s%ududx(s%nx+1,s%ny+1))
      case(272)
        allocate(s%vdvdy(s%nx+1,s%ny+1))
      case(273)
        allocate(s%udvdx(s%nx+1,s%ny+1))
      case(274)
        allocate(s%vdudy(s%nx+1,s%ny+1))
      case(275)
        allocate(s%viscu(s%nx+1,s%ny+1))
      case(276)
        allocate(s%viscv(s%nx+1,s%ny+1))
      case(277)
        allocate(s%setbathy(s%nx+1,s%ny+1,par%nsetbathy))
      case(278)
        allocate(s%tsetbathy(par%nsetbathy))
      case(279)
        allocate(s%breaking(s%nx+1,s%ny+1))
!directions for vi vim: filetype=fortran : syntax=fortran
