SCALE-RM
Functions/Subroutines | Variables
scale_ocean_grid_cartesc Module Reference

module ocean / grid / cartesianC More...

Functions/Subroutines

subroutine, public ocean_grid_cartesc_setup
 Setup. More...
 

Variables

real(rp), dimension(:), allocatable, public ocean_grid_cartesc_cz
 center coordinate [m]: z, local=global More...
 
real(rp), dimension(:), allocatable, public ocean_grid_cartesc_fz
 face coordinate [m]: z, local=global More...
 
real(rp), dimension(:), allocatable, public ocean_grid_cartesc_cdz
 z-length of control volume [m] More...
 

Detailed Description

module ocean / grid / cartesianC

Description
Grid module for cartesian coordinate for ocean
Author
Team SCALE
NAMELIST
  • PARAM_OCEAN_GRID_CARTESC
    nametypedefault valuecomment
    OCEAN_GRID_CARTESC_IN_BASENAME character(len=H_LONG) ''
    OCEAN_GRID_CARTESC_IN_AGGREGATE logical
    ODZ real(RP), dimension(ODZ_MAX) layer thickness for input

History Output
No history output

Function/Subroutine Documentation

◆ ocean_grid_cartesc_setup()

subroutine, public scale_ocean_grid_cartesc::ocean_grid_cartesc_setup

Setup.

Definition at line 61 of file scale_ocean_grid_cartesC.F90.

