Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
G
getm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Knut Klingbeil
getm
Commits
7418b137
Commit
7418b137
authored
Sep 23, 2005
by
kbk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for biology via GOTMs biology modules
parent
e939ae08
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
114 additions
and
27 deletions
+114
-27
src/3d/dynamic_allocations_3d.h
src/3d/dynamic_allocations_3d.h
+3
-0
src/3d/dynamic_declarations_3d.h
src/3d/dynamic_declarations_3d.h
+2
-0
src/3d/m3d.F90
src/3d/m3d.F90
+25
-4
src/3d/static_3d.h
src/3d/static_3d.h
+2
-0
src/3d/variables_3d.F90
src/3d/variables_3d.F90
+12
-2
src/Rules.make
src/Rules.make
+9
-1
src/getm/initialise.F90
src/getm/initialise.F90
+14
-6
src/ncdf/init_3d_ncdf.F90
src/ncdf/init_3d_ncdf.F90
+11
-7
src/ncdf/save_3d_ncdf.F90
src/ncdf/save_3d_ncdf.F90
+10
-3
src/output/output.F90
src/output/output.F90
+26
-4
No files found.
src/3d/dynamic_allocations_3d.h
View file @
7418b137
...
...
@@ -81,6 +81,9 @@
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
spm_pool
)
'
#endif
allocate
(
light
(
I3DFIELD
),
stat
=
rc
)
!
light
advection
velocity
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
light
)
'
#ifdef UV_TVD
allocate
(
uadv
(
I3DFIELD
),
stat
=
rc
)
!
u
advection
velocity
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
uadv
)
'
...
...
src/3d/dynamic_declarations_3d.h
View file @
7418b137
...
...
@@ -33,6 +33,8 @@
REALTYPE
,
dimension
(
:
,
:
),
allocatable
::
spm_pool
#endif
REALTYPE
,
dimension
(
:
,
:
,
:
),
allocatable
::
light
#ifdef UV_TVD
REALTYPE
,
dimension
(
:
,
:
,
:
),
allocatable
::
uadv
,
vadv
,
wadv
REALTYPE
,
dimension
(
:
,
:
,
:
),
allocatable
::
huadv
,
hvadv
,
hoadv
,
hnadv
...
...
src/3d/m3d.F90
View file @
7418b137
!$Id: m3d.F90,v 1.2
4 2005-04-25 07:55:5
0 kbk Exp $
!$Id: m3d.F90,v 1.2
5 2005-09-23 11:27:1
0 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
...
...
@@ -32,6 +32,10 @@
#endif
#ifdef SPM
use
suspended_matter
,
only
:
init_spm
,
do_spm
#endif
#ifdef GETM_BIO
use
bio
,
only
:
bio_calc
use
getm_bio
,
only
:
init_getm_bio
,
do_getm_bio
#endif
use
variables_3d
use
advection_3d
,
only
:
init_advection_3d
...
...
@@ -54,7 +58,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: m3d.F90,v $
! Revision 1.24 2005-04-25 07:55:50 kbk
! Revision 1.25 2005-09-23 11:27:10 kbk
! support for biology via GOTMs biology modules
!
! Revision 1.24 2005/04/25 07:55:50 kbk
! use more general frame for error handling - Umlauf
!
! Revision 1.23 2004/08/09 07:48:07 kbk
...
...
@@ -279,6 +286,10 @@
if
(
calc_spm
)
stop
'To use SPM you have to recompile with -DSPM'
#endif
#ifndef GETM_BIO
!KBK if(bio_calc) stop 'To use BIO you have to recompile with -DBIO'
#endif
! Allocates memory for the public data members - if not static
call
init_variables_3d
(
runtype
)
...
...
@@ -387,9 +398,15 @@
end
if
end
if
#endif
#ifdef SPM
if
(
calc_spm
)
call
init_spm
(
hotstart_spm
,
runtype
)
if
(
runtype
.ne.
4
)
call
init_advection_3d
(
2
)
if
(
runtype
.ne.
4
)
call
init_advection_3d
(
2
)
#endif
#ifdef GETM_BIO
!KBK if(bio_calc) call init_getm_bio()
call
init_getm_bio
()
#endif
if
(
bdy3d
)
call
init_bdy_3d
()
...
...
@@ -512,7 +529,11 @@
#endif
#ifdef SPM
if
(
calc_spm
)
call
do_spm
()
if
(
calc_spm
)
call
do_spm
()
#endif
#ifdef GETM_BIO
if
(
bio_calc
)
call
do_getm_bio
(
dt
)
#endif
UEx
=
_
ZERO_
;
VEx
=
_
ZERO_
...
...
src/3d/static_3d.h
View file @
7418b137
...
...
@@ -57,6 +57,8 @@
REALTYPE
::
spm_pool
(
I2DFIELD
)
#endif
REALTYPE
::
light
(
I3DFIELD
)
#ifdef UV_TVD
REALTYPE
::
uadv
(
I3DFIELD
)
REALTYPE
::
vadv
(
I3DFIELD
)
...
...
src/3d/variables_3d.F90
View file @
7418b137
!$Id: variables_3d.F90,v 1.
6 2004-01-06 15:04:0
0 kbk Exp $
!$Id: variables_3d.F90,v 1.
7 2005-09-23 11:27:1
0 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
...
...
@@ -27,6 +27,11 @@
#include "static_3d.h"
#else
#include "dynamic_declarations_3d.h"
#endif
#ifdef GETM_BIO
REALTYPE
,
allocatable
::
cc3d
(:,:,:,:)
REALTYPE
,
allocatable
::
ws3d
(:,:,:,:)
#endif
integer
::
size3d_field
integer
::
mem3d
...
...
@@ -35,7 +40,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: variables_3d.F90,v $
! Revision 1.6 2004-01-06 15:04:00 kbk
! Revision 1.7 2005-09-23 11:27:10 kbk
! support for biology via GOTMs biology modules
!
! Revision 1.6 2004/01/06 15:04:00 kbk
! FCT advection + split of advection_3d.F90 + extra adv. input checks
!
! Revision 1.5 2003/12/16 15:58:54 kbk
...
...
@@ -126,6 +134,8 @@
uuEx
=
_
ZERO_
;
vvEx
=
_
ZERO_
tke
=
1.e-10
;
eps
=
1.e-10
light
=
_
ONE_
#ifdef UV_TVD
uadv
=
_
ZERO_
;
vadv
=
_
ZERO_
;
wadv
=
_
ZERO_
hnadv
=
_
ZERO_
;
hoadv
=
_
ZERO_
...
...
src/Rules.make
View file @
7418b137
#$Id: Rules.make,v 1.1
1 2004-06-15 08:25:57
kbk Exp $
#$Id: Rules.make,v 1.1
2 2005-09-23 11:27:10
kbk Exp $
#
# This file contains rules which are shared between multiple Makefiles.
# This file is quite complicated - all compilation options are set in this
...
...
@@ -35,6 +35,10 @@ ifeq ($(GETM_SPM),true)
DEFINES
+=
-DSPM
endif
ifeq
($(GETM_BIO),true)
DEFINES
+=
-DGETM_BIO
endif
# The compilation mode is obtained from $COMPILATION_MODE
# default production - else debug or profiling
ifndef
GETM_PARALLEL
...
...
@@ -101,6 +105,10 @@ INCDIRS = -I$(GETMDIR)/include -I$(MODDIR)
LINKDIRS
=
-L
$(LIBDIR)
EXTRA_LIBS
=
ifeq
($(GETM_BIO),true)
EXTRA_LIBS
+=
-lbio
$(buildtype)
endif
ifeq
($(turbulence),gotm)
ifndef
GOTMDIR
GOTMDIR
=
$(HOME)
/gotm
...
...
src/getm/initialise.F90
View file @
7418b137
!$Id: initialise.F90,v 1.
7 2004-06-15 09:04:51
kbk Exp $
!$Id: initialise.F90,v 1.
8 2005-09-23 11:27:10
kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
...
...
@@ -22,7 +22,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: initialise.F90,v $
! Revision 1.7 2004-06-15 09:04:51 kbk
! Revision 1.8 2005-09-23 11:27:10 kbk
! support for biology via GOTMs biology modules
!
! Revision 1.7 2004/06/15 09:04:51 kbk
! CONST_VISC --> CONSTANT_VISCOSITY - Ruiz
!
! Revision 1.6 2004/01/13 07:49:06 kbk
...
...
@@ -103,6 +106,9 @@
use
m3d
,
only
:
cord_relax
,
init_3d
,
ssen
,
ssun
,
ssvn
#ifndef NO_BAROCLINIC
use
m3d
,
only
:
T
#endif
#ifdef GETM_BIO
use
rivers
,
only
:
init_rivers_bio
#endif
use
turbulence
,
only
:
init_turbulence
use
mtridiagonal
,
only
:
init_tridiagonal
...
...
@@ -231,21 +237,20 @@
call
init_domain
(
input_dir
)
!KBK-2003-02-10 call init_output(runid,title,start,runtype,dryrun,myid)
call
init_meteo
()
#ifndef NO_3D
call
init_rivers
()
#endif
call
init_output
(
runid
,
title
,
start
,
runtype
,
dryrun
,
myid
)
call
init_2d
(
runtype
,
timestep
,
hotstart
)
#ifndef NO_3D
if
(
runtype
.gt.
1
)
then
call
init_3d
(
runtype
,
timestep
,
hotstart
)
#ifdef GETM_BIO
call
init_rivers_bio
#endif
#ifndef CONSTANT_VISCOSITY
call
init_turbulence
(
60
,
trim
(
input_dir
)
//
'gotmturb.inp'
,
kmax
)
#else
...
...
@@ -254,9 +259,12 @@
LEVEL2
'background turbulent viscosity set to'
,
avmback
LEVEL2
'background turbulent diffusivity set to'
,
avhback
call
init_tridiagonal
(
kmax
)
end
if
#endif
call
init_output
(
runid
,
title
,
start
,
runtype
,
dryrun
,
myid
)
#if 0
call
init_waves
(
hotstart
)
call
init_biology
(
hotstart
)
...
...
src/ncdf/init_3d_ncdf.F90
View file @
7418b137
!$Id: init_3d_ncdf.F90,v 1.
9 2005-04-25 09:32:34
kbk Exp $
!$Id: init_3d_ncdf.F90,v 1.
10 2005-09-23 11:27:10
kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
...
...
@@ -17,6 +17,9 @@
use
domain
,
only
:
ioff
,
joff
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
kmax
use
domain
,
only
:
vert_cord
#ifdef GETM_BIO
use
bio_var
,
only
:
numc
,
var_names
,
var_units
,
var_long
#endif
IMPLICIT
NONE
!
...
...
@@ -29,7 +32,10 @@
! !REVISION HISTORY:
!
! $Log: init_3d_ncdf.F90,v $
! Revision 1.9 2005-04-25 09:32:34 kbk
! Revision 1.10 2005-09-23 11:27:10 kbk
! support for biology via GOTMs biology modules
!
! Revision 1.9 2005/04/25 09:32:34 kbk
! added NetCDF IO rewrite + de-stag of velocities - Umlauf
!
! Revision 1.8 2004/10/07 15:46:56 kbk
...
...
@@ -79,6 +85,7 @@
!
! !LOCAL VARIABLES:
integer
::
err
integer
::
n
,
rc
integer
::
xlen
,
ylen
,
zlen
integer
::
scalar
(
1
),
axisdim
(
1
),
f3_dims
(
3
),
f4_dims
(
4
)
REALTYPE
::
fv
,
mv
,
vr
(
2
)
...
...
@@ -331,14 +338,11 @@
do
n
=
1
,
numc
err
=
nf_def_var
(
ncid
,
var_names
(
n
),
NF_REAL
,
4
,
f4_dims
,
bio_ids
(
n
))
if
(
err
.NE.
NF_NOERR
)
go to
10
STDERR
n
,
var_names
(
n
),
bio_ids
(
n
)
call
set_attributes
(
ncid
,
bio_ids
(
n
),
&
long_name
=
var_long
(
n
),
&
units
=
' '
,
&
long_name
=
trim
(
var_long
(
n
)
),
&
units
=
trim
(
var_units
(
n
))
,
&
FillValue
=
fv
,
missing_value
=
mv
,
valid_range
=
vr
)
end
do
STDERR
'init_3d_ncdf() - remember more bio settings'
#endif
! globals
...
...
src/ncdf/save_3d_ncdf.F90
View file @
7418b137
!$Id: save_3d_ncdf.F90,v 1.1
0 2005-04-25 09:32:34
kbk Exp $
!$Id: save_3d_ncdf.F90,v 1.1
1 2005-09-23 11:27:10
kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
...
...
@@ -26,6 +26,10 @@
use
variables_3d
,
only
:
tke
,
num
,
nuh
,
eps
#ifdef SPM
use
variables_3d
,
only
:
spm_pool
,
spm
#endif
#ifdef GETM_BIO
use
bio_var
,
only
:
numc
use
variables_3d
,
only
:
cc3d
,
ws3d
#endif
use
parameters
,
only
:
g
,
rho_0
IMPLICIT
NONE
...
...
@@ -40,7 +44,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: save_3d_ncdf.F90,v $
! Revision 1.10 2005-04-25 09:32:34 kbk
! Revision 1.11 2005-09-23 11:27:10 kbk
! support for biology via GOTMs biology modules
!
! Revision 1.10 2005/04/25 09:32:34 kbk
! added NetCDF IO rewrite + de-stag of velocities - Umlauf
!
! Revision 1.9 2004/06/15 08:25:57 kbk
...
...
@@ -84,7 +91,7 @@
!
!
! !LOCAL VARIABLES:
integer
::
err
integer
::
err
,
n
integer
::
start
(
4
),
edges
(
4
)
integer
,
save
::
n3d
=
0
REALTYPE
,
parameter
::
x
=-
rho_0
/
g
...
...
src/output/output.F90
View file @
7418b137
!$Id: output.F90,v 1.1
1 2005-05-04 11:45:30
kbk Exp $
!$Id: output.F90,v 1.1
2 2005-09-23 11:27:11
kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
...
...
@@ -55,7 +55,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: output.F90,v $
! Revision 1.11 2005-05-04 11:45:30 kbk
! Revision 1.12 2005-09-23 11:27:11 kbk
! support for biology via GOTMs biology modules
!
! Revision 1.11 2005/05/04 11:45:30 kbk
! adding model time stamp on IO
!
! Revision 1.10 2005/04/25 09:32:34 kbk
...
...
@@ -359,7 +362,13 @@
#endif
#ifdef SPM
use
m3d
,
only
:
spm
,
spm_pool
,
calc_spm
,
hotstart_spm
#endif
#endif
#ifdef GETM_BIO
use
bio
,
only
:
bio_calc
use
bio_var
,
only
:
numc
use
getm_bio
,
only
:
hotstart_bio
use
variables_3d
,
only
:
cc3d
#endif
IMPLICIT
NONE
!
! !INPUT PARAMETERS:
...
...
@@ -377,6 +386,7 @@
!
! !LOCAL VARIABLES
integer
,
save
::
n
=
0
integer
::
i
logical
,
save
::
continuous
=
.false.
integer
::
jd
,
secs
character
(
len
=
19
)
::
timestr_out
...
...
@@ -417,7 +427,13 @@
LEVEL3
'saving spm'
write
(
RESTART
)
spm
write
(
RESTART
)
spm_pool
end
if
end
if
#endif
#ifdef GETM_BIO
if
(
bio_calc
)
then
LEVEL3
'saving bio variables'
write
(
RESTART
)
cc3d
end
if
#endif
end
if
#endif
...
...
@@ -462,6 +478,12 @@
LEVEL3
'set spm_init_method=0 to read them from hotstart file'
end
if
end
if
#endif
#ifdef GETM_BIO
if
(
bio_calc
.and.
hotstart_bio
)
then
LEVEL3
'reading bio variables'
read
(
RESTART
)
cc3d
end
if
#endif
end
if
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment