Commit cbec6e79 authored by Knut's avatar Knut

Merge branch 'meteo' into rivers

parents cec9b0e7 d4a07e29
......@@ -199,7 +199,7 @@
zm = max( z(i ,j) , -H(i+1,j)+min( min_depth , D(i ,j) ) )
zx = ( zp - zm + (airp(i+1,j)-airp(i,j))*gammai ) / DXU
tausu = _HALF_ * ( tausx(i,j) + tausx(i+1,j) )
#ifdef _SLR_V26_
#ifndef _SLR_NOCLIP_
if (U(i,j) .gt. _ZERO_) then
Slr = max( Slru(i,j) , _ZERO_ )
else
......@@ -369,7 +369,7 @@
zm = max( z(i,j ) , -H(i,j+1)+min( min_depth , D(i,j ) ) )
zy = ( zp - zm + (airp(i,j+1)-airp(i,j))*gammai ) / DYV
tausv = _HALF_ * ( tausy(i,j) + tausy(i,j+1) )
#ifdef _SLR_V26_
#ifndef _SLR_NOCLIP_
if (V(i,j) .gt. _ZERO_) then
Slr = max( Slrv(i,j) , _ZERO_ )
else
......
......@@ -207,6 +207,123 @@
end subroutine postinit_variables_2d
!EOC
!-----------------------------------------------------------------------
!BOP
!
! !ROUTINE: register_2d_variables() - register GETM variables.
!
! !INTERFACE:
subroutine register_2d_variables(fm)
!
! !DESCRIPTION:
!
! !USES:
use field_manager
IMPLICIT NONE
!
! !INPUT PARAMETERS:
type (type_field_manager) :: fm
!
! !REVISION HISTORY:
! Original author(s): Karsten Bolding & Jorn Bruggeman
!
! !LOCAL VARIABLES:
logical :: used
integer,parameter :: rk = kind(_ONE_)
!EOP
!-----------------------------------------------------------------------
!BOC
LEVEL2 'register_2d_variables()'
!D(E2DFIELD)
!DU,DV
!z(E2DFIELD)
!zo(E2DFIELD)
!U(E2DFIELD)
!V(E2DFIELD)
!UEx(E2DFIELD)
!VEx(E2DFIELD)
!fU(E2DFIELD)
!fV(E2DFIELD)
!ru(E2DFIELD)
!rv(E2DFIELD)
!Uint(E2DFIELD)
!Vint(E2DFIELD)
!Uinto(E2DFIELD)
!Vinto(E2DFIELD)
!res_du(E2DFIELD)
!res_u(E2DFIELD)
!res_dv(E2DFIELD)
!res_v(E2DFIELD)
!kbk
!SlUx(E2DFIELD)
!SlVx(E2DFIELD)
!Slru(E2DFIELD)
!Slrv(E2DFIELD)
!zub(E2DFIELD)
!zvb(E2DFIELD)
!zub0(E2DFIELD)
!zvb0(E2DFIELD)
!An(E2DFIELD)
!AnX(E2DFIELD)
!fwf(E2DFIELD)
!fwf_int(E2DFIELD)
!EWbdy(jmax),ENbdy(imax),EEbdy(jmax),ESbdy(imax)
! category - 2d
call fm%register('z', 'm', 'sea surface elevation', standard_name='sea surface elevation', fill_value=-9999.0_rk, data2d=z(_2D_W_), category="2d", part_of_state=.true.)
call fm%register('zo', 'm', 'sea surface elevation', standard_name='sea surface elevation', fill_value=-9999.0_rk, data2d=zo(_2D_W_), category="2d", output_level=output_level_debug)
call fm%register('D', 'm', 'water depth', standard_name='water depth', fill_value=-10009.0_rk, data2d=D(_2D_W_), category="2d", part_of_state=.true.)
call fm%register('U', 'm2/s', 'transport in local x-direction', standard_name='', data2d=U(_2D_W_), category='2d', output_level=output_level_debug, part_of_state=.true.)
call fm%register('V', 'm2/s', 'transport in local y-direction', standard_name='', data2d=V(_2D_W_), category='2d', output_level=output_level_debug, part_of_state=.true.)
call fm%register('velx', 'm/s', 'velocity in global x-direction', standard_name='', data2d=velx(_2D_W_), category='2d', fill_value=-9999.0_rk, output_level=output_level_debug)
call fm%register('vely', 'm/s', 'velocity in global y-direction', standard_name='', data2d=vely(_2D_W_), category='2d', fill_value=-9999.0_rk, output_level=output_level_debug)
if (do_numerical_analyses_2d) then
call fm%register('numdis_2d', 'W/kg', 'numerical dissipation', standard_name='', category='2d', output_level=output_level_debug)
call fm%register('phydis_2d', 'W/kg', 'physical dissipation' , standard_name='', category='2d', output_level=output_level_debug)
end if
return
end subroutine register_2d_variables
!EOC
!-----------------------------------------------------------------------
!BOP
!
! !ROUTINE: finalize_register_2d_variables() - send optional variables.
!
! !INTERFACE:
subroutine finalize_register_2d_variables(fm)
!
! !DESCRIPTION:
!
! !USES:
use field_manager
IMPLICIT NONE
!
! !INPUT PARAMETERS:
type (type_field_manager) :: fm
!
! !REVISION HISTORY:
! Original author(s): Karsten Bolding & Jorn Bruggeman
!
! !LOCAL VARIABLES:
!EOP
!-----------------------------------------------------------------------
!BOC
LEVEL1 'finalize_register_2d_variables()'
if (do_numerical_analyses_2d) then
call fm%send_data('numdis_2d', numdis_2d(_2D_W_))
call fm%send_data('phydis_2d', phydis_2d(_2D_W_))
end if
return
end subroutine finalize_register_2d_variables
!EOC
!-----------------------------------------------------------------------
!BOP
!
......
......@@ -73,6 +73,9 @@
if (rc /= 0) stop 'init_3d: Error allocating memory (sf)'
#endif
allocate(zc(I3DFIELD),stat=rc) ! 3D field for cell center coordinates
if (rc /= 0) stop 'init_3d: Error allocating memory (zc)'
allocate(ho(I3DFIELD),stat=rc) ! 3D field for old box height (z-column)
if (rc /= 0) stop 'init_3d: Error allocating memory (ho)'
......
......@@ -22,6 +22,7 @@
#ifdef STRUCTURE_FRICTION
REALTYPE, dimension(:,:,:), allocatable :: sf
#endif
REALTYPE, dimension(:,:,:), allocatable, target :: zc
REALTYPE, dimension(:,:,:), allocatable, target :: hn,hvel,hun,hvn
REALTYPE, dimension(:,:,:), allocatable :: ho,huo,hvo
REALTYPE, dimension(:,:,:), allocatable, target :: zwn,zcn
......
......@@ -41,6 +41,7 @@
! !PUBLIC DATA MEMBERS:
public init_getm_fabm, postinit_getm_fabm, do_getm_fabm, model, output_none
public init_getm_fabm_fields
public register_fabm_variables, finalize_register_fabm_variables
integer, public :: fabm_init_method=0
character(len=PATH_MAX) :: fabm_init_file
integer :: fabm_init_format, fabm_field_no
......@@ -334,6 +335,123 @@ end interface
end subroutine init_getm_fabm_fields
!EOC
#ifdef _FABM_
!-----------------------------------------------------------------------
!BOP
!
! !ROUTINE: register_fabm_variables() - register FABM variables.
!
! !INTERFACE:
subroutine register_fabm_variables(fm)
!
! !DESCRIPTION:
!
! !USES:
use field_manager
IMPLICIT NONE
!
! !INPUT PARAMETERS:
type (type_field_manager) :: fm
!
! !REVISION HISTORY:
! Original author(s): Karsten Bolding & Jorn Bruggeman
!
! !LOCAL VARIABLES:
integer :: i,output_level
logical :: in_output
!EOP
!-----------------------------------------------------------------------
!BOC
if (.not. fabm_calc) return
LEVEL2 'register_fabm_variables()'
do i=1,size(model%state_variables)
output_level = output_level_default
if (model%state_variables(i)%output==output_none) output_level = output_level_debug
call fm%register(model%state_variables(i)%name, model%state_variables(i)%units, &
model%state_variables(i)%long_name, minimum=model%state_variables(i)%minimum, maximum=model%state_variables(i)%maximum, &
fill_value=model%state_variables(i)%missing_value, dimensions=(/id_dim_z/), data3d=fabm_pel(_3D_W_,i), category='fabm'//model%state_variables(i)%target%owner%get_path(), output_level=output_level)
end do
do i=1,size(model%bottom_state_variables)
output_level = output_level_default
if (model%bottom_state_variables(i)%output==output_none) output_level = output_level_debug
call fm%register(model%bottom_state_variables(i)%name, model%bottom_state_variables(i)%units, &
model%bottom_state_variables(i)%long_name, minimum=model%bottom_state_variables(i)%minimum, &
maximum=model%bottom_state_variables(i)%maximum, fill_value=model%bottom_state_variables(i)%missing_value, &
data2d=fabm_ben(_2D_W_,i), category='fabm'//model%bottom_state_variables(i)%target%owner%get_path(), output_level=output_level)
end do
do i=1,size(model%diagnostic_variables)
output_level = output_level_default
if (model%diagnostic_variables(i)%output==output_none) output_level = output_level_debug
call fm%register(model%diagnostic_variables(i)%name, model%diagnostic_variables(i)%units, &
model%diagnostic_variables(i)%long_name, minimum=model%diagnostic_variables(i)%minimum, maximum=model%diagnostic_variables(i)%maximum, &
fill_value=model%diagnostic_variables(i)%missing_value, dimensions=(/id_dim_z/), data3d=fabm_diag(_3D_W_,i), category='fabm'//model%diagnostic_variables(i)%target%owner%get_path(), output_level=output_level, used=in_output)
if (in_output) model%diagnostic_variables(i)%save = .true.
end do
do i=1,size(model%horizontal_diagnostic_variables)
output_level = output_level_default
if (model%horizontal_diagnostic_variables(i)%output==output_none) output_level = output_level_debug
call fm%register(model%horizontal_diagnostic_variables(i)%name, model%horizontal_diagnostic_variables(i)%units, &
model%horizontal_diagnostic_variables(i)%long_name, minimum=model%horizontal_diagnostic_variables(i)%minimum, maximum=model%horizontal_diagnostic_variables(i)%maximum, &
fill_value=model%horizontal_diagnostic_variables(i)%missing_value, data2d=fabm_diag_hz(_2D_W_,i), category='fabm'//model%horizontal_diagnostic_variables(i)%target%owner%get_path(), output_level=output_level, used=in_output)
if (in_output) model%horizontal_diagnostic_variables(i)%save = .true.
end do
if (do_numerical_analyses_3d) then
do i=1,size(model%state_variables)
call fm%register('nummix_'//trim(model%state_variables(i)%name), &
'('//trim(model%state_variables(i)%units)//')**2/s', &
'numerical mixing of '//trim(model%state_variables(i)%long_name), &
dimensions=(/id_dim_z/), &
category='fabm'//model%state_variables(i)%target%owner%get_path(), &
output_level=output_level_debug)
end do
end if
return
end subroutine register_fabm_variables
!EOC
#endif
!-----------------------------------------------------------------------
!BOP
!
! !ROUTINE: finalize_register_fabm_variables() - send optional variables.
!
! !INTERFACE:
subroutine finalize_register_fabm_variables(fm)
!
! !DESCRIPTION:
!
! !USES:
use field_manager
IMPLICIT NONE
!
! !INPUT PARAMETERS:
type (type_field_manager) :: fm
!
! !REVISION HISTORY:
! Original author(s): Karsten Bolding & Jorn Bruggeman
!
! !LOCAL VARIABLES:
integer :: i
!EOP
!-----------------------------------------------------------------------
!BOC
LEVEL1 'finalize_register_fabm_variables()'
if (fabm_calc) then
if (do_numerical_analyses_3d) then
do i=1,size(model%state_variables)
call fm%send_data('nummix_'//trim(model%state_variables(i)%name), nummix_fabm_pel(_3D_W_,i))
end do
end if
end if
return
end subroutine finalize_register_fabm_variables
!EOC
!-----------------------------------------------------------------------
!BOP
!
......
......@@ -36,6 +36,7 @@
#ifdef STRUCTURE_FRICTION
REALTYPE :: sf(I3DFIELD)
#endif
REALTYPE :: zc(I3DFIELD)
REALTYPE :: ho(I3DFIELD)
REALTYPE,dimension(I3DFIELD),target :: hn,hvel,hun,hvn
REALTYPE,dimension(I3DFIELD),target :: zwn,zcn
......
......@@ -85,7 +85,7 @@
k=kumin(i,j)
rrdraghm1 = rru(i,j) / hun(i,j,k)
rdragDm1 = ru (i,j) / Dun(i,j)
#ifdef _SLR_V26_
#ifndef _SLR_NOCLIP_
Slru(i,j) = rrdraghm1*uu (i,j,k) &
- rdragDm1 *Uadv(i,j)
#else
......@@ -125,7 +125,7 @@
k=kvmin(i,j)
rrdraghm1 = rrv(i,j) / hvn(i,j,k)
rdragDm1 = rv (i,j) / Dvn(i,j)
#ifdef _SLR_V26_
#ifndef _SLR_NOCLIP_
Slrv(i,j) = rrdraghm1*vv (i,j,k) &
- rdragDm1 *Vadv(i,j)
#else
......
......@@ -344,6 +344,233 @@
end subroutine postinit_variables_3d
!EOC
!-----------------------------------------------------------------------
!BOP
!
! !ROUTINE: register_3d_variables() - register GETM variables.
!
! !INTERFACE:
subroutine register_3d_variables(fm,runtype,update_temp,update_salt)
!
! !DESCRIPTION:
!
! !USES:
use field_manager
IMPLICIT NONE
!
! !INPUT PARAMETERS:
type (type_field_manager) :: fm
integer, intent(in) :: runtype
logical, intent(in) :: update_temp,update_salt
!
! !REVISION HISTORY:
! Original author(s): Karsten Bolding & Jorn Bruggeman
!
! !LOCAL VARIABLES:
integer,parameter :: rk = kind(_ONE_)
!EOP
!-----------------------------------------------------------------------
!BOC
LEVEL2 'register_3d_variables()'
!:: kmin(I2DFIELD)
!:: kumin(I2DFIELD)
!:: kvmin(I2DFIELD)
!:: kmin_pmz(I2DFIELD)
!:: kumin_pmz(I2DFIELD)
!:: kvmin_pmz(I2DFIELD)
!:: uu(I3DFIELD)
!:: vv(I3DFIELD)
!:: ww(I3DFIELD)
#ifdef _MOMENTUM_TERMS_
!:: tdv_u(I3DFIELD)
!:: adv_u(I3DFIELD)
!:: vsd_u(I3DFIELD)
!:: hsd_u(I3DFIELD)
!:: cor_u(I3DFIELD)
!:: epg_u(I3DFIELD)
!:: ipg_u(I3DFIELD)
!:: tdv_v(I3DFIELD)
!:: adv_v(I3DFIELD)
!:: vsd_v(I3DFIELD)
!:: hsd_v(I3DFIELD)
!:: cor_v(I3DFIELD)
!:: epg_v(I3DFIELD)
!:: ipg_v(I3DFIELD)
#endif
#ifdef STRUCTURE_FRICTION
!:: sf(I3DFIELD)
#endif
!:: ho(I3DFIELD)
!:: hn(I3DFIELD)
!:: huo(I3DFIELD)
!:: hun(I3DFIELD)
!:: hvo(I3DFIELD)
!:: hvn(I3DFIELD)
!:: hcc(I3DFIELD)
!:: uuEx(I3DFIELD)
!:: vvEx(I3DFIELD)
!:: num(I3DFIELD)
!:: nuh(I3DFIELD)
! 3D turbulent fields
!:: tke(I3DFIELD)
!:: eps(I3DFIELD)
!:: SS(I3DFIELD)
#ifndef NO_BAROCLINIC
! 3D baroclinic fields
!:: NN(I3DFIELD)
!:: S(I3DFIELD)
!:: T(I3DFIELD)
!:: rho(I3DFIELD)
!:: rad(I3DFIELD)
!:: buoy(I3DFIELD)
!:: alpha(I3DFIELD)
!:: beta(I3DFIELD)
!:: idpdx(I3DFIELD)
!:: idpdy(I3DFIELD)
!:: light(I3DFIELD)
#endif
#ifdef SPM
! suspended matter
!:: spm(I3DFIELD)
!:: spm_ws(I3DFIELD)
!:: spm_pool(I2DFIELD)
#endif
! 2D fields in 3D domain
!:: sseo(I2DFIELD)
!:: ssen(I2DFIELD)
!:: Dn(I2DFIELD)
!:: ssuo(I2DFIELD)
!:: ssun(I2DFIELD)
!:: ssvo(I2DFIELD)
!:: ssvn(I2DFIELD)
!:: Dun,Dvn
! 3D friction in 3D domain
!:: rru(I2DFIELD)
!:: rrv(I2DFIELD)
!:: taus(I2DFIELD)
!:: taubx(I2DFIELD)
!:: tauby(I2DFIELD)
!:: taub(I2DFIELD)
! light attenuation
!:: A(I2DFIELD)
!:: g1(I2DFIELD)
!:: g2(I2DFIELD)
! category - 3d
if (runtype .ge. 2) then
call fm%register('zc', 'm', 'center coordinate', standard_name='', dimensions=(/id_dim_z/),data3d=zc(_3D_W_), category='grid', part_of_state=.false.)
call fm%register('zcn', 'm', 'z', standard_name='', dimensions=(/id_dim_z/), data3d=zcn(_3D_W_), category='grid')
call fm%register('hn', 'm', 'layer thickness', standard_name='cell_thickness', dimensions=(/id_dim_z/),data3d=hn(_3D_W_), category='grid', part_of_state=.true.)
call fm%register('hun', 'm', 'layer thickness - U-points', standard_name='cell_thickness', dimensions=(/id_dim_z/),data3d=hun(_3D_W_), category='grid', output_level=output_level_debug)
call fm%register('hvn', 'm', 'layer thickness - V-points', standard_name='cell_thickness', dimensions=(/id_dim_z/),data3d=hvn(_3D_W_), category='grid', output_level=output_level_debug)
call fm%register('ho', 'm', 'old layer thickness', standard_name='cell_thickness', dimensions=(/id_dim_z/),data3d=ho(_3D_W_), category='grid', output_level=output_level_debug)
call fm%register('ssen', 'm', 'elevation at T-points (3D)', standard_name='', data2d=ssen(_2D_W_), category='3d', fill_value=-9999.0_rk, output_level=output_level_debug, part_of_state=.true.)
call fm%register('ssun', 'm', 'elevation at U-points (3D)', standard_name='', data2d=ssun(_2D_W_), category='3d', output_level=output_level_debug, part_of_state=.true.)
call fm%register('ssvn', 'm', 'elevation at V-points (3D)', standard_name='', data2d=ssvn(_2D_W_), category='3d', output_level=output_level_debug, part_of_state=.true.)
call fm%register('sseo', 'm', 'old elevation at T-points (3D)', standard_name='', data2d=sseo(_2D_W_), category='3d', fill_value=-9999.0_rk, output_level=output_level_debug, part_of_state=.true.)
call fm%register('uu', 'm2/s', 'transport in local x-direction (3D)', standard_name='', dimensions=(/id_dim_z/), data3d=uu(_3D_W_), category='3d', output_level=output_level_debug, part_of_state=.true.)
call fm%register('vv', 'm2/s', 'transport in local y-direction (3D)', standard_name='', dimensions=(/id_dim_z/), data3d=vv(_3D_W_), category='3d', output_level=output_level_debug, part_of_state=.true.)
call fm%register('ww', 'm/s', 'grid-related vertical velocity', standard_name='', dimensions=(/id_dim_z/), data3d=ww(_3D_W_), category='3d', output_level=output_level_debug)
call fm%register('velx3d', 'm/s', 'velocity in global x-direction (3D)', standard_name='', dimensions=(/id_dim_z/), data3d=velx3d(_3D_W_), category='3d', fill_value=-9999.0_rk, output_level=output_level_debug)
call fm%register('vely3d', 'm/s', 'velocity in global y-direction (3D)', standard_name='', dimensions=(/id_dim_z/), data3d=vely3d(_3D_W_), category='3d', fill_value=-9999.0_rk, output_level=output_level_debug)
call fm%register('w', 'm/s', 'vertical velocity', standard_name='', dimensions=(/id_dim_z/), data3d=w(_3D_W_), category='3d', fill_value=-9999.0_rk, output_level=output_level_debug)
call fm%register('velx2dadv', 'm/s', 'depth-avg. velocity in global x-direction (3D)', standard_name='', data2d=velx2dadv(_2D_W_), category='3d', fill_value=-9999.0_rk, output_level=output_level_debug)
call fm%register('vely2dadv', 'm/s', 'depth-avg. velocity in global y-direction (3D)', standard_name='', data2d=vely2dadv(_2D_W_), category='3d', fill_value=-9999.0_rk, output_level=output_level_debug)
call fm%register('SS', 's-2', 'shear frequency squared', standard_name='', dimensions=(/id_dim_z/), data3d=SS(_3D_W_), category='3d', output_level=output_level_debug)
end if
! category - turbulence
if (runtype .ge. 2) then
call fm%register('tke' , 'm2/s2', 'TKE' , standard_name='', dimensions=(/id_dim_z/), data3d=tke(_3D_W_), category='turbulence', output_level=output_level_debug)
call fm%register('diss', 'm2/s3', 'dissipation', standard_name='', dimensions=(/id_dim_z/), data3d=eps(_3D_W_), category='turbulence', output_level=output_level_debug)
call fm%register('num' , 'm2/s' , 'viscosity' , standard_name='', dimensions=(/id_dim_z/), data3d=num(_3D_W_), category='turbulence', output_level=output_level_debug)
call fm%register('nuh' , 'm2/s' , 'diffusivity', standard_name='', dimensions=(/id_dim_z/), data3d=nuh(_3D_W_), category='turbulence', output_level=output_level_debug)
end if
#ifndef NO_BAROCLINIC
! category - baroclinic
if (runtype .ge. 3) then
call fm%register('temp', 'Celsius', 'temperature', standard_name='', dimensions=(/id_dim_z/), fill_value=-9999.0_rk, data3d=T (_3D_W_), category='baroclinic', part_of_state=.true.)
call fm%register('salt', '1e-3' , 'salinity' , standard_name='', dimensions=(/id_dim_z/), fill_value=-9999.0_rk, data3d=S (_3D_W_), category='baroclinic', part_of_state=.true.)
call fm%register('rho' , 'kg/m3' , 'density' , standard_name='', dimensions=(/id_dim_z/), fill_value=-9999.0_rk, data3d=rho(_3D_W_), category='baroclinic', output_level=output_level_debug)
call fm%register('NN', 's-2', 'buoyancy frequency squared', standard_name='', dimensions=(/id_dim_z/), data3d=NN(_3D_W_), category='baroclinic', output_level=output_level_debug)
call fm%register('idpdx', 'm2/s2', 'baroclinic pressure gradient - x', standard_name='', dimensions=(/id_dim_z/),data3d=idpdx(_3D_W_), category='baroclinic', output_level=output_level_debug)
#ifndef SLICE_MODEL
call fm%register('idpdy', 'm2/s2', 'baroclinic pressure gradient - y', standard_name='', dimensions=(/id_dim_z/),data3d=idpdy(_3D_W_), category='baroclinic', output_level=output_level_debug)
#endif
end if
#endif
if (do_numerical_analyses_3d) then
call fm%register('numdis_3d', 'W/kg', 'numerical dissipation (3D)', standard_name='', dimensions=(/id_dim_z/), category='3d', output_level=output_level_debug)
call fm%register('phydis_3d', 'W/kg', 'physical dissipation (3D)' , standard_name='', dimensions=(/id_dim_z/), category='3d', output_level=output_level_debug)
if (update_temp) then
call fm%register('nummix_temp', 'degC**2/s', 'numerical mixing of temperature', standard_name='', dimensions=(/id_dim_z/), category='3d', output_level=output_level_debug)
call fm%register('phymix_temp', 'degC**2/s', 'physical mixing of temperature' , standard_name='', dimensions=(/id_dim_z/), category='3d', output_level=output_level_debug)
end if
if (update_salt) then
call fm%register('nummix_salt', 'psu**2/s', 'numerical mixing of salinity', standard_name='', dimensions=(/id_dim_z/), category='3d', output_level=output_level_debug)
call fm%register('phymix_salt', 'psu**2/s', 'physical mixing of salinity' , standard_name='', dimensions=(/id_dim_z/), category='3d', output_level=output_level_debug)
end if
end if
return
end subroutine register_3d_variables
!EOC
!-----------------------------------------------------------------------
!BOP
!
! !ROUTINE: finalize_register_3d_variables() - send optional variables.
!
! !INTERFACE:
subroutine finalize_register_3d_variables(fm,update_temp,update_salt)
!
! !DESCRIPTION:
!
! !USES:
use field_manager
IMPLICIT NONE
!
! !INPUT PARAMETERS:
type (type_field_manager) :: fm
logical, intent(in) :: update_temp,update_salt
!
! !REVISION HISTORY:
! Original author(s): Karsten Bolding & Jorn Bruggeman
!
! !LOCAL VARIABLES:
!EOP
!-----------------------------------------------------------------------
!BOC
LEVEL1 'finalize_register_3d_variables()'
if (do_numerical_analyses_3d) then
call fm%send_data('numdis_3d', numdis_3d(_3D_W_))
call fm%send_data('phydis_3d', phydis_3d(_3D_W_))
if (update_temp) then
call fm%send_data('nummix_temp', nummix_T(_3D_W_))
call fm%send_data('phymix_temp', phymix_T(_3D_W_))
end if
if (update_salt) then
call fm%send_data('nummix_salt', nummix_S(_3D_W_))
call fm%send_data('phymix_salt', phymix_S(_3D_W_))
end if
end if
return
end subroutine finalize_register_3d_variables
!EOC
!-----------------------------------------------------------------------
!BOP
!
......
......@@ -70,6 +70,7 @@
!
!
! !USES:
use variables_3d, only: zc
use getm_timers, only: tic, toc,TIM_COORDS
IMPLICIT NONE
!
......@@ -166,6 +167,15 @@ stop
call mirror_bdy_3d(hvn,V_TAG)
#endif
! KK-TODO: remove because we already have zcn
! calculate the z-coordinate of the cell centers
! references to mean sea level
zc(:,:,0)=-H(:,:)
zc(:,:,1)=-H(:,:) + 0.5*hn(:,:,1)
do k=2,kmax
zc(:,:,k)=zc(:,:,k-1)+0.5*(hn(:,:,k-1)+hn(:,:,k))
end do
#ifdef SLICE_MODEL
do i=imin,imax
do k=kvmin(i,2),kmax
......
......@@ -79,11 +79,6 @@ if(GETM_USE_FABM)
endif(GETM_USE_FABM)
option(GETM_USE_FLEXIBLE_OUTPUT "Use new output manager" ON)
if(GETM_USE_FLEXIBLE_OUTPUT)
add_definitions(-D_FLEXIBLE_OUTPUT_)
endif()
option(GETM_USE_STRUCTURE_FRICTION "Include structure friction" OFF)
if(GETM_USE_STRUCTURE_FRICTION)