Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Nemo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Hatfield
Nemo
Commits
cf05dbcc
Commit
cf05dbcc
authored
2 years ago
by
Sebastien MASSON
Browse files
Options
Downloads
Patches
Plain Diff
minor fix in zdftke and zdfiwm, #68
parent
005ca9c1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OCE/ZDF/zdfiwm.F90
+38
-28
38 additions, 28 deletions
src/OCE/ZDF/zdfiwm.F90
src/OCE/ZDF/zdftke.F90
+2
-4
2 additions, 4 deletions
src/OCE/ZDF/zdftke.F90
with
40 additions
and
32 deletions
src/OCE/ZDF/zdfiwm.F90
+
38
−
28
View file @
cf05dbcc
...
...
@@ -129,8 +129,8 @@ CONTAINS
!!----------------------------------------------------------------------
INTEGER
,
INTENT
(
in
)
::
kt
! ocean time step
INTEGER
,
INTENT
(
in
)
::
Kmm
! time level index
REAL
(
wp
),
DIMENSION
(
:,:,:)
,
INTENT
(
inout
)
::
p_avm
! momentum Kz (w-points)
REAL
(
wp
),
DIMENSION
(
A2D
(
0
),
jpk
)
,
INTENT
(
inout
)
::
p_avt
,
p_avs
! tracer Kz (w-points)
REAL
(
wp
),
DIMENSION
(
jpi
,
jpj
,
jpk
)
,
INTENT
(
inout
)
::
p_avm
! momentum Kz (w-points)
REAL
(
wp
),
DIMENSION
(
A2D
(
0
),
jpk
),
INTENT
(
inout
)
::
p_avt
,
p_avs
! tracer Kz (w-points)
!
INTEGER
::
ji
,
jj
,
jk
! dummy loop indices
REAL
(
wp
),
SAVE
::
zztmp
...
...
@@ -299,7 +299,7 @@ CONTAINS
ENDIF
ENDIF
IF
(
sn_cfctl
%
l_prtctl
)
CALL
prt_ctl
(
tab3d_1
=
zav_wave
,
clinfo1
=
' iwm - av_wave: '
,
tab3d_2
=
avt
,
clinfo2
=
' avt: '
)
IF
(
sn_cfctl
%
l_prtctl
)
CALL
prt_ctl
(
tab3d_1
=
zav_wave
,
clinfo1
=
' iwm - av_wave: '
,
tab3d_2
=
p_
avt
,
clinfo2
=
' avt: '
)
!
END
SUBROUTINE
zdf_iwm
...
...
@@ -341,6 +341,7 @@ CONTAINS
INTEGER
,
PARAMETER
::
jp_mps
=
4
INTEGER
,
PARAMETER
::
jp_dsb
=
5
INTEGER
,
PARAMETER
::
jp_dsc
=
6
INTEGER
::
ji
,
jj
!
TYPE
(
FLD_N
),
DIMENSION
(
jpiwm
)
::
slf_iwm
! array of namelist informations
TYPE
(
FLD_N
)
::
sn_mpb
,
sn_mpc
,
sn_mpn
,
sn_mps
! information about Mixing Power field to be read
...
...
@@ -349,6 +350,7 @@ CONTAINS
!
REAL
(
wp
),
DIMENSION
(
A2D
(
0
),
4
)
::
ztmp
REAL
(
wp
),
DIMENSION
(
4
)
::
zdia
REAL
(
wp
)
::
zcte
!
NAMELIST
/
namzdf_iwm
/
ln_mevar
,
ln_tsdiff
,
&
&
cn_dir
,
sn_mpb
,
sn_mpc
,
sn_mpn
,
sn_mps
,
sn_dsb
,
sn_dsc
...
...
@@ -373,10 +375,12 @@ CONTAINS
! This internal-wave-driven mixing parameterization elevates avt and avm in the interior, and
! ensures that avt remains larger than its molecular value (=1.4e-7). Therefore, avtb should
! be set here to a very small value, and avmb to its (uniform) molecular value (=1.4e-6).
avmb
(:)
=
rnu
! molecular value
avtb
(:)
=
1.e-10_wp
! very small diffusive minimum (background avt is specified in zdf_iwm)
avtb_2d
(:,:)
=
1._wp
! uniform
IF
(
lwp
)
THEN
! Control print
avmb
(:)
=
rnu
! molecular value
avtb
(:)
=
1.e-10_wp
! very small diffusive minimum (background avt is specified in zdf_iwm)
DO_2D
(
0
,
0
,
0
,
0
)
avtb_2d
(
ji
,
jj
)
=
1._wp
! uniform
END_2D
IF
(
lwp
)
THEN
! Control print
WRITE
(
numout
,
*
)
WRITE
(
numout
,
*
)
' Force the background value applied to avm & avt in TKE to be everywhere '
,
&
&
'the viscous molecular value & a very small diffusive value, resp.'
...
...
@@ -398,32 +402,38 @@ CONTAINS
CALL
fld_fill
(
sf_iwm
,
slf_iwm
,
cn_dir
,
'zdfiwm_init'
,
'iwm input file'
,
'namiwm'
)
! ! hard-coded default values
sf_iwm
(
jp_mpb
)
%
fnow
(:,:,
1
)
=
1.e-10_wp
sf_iwm
(
jp_mpc
)
%
fnow
(:,:,
1
)
=
1.e-10_wp
sf_iwm
(
jp_mpn
)
%
fnow
(:,:,
1
)
=
1.e-5_wp
sf_iwm
(
jp_mps
)
%
fnow
(:,:,
1
)
=
1.e-10_wp
sf_iwm
(
jp_dsb
)
%
fnow
(:,:,
1
)
=
100._wp
sf_iwm
(
jp_dsc
)
%
fnow
(:,:,
1
)
=
100._wp
DO_2D
(
0
,
0
,
0
,
0
)
sf_iwm
(
jp_mpb
)
%
fnow
(
ji
,
jj
,
1
)
=
1.e-10_wp
sf_iwm
(
jp_mpc
)
%
fnow
(
ji
,
jj
,
1
)
=
1.e-10_wp
sf_iwm
(
jp_mpn
)
%
fnow
(
ji
,
jj
,
1
)
=
1.e-5_wp
sf_iwm
(
jp_mps
)
%
fnow
(
ji
,
jj
,
1
)
=
1.e-10_wp
sf_iwm
(
jp_dsb
)
%
fnow
(
ji
,
jj
,
1
)
=
100._wp
sf_iwm
(
jp_dsc
)
%
fnow
(
ji
,
jj
,
1
)
=
100._wp
END_2D
! ! read necessary fields
CALL
fld_read
(
nit000
,
1
,
sf_iwm
)
ebot_iwm
(:,:)
=
sf_iwm
(
1
)
%
fnow
(:,:,
1
)
*
smask0
(:,:)
! energy flux for dissipation above abyssal hills [W/m2]
ecri_iwm
(:,:)
=
sf_iwm
(
2
)
%
fnow
(:,:,
1
)
*
smask0
(:,:)
! energy flux for dissipation at topographic slopes [W/m2]
ensq_iwm
(:,:)
=
sf_iwm
(
3
)
%
fnow
(:,:,
1
)
*
smask0
(:,:)
! energy flux for dissipation scaling with N^2 [W/m2]
esho_iwm
(:,:)
=
sf_iwm
(
4
)
%
fnow
(:,:,
1
)
*
smask0
(:,:)
! energy flux for dissipation due to shoaling [W/m2]
hbot_iwm
(:,:)
=
sf_iwm
(
5
)
%
fnow
(:,:,
1
)
! spatially variable decay scale for abyssal hill dissipation [m]
hcri_iwm
(:,:)
=
sf_iwm
(
6
)
%
fnow
(:,:,
1
)
! spatially variable decay scale for topographic-slope [m]
hcri_iwm
(:,:)
=
1._wp
/
hcri_iwm
(:,:)
! only the inverse height is used, hence calculated here once for all
DO_2D
(
0
,
0
,
0
,
0
)
zcte
=
smask0
(
ji
,
jj
)
ebot_iwm
(
ji
,
jj
)
=
sf_iwm
(
1
)
%
fnow
(
ji
,
jj
,
1
)
*
zcte
! energy flux for dissipation above abyssal hills [W/m2]
ecri_iwm
(
ji
,
jj
)
=
sf_iwm
(
2
)
%
fnow
(
ji
,
jj
,
1
)
*
zcte
! energy flux for dissipation at topographic slopes [W/m2]
ensq_iwm
(
ji
,
jj
)
=
sf_iwm
(
3
)
%
fnow
(
ji
,
jj
,
1
)
*
zcte
! energy flux for dissipation scaling with N^2 [W/m2]
esho_iwm
(
ji
,
jj
)
=
sf_iwm
(
4
)
%
fnow
(
ji
,
jj
,
1
)
*
zcte
! energy flux for dissipation due to shoaling [W/m2]
hbot_iwm
(
ji
,
jj
)
=
sf_iwm
(
5
)
%
fnow
(
ji
,
jj
,
1
)
! spatially variable decay scale for abyssal hill dissipation [m]
hcri_iwm
(
ji
,
jj
)
=
1._wp
/
sf_iwm
(
6
)
%
fnow
(
ji
,
jj
,
1
)
! inverse decay scale for topographic slope dissipation [m-1]
END_2D
! diags
ztmp
(:,:,
1
)
=
e1e2t
(:,:)
*
ebot_iwm
(:,:)
ztmp
(:,:,
2
)
=
e1e2t
(:,:)
*
ecri_iwm
(:,:)
ztmp
(:,:,
3
)
=
e1e2t
(:,:)
*
ensq_iwm
(:,:)
ztmp
(:,:,
4
)
=
e1e2t
(:,:)
*
esho_iwm
(:,:)
DO_2D
(
0
,
0
,
0
,
0
)
zcte
=
e1e2t
(
ji
,
jj
)
ztmp
(
ji
,
jj
,
1
)
=
zcte
*
ebot_iwm
(
ji
,
jj
)
ztmp
(
ji
,
jj
,
2
)
=
zcte
*
ecri_iwm
(
ji
,
jj
)
ztmp
(
ji
,
jj
,
3
)
=
zcte
*
ensq_iwm
(
ji
,
jj
)
ztmp
(
ji
,
jj
,
4
)
=
zcte
*
esho_iwm
(
ji
,
jj
)
END_2D
zdia
(
1
:
4
)
=
glob_sum_vec
(
'zdfiwm'
,
ztmp
(:,:,
1
:
4
)
)
zdia
(
1
:
4
)
=
glob_sum_vec
(
'zdfiwm'
,
ztmp
)
IF
(
lwp
)
THEN
WRITE
(
numout
,
*
)
' Dissipation above abyssal hills: '
,
zdia
(
1
)
*
1.e-12_wp
,
'TW'
...
...
This diff is collapsed.
Click to expand it.
src/OCE/ZDF/zdftke.F90
+
2
−
4
View file @
cf05dbcc
...
...
@@ -56,9 +56,7 @@ MODULE zdftke
USE
in_out_manager
! I/O manager
USE
iom
! I/O manager library
USE
lib_mpp
! MPP library
USE
lbclnk
! ocean lateral boundary conditions (or mpp link)
USE
prtctl
! Print control
USE
lib_fortran
! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
USE
sbcwave
! Surface boundary waves
IMPLICIT
NONE
...
...
@@ -820,9 +818,9 @@ CONTAINS
IF
(
nn_etau
/
=
0
)
THEN
SELECT
CASE
(
nn_htau
)
! Choice of the depth of penetration
CASE
(
0
)
! constant depth penetration (here 10 meters)
htau
(
:,:
)
=
10._wp
htau
(
A2D
(
0
)
)
=
10._wp
CASE
(
1
)
! F(latitude) : 0.5m to 30m poleward of 40 degrees
htau
(
:,:
)
=
MAX
(
0.5_wp
,
MIN
(
30._wp
,
45._wp
*
ABS
(
SIN
(
rpi
/
180._wp
*
gphit
(
:,:
)
)
)
)
)
htau
(
A2D
(
0
)
)
=
MAX
(
0.5_wp
,
MIN
(
30._wp
,
45._wp
*
ABS
(
SIN
(
rpi
/
180._wp
*
gphit
(
A2D
(
0
)
)
)
)
)
)
END
SELECT
ENDIF
! !* read or initialize all required files
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment