Skip to content
Snippets Groups Projects
Commit 9f38daf1 authored by Evgeny Mortikov's avatar Evgeny Mortikov
Browse files

adding surface temperature to output

parent 5a50a51f
No related branches found
No related tags found
No related merge requests found
......@@ -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( &
......
......@@ -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
......
......@@ -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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment