SCALE-RM
Functions/Subroutines
scale_ocean_dyn_offline Module Reference

module ocean / dynamics / offline More...

Functions/Subroutines

subroutine, public ocean_dyn_offline_setup
 Setup. More...
 
subroutine, public ocean_dyn_offline (OKMAX, OKS, OKE, OIA, OIS, OIE, OJA, OJS, OJE, calc_flag, dt, NOWDAYSEC, OCEAN_TEMP)
 Slab ocean model. More...
 

Detailed Description

module ocean / dynamics / offline

Description
ocean offline model
Author
Team SCALE
NAMELIST
  • PARAM_OCEAN_DYN_OFFLINE
    nametypedefault valuecomment
    OCEAN_DYN_OFFLINE_BASENAME character(len=H_LONG), dimension(FILE_EXTERNAL_INPUT_FILE_LIMIT) ''
    OCEAN_DYN_OFFLINE_ENABLE_PERIODIC_YEAR logical .false.
    OCEAN_DYN_OFFLINE_ENABLE_PERIODIC_MONTH logical .false.
    OCEAN_DYN_OFFLINE_ENABLE_PERIODIC_DAY logical .false.
    OCEAN_DYN_OFFLINE_STEP_FIXED integer 0
    OCEAN_DYN_OFFLINE_OFFSET real(RP) 0.0_RP
    OCEAN_DYN_OFFLINE_DEFVAL real(RP) = UNDEF
    OCEAN_DYN_OFFLINE_CHECK_COORDINATES logical .true.
    OCEAN_DYN_OFFLINE_STEP_LIMIT integer 0

History Output
No history output

Function/Subroutine Documentation

◆ ocean_dyn_offline_setup()

subroutine, public scale_ocean_dyn_offline::ocean_dyn_offline_setup ( )

Setup.

Definition at line 48 of file scale_ocean_dyn_offline.F90.

References scale_const::const_undef, scale_file_external_input::file_external_input_file_limit, scale_file_external_input::file_external_input_regist(), scale_io::io_fid_conf, and scale_prc::prc_abort().

Referenced by mod_ocean_driver::ocean_driver_setup().

