SCALE-RM
Functions/Subroutines | Variables
mod_mktopo Module Reference

module MKTOPO More...

Functions/Subroutines

subroutine, public mktopo_setup
 Setup. More...
 
subroutine, public mktopo
 Driver. More...
 

Variables

integer, public mktopo_type = -1
 
integer, parameter, public i_ignore = 0
 
integer, parameter, public i_flat = 1
 
integer, parameter, public i_bellshape = 2
 
integer, parameter, public i_schaer = 3
 

Detailed Description

module MKTOPO

Description
subroutines for preparing topography data (ideal case)
Author
Team SCALE
History
  • 2012-12-26 (H.Yashiro) [new]
NAMELIST
  • PARAM_MKTOPO
    nametypedefault valuecomment
    MKTOPO_NAME character(len=H_SHORT) 'NONE'

  • PARAM_MKTOPO_FLAT
    nametypedefault valuecomment
    FLAT_HEIGHT real(RP) 100.0_RP height of mountain [m]

  • PARAM_MKTOPO_BELLSHAPE
    nametypedefault valuecomment
    BELL_EACHNODE logical .false. Arrange mountain at each node? [kg/kg]
    BELL_CX real(RP) 2.E3_RP center location [m]: x
    BELL_CY real(RP) 2.E3_RP center location [m]: y
    BELL_RX real(RP) 2.E3_RP bubble radius [m]: x
    BELL_RY real(RP) 2.E3_RP bubble radius [m]: y
    BELL_HEIGHT real(RP) 100.0_RP height of mountain [m]

  • PARAM_MKTOPO_SCHAER
    nametypedefault valuecomment
    SCHAER_CX real(RP) 25.E3_RP center location [m]: x
    SCHAER_RX real(RP) 5.E3_RP bubble radius [m]: x
    SCHAER_LAMBDA real(RP) 4.E3_RP wavelength of wavelike perturbation [m]: x
    SCHAER_HEIGHT real(RP) 250.0_RP height of mountain [m]
    SCHAER_SWAPXY logical .false.

History Output
No history output

Function/Subroutine Documentation

◆ mktopo_setup()

subroutine, public mod_mktopo::mktopo_setup ( )

Setup.

Definition at line 70 of file mod_mktopo.f90.

References i_bellshape, i_flat, i_ignore, i_schaer, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_l, scale_stdio::io_lnml, mktopo_type, and scale_process::prc_mpistop().

Referenced by mod_rm_prep::scalerm_prep().

70  implicit none
71 
72  character(len=H_SHORT) :: mktopo_name = 'NONE'
73 
74  namelist / param_mktopo / &
75  mktopo_name
76 
77  integer :: ierr
78  !---------------------------------------------------------------------------
79 
80  if( io_l ) write(io_fid_log,*)
81  if( io_l ) write(io_fid_log,*) '++++++ Module[make topo] / Categ[preprocess] / Origin[SCALE-RM]'
82 
83  !--- read namelist
84  rewind(io_fid_conf)
85  read(io_fid_conf,nml=param_mktopo,iostat=ierr)
86  if( ierr < 0 ) then !--- missing
87  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
88  elseif( ierr > 0 ) then !--- fatal error
89  write(*,*) 'xxx Not appropriate names in namelist PARAM_MKTOPO. Check!'
90  call prc_mpistop
91  endif
92  if( io_lnml ) write(io_fid_log,nml=param_mktopo)
93 
94  select case(mktopo_name)
95  case('NONE')
96  mktopo_type = i_ignore
97  case('FLAT')
98  mktopo_type = i_flat
99  case('BELLSHAPE')
100  mktopo_type = i_bellshape
101  case('SCHAER')
102  mktopo_type = i_schaer
103  case default
104  write(*,*) ' xxx Unsupported TYPE:', trim(mktopo_name)
105  call prc_mpistop
106  endselect
107 
108  return
subroutine, public prc_mpistop
Abort MPI.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mktopo()

subroutine, public mod_mktopo::mktopo ( )

Driver.

Definition at line 114 of file mod_mktopo.f90.

References scale_const::const_pi, i_bellshape, i_flat, i_ignore, i_schaer, scale_grid_index::ia, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_l, scale_stdio::io_lnml, scale_grid_index::is, scale_grid_index::ja, scale_grid_index::js, mktopo_type, scale_process::prc_mpistop(), scale_topography::topo_write(), and scale_topography::topo_zsfc.

Referenced by mod_rm_prep::scalerm_prep().

114  use scale_topography, only: &
115  topo_write
116  implicit none
117  !---------------------------------------------------------------------------
118 
119  if ( mktopo_type == i_ignore ) then
120  if( io_l ) write(io_fid_log,*)
121  if( io_l ) write(io_fid_log,*) '++++++ SKIP MAKING TOPOGRAPHY DATA ++++++'
122  else
123  if( io_l ) write(io_fid_log,*)
124  if( io_l ) write(io_fid_log,*) '++++++ START MAKING TOPOGRAPHY DATA ++++++'
125 
126  select case(mktopo_type)
127  case(i_flat)
128  call mktopo_flat
129 
130  case(i_bellshape)
131  call mktopo_bellshape
132 
133  case(i_schaer)
134  call mktopo_schaer
135 
136  case default
137  write(*,*) ' xxx Unsupported TYPE:', mktopo_type
138  call prc_mpistop
139  endselect
140 
141  if( io_l ) write(io_fid_log,*) '++++++ END MAKING TOPOGRAPHY DATA ++++++'
142 
143  ! output topography file
144  call topo_write
145  endif
146 
147  return
subroutine, public topo_write
Write topography.
subroutine, public prc_mpistop
Abort MPI.
module TOPOGRAPHY
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ mktopo_type

integer, public mod_mktopo::mktopo_type = -1

Definition at line 46 of file mod_mktopo.f90.

Referenced by mktopo(), and mktopo_setup().

46  integer, public :: mktopo_type = -1

◆ i_ignore

integer, parameter, public mod_mktopo::i_ignore = 0

Definition at line 47 of file mod_mktopo.f90.

Referenced by mktopo(), and mktopo_setup().

47  integer, public, parameter :: i_ignore = 0

◆ i_flat

integer, parameter, public mod_mktopo::i_flat = 1

Definition at line 48 of file mod_mktopo.f90.

Referenced by mktopo(), and mktopo_setup().

48  integer, public, parameter :: i_flat = 1

◆ i_bellshape

integer, parameter, public mod_mktopo::i_bellshape = 2

Definition at line 49 of file mod_mktopo.f90.

Referenced by mktopo(), and mktopo_setup().

49  integer, public, parameter :: i_bellshape = 2

◆ i_schaer

integer, parameter, public mod_mktopo::i_schaer = 3

Definition at line 50 of file mod_mktopo.f90.

Referenced by mktopo(), and mktopo_setup().

50  integer, public, parameter :: i_schaer = 3