Skip to content
Snippets Groups Projects
Commit ab01d72f authored by Daria Gladskikh's avatar Daria Gladskikh :ocean:
Browse files

papa long

parent 8db94bcb
Branches main
No related tags found
No related merge requests found
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#Meteo source
https://www.pmel.noaa.gov/
#Meteo short data for
2014-01-01-00:00
2015-12-31-23:00
#Timestep
1 H
#Coordinates
50.1°N, 144.9°W
\ No newline at end of file
1 32.446
10 32.453
20 32.45
25 32.453
30 32.454
45 32.459
60 32.468
80 32.53
100 32.716
120 32.867
150 33.332
200 33.704
\ No newline at end of file
1 282.479
5 282.479
10 282.475
14 282.474
20 282.472
25 282.469
30 282.465
45 282.443
60 282.383
80 281.002
100 278.448
120 278.047
150 277.678
175 277.473
200 277.356
300 277.09
\ No newline at end of file
......@@ -24,12 +24,14 @@ module obl_config
integer, parameter :: obl_config_papa_meteo = 2 !< Papa-station (meteo) setup
integer, parameter :: obl_config_cbl = 3 !< CBL setup
integer, parameter :: obl_config_cyclone = 4 !< cyclone setup
integer, parameter :: obl_config_papa_long_fluxes = 5 !< Papa-station (fluxes) setup
character(len = 16), parameter :: obl_config_kato_tag = 'kato'
character(len = 16), parameter :: obl_config_papa_fluxes_tag = 'papa-fluxes'
character(len = 16), parameter :: obl_config_papa_meteo_tag = 'papa-meteo'
character(len = 16), parameter :: obl_config_cbl_tag = 'cbl'
character(len = 16), parameter :: obl_config_cyclone_tag = 'cyclone'
character(len = 16), parameter :: obl_config_papa_long_fluxes_tag = 'papa-long-fluxes'
!> @brief model enum def.
integer, parameter :: obl_model_pph = 0 !< pacanowski-philander
......@@ -62,8 +64,11 @@ contains
id = obl_config_cbl
else if (trim(tag) == trim(obl_config_cyclone_tag)) then
id = obl_config_cyclone
else if (trim(tag) == trim(obl_config_papa_long_fluxes_tag)) then
id = obl_config_papa_long_fluxes
end if
end function
function get_obl_config_tag(id) result(tag)
......@@ -82,6 +87,8 @@ contains
tag = obl_config_cbl_tag
else if (id == obl_config_cyclone) then
tag = obl_config_cyclone_tag
else if (id == obl_config_papa_long_fluxes) then
tag = obl_config_papa_long_fluxes_tag
end if
end function
......@@ -133,6 +140,7 @@ contains
use obl_run_papa_meteo, only : set_grid_papa_meteo => set_grid
use obl_run_cbl, only : set_grid_cbl => set_grid
use obl_run_cyclone, only : set_grid_cyclone => set_grid
use obl_run_papa_long_fluxes, only : set_grid_papa_long_fluxes => set_grid
type (gridDataType), intent(inout) :: grid
integer, intent(in) :: config_id
......@@ -162,6 +170,10 @@ contains
call set_grid_cyclone(grid)
return
endif
if (config_id == obl_config_papa_long_fluxes) then
call set_grid_papa_long_fluxes(grid)
return
endif
#ifdef USE_CONFIG_PARSER
block
......@@ -199,6 +211,7 @@ contains
use obl_run_papa_meteo, only : set_time_papa_meteo => set_time
use obl_run_cbl, only : set_time_cbl => set_time
use obl_run_cyclone, only : set_time_cyclone => set_time
use obl_run_papa_long_fluxes, only : set_time_papa_long_fluxes => set_time
real, intent(out) :: time_begin, time_end, dt
integer, intent(in) :: config_id
......@@ -228,6 +241,10 @@ contains
call set_time_cyclone(time_begin, time_end, dt)
return
endif
if (config_id == obl_config_papa_long_fluxes) then
call set_time_papa_long_fluxes(time_begin, time_end, dt)
return
endif
#ifdef USE_CONFIG_PARSER
block
......@@ -268,6 +285,7 @@ contains
use obl_run_papa_meteo, only : set_phys_papa_meteo => set_phys
use obl_run_cbl, only : set_phys_cbl => set_phys
use obl_run_cyclone, only : set_phys_cyclone => set_phys
use obl_run_papa_long_fluxes, only : set_phys_papa_long_fluxes => set_phys
integer, intent(in) :: config_id
integer, intent(out) :: ierr
......@@ -295,6 +313,10 @@ contains
call set_phys_cyclone
return
endif
if (config_id == obl_config_papa_long_fluxes) then
call set_phys_papa_long_fluxes
return
endif
#ifdef USE_CONFIG_PARSER
block
......@@ -348,6 +370,7 @@ contains
use obl_run_papa_meteo, only : set_forcing_papa_meteo => set_forcing
use obl_run_cbl, only : set_forcing_cbl => set_forcing
use obl_run_cyclone, only : set_forcing_cyclone => set_forcing
use obl_run_papa_long_fluxes, only : set_forcing_papa_long_fluxes => set_forcing
integer, intent(in) :: config_id
integer, intent(out) :: ierr
......@@ -375,6 +398,10 @@ contains
call set_forcing_cyclone
return
endif
if (config_id == obl_config_papa_long_fluxes) then
call set_forcing_papa_long_fluxes
return
endif
!< assuming that forcing def. is optional
block
......@@ -460,6 +487,7 @@ contains
use obl_run_papa_meteo, only : set_initial_conditions_papa_meteo => set_initial_conditions
use obl_run_cbl, only : set_initial_conditions_cbl => set_initial_conditions
use obl_run_cyclone, only : set_initial_conditions_cyclone => set_initial_conditions
use obl_run_papa_long_fluxes, only : set_initial_conditions_papa_long_fluxes => set_initial_conditions
type (gridDataType), intent(in) :: grid
......@@ -489,6 +517,10 @@ contains
call set_initial_conditions_cyclone(grid)
return
endif
if (config_id == obl_config_papa_long_fluxes) then
call set_initial_conditions_papa_long_fluxes(grid)
return
endif
block
!< *: will fail without configuration file
......
module obl_run_papa_long_fluxes
!< @brief obl scm Papa-station 'fluxes' setup
! --------------------------------------------------------------------------------
! TO DO:
! -- ***
! modules used
! --------------------------------------------------------------------------------
! directives list
! --------------------------------------------------------------------------------
implicit none
private
! public interface
! --------------------------------------------------------------------------------
public :: set_phys
public :: set_grid
public :: set_time
public :: set_forcing
public :: set_initial_conditions
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
character(len = 256), parameter :: path = 'papa-2014-long/'
! --------------------------------------------------------------------------------
contains
! --------------------------------------------------------------------------------
subroutine set_phys
!> @brief phys parameters setup
! ----------------------------------------------------------------------------
use obl_scm
! ----------------------------------------------------------------------------
!< coriolis frequency
f = 1.116 * 1e-4
!< SW extinction parameters
a_band_ratio = 0.67
a_extinction_coeff = 1.0
b_extinction_coeff = 1.0 / 17.0
sw_albedo = 0.3
end subroutine set_phys
! --------------------------------------------------------------------------------
subroutine set_grid(grid)
!> @brief grid parameters setup
! ----------------------------------------------------------------------------
use obl_grid
type (gridDataType), intent(inout) :: grid
! ----------------------------------------------------------------------------
!< in: [zpos, height, cz]
call set_uniform_grid(grid, -128.0, 128.0, 32)
end subroutine set_grid
! --------------------------------------------------------------------------------
subroutine set_time(time_begin, time_end, dt)
!> @brief time parameters setup
! ----------------------------------------------------------------------------
real, intent(out) :: time_begin, time_end, dt
! ----------------------------------------------------------------------------
time_begin = 0.0 * 3600.0
time_end = 4600.0 * 3600.0 !17520.0 * 3600.0
dt = 1.0
end subroutine set_time
! --------------------------------------------------------------------------------
subroutine set_forcing
!> @brief forcing setup
! ----------------------------------------------------------------------------
use obl_fluxes
use obl_tforcing
! ----------------------------------------------------------------------------
!< setting atmospheric forcing
! ----------------------------------------------------------------------------
!< using 'flux' mode
is_meteo_setup = 0
call set_external_tforcing(sensible_hflux_surf, 'meteo-forcing/'//trim(path)//'sensible_hflux.dat')
call set_external_tforcing(latent_hflux_surf, 'meteo-forcing/'//trim(path)//'latent_hflux.dat')
call set_const_tforcing(salin_flux_surf, 0.0)
call set_external_tforcing(tau_x_surf, 'meteo-forcing/'//trim(path)//'tau-x.dat')
call set_external_tforcing(tau_y_surf, 'meteo-forcing/'//trim(path)//'tau-y.dat')
call set_external_tforcing(sw_flux_surf, 'meteo-forcing/'//trim(path)//'SW-down.dat')
call set_external_tforcing(lw_in_surf, 'meteo-forcing/'//trim(path)//'LW-down.dat')
!< normalize time in external forcing: hrs -> sec
call normalize_time_tforcing(sensible_hflux_surf, 3600.0)
call normalize_time_tforcing(latent_hflux_surf, 3600.0)
call normalize_time_tforcing(tau_x_surf, 3600.0)
call normalize_time_tforcing(tau_y_surf, 3600.0)
call normalize_time_tforcing(sw_flux_surf, 3600.0)
call normalize_time_tforcing(lw_in_surf, 3600.0)
! ----------------------------------------------------------------------------
!< setting bottom forcing
! ----------------------------------------------------------------------------
call set_const_tforcing(hflux_bot, 0.0)
call set_const_tforcing(salin_flux_bot, 0.0)
call set_const_tforcing(tau_x_bot, 0.0)
call set_const_tforcing(tau_y_bot, 0.0)
! ----------------------------------------------------------------------------
end subroutine set_forcing
! --------------------------------------------------------------------------------
subroutine set_initial_conditions(grid)
!> @brief initial_conditions setup
! ----------------------------------------------------------------------------
use obl_state
use obl_init
use obl_grid
type (gridDataType), intent(in) :: grid
! ----------------------------------------------------------------------------
call set_external_profile(Theta, 'meteo-init/'//trim(path)//'Theta.dat', grid)
call set_external_profile(Salin, 'meteo-init/'//trim(path)//'Salin.dat', grid)
call set_const_profile(U, 0.0, grid)
call set_const_profile(V, 0.0, grid)
end subroutine set_initial_conditions
end module
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment