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...
 
subroutine, public ocean_grid_cartesc_finalize
 Finalize. 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 62 of file scale_ocean_grid_cartesC.F90.

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

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

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:

◆ ocean_grid_cartesc_finalize()

subroutine, public scale_ocean_grid_cartesc::ocean_grid_cartesc_finalize

Finalize.

Definition at line 144 of file scale_ocean_grid_cartesC.F90.

144  implicit none
145  !---------------------------------------------------------------------------
146 
147  log_newline
148  log_info("OCEAN_GRID_CARTESC_finalize",*) 'Finalize'
149 
150  !$acc exit data delete(OCEAN_GRID_CARTESC_CZ,OCEAN_GRID_CARTESC_FZ,OCEAN_GRID_CARTESC_CDZ)
151  deallocate( ocean_grid_cartesc_cz )
152  deallocate( ocean_grid_cartesc_fz )
153  deallocate( ocean_grid_cartesc_cdz )
154 
155  return

References scale_file::file_open(), 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::oks, 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

◆ 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 37 of file scale_ocean_grid_cartesC.F90.

37  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(), ocean_grid_cartesc_finalize(), 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:350
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:36
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:37
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:38
scale_file::file_aggregate
logical, public file_aggregate
Definition: scale_file.F90:196