48  use scale_prc, only: &
49  prc_abort
50  use scale_const, only: &
51  undef => const_undef
52  use scale_file_external_input, only: &
55  implicit none
56 
57  character(len=H_LONG) :: ocean_dyn_offline_basename(file_external_input_file_limit) = ''
58  logical :: ocean_dyn_offline_enable_periodic_year = .false.
59  logical :: ocean_dyn_offline_enable_periodic_month = .false.
60  logical :: ocean_dyn_offline_enable_periodic_day = .false.
61  integer :: ocean_dyn_offline_step_fixed = 0
62  real(RP) :: ocean_dyn_offline_offset = 0.0_rp
63  real(RP) :: ocean_dyn_offline_defval != UNDEF
64  logical :: ocean_dyn_offline_check_coordinates = .true.
65  integer :: ocean_dyn_offline_step_limit = 0
66 
67  namelist / param_ocean_dyn_offline / &
68  ocean_dyn_offline_basename, &
69  ocean_dyn_offline_enable_periodic_year, &
70  ocean_dyn_offline_enable_periodic_month, &
71  ocean_dyn_offline_enable_periodic_day, &
72  ocean_dyn_offline_step_fixed, &
73  ocean_dyn_offline_offset, &
74  ocean_dyn_offline_defval, &
75  ocean_dyn_offline_check_coordinates, &
76  ocean_dyn_offline_step_limit
77 
78  integer :: ierr
79  !---------------------------------------------------------------------------
80 
81  log_newline
82  log_info("OCEAN_DYN_OFFLINE_setup",*) 'Setup'
83 
84  ocean_dyn_offline_defval = undef
85 
86  !--- read namelist
87  rewind(io_fid_conf)
88  read(io_fid_conf,nml=param_ocean_dyn_offline,iostat=ierr)
89  if( ierr < 0 ) then !--- missing
90  log_info("OCEAN_DYN_OFFLINE_setup",*) 'Not found namelist. Default used.'
91  elseif( ierr > 0 ) then !--- fatal error
92  log_error("OCEAN_DYN_OFFLINE_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_DYN_OFFLINE. Check!'
93  call prc_abort
94  endif
95  log_nml(param_ocean_dyn_offline)
96 
97  log_info("OCEAN_DYN_OFFLINE_setup",*) 'Use offline ocean'
98 
99  if ( ocean_dyn_offline_basename(1) == '' ) then
100  log_error("OCEAN_DYN_OFFLINE_setup",*) 'OCEAN_DYN_OFFLINE_basename is necessary !!'
101  call prc_abort
102  endif
103 
104  call file_external_input_regist( ocean_dyn_offline_basename(:), & ! [IN]
105  'OCEAN_TEMP', & ! [IN]
106  'OXY', & ! [IN]
107  ocean_dyn_offline_enable_periodic_year, & ! [IN]
108  ocean_dyn_offline_enable_periodic_month, & ! [IN]
109  ocean_dyn_offline_enable_periodic_day, & ! [IN]
110  ocean_dyn_offline_step_fixed, & ! [IN]
111  ocean_dyn_offline_offset, & ! [IN]
112  ocean_dyn_offline_defval, & ! [IN]
113  ocean_dyn_offline_check_coordinates, & ! [IN]
114  ocean_dyn_offline_step_limit ) ! [IN]
115 
116  return
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
module file / external_input
subroutine, public file_external_input_regist(basename, varname, axistype, enable_periodic_year, enable_periodic_month, enable_periodic_day, step_fixed, offset, defval, check_coordinates, step_limit, exist)
Regist data.
real(rp), public const_undef
Definition: scale_const.F90:41
integer, parameter, public file_external_input_file_limit
limit of file (for one item)
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
module CONSTANT
Definition: scale_const.F90:11
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ocean_dyn_offline()

subroutine, public scale_ocean_dyn_offline::ocean_dyn_offline ( integer, intent(in)  OKMAX,
integer, intent(in)  OKS,
integer, intent(in)  OKE,
integer, intent(in)  OIA,
integer, intent(in)  OIS,
integer, intent(in)  OIE,
integer, intent(in)  OJA,
integer, intent(in)  OJS,
integer, intent(in)  OJE,
logical, dimension (oia,oja), intent(in)  calc_flag,
real(dp), intent(in)  dt,
real(dp), intent(in)  NOWDAYSEC,
real(rp), dimension(okmax,oia,oja), intent(inout)  OCEAN_TEMP 
)

Slab ocean model.

Definition at line 128 of file scale_ocean_dyn_offline.F90.

References scale_prc::prc_abort().

Referenced by mod_ocean_driver::ocean_driver_update().

128  use scale_prc, only: &
129  prc_abort
130  use scale_file_external_input, only: &
131  file_external_input_update
132  implicit none
133 
134  integer, intent(in) :: okmax, oks, oke
135  integer, intent(in) :: oia, ois, oie
136  integer, intent(in) :: oja, ojs, oje
137  logical, intent(in) :: calc_flag (oia,oja) ! to decide calculate or not
138  real(DP), intent(in) :: dt
139  real(DP), intent(in) :: nowdaysec
140  real(RP), intent(inout) :: ocean_temp(okmax,oia,oja)
141 
142  real(RP) :: ocean_temp_ref(okmax,oia,oja)
143 
144  logical :: error
145  integer :: i, j
146  !---------------------------------------------------------------------------
147 
148  log_progress(*) 'ocean / dynamics / offline'
149 
150  call file_external_input_update( 'OCEAN_TEMP', nowdaysec, ocean_temp_ref(:,:,:), error )
151 
152  if ( error ) then
153  log_error("OCEAN_DYN_OFFLINE",*) 'Requested data is not found!'
154  call prc_abort
155  endif
156 
157  do j = ojs, oje
158  do i = ois, oie
159  if ( calc_flag(i,j) ) then
160  ocean_temp(oks,i,j) = ocean_temp_ref(oks,i,j)
161  endif
162  enddo
163  enddo
164 
165  return
module file / external_input
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
Here is the call graph for this function:
Here is the caller graph for this function: