Commit 61cae53c authored by Knut's avatar Knut

Merge branch 'rivers' into rigid_lid

parents 47dac7f7 64419727
Pipeline #136 failed with stages
This diff is collapsed.
...@@ -162,7 +162,6 @@ ...@@ -162,7 +162,6 @@
integer :: i,j integer :: i,j
integer :: elev_method=1 integer :: elev_method=1
REALTYPE :: elev_const=_ZERO_ REALTYPE :: elev_const=_ZERO_
integer,parameter :: rk = kind(_ONE_)
character(LEN = PATH_MAX) :: elev_file='elev.nc' character(LEN = PATH_MAX) :: elev_file='elev.nc'
namelist /m2d/ & namelist /m2d/ &
elev_method,elev_const,elev_file, & elev_method,elev_const,elev_file, &
...@@ -415,8 +414,8 @@ ...@@ -415,8 +414,8 @@
! This is only needed for proper flexible output ! This is only needed for proper flexible output
where (az .eq. 0) where (az .eq. 0)
z = -9999.0d0 z = -9999._rk
zo = -9999.0d0 zo = -9999._rk
end where end where
call depth_update(zo,z,D,Dvel,DU,DV) call depth_update(zo,z,D,Dvel,DU,DV)
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
IMPLICIT NONE IMPLICIT NONE
! !
! !PUBLIC DATA MEMBERS: ! !PUBLIC DATA MEMBERS:
integer, parameter :: rk = kind(_ONE_)
REALTYPE :: dtm REALTYPE :: dtm
REALTYPE,dimension(:,:),pointer :: zo,z REALTYPE,dimension(:,:),pointer :: zo,z
logical :: do_numerical_analyses_2d=.false. logical :: do_numerical_analyses_2d=.false.
...@@ -101,7 +102,6 @@ ...@@ -101,7 +102,6 @@
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
integer :: rc integer :: rc
integer,parameter :: rk = kind(_ONE_)
!EOP !EOP
!------------------------------------------------------------------------- !-------------------------------------------------------------------------
!BOC !BOC
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
break_stat = 0 break_stat = 0
#endif #endif
z = -9999*_ONE_; zo =_ZERO_ z = -9999._rk ; zo =_ZERO_
U = _ZERO_; DU = _ZERO_; Uint = _ZERO_; UEx = _ZERO_ U = _ZERO_; DU = _ZERO_; Uint = _ZERO_; UEx = _ZERO_
V = _ZERO_; DV = _ZERO_; Vint = _ZERO_; VEx = _ZERO_ V = _ZERO_; DV = _ZERO_; Vint = _ZERO_; VEx = _ZERO_
...@@ -230,7 +230,6 @@ ...@@ -230,7 +230,6 @@
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
logical :: used logical :: used
integer,parameter :: rk = kind(_ONE_)
!EOP !EOP
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
!BOC !BOC
......
...@@ -396,8 +396,8 @@ ...@@ -396,8 +396,8 @@
num(i,j,:) = 1.e-15 num(i,j,:) = 1.e-15
nuh(i,j,:) = 1.e-15 nuh(i,j,:) = 1.e-15
#ifndef NO_BAROCLINIC #ifndef NO_BAROCLINIC
S(i,j,:) = -9999.0 S(i,j,:) = -9999._rk
T(i,j,:) = -9999.0 T(i,j,:) = -9999._rk
#endif #endif
end if end if
end do end do
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
use domain, only: imin,jmin,imax,jmax,kmax,H,az,dry_z use domain, only: imin,jmin,imax,jmax,kmax,H,az,dry_z
!KB use get_field, only: get_3d_field !KB use get_field, only: get_3d_field
use variables_2d, only: fwf_int use variables_2d, only: fwf_int
use variables_3d, only: S,hn,kmin use variables_3d, only: rk,S,hn,kmin
use meteo, only: metforcing,met_method,nudge_sss,sss use meteo, only: metforcing,met_method,nudge_sss,sss
use meteo, only: METEO_CONST,METEO_FROMFILE,METEO_FROMEXT use meteo, only: METEO_CONST,METEO_FROMFILE,METEO_FROMEXT
use halo_zones, only: update_3d_halo,wait_halo,D_TAG,H_TAG use halo_zones, only: update_3d_halo,wait_halo,D_TAG,H_TAG
...@@ -224,8 +224,8 @@ ...@@ -224,8 +224,8 @@
stop 'init_salinity' stop 'init_salinity'
end select end select
S(:,:,0) = -9999*_ONE_ S(:,:,0) = -9999._rk
forall(i=imin:imax,j=jmin:jmax, az(i,j).eq.0) S(i,j,:) = -9999*_ONE_ forall(i=imin:imax,j=jmin:jmax, az(i,j).eq.0) S(i,j,:) = -9999._rk
call update_3d_halo(S,S,az,imin,jmin,imax,jmax,kmax,D_TAG) call update_3d_halo(S,S,az,imin,jmin,imax,jmax,kmax,D_TAG)
call wait_halo(D_TAG) call wait_halo(D_TAG)
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
use domain, only: imin,jmin,imax,kmax,jmax,H,az,dry_z use domain, only: imin,jmin,imax,kmax,jmax,H,az,dry_z
use domain, only: ill,ihl,jll,jhl use domain, only: ill,ihl,jll,jhl
use domain, only: ilg,ihg,jlg,jhg use domain, only: ilg,ihg,jlg,jhg
use variables_3d, only: T,rad,hn,kmin,A,g1,g2,heatflux_net use variables_3d, only: rk,T,rad,hn,kmin,A,g1,g2,heatflux_net
use meteo, only: metforcing,met_method,nudge_sst,sst use meteo, only: metforcing,met_method,nudge_sst,sst
use meteo, only: METEO_CONST,METEO_FROMFILE,METEO_FROMEXT use meteo, only: METEO_CONST,METEO_FROMFILE,METEO_FROMEXT
!KB use get_field, only: get_3d_field !KB use get_field, only: get_3d_field
...@@ -303,8 +303,8 @@ end interface ...@@ -303,8 +303,8 @@ end interface
stop 'init_temperature' stop 'init_temperature'
end select end select
T(:,:,0) = -9999*_ONE_ T(:,:,0) = -9999._rk
forall(i=imin:imax,j=jmin:jmax, az(i,j).eq.0) T(i,j,:) = -9999*_ONE_ forall(i=imin:imax,j=jmin:jmax, az(i,j).eq.0) T(i,j,:) = -9999._rk
call update_3d_halo(T,T,az,imin,jmin,imax,jmax,kmax,D_TAG) call update_3d_halo(T,T,az,imin,jmin,imax,jmax,kmax,D_TAG)
call wait_halo(D_TAG) call wait_halo(D_TAG)
......
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
IMPLICIT NONE IMPLICIT NONE
! !
! !PUBLIC DATA MEMBERS: ! !PUBLIC DATA MEMBERS:
integer, parameter :: rk = kind(_ONE_)
REALTYPE :: dt,cnpar=0.9 REALTYPE :: dt,cnpar=0.9
REALTYPE :: avmback=_ZERO_,avhback=_ZERO_ REALTYPE :: avmback=_ZERO_,avhback=_ZERO_
logical :: do_numerical_analyses_3d=.false. logical :: do_numerical_analyses_3d=.false.
...@@ -175,7 +176,6 @@ ...@@ -175,7 +176,6 @@
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
integer :: rc integer :: rc
integer,parameter :: rk = kind(_ONE_)
!EOP !EOP
!------------------------------------------------------------------------- !-------------------------------------------------------------------------
!BOC !BOC
...@@ -236,8 +236,8 @@ ...@@ -236,8 +236,8 @@
#endif #endif
! must be nonzero for gotm_fabm in case of calc_temp=F ! must be nonzero for gotm_fabm in case of calc_temp=F
g1 = -9999*_ONE_ g1 = -9999._rk
g2 = -9999*_ONE_ g2 = -9999._rk
#ifdef DEBUG #ifdef DEBUG
write(debug,*) 'Leaving init_variables_3d()' write(debug,*) 'Leaving init_variables_3d()'
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
! Original author(s): Karsten Bolding & Jorn Bruggeman ! Original author(s): Karsten Bolding & Jorn Bruggeman
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
integer,parameter :: rk = kind(_ONE_) !
!EOP !EOP
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
!BOC !BOC
......
...@@ -171,9 +171,9 @@ stop ...@@ -171,9 +171,9 @@ stop
! calculate the z-coordinate of the cell centers ! calculate the z-coordinate of the cell centers
! references to mean sea level ! references to mean sea level
zc(:,:,0)=-H(:,:) zc(:,:,0)=-H(:,:)
zc(:,:,1)=-H(:,:) + 0.5*hn(:,:,1) zc(:,:,1)=-H(:,:) + _HALF_*hn(:,:,1)
do k=2,kmax do k=2,kmax
zc(:,:,k)=zc(:,:,k-1)+0.5*(hn(:,:,k-1)+hn(:,:,k)) zc(:,:,k)=zc(:,:,k-1)+_HALF_*(hn(:,:,k-1)+hn(:,:,k))
end do end do
#ifdef SLICE_MODEL #ifdef SLICE_MODEL
......
...@@ -372,6 +372,8 @@ ...@@ -372,6 +372,8 @@
end if end if
end if end if
call finalize_register_all_variables(runtype)
if (.not. dryrun) then if (.not. dryrun) then
if (save_initial) then if (save_initial) then
call output_manager_prepare_save(julianday, int(secondsofday), 0, int(MinN-1)) call output_manager_prepare_save(julianday, int(secondsofday), 0, int(MinN-1))
......
...@@ -11,6 +11,12 @@ ...@@ -11,6 +11,12 @@
! !
! !USES: ! !USES:
use field_manager use field_manager
use variables_2d, only: register_2d_variables
use variables_3d, only: register_3d_variables
#ifdef _FABM_
use getm_fabm, only: register_fabm_variables
#endif
use output_processing, only: register_processed_variables, finalize_register_processed_variables
IMPLICIT NONE IMPLICIT NONE
! !
! default: all is private. ! default: all is private.
...@@ -225,6 +231,7 @@ ...@@ -225,6 +231,7 @@
#ifdef _FABM_ #ifdef _FABM_
call finalize_register_fabm_variables(fm) call finalize_register_fabm_variables(fm)
#endif #endif
call finalize_register_processed_variables(fm)
return return
end subroutine finalize_register_all_variables end subroutine finalize_register_all_variables
......
...@@ -148,14 +148,8 @@ ...@@ -148,14 +148,8 @@
"dimensions do not match") "dimensions do not match")
end if end if
il = ilg ; jl = jlg ; ih = ihg ; jh = jhg il = ilg ; jl = jlg ; ih = ihg ; jh = jhg
else
il = 1 ; jl = 1 ; ih = iextr ; jh = jextr
end if end if
start(1) = il; start(2) = jl;
edges(1) = ih-il+1; edges(2) = jh-jl+1;
edges(3) = 1
allocate(beta(E2DFIELD),stat=err) allocate(beta(E2DFIELD),stat=err)
if (err /= 0) & if (err /= 0) &
stop 'init_meteo_input_ncdf: Error allocating memory (beta)' stop 'init_meteo_input_ncdf: Error allocating memory (beta)'
...@@ -174,6 +168,7 @@ ...@@ -174,6 +168,7 @@
call to_rotated_lat_lon(southpole,olon,olat,rlon,rlat,x) call to_rotated_lat_lon(southpole,olon,olat,rlon,rlat,x)
beta = x beta = x
end if end if
il = 1 ; jl = 1 ; ih = iextr ; jh = jextr
else else
if (met_lat(1) .gt. met_lat(2)) then if (met_lat(1) .gt. met_lat(2)) then
LEVEL3 'Reverting lat-axis and setting grid_scan to 0' LEVEL3 'Reverting lat-axis and setting grid_scan to 0'
...@@ -228,8 +223,21 @@ ...@@ -228,8 +223,21 @@
call getm_error("init_meteo_input_ncdf()", & call getm_error("init_meteo_input_ncdf()", &
"Some interpolation coefficients are not valid") "Some interpolation coefficients are not valid")
end if end if
il = minval(gridmap(:,:,1),mask=(gridmap(:,:,1).gt.0))
jl = minval(gridmap(:,:,2),mask=(gridmap(:,:,2).gt.0))
ih = min( maxval(gridmap(:,:,1))+1 , iextr )
jh = min( maxval(gridmap(:,:,2))+1 , jextr )
where( gridmap(:,:,1).gt.0 ) gridmap(:,:,1) = gridmap(:,:,1) - il + 1
where( gridmap(:,:,2).gt.0 ) gridmap(:,:,2) = gridmap(:,:,2) - jl + 1
end if end if
start(1) = il; start(2) = jl;
edges(1) = ih-il+1; edges(2) = jh-jl+1;
edges(3) = 1
allocate(d_airp(E2DFIELD),stat=rc) allocate(d_airp(E2DFIELD),stat=rc)
if (rc /= 0) stop 'init_meteo_input_ncdf: Error allocating memory (d_airp)' if (rc /= 0) stop 'init_meteo_input_ncdf: Error allocating memory (d_airp)'
d_airp = -9999*_ONE_ d_airp = -9999*_ONE_
...@@ -846,7 +854,7 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -846,7 +854,7 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
integer :: i,j,err integer :: i,j,err
REALTYPE,dimension(edges(1),edges(2)) :: wrk,wrk_dp REALTYPE,dimension(edges(1),edges(2)) :: wrk!,wrk_dp
REALTYPE :: angle,uu,vv,sinconv,cosconv REALTYPE :: angle,uu,vv,sinconv,cosconv
!EOP !EOP
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
...@@ -866,8 +874,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -866,8 +874,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,airp_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,airp_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,airp_input)
end if end if
end if end if
...@@ -881,8 +891,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -881,8 +891,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
evap_input(ill:ihl,jll:jhl) = wrk evap_input(ill:ihl,jll:jhl) = wrk
end if end if
else else
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,evap_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,evap_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,evap_input)
end if end if
if (evap_factor .ne. _ONE_) then if (evap_factor .ne. _ONE_) then
evap_input = evap_input * evap_factor evap_input = evap_input * evap_factor
...@@ -899,8 +911,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -899,8 +911,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
precip_input(ill:ihl,jll:jhl) = wrk precip_input(ill:ihl,jll:jhl) = wrk
end if end if
else else
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,precip_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,precip_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,precip_input)
end if end if
if (precip_factor .ne. _ONE_) then if (precip_factor .ne. _ONE_) then
precip_input = precip_input * precip_factor precip_input = precip_input * precip_factor
...@@ -920,8 +934,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -920,8 +934,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,u10_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,u10_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,u10_input)
end if end if
end if end if
...@@ -936,8 +952,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -936,8 +952,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,v10_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,v10_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,v10_input)
end if end if
end if end if
...@@ -976,8 +994,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -976,8 +994,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,t2_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,t2_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,t2_input)
end if end if
end if end if
...@@ -992,8 +1012,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -992,8 +1012,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,hum_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,hum_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,hum_input)
end if end if
end if end if
...@@ -1008,8 +1030,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1008,8 +1030,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,tcc_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,tcc_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,tcc_input)
end if end if
end if end if
...@@ -1064,8 +1088,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1064,8 +1088,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
sst_input(ill:ihl,jll:jhl) = wrk sst_input(ill:ihl,jll:jhl) = wrk
end if end if
else if (calc_met) then else if (calc_met) then
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,sst_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,sst_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,sst_input)
end if end if
end if end if
...@@ -1079,8 +1105,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1079,8 +1105,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
sss_input(ill:ihl,jll:jhl) = wrk sss_input(ill:ihl,jll:jhl) = wrk
end if end if
else if (calc_met) then else if (calc_met) then
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,sss_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,sss_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,sss_input)
end if end if
end if end if
...@@ -1094,6 +1122,35 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1094,6 +1122,35 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end subroutine read_data end subroutine read_data
!EOC !EOC
!-----------------------------------------------------------------------
!BOP
!
! !IROUTINE: flip_var -
!
! !INTERFACE:
subroutine flip_var(var)
IMPLICIT NONE
!
! !DESCRIPTION:
!
! !INPUT/OUTPUT PARAMETERS:
REALTYPE, intent(inout) :: var(edges(1),edges(2))
!
! !REVISION HISTORY:
!
! !LOCAL VARIABLES:
!
!EOP
!-----------------------------------------------------------------------
select case (grid_scan)
case (0)
var = var(:,edges(2):1:-1)
end select
return
end subroutine flip_var
!EOC
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
!BOP !BOP
! !
...@@ -1125,9 +1182,12 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1125,9 +1182,12 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
integer :: i,j integer :: i,j
integer :: iextr,jextr
!EOP !EOP
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
iextr = edges(1) ; jextr = edges(2)
select case (grid_scan) select case (grid_scan)
case (0) case (0)
do j=1,jextr do j=1,jextr
......
...@@ -18,18 +18,22 @@ ...@@ -18,18 +18,22 @@
private private
! !
! !PUBLIC DATA FUNCTIONS: ! !PUBLIC DATA FUNCTIONS:
public init_output_processing, register_processed_variables, do_output_processing public init_output_processing, do_output_processing
public register_processed_variables, finalize_register_processed_variables
! !
! !PUBLIC DATA MEMBERS: ! !PUBLIC DATA MEMBERS:
!
! !PRIVATE DATA MEMBERS:
REALTYPE, dimension(:,:), allocatable, target :: u2d, v2d REALTYPE, dimension(:,:), allocatable, target :: u2d, v2d
REALTYPE, dimension(:,:), allocatable, target :: u2d_destag, v2d_destag
REALTYPE, dimension(:,:,:), allocatable, target :: u3d, v3d REALTYPE, dimension(:,:,:), allocatable, target :: u3d, v3d
REALTYPE, dimension(:,:), allocatable, target :: u2d_destag, v2d_destag
REALTYPE, dimension(:,:,:), allocatable, target :: u3d_destag, v3d_destag REALTYPE, dimension(:,:,:), allocatable, target :: u3d_destag, v3d_destag
!
! !PRIVATE DATA MEMBERS: logical :: u2d_used, v2d_used
logical, target:: u2d_use, v2d_use logical :: u3d_used, v3d_used
logical, target :: u2d_now, v2d_now
logical, target :: u3d_now, v3d_now
logical, target:: u2d_destag_use, v2d_destag_use logical, target:: u2d_destag_use, v2d_destag_use
logical, target:: u3d_use, v3d_use
logical, target:: u3d_destag_use, v3d_destag_use logical, target:: u3d_destag_use, v3d_destag_use
integer, parameter :: rk = kind(_ONE_)