Commit aeb8af72 authored by Knut's avatar Knut

Merge branch 'cfl' into ss_nn_MUDFLAT

parents cebee253 87c13f85
......@@ -18,6 +18,7 @@
!
! !USES:
use domain, only: imin,imax,jmin,jmax
use field_manager
IMPLICIT NONE
!
! !PUBLIC DATA MEMBERS:
......@@ -152,6 +153,83 @@
end subroutine init_variables_2d
!EOC
!-----------------------------------------------------------------------
!BOP
!
! !ROUTINE: register_2d_variables() - register GETM variables.
!
! !INTERFACE:
subroutine register_2d_variables(fm)
!
! !DESCRIPTION:
!
! !USES:
! use variables_2d
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)
return
end subroutine register_2d_variables
!EOC
!-----------------------------------------------------------------------
!BOP
!
......
......@@ -30,9 +30,10 @@
!
!
! !USES:
use domain, only: imin,imax,jmin,jmax,kmax,H
use variables_3d, only: ho,hn,hvel
#ifdef SLICE_MODEL
use domain, only: imin,imax,jmin,jmax,kmax
use variables_3d, only: kvmin,hvo,hvn,ho,hn,hvel
use variables_3d, only: kvmin,hvo,hvn
#endif
use getm_timers, only: tic, toc,TIM_COORDS
use m3d
......@@ -52,9 +53,7 @@
logical, save :: first=.true.
integer :: ii
! integer :: preadapt=0
#ifdef SLICE_MODEL
integer :: i,j,k
#endif
!EOP
!-----------------------------------------------------------------------
!BOC
......@@ -102,6 +101,14 @@ stop
hvel = _HALF_ * ( ho + hn )
! 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
......
......@@ -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)'
......
......@@ -23,6 +23,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 :: hcc
......
......@@ -40,6 +40,7 @@
! !PUBLIC DATA MEMBERS:
public init_getm_fabm_fields
public init_getm_fabm, do_getm_fabm, model, output_none
public register_fabm_variables
integer, public :: fabm_init_method=0
character(len=PATH_MAX) :: fabm_init_file
integer :: fabm_init_format, fabm_field_no
......@@ -319,6 +320,73 @@ 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
return
end subroutine register_fabm_variables
!EOC
#endif
!-----------------------------------------------------------------------
!BOP
!
......
......@@ -38,6 +38,7 @@
#ifdef STRUCTURE_FRICTION
REALTYPE :: sf(I3DFIELD)
#endif
REALTYPE :: zc(I3DFIELD)
REALTYPE :: ho(I3DFIELD)
REALTYPE,dimension(I3DFIELD),target :: hn,hvel,hun,hvn
REALTYPE :: huo(I3DFIELD)
......
......@@ -112,6 +112,7 @@
!
! !USES:
use domain, only: imin,imax,jmin,jmax,kmax
use field_manager
IMPLICIT NONE
!
! !PUBLIC DATA MEMBERS:
......@@ -233,6 +234,177 @@
end subroutine init_variables_3d
!EOC
#ifndef NO_3D
!-----------------------------------------------------------------------
!BOP
!
! !ROUTINE: register_3d_variables() - register GETM variables.
!
! !INTERFACE:
subroutine register_3d_variables(fm,runtype)
!
! !DESCRIPTION:
!
! !USES:
!KB use variables_3d
IMPLICIT NONE
!
! !INPUT PARAMETERS:
type (type_field_manager) :: fm
integer, intent(in) :: runtype
!
! !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('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
return
end subroutine register_3d_variables
!EOC
#endif
!-----------------------------------------------------------------------
!BOP
!
......
......@@ -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)
add_definitions(-DSTRUCTURE_FRICTION)
......@@ -348,6 +343,7 @@ add_library(output OBJECT
output/diagnostic_variables.F90
output/ncdf_out.F90
output/nesting.F90
output/output_processing.F90
output/output.F90
)
......@@ -359,12 +355,12 @@ add_library(output OBJECT
add_dependencies(domain futils)
add_dependencies(meteo futils domain)
add_dependencies(2d domain)
add_dependencies(2d domain util)
add_dependencies(3d meteo domain 2d)
add_dependencies(output futils domain 2d 3d meteo)
add_dependencies(ncdf futils domain output)
add_dependencies(input futils 2d 3d ncdf)
add_dependencies(getm input)
add_dependencies(getm input output)
set_property(TARGET futils ncdf input APPEND PROPERTY INCLUDE_DIRECTORIES "${NetCDF_INCLUDE_DIRS}")
add_definitions(-DNETCDF_FMT -DREAL_4B=real\(4\))
......@@ -375,13 +371,10 @@ find_path(GOTM_BASE src/gotm/gotm.F90 DOC "Path to GOTM source directory.")
if(GOTM_BASE)
set(GOTM_BUILD_LIBRARIES_ONLY ON)
set(GOTM_USE_FABM ${GETM_USE_FABM} CACHE BOOL "Include support for Framework for Aquatic Biogeochemical Models (fabm.net)" FORCE)
set(GOTM_USE_FLEXIBLE_OUTPUT ${GETM_USE_FLEXIBLE_OUTPUT} CACHE BOOL "Use new output manager" FORCE)
add_subdirectory(${GOTM_BASE}/src gotm)
set(GOTM_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/gotm/modules)
set(GOTM_LIBRARIES turbulence util)
if(GETM_USE_FLEXIBLE_OUTPUT)
set(GOTM_LIBRARIES ${GOTM_LIBRARIES} output_manager)
endif()
set(GOTM_LIBRARIES turbulence util output_manager)
#KB set(GOTM_LIBRARIES ${GOTM_LIBRARIES} output_manager)
if(GETM_USE_FABM)
set(GOTM_LIBRARIES ${GOTM_LIBRARIES} gotm_fabm)
set_property(TARGET 3d getm APPEND PROPERTY INCLUDE_DIRECTORIES $<TARGET_PROPERTY:gotm_fabm,INTERFACE_INCLUDE_DIRECTORIES>)
......
......@@ -113,10 +113,7 @@ ifdef GOTM_PREFIX
GOTMLIBDIR = $(GOTM_PREFIX)/lib
LINKDIRS += -L$(GOTMLIBDIR)
ifeq ($(GETM_FLEXIBLE_OUTPUT),true)
DEFINES += -D_FLEXIBLE_OUTPUT_
EXTRA_LIBS += -loutput_manager
endif
ifeq ($(FABM),true)
EXTRA_LIBS += -lgotm_fabm
endif
......
......@@ -6,13 +6,6 @@ find_path(GOTM_PREFIX
DOC "Installation prefix for General Ocean Turbulence Models - gotm.net"
)
# Find GOTM output_manager library
if(GETM_USE_FLEXIBLE_OUTPUT)
find_library(GOTM_OUTMAN NAMES output_manager
HINTS ${GOTM_PREFIX}/lib
DOC "GOTM output_manager library")
endif(GETM_USE_FLEXIBLE_OUTPUT)
# Find GOTM/FABM coupling library if USE_FABM
if(GETM_USE_FABM)
find_library(GOTM_FABM NAMES gotm_fabm
......@@ -25,12 +18,17 @@ find_library(GOTM_TURBULENCE NAMES turbulence
HINTS ${GOTM_PREFIX}/lib
DOC "GOTM turbulence library")
# Find GOTM output_manager library
find_library(GOTM_OUTMAN NAMES output_manager
HINTS ${GOTM_PREFIX}/lib
DOC "GOTM output_manager library")
# Find GOTM utility library
find_library(GOTM_UTIL NAMES util
HINTS ${GOTM_PREFIX}/lib
DOC "GOTM utility library")
set(GOTM_LIBRARIES ${GOTM_OUTMAN} ${GOTM_FABM} ${GOTM_TURBULENCE} ${GOTM_UTIL})
set(GOTM_LIBRARIES ${GOTM_FABM} ${GOTM_TURBULENCE} ${GOTM_OUTMAN} ${GOTM_UTIL})
# Store configurable path of GOTM include directory
find_path(GOTM_INCLUDE_DIRS
......@@ -39,7 +37,7 @@ find_path(GOTM_INCLUDE_DIRS
DOC "GOTM include directories"
)
mark_as_advanced(GOTM_LIBRARIES GOTM_INCLUDE_DIRS GOTM_TURBULENCE GOTM_UTIL GOTM_FABM GOTM_OUTMAN)
mark_as_advanced(GOTM_LIBRARIES GOTM_INCLUDE_DIRS GOTM_TURBULENCE GOTM_OUTMAN GOTM_UTIL GOTM_FABM)
# Process default arguments (QUIET, REQUIRED)
include(FindPackageHandleStandardArgs)
......
......@@ -217,25 +217,25 @@
call read_topo_file(bathy_format,bathymetry)
if ( runtype .ge. 2 ) then
select case (vert_cord)
case(_SIGMA_COORDS_)
LEVEL2 'Using sigma coordinates'
case(_Z_COORDS_)
LEVEL2 'Using z-level coordinates'
case(_GENERAL_COORDS_)
LEVEL2 'Using general vertical coordinates'
case (_HYBRID_COORDS_) ! hybrid vertical coordinates
LEVEL2 'using hybrid vertical coordinates'
STDERR 'domain: hybrid_coordinates not coded yet'
stop
case (_ADAPTIVE_COORDS_) ! adaptive vertical coordinates
LEVEL2 'using adaptive vertical coordinates'
case default
call getm_error("init_domain()", &
"A non valid vertical coordinate system has been chosen");
end select
allocate(ga(0:kmax),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (ga)'
select case (vert_cord)
case(_SIGMA_COORDS_)
LEVEL2 'Using sigma coordinates'
case(_Z_COORDS_)
LEVEL2 'Using z-level coordinates'
case(_GENERAL_COORDS_)
LEVEL2 'Using general vertical coordinates'
case (_HYBRID_COORDS_) ! hybrid vertical coordinates
LEVEL2 'using hybrid vertical coordinates'
STDERR 'domain: hybrid_coordinates not coded yet'
stop
case (_ADAPTIVE_COORDS_) ! adaptive vertical coordinates
LEVEL2 'using adaptive vertical coordinates'
case default
call getm_error("init_domain()", &
"A non valid vertical coordinate system has been chosen");
end select
allocate(ga(0:kmax),stat=rc)
if (rc /= 0) stop 'init_domain: Error allocating memory (ga)'
end if
! Calculation masks
......
......@@ -74,6 +74,8 @@
! This is for do_input and do_output
integer, parameter :: TIM_INPUT = 90 ! input
integer, parameter :: TIM_OUTPUT = 92 ! output
integer, parameter :: TIM_FLEX_OUTPUT = 95 ! output_manager
integer, parameter :: TIM_OUTPUT_PROC = 96 ! output_processing
! These catch stuff that are *also* measured somewhere else:
integer, parameter :: TIM_ADV = 100 ! 2d advection