Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ocean-mixing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
inmcm-mirror
ocean-mixing
Commits
fae73476
Commit
fae73476
authored
7 months ago
by
Evgeny Mortikov
Browse files
Options
Downloads
Patches
Plain Diff
adding time-dependent forcing partial support
parent
a52279f3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
obl_main.f90
+50
-8
50 additions, 8 deletions
obl_main.f90
obl_tforcing.f90
+1
-1
1 addition, 1 deletion
obl_tforcing.f90
with
51 additions
and
9 deletions
obl_main.f90
+
50
−
8
View file @
fae73476
...
...
@@ -48,6 +48,11 @@ program obl_main
! turbulence closure parameters
type
(
pacanowskiParamType
)
::
param_pacanowski
! surface forcing
type
(
timeForcingDataType
)
::
sensible_hflux_surf
,
latent_hflux_surf
type
(
timeForcingDataType
)
::
salin_flux_surf
!type(timeForcingDataType) :: tau_x_surf, tau_y_surf
real
::
t
!< time, [s]
integer
::
nt
!< number of time steps
integer
::
nf
!< number of time steps for forcing
...
...
@@ -65,6 +70,7 @@ program obl_main
real
,
allocatable
::
Flux_sal_surf
(:),
Flux_sal_bot
(:)
!< salt fluxes, [PSU*m/s] ???
real
,
allocatable
::
Times_flux_Sal_surf
(:),
Times_flux_Sal_bot
(:)
real
,
allocatable
::
Tau_x_surf
(:),
Tau_y_surf
(:),
Tau_x_bot
(:),
Tau_y_bot
(:)
!< [N/m**2]
real
,
allocatable
::
flux_u_surf
(:),
flux_u_bot
(:)
!< [(m/s)**2]
real
,
allocatable
::
Times_flux_u_surf
(:),
Times_flux_u_bot
(:)
real
,
allocatable
::
flux_v_surf
(:),
flux_v_bot
(:)
!< [(m/s)**2]
...
...
@@ -77,6 +83,8 @@ program obl_main
integer
,
parameter
::
output_mode
=
1
! 1 -- netcdf, 2 -- ascii, 3 -- tecplot
integer
,
parameter
::
obl_setup
=
1
! 1 - Kato-Phillips, 2 - Papa station
real
::
Rho_dyn_surf
,
Rho_dyn_bot
!< density dynamic, [kg / m**3]
real
::
mld
!< mixed layer depth, [m]
...
...
@@ -245,15 +253,46 @@ program obl_main
call
U_init
(
U
,
nz
)
call
V_init
(
V
,
nz
)
!initialization of TKE & eps in case of k-epsilon closure
if
(
closure_mode
.eq.
3
.or.
closure_mode
.eq.
4
)
then
call
TKE_init
(
TKE
,
nz
)
call
eps_init
(
eps
,
nz
,
z
)
endif
! set atmospheric forcing
if
(
obl_setup
==
1
)
then
call
set_const_tforcing
(
sensible_hflux_surf
,
0.0
)
call
set_const_tforcing
(
latent_hflux_surf
,
0.0
)
call
set_const_tforcing
(
salin_flux_surf
,
0.0
)
!call set_const_tforcing(tau_x_surf, 0.1)
!call set_const_tforcing(tau_y_surf, 0.0)
endif
if
(
obl_setup
==
2
)
then
call
set_external_tforcing
(
sensible_hflux_surf
,
'PAPA_06_2017/sensible_hflux.txt'
)
call
set_external_tforcing
(
latent_hflux_surf
,
'PAPA_06_2017/latent_hflux.txt'
)
call
set_const_tforcing
(
salin_flux_surf
,
0.0
)
!call set_external_tforcing(tau_x_surf, 'PAPA_06_2017/tau_x.txt')
!call set_external_tforcing(tau_y_surf, 'PAPA_06_2017/tau_y.txt')
endif
!set boundary conditions
call
set_Flux_heat_surf
(
Flux_heat_surf
,
Times_flux_heat_surf
,
nf
,
df
)
call
set_Flux_heat_bot
(
Flux_heat_bot
,
Times_flux_heat_bot
,
nf
,
df
)
call
set_Flux_sal_surf
(
Flux_sal_surf
,
Times_flux_sal_surf
,
nf
,
df
)
call
set_Flux_sal_bot
(
Flux_sal_bot
,
Times_flux_sal_bot
,
nf
,
df
)
call
set_Tau_x_surf
(
Tau_x_surf
,
flux_u_surf
,
Times_flux_u_surf
,
nf
,
df
)
call
set_Tau_y_surf
(
Tau_y_surf
,
flux_v_surf
,
Times_flux_v_surf
,
nf
,
df
)
call
set_Flux_heat_bot
(
Flux_heat_bot
,
Times_flux_heat_bot
,
nf
,
df
)
call
set_Flux_sal_bot
(
Flux_sal_bot
,
Times_flux_sal_bot
,
nf
,
df
)
call
set_Tau_x_bot
(
Tau_x_bot
,
flux_u_bot
,
Times_flux_u_bot
,
nf
,
df
)
call
set_Tau_y_bot
(
Tau_y_bot
,
flux_v_bot
,
Times_flux_v_bot
,
nf
,
df
)
call
set_f_Heat_right
(
f_Heat_right
,
nz
)
call
set_f_Sal_right
(
f_Sal_right
,
nz
)
call
set_f_u_right
(
f_v_right
,
V
,
nz
)
...
...
@@ -273,12 +312,6 @@ program obl_main
N2_0
=
0.0004
!initialization of TKE & eps in case of k-epsilon closure
if
(
closure_mode
.eq.
3
.or.
closure_mode
.eq.
4
)
then
call
TKE_init
(
TKE
,
nz
)
call
eps_init
(
eps
,
nz
,
z
)
endif
i
=
1
do
while
(
time_current
<
time_end
)
...
...
@@ -463,6 +496,15 @@ program obl_main
deallocate
(
Km_TKE
)
deallocate
(
Km_eps
)
!> removing time-dependent forcing data
call
deallocate_tforcing
(
sensible_hflux_surf
)
call
deallocate_tforcing
(
latent_hflux_surf
)
call
deallocate_tforcing
(
salin_flux_surf
)
!call deallocate_tforcing(tau_x_surf)
!call deallocate_tforcing(tau_y_surf)
!> removing time slice data
call
output_cleanup
...
...
This diff is collapsed.
Click to expand it.
obl_tforcing.f90
+
1
−
1
View file @
fae73476
...
...
@@ -12,8 +12,8 @@ module obl_tforcing
! public interface
! --------------------------------------------------------------------------------
public
::
set_const_tforcing
,
set_external_tforcing
,
set_generic_tforcing
public
::
get_value_tforcing
public
::
deallocate_tforcing
! --------------------------------------------------------------------------------
!> @brief time forcing datatype
...
...
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