Commit 57584e6f authored by kbk's avatar kbk
Browse files

parallel support

parent 04d56af2
......@@ -110,7 +110,11 @@
#endif
! The width of the HALO zones
#ifdef PARALLEL
#define HALO 2
#else
#define HALO 1
#endif
! Here the memory-allocation is defined
#define E2DFIELD imin-HALO:imax+HALO,jmin-HALO:jmax+HALO
......
......@@ -13,36 +13,18 @@
allocate(zo(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (zo)'
allocate(zrold(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (zrold)'
allocate(zrnew(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (zrnew)'
allocate(zu(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (zu)'
allocate(zuo(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (zuo)'
allocate(zv(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (zv)'
allocate(zvo(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (zvo)'
allocate(U(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (U)'
allocate(V(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (V)'
allocate(uavg(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (uavg)'
allocate(vavg(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (vavg)'
allocate(UEx(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (UEx)'
......@@ -61,7 +43,8 @@
allocate(rv(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (rv)'
if (runtype .gt. 1) then
! if (runtype .gt. 1) then
if (runtype .gt. 0) then
allocate(Uint(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (Uint)'
......@@ -122,17 +105,5 @@
allocate(zvb0(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (zvb0)'
!kbk allocate(ResU(E2DFIELD),stat=rc)
!kbk if (rc /= 0) stop 'init_2d: Error allocating memory (ResU)'
!kbk allocate(ResV(E2DFIELD),stat=rc)
!kbk if (rc /= 0) stop 'init_2d: Error allocating memory (ResV)'
!kbk allocate(ResDU(E2DFIELD),stat=rc)
!kbk if (rc /= 0) stop 'init_2d: Error allocating memory (ResDU)'
!kbk allocate(ResDV(E2DFIELD),stat=rc)
!kbk if (rc /= 0) stop 'init_2d: Error allocating memory (ResDV)'
allocate(surfdiv(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_2d: Error allocating memory (surfdiv)'
REALTYPE, dimension(:,:), allocatable :: D,DU,DV
REALTYPE, dimension(:,:), allocatable :: z,zo
REALTYPE, dimension(:,:), allocatable :: zrold,zrnew
REALTYPE, dimension(:,:), allocatable :: zu,zuo
REALTYPE, dimension(:,:), allocatable :: zv,zvo
REALTYPE, dimension(:,:), allocatable :: U,V
REALTYPE, dimension(:,:), allocatable :: uavg,vavg
REALTYPE, dimension(:,:), allocatable :: UEx,VEx
REALTYPE, dimension(:,:), allocatable :: fU,fV
REALTYPE, dimension(:,:), allocatable :: ru,rv
REALTYPE, dimension(:,:), allocatable :: Uint,Vint
REALTYPE, dimension(:,:), allocatable :: Uinto,Vinto
REALTYPE, dimension(:,:), allocatable :: res_du,res_u
REALTYPE, dimension(:,:), allocatable :: res_dv,res_v
REALTYPE,dimension(:,:),allocatable :: D,DU,DV
REALTYPE,dimension(:,:),allocatable :: z,zo
REALTYPE,dimension(:,:),allocatable :: zu,zv
REALTYPE,dimension(:,:),allocatable :: U,V
REALTYPE,dimension(:,:),allocatable :: UEx,VEx
REALTYPE,dimension(:,:),allocatable :: fU,fV
REALTYPE,dimension(:,:),allocatable :: ru,rv
REALTYPE,dimension(:,:),allocatable :: Uint,Vint
REALTYPE,dimension(:,:),allocatable :: Uinto,Vinto
REALTYPE,dimension(:,:),allocatable :: res_du,res_u
REALTYPE,dimension(:,:),allocatable :: res_dv,res_v
!kbk
REALTYPE, dimension(:,:), allocatable :: ruu,rvv
REALTYPE, dimension(:,:), allocatable :: PP
REALTYPE,dimension(:,:),allocatable :: ruu,rvv
REALTYPE,dimension(:,:),allocatable :: PP
!kbk
REALTYPE, dimension(:,:), allocatable :: SlUx,SlVx
REALTYPE, dimension(:,:), allocatable :: Slru,Slrv
REALTYPE, dimension(:,:), allocatable :: zub,zvb
REALTYPE, dimension(:,:), allocatable :: zub0,zvb0
REALTYPE, dimension(:), allocatable :: EWbdy,ENbdy,EEbdy,ESbdy
REALTYPE, dimension(:,:), allocatable :: surfdiv
REALTYPE,dimension(:,:),allocatable :: SlUx,SlVx
REALTYPE,dimension(:,:),allocatable :: Slru,Slrv
REALTYPE,dimension(:,:),allocatable :: zub,zvb
REALTYPE,dimension(:,:),allocatable :: zub0,zvb0
REALTYPE,dimension(:,:),allocatable :: surfdiv
REALTYPE,dimension(:), allocatable :: EWbdy,ENbdy,EEbdy,ESbdy
! Remember to update this value if you add more 2D arrays.
integer, parameter :: n2d_fields=43
integer, parameter :: n2d_fields=35
! Remember to update this value if you add more 2D arrays.
integer, parameter :: n2d_fields=43
integer, parameter :: n2d_fields=35
!
REALTYPE D(E2DFIELD)
REALTYPE DU(E2DFIELD)
REALTYPE DV(E2DFIELD)
REALTYPE z(E2DFIELD)
REALTYPE zo(E2DFIELD)
REALTYPE zrold(E2DFIELD)
REALTYPE zrnew(E2DFIELD)
REALTYPE zu(E2DFIELD)
REALTYPE zuo(E2DFIELD)
REALTYPE zv(E2DFIELD)
REALTYPE zvo(E2DFIELD)
REALTYPE U(E2DFIELD)
REALTYPE V(E2DFIELD)
REALTYPE uavg(E2DFIELD)
REALTYPE vavg(E2DFIELD)
REALTYPE UEx(E2DFIELD)
REALTYPE VEx(E2DFIELD)
REALTYPE fU(E2DFIELD)
REALTYPE fV(E2DFIELD)
REALTYPE ru(E2DFIELD)
REALTYPE rv(E2DFIELD)
REALTYPE Uint(E2DFIELD)
REALTYPE Vint(E2DFIELD)
REALTYPE Uinto(E2DFIELD)
REALTYPE Vinto(E2DFIELD)
REALTYPE res_du(E2DFIELD)
REALTYPE res_u(E2DFIELD)
REALTYPE res_dv(E2DFIELD)
REALTYPE res_v(E2DFIELD)
REALTYPE D(E2DFIELD)
REALTYPE DU(E2DFIELD)
REALTYPE DV(E2DFIELD)
REALTYPE z(E2DFIELD)
REALTYPE zo(E2DFIELD)
REALTYPE zu(E2DFIELD)
REALTYPE zv(E2DFIELD)
REALTYPE U(E2DFIELD)
REALTYPE V(E2DFIELD)
REALTYPE UEx(E2DFIELD)
REALTYPE VEx(E2DFIELD)
REALTYPE fU(E2DFIELD)
REALTYPE fV(E2DFIELD)
REALTYPE ru(E2DFIELD)
REALTYPE rv(E2DFIELD)
REALTYPE Uint(E2DFIELD)
REALTYPE Vint(E2DFIELD)
REALTYPE Uinto(E2DFIELD)
REALTYPE Vinto(E2DFIELD)
REALTYPE res_du(E2DFIELD)
REALTYPE res_u(E2DFIELD)
REALTYPE res_dv(E2DFIELD)
REALTYPE res_v(E2DFIELD)
!kbk
REALTYPE ruu(E2DFIELD)
REALTYPE rvv(E2DFIELD)
REALTYPE PP(E2DFIELD)
REALTYPE ruu(E2DFIELD)
REALTYPE rvv(E2DFIELD)
REALTYPE PP(E2DFIELD)
!kbk
REALTYPE SlUx(E2DFIELD)
REALTYPE SlVx(E2DFIELD)
REALTYPE Slru(E2DFIELD)
REALTYPE Slrv(E2DFIELD)
REALTYPE zub(E2DFIELD)
REALTYPE zvb(E2DFIELD)
REALTYPE zub0(E2DFIELD)
REALTYPE zvb0(E2DFIELD)
REALTYPE EWbdy(jmax),ENbdy(imax),EEbdy(jmax),ESbdy(imax)
REALTYPE surfdiv(E2DFIELD)
REALTYPE SlUx(E2DFIELD)
REALTYPE SlVx(E2DFIELD)
REALTYPE Slru(E2DFIELD)
REALTYPE Slrv(E2DFIELD)
REALTYPE zub(E2DFIELD)
REALTYPE zvb(E2DFIELD)
REALTYPE zub0(E2DFIELD)
REALTYPE zvb0(E2DFIELD)
REALTYPE surfdiv(E2DFIELD)
REALTYPE EWbdy(jmax),ENbdy(imax),EEbdy(jmax),ESbdy(imax)
......@@ -57,6 +57,7 @@
allocate(SS(I3DFIELD),stat=rc) ! 3D field for shear frequency
if (rc /= 0) stop 'init_3d: Error allocating memory (SS)'
#ifndef NO_BAROCLINIC
allocate(NN(I3DFIELD),stat=rc) ! 3D field for buoyancy frequency
if (rc /= 0) stop 'init_3d: Error allocating memory (NN)'
......@@ -83,6 +84,7 @@
allocate(spm_pool(I2DFIELD),stat=rc) ! Sinking velocity
if (rc /= 0) stop 'init_3d: Error allocating memory (spm_pool)'
#endif
#ifdef UV_TVD
allocate(uadv(I3DFIELD),stat=rc) ! u advection velocity
......
! Remember to update this value if you add more 3D arrays.
#ifdef UV_TVD
integer, parameter :: n3d_fields=29
integer,parameter :: n3d_fields=29
#else
integer, parameter :: n3d_fields=22
integer,parameter :: n3d_fields=22
#endif
REALTYPE, dimension(:,:,:), allocatable :: uu,vv,ww
REALTYPE, dimension(:,:,:), allocatable :: ho,hn
REALTYPE, dimension(:,:,:), allocatable :: huo,hun
REALTYPE, dimension(:,:,:), allocatable :: hvo,hvn
REALTYPE, dimension(:,:,:), allocatable :: uuEx,vvEx
REALTYPE, dimension(:,:,:), allocatable :: num,nuh
REALTYPE, dimension(:,:,:), allocatable :: tke,eps
#ifdef OLD_TURBULENCE
REALTYPE, dimension(:,:,:), allocatable :: tkeo,P,B
#endif
REALTYPE, dimension(:,:,:), allocatable :: SS,NN
! Number of vertical layers in z,u,v columns
integer, dimension(:,:), allocatable:: kmin,kumin,kvmin
REALTYPE, dimension(:,:,:), allocatable :: uu,vv,ww
REALTYPE, dimension(:,:,:), allocatable :: ho,hn
REALTYPE, dimension(:,:,:), allocatable :: huo,hun
REALTYPE, dimension(:,:,:), allocatable :: hvo,hvn
REALTYPE, dimension(:,:,:), allocatable :: uuEx,vvEx
REALTYPE, dimension(:,:,:), allocatable :: num,nuh
REALTYPE, dimension(:,:,:), allocatable :: tke,eps
REALTYPE, dimension(:,:,:), allocatable :: SS
#ifndef NO_BAROCLINIC
REALTYPE, dimension(:,:,:), allocatable :: NN
! 3D baroclinic fields
REALTYPE, dimension(:,:,:), allocatable :: S,T,rho
REALTYPE, dimension(:,:,:), allocatable :: idpdx,idpdy
REALTYPE, dimension(:,:,:), allocatable :: S,T,rho
REALTYPE, dimension(:,:,:), allocatable :: idpdx,idpdy
#endif
! suspended matter
REALTYPE, dimension(:,:,:), allocatable :: spm,spm_ws
REALTYPE, dimension(:,:), allocatable :: spm_pool
#ifndef NO_SUSP_MATTER
REALTYPE, dimension(:,:,:), allocatable :: spm,spm_ws
REALTYPE, dimension(:,:), allocatable :: spm_pool
#endif
#ifdef UV_TVD
REALTYPE, dimension(:,:,:), allocatable :: uadv,vadv,wadv
REALTYPE, dimension(:,:,:), allocatable :: huadv,hvadv,hoadv,hnadv
REALTYPE, dimension(:,:,:), allocatable :: uadv,vadv,wadv
REALTYPE, dimension(:,:,:), allocatable :: huadv,hvadv,hoadv,hnadv
#endif
! 2D fields in 3D domain
REALTYPE, dimension(:,:), allocatable :: sseo,ssen
REALTYPE, dimension(:,:), allocatable :: ssuo,ssun
REALTYPE, dimension(:,:), allocatable :: ssvo,ssvn
REALTYPE, dimension(:,:), allocatable :: sseo,ssen
REALTYPE, dimension(:,:), allocatable :: ssuo,ssun
REALTYPE, dimension(:,:), allocatable :: ssvo,ssvn
! 3D friction in 3D domain
REALTYPE, dimension(:,:), allocatable :: rru,rrv,taus,taub
REALTYPE, dimension(:,:), allocatable :: rru,rrv,taus,taub
! Number of vertical layers in z,u,v columns
integer, dimension(:,:), allocatable :: kmin,kumin,kvmin
! Remember to update this value if you add more 3D arrays.
#ifdef UV_TVD
integer, parameter :: n3d_fields=29
integer, parameter :: n3d_fields=29
#else
integer, parameter :: n3d_fields=22
integer, parameter :: n3d_fields=22
#endif
REALTYPE uu(I3DFIELD)
REALTYPE vv(I3DFIELD)
REALTYPE ww(I3DFIELD)
REALTYPE ho(I3DFIELD)
REALTYPE hn(I3DFIELD)
REALTYPE huo(I3DFIELD)
REALTYPE hun(I3DFIELD)
REALTYPE hvo(I3DFIELD)
REALTYPE hvn(I3DFIELD)
REALTYPE uuEx(I3DFIELD)
REALTYPE vvEx(I3DFIELD)
REALTYPE num(I3DFIELD)
REALTYPE nuh(I3DFIELD)
! Number of vertical layers in z,u,v columns
INTEGER :: kmin(I2DFIELD)
INTEGER :: kumin(I2DFIELD)
INTEGER :: kvmin(I2DFIELD)
REALTYPE :: uu(I3DFIELD)
REALTYPE :: vv(I3DFIELD)
REALTYPE :: ww(I3DFIELD)
REALTYPE :: ho(I3DFIELD)
REALTYPE :: hn(I3DFIELD)
REALTYPE :: huo(I3DFIELD)
REALTYPE :: hun(I3DFIELD)
REALTYPE :: hvo(I3DFIELD)
REALTYPE :: hvn(I3DFIELD)
REALTYPE :: uuEx(I3DFIELD)
REALTYPE :: vvEx(I3DFIELD)
REALTYPE :: num(I3DFIELD)
REALTYPE :: nuh(I3DFIELD)
! 3D turbulent fields
REALTYPE tke(I3DFIELD)
REALTYPE eps(I3DFIELD)
#ifdef OLD_TURBULENCE
REALTYPE tkeo(I3DFIELD)
REALTYPE P(I3DFIELD)
REALTYPE B(I3DFIELD)
#endif
REALTYPE SS(I3DFIELD)
REALTYPE NN(I3DFIELD)
REALTYPE :: tke(I3DFIELD)
REALTYPE :: eps(I3DFIELD)
REALTYPE :: SS(I3DFIELD)
REALTYPE :: NN(I3DFIELD)
#ifndef NO_BAROCLINIC
! 3D baroclinic fields
REALTYPE S(I3DFIELD)
REALTYPE T(I3DFIELD)
REALTYPE rho(I3DFIELD)
REALTYPE idpdx(I3DFIELD)
REALTYPE idpdy(I3DFIELD)
REALTYPE :: S(I3DFIELD)
REALTYPE :: T(I3DFIELD)
REALTYPE :: rho(I3DFIELD)
REALTYPE :: idpdx(I3DFIELD)
REALTYPE :: idpdy(I3DFIELD)
#endif
#ifndef NO_SUSP_MATTER
! suspended matter
REALTYPE spm(I3DFIELD)
REALTYPE spm_ws(I3DFIELD)
REALTYPE spm_pool(I2DFIELD)
REALTYPE :: spm(I3DFIELD)
REALTYPE :: spm_ws(I3DFIELD)
REALTYPE :: spm_pool(I2DFIELD)
#endif
#ifdef UV_TVD
REALTYPE uadv(I3DFIELD)
REALTYPE vadv(I3DFIELD)
REALTYPE wadv(I3DFIELD)
REALTYPE huadv(I3DFIELD)
REALTYPE hvadv(I3DFIELD)
REALTYPE hoadv(I3DFIELD)
REALTYPE hnadv(I3DFIELD)
REALTYPE :: uadv(I3DFIELD)
REALTYPE :: vadv(I3DFIELD)
REALTYPE :: wadv(I3DFIELD)
REALTYPE :: huadv(I3DFIELD)
REALTYPE :: hvadv(I3DFIELD)
REALTYPE :: hoadv(I3DFIELD)
REALTYPE :: hnadv(I3DFIELD)
#endif
! 2D fields in 3D domain
REALTYPE sseo(I2DFIELD)
REALTYPE ssen(I2DFIELD)
REALTYPE ssuo(I2DFIELD)
REALTYPE ssun(I2DFIELD)
REALTYPE ssvo(I2DFIELD)
REALTYPE ssvn(I2DFIELD)
REALTYPE :: sseo(I2DFIELD)
REALTYPE :: ssen(I2DFIELD)
REALTYPE :: ssuo(I2DFIELD)
REALTYPE :: ssun(I2DFIELD)
REALTYPE :: ssvo(I2DFIELD)
REALTYPE :: ssvn(I2DFIELD)
! 3D friction in 3D domain
REALTYPE rru(I2DFIELD)
REALTYPE rrv(I2DFIELD)
REALTYPE taus(I2DFIELD)
REALTYPE taub(I2DFIELD)
! Number of vertical layers in z,u,v columns
INTEGER kmin(I2DFIELD)
INTEGER kumin(I2DFIELD)
INTEGER kvmin(I2DFIELD)
REALTYPE :: rru(I2DFIELD)
REALTYPE :: rrv(I2DFIELD)
REALTYPE :: taus(I2DFIELD)
REALTYPE :: taub(I2DFIELD)
allocate(H(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (H)'
allocate(lonmap(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (lonmap)'
allocate(lonc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (lonc)'
allocate(latmap(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (latmap)'
allocate(latc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (latc)'
allocate(conv(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (conv)'
......@@ -48,74 +48,104 @@
allocate(av(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (av)'
allocate(av(E2DFIELD),stat=rc)
allocate(ax(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (ax)'
#if ! ( defined(CURVILINEAR) || defined(SPHERICAL) )
allocate(xc(imin-HALO:imax+HALO),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (xc)'
allocate(yc(jmin-HALO:jmax+HALO),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (yc)'
#else
allocate(xc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (xc)'
allocate(yc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (yc)'
allocate(xx(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (xx)'
allocate(yx(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (yx)'
allocate(xu(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (xu)'
allocate(yu(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (yu)'
allocate(xv(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (xv)'
allocate(yv(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (yv)'
allocate(lonx(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (lonx)'
allocate(latx(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (latx)'
allocate(lonc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (lonc)'
allocate(latc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (latc)'
allocate(lonu(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (lonu)'
allocate(latu(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (latu)'
allocate(lonv(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (lonv)'
allocate(latv(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (latv)'
allocate(dxdyc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (dxdyc)'
allocate(dydxc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (dydxc)'
allocate(angle(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (angle)'
allocate(dxc(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (dxc)'
allocate(dxu(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (dxu)'
allocate(dxv(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (dxv)'
allocate(dxx(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (dxx)'
allocate(dyc(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (dyc)'
allocate(dyu(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (dyu)'
allocate(dyv(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (dyv)'
allocate(dyx(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (dyx)'
allocate(arcd1(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (arcd1)'
allocate(arud1(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (arud1)'
allocate(arvd1(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (arvd1)'
#if defined(CURVILINEAR)
allocate(xc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (xc)'
allocate(yc(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (yc)'
allocate(xx(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (xx)'
allocate(yx(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (yx)'
allocate(xu(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (xu)'
allocate(yu(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (yu)'
allocate(xv(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (xv)'
allocate(yv(E2DFIELD),stat=rc)
if (rc /=0) stop 'init_domain: Error allocating memory (yv)'
#endif
#endif
......@@ -2,21 +2,27 @@
integer :: imin=-1,imax=-1,jmin=-1,jmax=-1
integer :: iimin=-1,iimax=-1,jjmin=-1,jjmax=-1
integer :: kmax=1
REALTYPE,dimension(:,:),allocatable :: H,HU,HV
REALTYPE,dimension(:,:),allocatable :: lonmap,latmap,conv
REALTYPE,dimension(:,:),allocatable :: dry_z,dry_u,dry_v
REALTYPE,dimension(:,:),allocatable :: cor,coru,corv