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
247916c3
Commit
247916c3
authored
Aug 14, 2015
by
Karsten Bolding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
almost feature complete new output method
parent
632a52f5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
31 deletions
+78
-31
src/2d/m2d.F90
src/2d/m2d.F90
+2
-3
src/2d/variables_2d.F90
src/2d/variables_2d.F90
+8
-1
src/3d/m3d.F90
src/3d/m3d.F90
+1
-9
src/3d/variables_3d.F90
src/3d/variables_3d.F90
+21
-1
src/getm/initialise.F90
src/getm/initialise.F90
+46
-17
No files found.
src/2d/m2d.F90
View file @
247916c3
...
...
@@ -132,6 +132,7 @@
integer
::
i
,
j
integer
::
elev_method
=
1
REALTYPE
::
elev_const
=
_
ZERO_
integer
,
parameter
::
rk
=
kind
(
_
ONE_
)
character
(
LEN
=
PATH_MAX
)
::
elev_file
=
'elev.nc'
namelist
/
m2d
/
&
elev_method
,
elev_const
,
elev_file
,
&
...
...
@@ -162,11 +163,9 @@
read
(
NAMLST
,
m2d
)
! Allocates memory for the public data members - if not static
call
init_variables_2d
(
runtype
)
call
init_variables_2d
(
runtype
,
field_manager
)
call
init_advection
()
call
field_manager
%
register
(
'z'
,
'm'
,
'sea surface elevation'
,
standard_name
=
'sea surface elevation'
,
data2d
=
z
(
I2DFIELD
))
LEVEL2
'Advection of depth-averaged velocities'
#ifdef NO_ADVECT
if
(
vel2d_adv_hor
.ne.
NOADV
)
then
...
...
src/2d/variables_2d.F90
View file @
247916c3
...
...
@@ -17,6 +17,7 @@
! {\tt PUBLIC DATA MEMBERS}.
!
! !USES:
use
field_manager
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
IMPLICIT
NONE
!
...
...
@@ -43,7 +44,7 @@
! !IROUTINE: init_variables_2d - initialise 2D related stuff.
!
! !INTERFACE:
subroutine
init_variables_2d
(
runtype
)
subroutine
init_variables_2d
(
runtype
,
field_manager
)
IMPLICIT
NONE
!
! !DESCRIPTION:
...
...
@@ -88,9 +89,11 @@
!
! !INPUT PARAMETERS:
integer
,
intent
(
in
)
::
runtype
class
(
type_field_manager
),
intent
(
inout
),
optional
::
field_manager
!
! !LOCAL VARIABLES:
integer
::
rc
integer
,
parameter
::
rk
=
kind
(
_
ONE_
)
!EOP
!-------------------------------------------------------------------------
!BOC
...
...
@@ -114,9 +117,13 @@
#endif
z
=
_
ZERO_
;
zo
=
_
ZERO_
call
field_manager
%
register
(
'z'
,
'm'
,
'sea surface elevation'
,
standard_name
=
'sea surface elevation'
,
fill_value
=
10.05_rk
,
data2d
=
z
(
_
2
D_W_
),
category
=
"2d"
)
call
field_manager
%
register
(
'zo'
,
'm'
,
'sea surface elevation'
,
standard_name
=
'sea surface elevation'
,
fill_value
=
10.05_rk
,
data2d
=
zo
(
_
2
D_W_
),
category
=
"2d"
,
output_level
=
output_level_debug
)
zub
=
_
ZERO_
;
zub0
=
_
ZERO_
zvb
=
_
ZERO_
;
zvb0
=
_
ZERO_
D
=
_
ZERO_
;
call
field_manager
%
register
(
'D'
,
'm'
,
'water depth'
,
standard_name
=
'water depth'
,
fill_value
=
10.05_rk
,
data2d
=
D
(
_
2
D_W_
),
category
=
"2d"
)
U
=
_
ZERO_
;
DU
=
_
ZERO_
;
fU
=
_
ZERO_
;
Uint
=
_
ZERO_
;
UEx
=
_
ZERO_
V
=
_
ZERO_
;
DV
=
_
ZERO_
;
fV
=
_
ZERO_
;
Vint
=
_
ZERO_
;
VEx
=
_
ZERO_
...
...
src/3d/m3d.F90
View file @
247916c3
...
...
@@ -155,7 +155,7 @@
end
if
! Allocates memory for the public data members - if not static
call
init_variables_3d
(
runtype
)
call
init_variables_3d
(
runtype
,
field_manager
)
call
init_advection_3d
()
! Sanity checks for advection specifications
...
...
@@ -286,14 +286,6 @@
if
(
vert_cord
.eq.
_
ADAPTIVE_COORDS_
)
call
preadapt_coordinates
(
preadapt
)
! need to get a variable of type_field_manager already initialized to here
#if 1
call
field_manager
%
register
(
'hn'
,
'm'
,
'layer thickness'
,
standard_name
=
'cell_thickness'
,
dimensions
=
(/
id_dim_z
/),
data3d
=
hn
(
I3DFIELD
))
call
field_manager
%
register
(
'temp'
,
'Celsius'
,
'temperature'
,
standard_name
=
''
,
dimensions
=
(/
id_dim_z
/),
data3d
=
T
(
I3DFIELD
))
#endif
call
field_manager
%
list
()
#ifdef DEBUG
write
(
debug
,
*
)
'Leaving init_3d()'
write
(
debug
,
*
)
...
...
src/3d/variables_3d.F90
View file @
247916c3
...
...
@@ -111,6 +111,7 @@
! {\tt init\_variables\_3d}) and cleanup (see {\tt clean\_variables\_3d}).
!
! !USES:
use
field_manager
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
kmax
IMPLICIT
NONE
!
...
...
@@ -159,11 +160,12 @@
! \label{sec-init-variables}
!
! !INTERFACE:
subroutine
init_variables_3d
(
runtype
)
subroutine
init_variables_3d
(
runtype
,
field_manager
)
IMPLICIT
NONE
!
! !INPUT PARAMETERS:
integer
,
intent
(
in
)
::
runtype
class
(
type_field_manager
),
intent
(
inout
),
optional
::
field_manager
!
! !DESCRIPTION:
! Dynamic allocation of memory for 3D related fields via
...
...
@@ -172,6 +174,7 @@
!
! !LOCAL VARIABLES:
integer
::
rc
integer
,
parameter
::
rk
=
kind
(
_
ONE_
)
!EOP
!-------------------------------------------------------------------------
!BOC
...
...
@@ -192,7 +195,14 @@
#endif
hn
=
_
ZERO_
;
hun
=
_
ZERO_
;
hvn
=
_
ZERO_
call
field_manager
%
register
(
'hn'
,
'm'
,
'layer thickness'
,
standard_name
=
'cell_thickness'
,
dimensions
=
(/
id_dim_z
/),
data3d
=
hn
(
_
3
D_W_
),
category
=
'grid'
)
call
field_manager
%
register
(
'hun'
,
'm'
,
'layer thickness - U-points'
,
standard_name
=
'cell_thickness'
,
dimensions
=
(/
id_dim_z
/),
data3d
=
hun
(
_
3
D_W_
),
category
=
'grid'
,
output_level
=
output_level_debug
)
call
field_manager
%
register
(
'hvn'
,
'm'
,
'layer thickness - V-points'
,
standard_name
=
'cell_thickness'
,
dimensions
=
(/
id_dim_z
/),
data3d
=
hvn
(
_
3
D_W_
),
category
=
'grid'
,
output_level
=
output_level_debug
)
call
field_manager
%
register
(
'temp'
,
'Celsius'
,
'temperature'
,
standard_name
=
''
,
dimensions
=
(/
id_dim_z
/),
data3d
=
T
(
_
3
D_W_
),
category
=
'baroclinic'
)
call
field_manager
%
register
(
'salt'
,
'PSU'
,
'salinity'
,
standard_name
=
''
,
dimensions
=
(/
id_dim_z
/),
data3d
=
S
(
_
3
D_W_
),
category
=
'baroclinic'
)
uu
=
_
ZERO_
;
vv
=
_
ZERO_
;
ww
=
_
ZERO_
#ifdef _MOMENTUM_TERMS_
tdv_u
=
_
ZERO_
;
adv_u
=
_
ZERO_
;
vsd_u
=
_
ZERO_
;
hsd_u
=
_
ZERO_
cor_u
=
_
ZERO_
;
epg_u
=
_
ZERO_
;
ipg_u
=
_
ZERO_
...
...
@@ -200,7 +210,15 @@
cor_v
=
_
ZERO_
;
epg_v
=
_
ZERO_
;
ipg_v
=
_
ZERO_
#endif
ssen
=
_
ZERO_
;
ssun
=
_
ZERO_
;
ssvn
=
_
ZERO_
call
field_manager
%
register
(
'ssen'
,
'm'
,
'elevtion at T-points (3D)'
,
standard_name
=
''
,
data2d
=
ssen
(
_
2
D_W_
),
category
=
'3d'
,
output_level
=
output_level_debug
)
call
field_manager
%
register
(
'ssun'
,
'm'
,
'elevtion at U-points (3D)'
,
standard_name
=
''
,
data2d
=
ssun
(
_
2
D_W_
),
category
=
'3d'
,
output_level
=
output_level_debug
)
call
field_manager
%
register
(
'ssvn'
,
'm'
,
'elevtion at V-points (3D)'
,
standard_name
=
''
,
data2d
=
ssvn
(
_
2
D_W_
),
category
=
'3d'
,
output_level
=
output_level_debug
)
Dn
=
_
ZERO_
;
Dun
=
_
ZERO_
;
Dvn
=
_
ZERO_
#if 0
call
field_manager
%
register
(
'ssen'
,
'm'
,
'elevtion at T-points (3D)'
,
standard_name
=
''
,
data2d
=
ssen
(
_
2
D_W_
),
category
=
'3d'
,
output_level
=
output_level_debug
)
call
field_manager
%
register
(
'ssun'
,
'm'
,
'elevtion at U-points (3D)'
,
standard_name
=
''
,
data2d
=
ssun
(
_
2
D_W_
),
category
=
'3d'
,
output_level
=
output_level_debug
)
call
field_manager
%
register
(
'ssvn'
,
'm'
,
'elevtion at V-points (3D)'
,
standard_name
=
''
,
data2d
=
ssvn
(
_
2
D_W_
),
category
=
'3d'
,
output_level
=
output_level_debug
)
#endif
rru
=
_
ZERO_
;
rrv
=
_
ZERO_
uuEx
=
_
ZERO_
;
vvEx
=
_
ZERO_
tke
=
1.e-10
;
eps
=
1.e-10
...
...
@@ -211,6 +229,8 @@
light
=
_
ONE_
idpdx
=
_
ZERO_
idpdy
=
_
ZERO_
call
field_manager
%
register
(
'idpdx'
,
'm'
,
'baroclinic pressure gradient - x'
,
standard_name
=
''
,
dimensions
=
(/
id_dim_z
/),
data3d
=
idpdx
(
_
3
D_W_
),
category
=
'baroclinic'
,
output_level
=
output_level_debug
)
call
field_manager
%
register
(
'idpdy'
,
'm'
,
'baroclinic pressure gradient - y'
,
standard_name
=
''
,
dimensions
=
(/
id_dim_z
/),
data3d
=
idpdy
(
_
3
D_W_
),
category
=
'baroclinic'
,
output_level
=
output_level_debug
)
#endif
#ifdef DEBUG
...
...
src/getm/initialise.F90
View file @
247916c3
...
...
@@ -53,8 +53,10 @@
use
output
,
only
:
init_output
,
do_output
,
restart_file
,
out_dir
use
input
,
only
:
init_input
use
domain
,
only
:
init_domain
use
domain
,
only
:
iextr
,
jextr
,
imin
,
imax
,
jmin
,
jmax
,
kmax
use
domain
,
only
:
vert_cord
,
maxdepth
use
domain
,
only
:
H
use
domain
,
only
:
iextr
,
jextr
,
imin
,
imax
,
ioff
,
jmin
,
jmax
,
joff
,
kmax
use
domain
,
only
:
xcord
,
ycord
use
domain
,
only
:
vert_cord
,
maxdepth
,
ga
use
time
,
only
:
init_time
,
update_time
,
write_time_string
use
time
,
only
:
start
,
timestr
,
timestep
use
time
,
only
:
julianday
,
secondsofday
...
...
@@ -118,16 +120,26 @@
character
(
len
=
PATH_MAX
)
::
hot_in
=
''
#if defined SPHERICAL
character
(
len
=
8
)
::
xname
=
'lonc'
character
(
len
=
8
)
::
yname
=
'latc'
character
(
len
=
16
)
::
xname
=
'lonc'
character
(
len
=
16
)
::
xlongname
=
'longitude'
character
(
len
=
16
)
::
xunits
=
'degrees_east'
character
(
len
=
16
)
::
yname
=
'latc'
character
(
len
=
16
)
::
ylongname
=
'latitude'
character
(
len
=
16
)
::
yunits
=
'degrees_north'
#elif defined CURVILINEAR
character
(
len
=
8
)
::
xname
=
'xic'
character
(
len
=
8
)
::
yname
=
'etac'
character
(
len
=
16
)
::
xname
=
'xic'
character
(
len
=
16
)
::
yname
=
'etac'
#else
character
(
len
=
8
)
::
xname
=
'xc'
character
(
len
=
8
)
::
yname
=
'yc'
character
(
len
=
16
)
::
xname
=
'xc'
character
(
len
=
16
)
::
yname
=
'yc'
#endif
character
(
len
=
8
)
::
zname
=
'sigma'
character
(
len
=
16
)
::
zname
=
'sigma'
character
(
len
=
64
)
::
zlongname
=
'sigma'
character
(
len
=
16
)
::
zunits
=
'sigma'
character
(
len
=
16
)
::
postfix
integer
,
parameter
::
rk
=
kind
(
_
ONE_
)
!KB character(len=PATH_MAX) :: zname='lonc'
...
...
@@ -244,24 +256,39 @@
select
case
(
vert_cord
)
case
(
1
)
zname
=
'sigma'
! zunits = 'sigma_level'
zlongname
=
'sigma layers'
zunits
=
'sigma_level'
case
(
2
)
zname
=
'z'
! zunits = 'm'
zlongname
=
'geopotential'
zunits
=
'm'
case
(
3
,
4
,
5
)
zname
=
'level'
! zunits = 'level'
zlongname
=
'general vertical coordinates'
zunits
=
'level'
case
default
end
select
#endif
call
field_manager_
%
register_dimension
(
trim
(
xname
),
(
imax
+
HALO
)
-
(
imin
-
HALO
)
+1
,
id
=
id_dim_lon
)
call
field_manager_
%
register_dimension
(
trim
(
yname
),
(
jmax
+
HALO
)
-
(
jmin
-
HALO
)
+1
,
id
=
id_dim_lat
)
call
field_manager_
%
register_dimension
(
trim
(
xname
),
imax
-
imin
+1
,
global_length
=
iextr
,
offset
=
ioff
,
id
=
id_dim_lon
)
call
field_manager_
%
register_dimension
(
trim
(
yname
),
jmax
-
jmin
+1
,
global_length
=
jextr
,
offset
=
joff
,
id
=
id_dim_lat
)
call
field_manager_
%
register_dimension
(
trim
(
zname
),
kmax
+1
,
id
=
id_dim_z
)
call
field_manager_
%
register_dimension
(
'time'
,
id
=
id_dim_time
)
call
field_manager_
%
initialize
(
prepend_by_default
=
(/
id_dim_lon
,
id_dim_lat
/),
append_by_default
=
(/
id_dim_time
/))
allocate
(
type_getm_host
::
output_manager_host
)
if
(
myid
.ge.
0
)
then
write
(
postfix
,
'(A,I4.4)'
)
'.'
,
myid
call
output_manager_init
(
field_manager_
,
trim
(
postfix
))
else
call
output_manager_init
(
field_manager_
)
end
if
call
field_manager_
%
register
(
trim
(
xname
),
trim
(
xunits
),
trim
(
xlongname
),
dimensions
=
(/
id_dim_lon
/),
no_default_dimensions
=
.true.
,
data1d
=
xcord
(
_
IRANGE_NO_HALO_
),
coordinate_dimension
=
id_dim_lon
)
call
field_manager_
%
register
(
trim
(
yname
),
trim
(
yunits
),
trim
(
ylongname
),
dimensions
=
(/
id_dim_lat
/),
no_default_dimensions
=
.true.
,
data1d
=
ycord
(
_
JRANGE_NO_HALO_
),
coordinate_dimension
=
id_dim_lat
)
call
field_manager_
%
register
(
'bathymetry'
,
'm'
,
'bathymetry'
,
standard_name
=
'bathymetry'
,
fill_value
=
-10._rk
,
data2d
=
H
(
_
2
D_W_
),
category
=
'depth'
,
output_level
=
output_level_required
)
!KB call field_manager_%register('bathymetry', 'm', 'bathymetry', standard_name='bathymetry', fill_value=-10._rk, data2d=H(_2D_W_), category='depth',output_level=output_level_required)
!KB call field_manager_%register('bathymetry', 'm', 'bathymetry', standard_name='bathymetry', fill_value=-10._rk, data2d=H(_2D_W_), category='depth',output_level=output_level_required)
call
init_meteo
(
hotstart
)
...
...
@@ -274,6 +301,8 @@
#ifndef NO_3D
if
(
runtype
.gt.
1
)
then
call
init_3d
(
runtype
,
timestep
,
hotstart
,
field_manager_
)
STDERR
ga
call
field_manager_
%
register
(
trim
(
zname
),
trim
(
zunits
),
trim
(
zlongname
),
dimensions
=
(/
id_dim_z
/),
no_default_dimensions
=
.true.
,
data1d
=
ga
,
coordinate_dimension
=
id_dim_z
)
#ifndef CONSTANT_VISCOSITY
call
init_turbulence
(
60
,
trim
(
input_dir
)
//
'gotmturb.nml'
,
kmax
)
#else
...
...
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