61  use scale_prc, only: &
62  prc_abort
63  use scale_file, only: &
64  file_aggregate
65  implicit none
66 
67  namelist / param_ocean_grid_cartesc / &
68  ocean_grid_cartesc_in_basename, &
69  ocean_grid_cartesc_in_aggregate, &
70  odz
71 
72  integer :: ierr
73  integer :: k
74  !---------------------------------------------------------------------------
75 
76  log_newline
77  log_info("OCEAN_GRID_CARTESC_setup",*) 'Setup'
78 
79  if ( okmax < 1 ) then
80  log_info("OCEAN_GRID_CARTESC_setup",*) 'Skip because OKMAX < 1'
81  return
82  end if
83 
84  odz(:) = 10.0_rp
85 
86  ocean_grid_cartesc_in_aggregate = file_aggregate
87 
88  !--- read namelist
89  rewind(io_fid_conf)
90  read(io_fid_conf,nml=param_ocean_grid_cartesc,iostat=ierr)
91  if( ierr < 0 ) then !--- missing
92  log_info("OCEAN_GRID_CARTESC_setup",*) 'Not found namelist. Default used.'
93  elseif( ierr > 0 ) then !--- fatal error
94  log_error("OCEAN_GRID_CARTESC_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_GRID_CARTESC. Check!'
95  call prc_abort
96  endif
97  log_nml(param_ocean_grid_cartesc)
98 
99  allocate( ocean_grid_cartesc_cz(oks :oke) )
100  allocate( ocean_grid_cartesc_fz(oks-1:oke) )
101  allocate( ocean_grid_cartesc_cdz(oks :oke) )
102 
103  log_newline
104  log_info("OCEAN_GRID_CARTESC_setup",*) 'Ocean grid information '
105 
106  if ( ocean_grid_cartesc_in_basename /= '' ) then
107  call ocean_grid_cartesc_read
108  else
109  log_info("OCEAN_GRID_CARTESC_setup",*) 'Not found input grid file. Grid position is calculated.'
110 
111  call ocean_grid_cartesc_generate
112  endif
113 
114  if ( oke == oks ) then
115  log_newline
116  log_info("OCEAN_GRID_CARTESC_setup",*) 'Single layer. ODZ = ', ocean_grid_cartesc_cdz(1)
117  else
118  log_newline
119  log_info("OCEAN_GRID_CARTESC_setup",'(1x,A)') 'Vertical Coordinate'
120  log_info_cont('(1x,A)') '| k z zh dz k |'
121  log_info_cont('(1x,A)') '| [m] [m] [m] |'
122  k = oks-1
123  log_info_cont('(1x,A,F8.3,A,I4,A)') '| ',ocean_grid_cartesc_fz(k),' ',k,' | Atmosphere interface'
124  do k = oks, oke-1
125  log_info_cont('(1x,A,I4,F8.3,A,F8.3,A)') '|',k,ocean_grid_cartesc_cz(k),' ',ocean_grid_cartesc_cdz(k),' | '
126  log_info_cont('(1x,A,F8.3,A,I4,A)') '| ',ocean_grid_cartesc_fz(k),' |',k,' | '
127  enddo
128  k = oke
129  log_info_cont('(1x,A,I4,F8.3,A,F8.3,A)') '|',k,ocean_grid_cartesc_cz(k),' ',ocean_grid_cartesc_cdz(k),' | '
130  log_info_cont('(1x,A,F8.3,A,I4,A)') '| ',ocean_grid_cartesc_fz(k),' ',k,' | layer of no motion'
131  log_info_cont('(1x,A)') '|=================================|'
132  endif
133 
134  return

References scale_file::file_aggregate, scale_file::file_open(), scale_io::io_fid_conf, ocean_grid_cartesc_cdz, ocean_grid_cartesc_cz, ocean_grid_cartesc_fz, scale_ocean_grid_cartesc_index::oka, scale_ocean_grid_cartesc_index::oke, scale_ocean_grid_cartesc_index::okmax, scale_ocean_grid_cartesc_index::oks, scale_prc::prc_abort(), and scale_prc::prc_myrank.

Referenced by mod_rm_driver::rm_driver(), and mod_rm_prep::rm_prep().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ocean_grid_cartesc_cz

real(rp), dimension (:), allocatable, public scale_ocean_grid_cartesc::ocean_grid_cartesc_cz

center coordinate [m]: z, local=global

Definition at line 35 of file scale_ocean_grid_cartesC.F90.

35  real(RP), public, allocatable :: OCEAN_GRID_CARTESC_CZ (:)

Referenced by scale_file_cartesc::file_cartesc_set_coordinates_urban(), scale_file_cartesc::file_cartesc_write_axes(), scale_file_history_cartesc::file_history_cartesc_truncate_3d(), and ocean_grid_cartesc_setup().

◆ ocean_grid_cartesc_fz

real(rp), dimension (:), allocatable, public scale_ocean_grid_cartesc::ocean_grid_cartesc_fz

face coordinate [m]: z, local=global

Definition at line 36 of file scale_ocean_grid_cartesC.F90.

36  real(RP), public, allocatable :: OCEAN_GRID_CARTESC_FZ (:)

Referenced by scale_file_cartesc::file_cartesc_write_axes(), scale_file_history_cartesc::file_history_cartesc_truncate_3d(), and ocean_grid_cartesc_setup().

◆ ocean_grid_cartesc_cdz

real(rp), dimension(:), allocatable, public scale_ocean_grid_cartesc::ocean_grid_cartesc_cdz
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_ocean_grid_cartesc::ocean_grid_cartesc_cz
real(rp), dimension(:), allocatable, public ocean_grid_cartesc_cz
center coordinate [m]: z, local=global
Definition: scale_ocean_grid_cartesC.F90:35
scale_file
module file
Definition: scale_file.F90:15
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_ocean_grid_cartesc::ocean_grid_cartesc_fz
real(rp), dimension(:), allocatable, public ocean_grid_cartesc_fz
face coordinate [m]: z, local=global
Definition: scale_ocean_grid_cartesC.F90:36
scale_ocean_grid_cartesc::ocean_grid_cartesc_cdz
real(rp), dimension(:), allocatable, public ocean_grid_cartesc_cdz
z-length of control volume [m]
Definition: scale_ocean_grid_cartesC.F90:37