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
9f38daf1
Commit
9f38daf1
authored
7 months ago
by
Evgeny Mortikov
Browse files
Options
Downloads
Patches
Plain Diff
adding surface temperature to output
parent
5a50a51f
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
io_metadata.f90
+9
-0
9 additions, 0 deletions
io_metadata.f90
obl_main.f90
+5
-4
5 additions, 4 deletions
obl_main.f90
obl_output.f90
+12
-0
12 additions, 0 deletions
obl_output.f90
obl_time_and_space.f90
+0
-16
0 additions, 16 deletions
obl_time_and_space.f90
with
26 additions
and
20 deletions
io_metadata.f90
+
9
−
0
View file @
9f38daf1
...
...
@@ -355,6 +355,15 @@ module io_metadata
char_name
=
[
character
(
len
=
32
)
::
'long_name'
,
'units'
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
],
&
char_value
=
[
character
(
len
=
32
)
::
'Meridional Wind Stress'
,
'N m-2'
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
],
&
real_name
=
[
character
(
len
=
32
)
::
'missing_value'
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
],
&
real_value
=
[
-9999.9
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
])
! Metadata for theta_surf
type
(
variable_metadata
),
public
::
meta_theta_surf
=
variable_metadata
(
&
name
=
'Theta_surf'
,
&
dim_names
=
[
character
(
len
=
32
)
::
'Time'
,
''
,
''
,
''
],
&
char_name
=
[
character
(
len
=
32
)
::
'long_name'
,
'units'
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
],
&
char_value
=
[
character
(
len
=
32
)
::
'Temperature surface'
,
'K'
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
],
&
real_name
=
[
character
(
len
=
32
)
::
'missing_value'
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
],
&
real_value
=
[
-9999.9
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
])
type
(
variable_metadata
),
public
::
meta_init_theta
=
variable_metadata
(
&
...
...
This diff is collapsed.
Click to expand it.
obl_main.f90
+
5
−
4
View file @
9f38daf1
...
...
@@ -60,11 +60,9 @@ program obl_main
real
::
t
!< time, [s]
integer
::
nt
!< number of time steps
integer
::
nf
!< number of time steps for forcing
real
::
z
!< depth, [m]
integer
::
nz
!< number of steps in z (depth), [m]
real
::
dt
!< time step [s]
real
::
df
!< time step for forcing [s]
real
,
allocatable
::
dz
(:)
!< depth(z) step [m]
integer
::
i
,
k
!< counters
integer
::
status
,
num
!< for file input/output
...
...
@@ -198,8 +196,7 @@ program obl_main
#endif
allocate
(
dz
(
1
:
nz
))
call
set_dz_dt
(
dz
,
dt
,
nz
,
nt
,
t
,
z
)
call
set_Time_Space_Forcing
(
nf
,
df
)
write
(
*
,
*
)
t
,
dt
,
nt
,
z
,
nz
,
nf
,
df
write
(
*
,
*
)
t
,
dt
,
nt
,
z
,
nz
! setting grid -- just an example
! > [zpos, height, cz, gcz]
...
...
@@ -425,6 +422,8 @@ program obl_main
call
push_value_to_tseries
(
output_tau_x
,
flux_u_surf_res
)
call
push_value_to_tseries
(
output_tau_y
,
flux_v_surf_res
)
call
push_value_to_tseries
(
output_Theta_surf
,
Theta_dev
(
grid
%
cz
))
call
push_value_to_tseries
(
output_time
,
time_current
/
3600.0
)
endif
enddo
...
...
@@ -437,6 +436,8 @@ program obl_main
output_tau_x
%
data
(
1
:
output_tau_x
%
num
)
=
output_tau_x
%
data
(
1
:
output_tau_x
%
num
)
*
Rho_ref
output_tau_y
%
data
(
1
:
output_tau_y
%
num
)
=
output_tau_y
%
data
(
1
:
output_tau_y
%
num
)
*
Rho_ref
output_Theta_surf
%
data
(
1
:
output_Theta_surf
%
num
)
=
output_Theta_surf
%
data
(
1
:
output_Theta_surf
%
num
)
+
Theta_ref
endif
if
(
output_mode
.eq.
1
)
then
...
...
This diff is collapsed.
Click to expand it.
obl_output.f90
+
12
−
0
View file @
9f38daf1
...
...
@@ -39,6 +39,8 @@ module obl_output
type
(
oblTImeSeries
),
public
::
output_tau_x
,
output_tau_y
type
(
oblTimeSeries
),
public
::
output_Theta_surf
contains
...
...
@@ -103,6 +105,8 @@ module obl_output
call
write_1d_real_nc
(
output_tau_x
%
data
(
1
:
output_tau_x
%
num
),
'output.nc'
,
meta_tau_u
)
call
write_1d_real_nc
(
output_tau_y
%
data
(
1
:
output_tau_y
%
num
),
'output.nc'
,
meta_tau_v
)
call
write_1d_real_nc
(
output_Theta_surf
%
data
(
1
:
output_Theta_surf
%
num
),
'output.nc'
,
meta_theta_surf
)
end
subroutine
write_netcdf
! --------------------------------------------------------------------------------
...
...
@@ -157,6 +161,9 @@ module obl_output
call
write_1d_real_ascii
(
output_tau_y
%
data
(
1
:
output_tau_y
%
num
),
&
trim
(
path
)
//
trim
(
meta_tau_v
%
name
)
//
'.txt'
,
meta_tau_v
)
call
write_1d_real_ascii
(
output_Theta_surf
%
data
(
1
:
output_Theta_surf
%
num
),
&
trim
(
path
)
//
trim
(
meta_theta_surf
%
name
)
//
'.txt'
,
meta_theta_surf
)
end
subroutine
write_ascii
! --------------------------------------------------------------------------------
...
...
@@ -215,6 +222,9 @@ module obl_output
call
write_1d_real_plt
(
output_tau_y
%
data
(
1
:
output_tau_y
%
num
),
tcoord
(
1
:
output_tau_y
%
num
),
&
trim
(
path
)
//
trim
(
meta_tau_v
%
name
)
//
'.plt'
,
meta_tau_v
)
call
write_1d_real_plt
(
output_Theta_surf
%
data
(
1
:
output_Theta_surf
%
num
),
tcoord
(
1
:
output_Theta_surf
%
num
),
&
trim
(
path
)
//
trim
(
meta_theta_surf
%
name
)
//
'.plt'
,
meta_theta_surf
)
end
subroutine
write_tecplot
! --------------------------------------------------------------------------------
...
...
@@ -250,6 +260,8 @@ module obl_output
call
deallocate_tseries
(
output_tau_x
)
call
deallocate_tseries
(
output_tau_y
)
call
deallocate_tseries
(
output_Theta_surf
)
end
subroutine
output_cleanup
end
module
\ No newline at end of file
This diff is collapsed.
Click to expand it.
obl_time_and_space.f90
+
0
−
16
View file @
9f38daf1
...
...
@@ -25,22 +25,6 @@ module obl_time_and_space
close
(
1
)
end
subroutine
subroutine
set_Time_Space_Forcing
(
nf
,
df
)
!< @brief set number of steps and step for forcing
integer
,
intent
(
out
)
::
nf
!< number of time steps for forcing
real
,
intent
(
out
)
::
df
!< time step for forcing [s]
integer
::
status
!open (1, file= 'PAPA_06_2017/time_space_for_calc_PAPA.txt', status ='old')
open
(
115
,
file
=
'Kato-Phillips/time_space_for_forcing.txt'
,
status
=
'old'
)
status
=
0
do
while
(
status
.eq.
0
)
read
(
115
,
*
,
iostat
=
status
)
nf
,
df
end
do
close
(
115
)
end
subroutine
subroutine
set_dz_dt
(
dz
,
dt
,
nz
,
nt
,
t
,
z
)
!< @brief set time and depth steps
...
...
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