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
2d0e8e71
Commit
2d0e8e71
authored
Mar 13, 2012
by
Knut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
z0_method => bottfric_method
parent
e7c6ee2a
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
84 additions
and
52 deletions
+84
-52
schemas/getm-2.0_getm-2.1.converter
schemas/getm-2.0_getm-2.1.converter
+3
-3
schemas/getm-2.1.defaults
schemas/getm-2.1.defaults
+9
-6
schemas/getm-2.1.schema
schemas/getm-2.1.schema
+23
-8
src/2d/m2d.F90
src/2d/m2d.F90
+3
-2
src/2d/variables_2d.F90
src/2d/variables_2d.F90
+9
-2
src/3d/m3d.F90
src/3d/m3d.F90
+3
-3
src/3d/slow_terms.F90
src/3d/slow_terms.F90
+2
-2
src/3d/variables_3d.F90
src/3d/variables_3d.F90
+10
-2
src/domain/domain.F90
src/domain/domain.F90
+20
-22
src/ncdf/ncdf_topo.F90
src/ncdf/ncdf_topo.F90
+2
-2
No files found.
schemas/getm-2.0_getm-2.1.converter
View file @
2d0e8e71
...
...
@@ -8,7 +8,7 @@
<forward>
<![CDATA[
z0_method = source['getm/domain/z0_method'].getValue(usedefault=True)
target['getm/domain/
z0_method'].setValue(z0_method+1
)
target['getm/domain/
bottfric_method'].setValue(z0_method+2
)
nmls = ('getm/m3d/vel_','getm/temp/temp_','getm/salt/salt_')
for nml in nmls:
...
...
@@ -28,8 +28,8 @@ for nml in nmls:
</forward>
<backward>
<![CDATA[
z0_method = source['getm/domain/z0
_method'].getValue(usedefault=True)
target['getm/domain/z0_method'].setValue(
z0_method-1
)
bottfric_method = source['getm/domain/bottfric
_method'].getValue(usedefault=True)
target['getm/domain/z0_method'].setValue(
bottfric_method-2
)
nmls = ('getm/m3d/vel_','getm/temp/temp_','getm/salt/salt_')
for nml in nmls:
...
...
schemas/getm-2.1.defaults
View file @
2d0e8e71
...
...
@@ -105,18 +105,21 @@
<jh>
-1
</jh>
<
cd_min
>
-1.0
</
cd_min
>
<
z0_method
>
1
</
z0_method
>
<
bottfric_method
>
2
</
bottfric_method
>
<
rdrag
>
0.0004
</
rdrag
>
<z0_const>
0.001
</z0_const>
<z0d_iters>
0
</z0d_iters>
<cd_min>
-1.0
</cd_min>
</domain>
<meteo>
<metforcing>
...
...
schemas/getm-2.1.schema
View file @
2d0e8e71
...
...
@@ -81,19 +81,34 @@
<element
name=
"ih"
type=
"int"
label=
"???"
/>
<element
name=
"jl"
type=
"int"
label=
"???"
/>
<element
name=
"jh"
type=
"int"
label=
"???"
/>
<element
name=
"cd_min"
type=
"float"
unit=
"m/s"
label=
"min. drag coefficient"
/>
<element
name=
"z0_method"
type=
"int"
label=
"bottom roughness specification"
>
<element
name=
"bottfric_method"
type=
"int"
label=
"bottom friction specification"
>
<options>
<option
value=
"0"
label=
"disable quadratic bottom friction"
/>
<option
value=
"1"
label=
"constant - using z0_const"
/>
<option
value=
"2"
label=
"space varying - read from bathymetry file (variable name MUST be z0)"
/>
<option
value=
"0"
label=
"disable bottom friction"
/>
<option
value=
"1"
label=
"linear with rdrag"
/>
<option
value=
"2"
label=
"quadratic with z0_const, z0d_iters and cd_min"
/>
<option
value=
"3"
label=
"quadratic with z0 from topofile, z0d_iters and cd_min"
/>
</options>
</element>
<element
name=
"rdrag"
type=
"float"
label=
"linear bottom friction parameter"
unit=
"m/s"
>
<condition
type=
"eq"
variable=
"./bottfric_method"
value=
"1"
/>
</element>
<element
name=
"z0_const"
type=
"float"
label=
"constant bottom roughness"
unit=
"m"
>
<condition
type=
"eq"
variable=
"./z0_method"
value=
"1"
/>
<condition
type=
"or"
>
<condition
type=
"eq"
variable=
"./bottfric_method"
value=
"2"
/>
<condition
type=
"eq"
variable=
"./bottfric_method"
value=
"3"
/>
</condition>
</element>
<element
name=
"z0d_iters"
type=
"int"
label=
"iterations for dynamic bottom roughness"
minInclusive=
"0"
>
<condition
type=
"or"
>
<condition
type=
"eq"
variable=
"./bottfric_method"
value=
"2"
/>
<condition
type=
"eq"
variable=
"./bottfric_method"
value=
"3"
/>
</condition>
</element>
<element
name=
"z0d_iters"
type=
"int"
label=
"iterations for dynamic z0"
minInclusive=
"0"
>
<condition
type=
"ne"
variable=
"./z0_method"
value=
"0"
/>
<element
name=
"cd_min"
type=
"float"
label=
"minimum drag coefficient"
>
<condition
type=
"or"
>
<condition
type=
"eq"
variable=
"./bottfric_method"
value=
"2"
/>
<condition
type=
"eq"
variable=
"./bottfric_method"
value=
"3"
/>
</condition>
</element>
</element>
...
...
src/2d/m2d.F90
View file @
2d0e8e71
...
...
@@ -21,7 +21,8 @@
use
exceptions
use
time
,
only
:
julianday
,
secondsofday
use
parameters
,
only
:
avmmol
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
az
,
au
,
av
,
ax
,
H
,
HU
,
HV
,
min_depth
,
z0_method
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
az
,
au
,
av
,
ax
,
H
,
HU
,
HV
,
min_depth
use
domain
,
only
:
bottfric_method
use
domain
,
only
:
ilg
,
ihg
,
jlg
,
jhg
use
domain
,
only
:
ill
,
ihl
,
jll
,
jhl
use
domain
,
only
:
openbdy
...
...
@@ -411,7 +412,7 @@
call
tic
(
TIM_INTEGR2D
)
if
(
mod
(
loop
-1
,
MM
)
.eq.
0
)
then
! MacroMicro time step
if
(
z0_method
.ne.
0
)
then
if
(
bottfric_method
.eq.
2
.or.
bottfric_method
.eq.
3
)
then
call
bottom_friction
(
U
,
V
,
DU
,
DV
,
ru
,
rv
)
end
if
end
if
...
...
src/2d/variables_2d.F90
View file @
2d0e8e71
...
...
@@ -17,7 +17,8 @@
! {\tt PUBLIC DATA MEMBERS}.
!
! !USES:
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
H
,
HU
,
HV
,
min_depth
,
cd_min
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
H
,
HU
,
HV
,
min_depth
use
domain
,
only
:
bottfric_method
,
rdrag
IMPLICIT
NONE
!
! !PUBLIC DATA MEMBERS:
...
...
@@ -118,7 +119,13 @@
U
=
_
ZERO_
;
fU
=
_
ZERO_
;
Uint
=
_
ZERO_
;
UEx
=
_
ZERO_
V
=
_
ZERO_
;
fV
=
_
ZERO_
;
Vint
=
_
ZERO_
;
VEx
=
_
ZERO_
ru
=
cd_min
;
rv
=
cd_min
if
(
bottfric_method
.eq.
1
)
then
ru
=
rdrag
rv
=
rdrag
else
ru
=
_
ZERO_
rv
=
_
ZERO_
end
if
res_du
=
_
ZERO_
;
res_u
=
_
ZERO_
res_dv
=
_
ZERO_
;
res_v
=
_
ZERO_
...
...
src/3d/m3d.F90
View file @
2d0e8e71
...
...
@@ -25,7 +25,7 @@
! !USES:
use
exceptions
use
parameters
,
only
:
avmmol
use
domain
,
only
:
openbdy
,
maxdepth
,
vert_cord
,
az
,
z0
_method
use
domain
,
only
:
openbdy
,
maxdepth
,
vert_cord
,
az
,
bottfric
_method
use
m2d_general
,
only
:
bottom_friction
use
m2d
,
only
:
Am
use
variables_2d
,
only
:
z
...
...
@@ -334,7 +334,7 @@
call
coordinates
(
hotstart
)
if
(
z0_method
.ne.
0
)
then
if
(
bottfric_method
.eq.
2
.or.
bottfric_method
.eq.
3
)
then
call
bottom_friction
(
uu
(:,:,
1
),
vv
(:,:,
1
),
hun
(:,:,
1
),
hvn
(:,:,
1
),
rru
,
rrv
)
end
if
...
...
@@ -495,7 +495,7 @@
call
uv_advect_3d
()
if
(
Am
.gt.
_
ZERO_
)
call
uv_diffusion_3d
()
! Must be called after uv_advect_3d
if
(
z0_method
.ne.
0
)
then
if
(
bottfric_method
.eq.
2
.or.
bottfric_method
.eq.
3
)
then
call
tic
(
TIM_INTEGR3D
)
call
bottom_friction
(
uu
(:,:,
1
),
vv
(:,:,
1
),
hun
(:,:,
1
),
hvn
(:,:,
1
),
rru
,
rrv
,
zub
,
zvb
)
call
toc
(
TIM_INTEGR3D
)
...
...
src/3d/slow_terms.F90
View file @
2d0e8e71
...
...
@@ -19,7 +19,7 @@
! {\tt slow\_diffusion}.
!
! !USES:
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
kmax
,
au
,
av
,
z0
_method
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
kmax
,
au
,
av
,
bottfric
_method
use
variables_2d
,
only
:
Uint
,
Vint
,
UEx
,
VEx
,
Slru
,
Slrv
,
SlUx
,
SlVx
,
ru
,
rv
use
variables_3d
,
only
:
kumin
,
kvmin
,
uu
,
vv
,
hun
,
hvn
,
Dn
,
Dun
,
Dvn
use
variables_3d
,
only
:
uuEx
,
vvEx
,
rru
,
rrv
...
...
@@ -55,7 +55,7 @@
if
(
kmax
.gt.
1
)
then
if
(
z0_method
.ne.
0
)
then
if
(
bottfric_method
.eq.
2
.or.
bottfric_method
.eq.
3
)
then
call
bottom_friction
(
Uint
,
Vint
,
Dun
,
Dvn
,
ru
,
rv
)
end
if
call
calc_uvex
(
0
,
Uint
,
Vint
,
Dn
,
Dun
,
Dvn
)
...
...
src/3d/variables_3d.F90
View file @
2d0e8e71
...
...
@@ -111,7 +111,7 @@
! {\tt init\_variables\_3d}) and cleanup (see {\tt clean\_variables\_3d}).
!
! !USES:
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
kmax
,
cd_min
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
kmax
,
bottfric_method
,
rdrag
IMPLICIT
NONE
!
! !PUBLIC DATA MEMBERS:
...
...
@@ -194,7 +194,15 @@
#endif
ssen
=
_
ZERO_
;
ssun
=
_
ZERO_
;
ssvn
=
_
ZERO_
Dn
=
SMALL
;
Dun
=
SMALL
;
Dvn
=
SMALL
rru
=
cd_min
;
rrv
=
cd_min
if
(
bottfric_method
.eq.
1
)
then
rru
=
rdrag
rrv
=
rdrag
else
rru
=
_
ZERO_
rrv
=
_
ZERO_
end
if
uuEx
=
_
ZERO_
;
vvEx
=
_
ZERO_
tke
=
1.e-10
;
eps
=
1.e-10
preadapt
=
0
...
...
src/domain/domain.F90
View file @
2d0e8e71
...
...
@@ -84,11 +84,11 @@
REALTYPE
::
cori
=
_
ZERO_
REALTYPE
::
cd_min
=
_
ZERO_
! method for specifying bottom roughness (0=disable, 1=const, 2=from topo.nc)
integer
::
z0_method
=
1
integer
::
bottfric_method
=
2
REALTYPE
::
rdrag
=
0.0004d0
REALTYPE
::
z0_const
=
0.001d0
integer
::
z0d_iters
=
0
REALTYPE
::
cd_min
=
_
ZERO_
! !DEFINED PARAMETERS:
integer
,
parameter
::
INNER
=
1
...
...
@@ -162,7 +162,7 @@
longitude
,
latitude
,
f_plane
,
openbdy
,
bdyinfofile
,
&
crit_depth
,
min_depth
,
kdum
,
ddu
,
ddl
,
&
d_gamma
,
gamma_surf
,
il
,
ih
,
jl
,
jh
,
&
cd_min
,
z0_method
,
z0_const
,
z0d_iters
bottfric_method
,
z0_const
,
z0d_iters
,
cd_min
!EOP
!-------------------------------------------------------------------------
!BOC
...
...
@@ -373,38 +373,34 @@
LEVEL2
'bottom friction specification'
#ifdef NO_BOTTFRIC
if
(
cd_min
.gt.
_
ZERO_
.or.
z0_method
.ne.
0
)
then
LEVEL3
'Reset
cd_min=0.0 and z0
_method=0 due to obsolete -DNO_BOTTFRIC.'
if
(
bottfric_method
.ne.
0
)
then
LEVEL3
'Reset
bottfric
_method=0 due to obsolete -DNO_BOTTFRIC.'
LEVEL3
'Note that this behaviour will be removed in the future!'
cd_min
=
_
ZERO_
z0_method
=
0
bottfric_method
=
0
end
if
#endif
if
(
cd_min
.lt.
_
ZERO_
)
then
cd_min
=
_
ZERO_
if
(
bottfric_method
.eq.
1
.and.
rdrag
.le.
_
ZERO_
)
then
bottfric_method
=
0
end
if
select
case
(
z0
_method
)
select
case
(
bottfric
_method
)
case
(
0
)
if
(
cd_min
.gt.
_
ZERO_
)
then
LEVEL3
'linear bottom friction with drag coefficient cd = '
,
real
(
cd_min
)
else
LEVEL3
'disabled bottom friction'
end
if
LEVEL3
'no bottom friction'
case
(
1
)
LEVEL3
'quadratic bottom friction with constant z0 = '
,
real
(
z0_const
)
LEVEL3
'linear bottom friction with rdrag = '
,
real
(
rdrag
)
case
(
2
)
LEVEL3
'quadratic bottom friction with z0_const = '
,
real
(
z0_const
)
if
(
z0_const
.le.
_
ZERO_
)
then
call
getm_error
(
"init_domain()"
,
&
"non-positive bottom roughness"
);
end
if
zub0
=
z0_const
zvb0
=
z0_const
case
(
2
)
LEVEL3
'quadratic bottom friction with z0
field
read from topo file'
case
(
3
)
LEVEL3
'quadratic bottom friction with z0 read from topo file'
if
(
MINVAL
(
z0
(
imin
:
imax
,
jmin
:
jmax
),
mask
=
(
az
(
imin
:
imax
,
jmin
:
jmax
)
.ge.
1
))
.le.
_
ZERO_
)
then
call
getm_error
(
"init_domain()"
,
&
"non-positive bottom roughness in z0 field"
);
end
if
! Note (KK): we need halo update only for periodic domains
call
update_2d_halo
(
z0
,
z0
,
az
,
imin
,
jmin
,
imax
,
jmax
,
H_TAG
)
call
wait_halo
(
H_TAG
)
...
...
@@ -426,9 +422,11 @@
call
getm_error
(
"init_domain()"
,
&
"A non valid z0 method has been chosen"
);
end
select
if
(
z0_method
.ne.
0
)
then
if
(
bottfric_method
.eq.
2
.or.
bottfric_method
.eq.
3
)
then
if
(
cd_min
.gt.
_
ZERO_
)
then
LEVEL3
'min. drag coefficient: '
,
real
(
cd_min
)
LEVEL3
'min. drag coefficient cd_min = '
,
real
(
cd_min
)
else
cd_min
=
_
ZERO_
end
if
if
(
z0d_iters
.gt.
0
)
then
LEVEL3
'iterations for dynamic bottom roughness: '
,
z0d_iters
...
...
src/ncdf/ncdf_topo.F90
View file @
2d0e8e71
...
...
@@ -33,7 +33,7 @@
use
domain
,
only
:
latc
,
lonc
use
domain
,
only
:
latx
,
lonx
use
domain
,
only
:
convx
,
convc
use
domain
,
only
:
z0
_method
,
z0
use
domain
,
only
:
bottfric
_method
,
z0
IMPLICIT
NONE
!
! !PUBLIC MEMBER FUNCTIONS:
...
...
@@ -630,7 +630,7 @@ stop
end
select
! read bottom roughness
if
(
z0_method
.eq.
2
)
then
if
(
bottfric_method
.eq.
3
)
then
status
=
nf90_inq_varid
(
ncid
,
"z0"
,
id
)
if
(
status
.ne.
NF90_NOERR
)
then
call
netcdf_error
(
status
,
"ncdf_check_grid()"
,
&
...
...
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