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) ''
    OCEAN_DYN_OFFLINE_BASENAME_ADD_NUM logical .false.
    OCEAN_DYN_OFFLINE_NUMBER_OF_FILES integer 1
    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.

48  use scale_prc, only: &
49  prc_abort
50  use scale_const, only: &
51  undef => const_undef
52  use scale_file_external_input, only: &
54  implicit none
55 
56  character(len=H_LONG) :: OCEAN_DYN_OFFLINE_basename = ''
57  logical :: OCEAN_DYN_OFFLINE_basename_add_num = .false.
58  integer :: OCEAN_DYN_OFFLINE_number_of_files = 1
59  logical :: OCEAN_DYN_OFFLINE_enable_periodic_year = .false.
60  logical :: OCEAN_DYN_OFFLINE_enable_periodic_month = .false.
61  logical :: OCEAN_DYN_OFFLINE_enable_periodic_day = .false.
62  integer :: OCEAN_DYN_OFFLINE_step_fixed = 0
63  real(RP) :: OCEAN_DYN_OFFLINE_offset = 0.0_rp
64  real(RP) :: OCEAN_DYN_OFFLINE_defval != UNDEF
65  logical :: OCEAN_DYN_OFFLINE_check_coordinates = .true.
66  integer :: OCEAN_DYN_OFFLINE_step_limit = 0
67 
68  namelist / param_ocean_dyn_offline / &
69  ocean_dyn_offline_basename, &
70  ocean_dyn_offline_basename_add_num, &
71  ocean_dyn_offline_number_of_files, &
72  ocean_dyn_offline_enable_periodic_year, &
73  ocean_dyn_offline_enable_periodic_month, &
74  ocean_dyn_offline_enable_periodic_day, &
75  ocean_dyn_offline_step_fixed, &
76  ocean_dyn_offline_offset, &
77  ocean_dyn_offline_defval, &
78  ocean_dyn_offline_check_coordinates, &
79  ocean_dyn_offline_step_limit
80 
81  integer :: ierr
82  !---------------------------------------------------------------------------
83 
84  log_newline
85  log_info("OCEAN_DYN_OFFLINE_setup",*) 'Setup'
86 
87  ocean_dyn_offline_defval = undef
88 
89  !--- read namelist
90  rewind(io_fid_conf)
91  read(io_fid_conf,nml=param_ocean_dyn_offline,iostat=ierr)
92  if( ierr < 0 ) then !--- missing
93  log_info("OCEAN_DYN_OFFLINE_setup",*) 'Not found namelist. Default used.'
94  elseif( ierr > 0 ) then !--- fatal error
95  log_error("OCEAN_DYN_OFFLINE_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_DYN_OFFLINE. Check!'
96  call prc_abort
97  endif
98  log_nml(param_ocean_dyn_offline)
99 
100  log_info("OCEAN_DYN_OFFLINE_setup",*) 'Use offline ocean'
101 
102  if ( ocean_dyn_offline_basename == '' ) then
103  log_error("OCEAN_DYN_OFFLINE_setup",*) 'OCEAN_DYN_OFFLINE_basename is necessary !!'
104  call prc_abort
105  endif
106 
107  call file_external_input_regist( ocean_dyn_offline_basename, & ! [IN]
108  ocean_dyn_offline_basename_add_num, & ! [IN]
109  ocean_dyn_offline_number_of_files, & ! [IN]
110  'OCEAN_TEMP', & ! [IN]
111  'OXY', & ! [IN]
112  ocean_dyn_offline_enable_periodic_year, & ! [IN]
113  ocean_dyn_offline_enable_periodic_month, & ! [IN]
114  ocean_dyn_offline_enable_periodic_day, & ! [IN]
115  ocean_dyn_offline_step_fixed, & ! [IN]
116  ocean_dyn_offline_offset, & ! [IN]
117  ocean_dyn_offline_defval, & ! [IN]
118  check_coordinates = ocean_dyn_offline_check_coordinates, & ! [IN]
119  step_limit = ocean_dyn_offline_step_limit ) ! [IN]
120 
121  return

References scale_const::const_undef, 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().

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 133 of file scale_ocean_dyn_offline.F90.

133  use scale_prc, only: &
134  prc_abort
135  use scale_file_external_input, only: &
136  file_external_input_update
137  implicit none
138 
139  integer, intent(in) :: OKMAX, OKS, OKE
140  integer, intent(in) :: OIA, OIS, OIE
141  integer, intent(in) :: OJA, OJS, OJE
142  logical, intent(in) :: calc_flag (OIA,OJA) ! to decide calculate or not
143  real(DP), intent(in) :: dt
144  real(DP), intent(in) :: NOWDAYSEC
145  real(RP), intent(inout) :: OCEAN_TEMP(OKMAX,OIA,OJA)
146 
147  real(RP) :: OCEAN_TEMP_ref(OKMAX,OIA,OJA)
148 
149  logical :: error
150  integer :: i, j
151  !---------------------------------------------------------------------------
152 
153  log_progress(*) 'ocean / dynamics / offline'
154 
155  call file_external_input_update( 'OCEAN_TEMP', nowdaysec, ocean_temp_ref(:,:,:), error )
156 
157  if ( error ) then
158  log_error("OCEAN_DYN_OFFLINE",*) 'Requested data is not found!'
159  call prc_abort
160  endif
161 
162  do j = ojs, oje
163  do i = ois, oie
164  if ( calc_flag(i,j) ) then
165  ocean_temp(oks,i,j) = ocean_temp_ref(oks,i,j)
166  endif
167  enddo
168  enddo
169 
170  return

References scale_prc::prc_abort().

Referenced by mod_ocean_driver::ocean_driver_update().

Here is the call graph for this function:
Here is the caller graph for this function:
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_file_external_input::file_external_input_regist
subroutine, public file_external_input_regist(basename, basename_add_num, number_of_files, varname, axistype, enable_periodic_year, enable_periodic_month, enable_periodic_day, step_fixed, offset, defval, check_coordinates, aggregate, allow_missing, step_limit, exist)
Regist data.
Definition: scale_file_external_input.F90:324
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_file_external_input
module file / external_input
Definition: scale_file_external_input.F90:12