SCALE-RM
Functions/Subroutines | Variables
mod_mkinit Module Reference

module INITIAL More...

Functions/Subroutines

subroutine, public mkinit_setup
 Setup. More...
 
subroutine, public mkinit
 Driver. More...
 
subroutine rect_setup
 Bubble. More...
 
real(rp) function faero (f0, r0, x, alpha, rhoa)
 
subroutine flux_setup
 flux setup More...
 
subroutine land_setup
 Land setup. More...
 
subroutine ocean_setup
 Ocean setup. More...
 
subroutine urban_setup
 Urban setup. More...
 
subroutine tke_setup
 TKE setup. More...
 
subroutine read_sounding (DENS, VELX, VELY, POTT, QV)
 Read sounding data from file. More...
 
subroutine interporation_fact (fact0, fact1, idx0, idx1, x, x_org, nx, loop)
 

Variables

integer, public mkinit_type = -1
 
integer, parameter, public i_ignore = 0
 
integer, parameter, public i_planestate = 1
 
integer, parameter, public i_tracerbubble = 2
 
integer, parameter, public i_coldbubble = 3
 
integer, parameter, public i_lambwave = 4
 
integer, parameter, public i_gravitywave = 5
 
integer, parameter, public i_khwave = 6
 
integer, parameter, public i_turbulence = 7
 
integer, parameter, public i_mountainwave = 8
 
integer, parameter, public i_warmbubble = 9
 
integer, parameter, public i_supercell = 10
 
integer, parameter, public i_squallline = 11
 
integer, parameter, public i_wk1982 = 12
 
integer, parameter, public i_dycoms2_rf01 = 13
 
integer, parameter, public i_dycoms2_rf02 = 14
 
integer, parameter, public i_rico = 15
 
integer, parameter, public i_interporation = 16
 
integer, parameter, public i_landcouple = 17
 
integer, parameter, public i_oceancouple = 18
 
integer, parameter, public i_urbancouple = 19
 
integer, parameter, public i_triplecouple = 20
 
integer, parameter, public i_bubblecouple = 21
 
integer, parameter, public i_seabreeze = 22
 
integer, parameter, public i_heatisland = 23
 
integer, parameter, public i_dycoms2_rf02_dns = 24
 
integer, parameter, public i_real = 25
 
integer, parameter, public i_grayzone = 26
 
integer, parameter, public i_boxaero = 27
 
integer, parameter, public i_warmbubbleaero = 28
 
integer, parameter, public i_cavityflow = 29
 
integer, parameter, public i_barocwave = 30
 
integer, parameter, public i_bomex = 31
 

Detailed Description

module INITIAL

Description
subroutines for preparing initial data
Author
Team SCALE
History
  • 2011-11-11 (H.Yashiro) [new] Imported from SCALE-RM ver.2
  • 2012-01-31 (Y.Miyamoto) [add] Lamb wave test
  • 2012-01-31 (Y.Miyamoto) [add] KH wave test
  • 2012-01-31 (Y.Miyamoto) [add] turbulence test
  • 2011-02-01 (H.Yashiro) [add] supercell test, follow the supercell test of WRF
  • 2012-02-06 (Y.Miyamoto) [add] advection test
  • 2012-02-16 (Y.Miyamoto) [mod] added hydrostatic balance calculation
  • 2012-03-27 (H.Yashiro) [mod] change subroutines into one module
  • 2012-04-04 (Y.Miyamoto) [new] SQUALLINE test, for GCSS model comparison (Redelsperger et al. 2000)
  • 2012-04-06 (H.Yashiro) [new] uniform state test
  • 2012-04-08 (H.Yashiro) [mod] merge all init programs
  • 2012-06-13 (Y.Sato) [mod] add hbinw option (***HBINW)
  • 2013-02-25 (H.Yashiro) [mod] ISA profile
  • 2014-03-27 (A.Noda) [mod] add DYCOMS2_RF02_DNS
  • 2014-04-28 (R.Yoshida) [add] real case experiment
  • 2014-08-26 (A.Noda) [mod] add GRAYZONE
  • 2015-03-27 (Y.Sato) [mod] add Box aero
  • 2015-04-30 (Y.Sato) [mod] add WARMBUBBLE-AERO
NAMELIST
  • PARAM_MKINIT
    nametypedefault valuecomment
    MKINIT_INITNAME character(len=H_SHORT) 'NONE'
    FLG_INTRP logical .false.

  • PARAM_BUBBLE
    nametypedefault valuecomment
    BBL_EACHNODE logical .false. Arrange bubble at each node? [kg/kg]
    BBL_CZ real(RP) 2.E3_RP center location [m]: z
    BBL_CX real(RP) 2.E3_RP center location [m]: x
    BBL_CY real(RP) 2.E3_RP center location [m]: y
    BBL_RZ real(RP) 0.0_RP bubble radius [m]: z
    BBL_RX real(RP) 0.0_RP bubble radius [m]: x
    BBL_RY real(RP) 0.0_RP bubble radius [m]: y

  • PARAM_RECT
    nametypedefault valuecomment
    RCT_EACHNODE logical .false. Arrange rectangle at each node? [kg/kg]
    RCT_CZ real(RP) 2.E3_RP center location [m]: z
    RCT_CX real(RP) 2.E3_RP center location [m]: x
    RCT_CY real(RP) 2.E3_RP center location [m]: y
    RCT_RZ real(RP) 2.E3_RP rectangle z width [m]: z
    RCT_RX real(RP) 2.E3_RP rectangle x width [m]: x
    RCT_RY real(RP) 2.E3_RP rectangle y width [m]: y

  • PARAM_AERO
    nametypedefault valuecomment
    M0_INIT real(RP) 0.0_RP initial total num. conc. of modes (Atk,Acm,Cor) [#/m3]
    DG_INIT real(RP) 80.e-9_RP initial number equivalen diameters of modes [m]
    SG_INIT real(RP) 1.6_RP initial standard deviation [-]
    D_MIN_INP real(RP), dimension(3) d_min_def
    D_MAX_INP real(RP), dimension(3) d_max_def
    K_MIN_INP real(RP), dimension(3) k_min_def
    K_MAX_INP real(RP), dimension(3) k_max_def
    N_KAP_INP integer, dimension(3) n_kap_def

  • PARAM_SBMAERO
    nametypedefault valuecomment
    F0_AERO real(RP) 1.E+7_RP
    R0_AERO real(RP) 1.E-7_RP
    R_MAX real(RP) 1.E-06_RP
    R_MIN real(RP) 1.E-08_RP
    A_ALPHA real(RP) 3.0_RP
    RHO_AERO real(RP) 2.25E+03_RP

  • PARAM_MKINIT_FLUX
    nametypedefault valuecomment
    FLX_RAIN real(RP) 0.0_RP surface rain flux [kg/m2/s]
    FLX_SNOW real(RP) 0.0_RP surface snow flux [kg/m2/s]
    FLX_LW_DN real(RP) 0.0_RP surface downwad long-wave radiation flux [J/m2/s]
    FLX_SW_DN real(RP) 0.0_RP surface downwad short-wave radiation flux [J/m2/s]

  • PARAM_MKINIT_LAND
    nametypedefault valuecomment
    LND_TEMP real(RP) soil temperature [K]
    LND_WATER real(RP) 0.15_RP soil moisture [m3/m3]
    SFC_TEMP real(RP) ocean skin temperature [K]
    SFC_ALBEDO_LW real(RP) 0.04_RP ocean surface albedo for LW (0-1)
    SFC_ALBEDO_SW real(RP) 0.05_RP ocean surface albedo for SW (0-1)

  • PARAM_MKINIT_OCEAN
    nametypedefault valuecomment
    OCN_TEMP real(RP) ocean temperature [K]
    SFC_TEMP real(RP) ocean skin temperature [K]
    SFC_ALBEDO_LW real(RP) 0.04_RP ocean surface albedo for LW (0-1)
    SFC_ALBEDO_SW real(RP) 0.05_RP ocean surface albedo for SW (0-1)
    SFC_Z0M real(RP) 1.0e-4_RP ocean surface roughness length (momentum) [m]
    SFC_Z0H real(RP) 1.0e-4_RP ocean surface roughness length (heat) [m]
    SFC_Z0E real(RP) 1.0e-4_RP ocean surface roughness length (vapor) [m]

  • PARAM_MKINIT_URBAN
    nametypedefault valuecomment
    URB_ROOF_TEMP real(RP) Surface temperature of roof [K]
    URB_BLDG_TEMP real(RP) Surface temperature of building [K
    URB_GRND_TEMP real(RP) Surface temperature of ground [K]
    URB_CNPY_TEMP real(RP) Diagnostic canopy air temperature
    URB_CNPY_HMDT real(RP) 0.0_RP Diagnostic canopy humidity [-]
    URB_CNPY_WIND real(RP) 0.0_RP Diagnostic canopy wind [m/s]
    URB_ROOF_LAYER_TEMP real(RP) temperature in layer of roof [K]
    URB_BLDG_LAYER_TEMP real(RP) temperature in layer of building [
    URB_GRND_LAYER_TEMP real(RP) temperature in layer of ground [K]
    URB_ROOF_RAIN real(RP) 0.0_RP temperature in layer of roof [K]
    URB_BLDG_RAIN real(RP) 0.0_RP temperature in layer of building [
    URB_GRND_RAIN real(RP) 0.0_RP temperature in layer of ground [K]
    URB_RUNOFF real(RP) 0.0_RP temperature in layer of ground [K]
    URB_SFC_TEMP real(RP) Grid average of surface temperature [K]
    URB_ALB_LW real(RP) 0.0_RP Grid average of surface albedo for LW (0-1)
    URB_ALB_SW real(RP) 0.0_RP Grid average of surface albedo for SW (0-1)

  • PARAM_MKINIT_TKE
    nametypedefault valuecomment
    TKE_CONST real(RP)

  • PARAM_MKINIT_SOUNDING
    nametypedefault valuecomment
    ENV_IN_SOUNDING_FILE character(len=H_LONG) ''

  • PARAM_MKINIT_PLANESTATE
    nametypedefault valuecomment
    SFC_THETA real(RP) surface potential temperature [K]
    SFC_PRES real(RP) surface pressure [Pa]
    SFC_RH real(RP) 80.0_RP surface relative humidity [%]
    ENV_THETA real(RP) potential temperature of environment [K]
    ENV_TLAPS real(RP) 4.E-3_RP Lapse rate of THETA [K/m]
    ENV_U real(RP) 0.0_RP velocity u of environment [m/s]
    ENV_V real(RP) 0.0_RP velocity v of environment [m/s]
    ENV_RH real(RP) 80.0_RP Relative Humidity of environment [%]
    RANDOM_THETA real(RP) 0.01_RP
    RANDOM_U real(RP) 0.0_RP amplitude of random disturbance u
    RANDOM_V real(RP) 0.0_RP amplitude of random disturbance v
    RANDOM_RH real(RP) 0.0_RP amplitude of random disturbance RH

  • PARAM_MKINIT_TRACERBUBBLE
    nametypedefault valuecomment
    SFC_THETA real(RP) surface potential temperature [K]
    SFC_PRES real(RP) surface pressure [Pa]
    ENV_THETA real(RP) potential temperature of environment [K]
    ENV_U real(RP) 0.0_RP velocity u of environment [m/s]
    ENV_V real(RP) 0.0_RP velocity v of environment [m/s]
    SHAPE_NC character(len=H_SHORT) 'BUBBLE' BUBBLE or RECT
    BBL_NC real(RP) 0.0_RP extremum of NC in bubble [kg/kg]

  • PARAM_MKINIT_COLDBUBBLE
    nametypedefault valuecomment
    SFC_THETA real(RP) surface potential temperature [K]
    SFC_PRES real(RP) surface pressure [Pa]
    ENV_THETA real(RP) potential temperature of environment [K]
    BBL_TEMP real(RP) -15.0_RP extremum of temperature in bubble [K]

  • PARAM_MKINIT_LAMBWAVE
    nametypedefault valuecomment
    SFC_PRES real(RP) surface pressure [Pa]
    ENV_U real(RP) 0.0_RP velocity u of environment [m/s]
    ENV_V real(RP) 0.0_RP velocity v of environment [m/s]
    ENV_TEMP real(RP) 300.0_RP temperature of environment [K]
    BBL_PRES real(RP) 100._RP extremum of pressure in bubble [Pa]

  • PARAM_MKINIT_GRAVITYWAVE
    nametypedefault valuecomment
    SFC_THETA real(RP) surface potential temperature [K]
    SFC_PRES real(RP) surface pressure [Pa]
    ENV_U real(RP) 0.0_RP velocity u of environment [m/s]
    ENV_V real(RP) 0.0_RP velocity v of environment [m/s]
    ENV_BVF real(RP) 0.01_RP Brunt Vaisala frequencies of environment [1/s]
    BBL_THETA real(RP) 1.0_RP extremum of temperature in bubble [K]

  • PARAM_MKINIT_KHWAVE
    nametypedefault valuecomment
    SFC_THETA real(RP) surface potential temperature [K]
    SFC_PRES real(RP) surface pressure [Pa]
    ENV_L1_ZTOP real(RP) 1.E3_RP top height of the layer1 (constant THETA) [m]
    ENV_L3_ZBOTTOM real(RP) 2100.0_RP bottom height of the layer3 (high THETA) [m]
    ENV_L1_THETA real(RP) 300.0_RP THETA in the layer1 (low THETA) [K]
    ENV_L3_THETA real(RP) 301.0_RP THETA in the layer3 (high THETA) [K]
    ENV_L1_U real(RP) 0.0_RP velocity u in the layer1 (low THETA) [K]
    ENV_L3_U real(RP) 20.0_RP velocity u in the layer3 (high THETA) [K]
    RANDOM_U real(RP) 0.0_RP amplitude of random disturbance u

  • PARAM_MKINIT_TURBULENCE
    nametypedefault valuecomment
    SFC_THETA real(RP) surface potential temperature [K]
    SFC_PRES real(RP) surface pressure [Pa]
    SFC_RH real(RP) 80.0_RP surface relative humidity [%]
    ENV_THETA real(RP) potential temperature of environment [K]
    ENV_TLAPS real(RP) 4.E-3_RP Lapse rate of THETA [K/m]
    ENV_U real(RP) 0.0_RP velocity u of environment [m/s]
    ENV_V real(RP) 0.0_RP velocity v of environment [m/s]
    ENV_RH real(RP) 80.0_RP Relative Humidity of environment [%]
    RANDOM_THETA real(RP) 0.01_RP
    RANDOM_U real(RP) 0.0_RP amplitude of random disturbance u
    RANDOM_V real(RP) 0.0_RP amplitude of random disturbance v
    RANDOM_RH real(RP) 0.0_RP amplitude of random disturbance RH

  • PARAM_MKINIT_CAVITYFLOW
    nametypedefault valuecomment
    ULID real(RP) 1.D01
    PRES0 real(RP) 1.D05
    REYNOLDS_NUM real(RP) 1.D03
    MACH_NUM real(RP) 3.D-2

  • PARAM_MKINIT_MOUNTAINWAVE
    nametypedefault valuecomment
    SFC_THETA real(RP) surface potential temperature [K]
    SFC_PRES real(RP) surface pressure [Pa]
    ENV_U real(RP) 0.0_RP velocity u of environment [m/s]
    ENV_V real(RP) 0.0_RP velocity v of environment [m/s]
    SCORER real(RP) 2.E-3_RP Scorer parameter (~=N/U) [1/m]
    BBL_NC real(RP) 0.0_RP extremum of NC in bubble [kg/kg]

  • PARAM_MKINIT_BAROCWAVE
    nametypedefault valuecomment
    REF_TEMP real(RP) 288.E0_RP The reference temperature [K]
    REF_PRES real(RP) 1.E5_RP The reference pressure [Pa]
    LAPSE_RATE real(RP) 5.E-3_RP The lapse rate [K/m]
    PHI0DEG real(RP) 45.E0_RP The central latitude [degree_north]
    U0 real(RP) 35.E0_RP The parameter associated with zonal jet maximum amplitude [m/s]
    B real(RP) 2.E0_RP The vertical half-width [1]
    UP real(RP) 1.E0_RP The maximum amplitude of zonal wind perturbation [m/s]
    LP real(RP) 600.E3_RP The width of Gaussian profile
    XC real(RP) 2000.E3_RP The center point (x) of inital perturbation
    YC real(RP) 2500.E3_RP The center point (y) of inital perturbation

  • PARAM_MKINIT_WARMBUBBLE
    nametypedefault valuecomment
    SFC_THETA real(RP) surface potential temperature [K]
    SFC_PRES real(RP) surface pressure [Pa]
    ENV_U real(RP) 0.0_RP velocity u of environment [m/s]
    ENV_V real(RP) 0.0_RP velocity v of environment [m/s]
    ENV_RH real(RP) 80.0_RP Relative Humidity of environment [%]
    ENV_L1_ZTOP real(RP) 1.E3_RP top height of the layer1 (constant THETA) [m]
    ENV_L2_ZTOP real(RP) 14.E3_RP top height of the layer2 (small THETA gradient) [m]
    ENV_L2_TLAPS real(RP) 4.E-3_RP Lapse rate of THETA in the layer2 (small THETA gradient) [K/m]
    ENV_L3_TLAPS real(RP) 3.E-2_RP Lapse rate of THETA in the layer3 (large THETA gradient) [K/m]
    BBL_THETA real(RP) 1.0_RP extremum of temperature in bubble [K]

  • PARAM_MKINIT_SUPERCELL
    nametypedefault valuecomment
    BBL_THETA real(RP) 1.0_RP extremum of temperature in bubble [K]

  • PARAM_MKINIT_SQUALLLINE
    nametypedefault valuecomment
    RANDOM_THETA real(RP) 0.01_RP
    OFFSET_VELX real(RP) 12.0_RP
    OFFSET_VELY real(RP) -2.0_RP

  • PARAM_MKINIT_WK1982
    nametypedefault valuecomment
    SFC_THETA real(RP) surface potential temperature [K]
    SFC_PRES real(RP) surface pressure [Pa]
    TR_Z real(RP) 12000.0_RP height of tropopause [m]
    TR_THETA real(RP) 343.0_RP pot. temperature at tropopause [K]
    TR_TEMP real(RP) 213.0_RP temperature at tropopause [K]
    SHEAR_Z real(RP) 3000.0_RP center height of shear layer [m]
    SHEAR_U real(RP) 15.0_RP velocity u over the shear layer [m/s]
    BBL_THETA real(RP) 1.0_RP extremum of temperature in bubble [K]

  • PARAM_MKINIT_RF01
    nametypedefault valuecomment
    PERTURB_AMP real(RP) 0.0_RP
    RANDOM_LIMIT integer 0
    RANDOM_FLAG integer 0 0 -> no perturbation
    USE_LWSET logical .false. use liq. water. static energy temp.?

  • PARAM_MKINIT_RF02
    nametypedefault valuecomment
    PERTURB_AMP real(RP) 0.0_RP
    RANDOM_LIMIT integer 0
    RANDOM_FLAG integer 0 0 -> no perturbation

  • PARAM_MKINIT_RF02_DNS
    nametypedefault valuecomment
    ZB real(RP) 750.0_RP domain bottom
    CONST_U real(RP) 0.0_RP
    CONST_V real(RP) 0.0_RP
    PRES_ZB real(RP) 93060.0_RP
    PERTURB_AMP real(RP) 0.0_RP
    RANDOM_LIMIT integer 0
    RANDOM_FLAG integer 0 0 -> no perturbation

  • PARAM_MKINIT_RICO
    nametypedefault valuecomment
    PERTURB_AMP_PT real(RP) 0.1_RP
    PERTURB_AMP_QV real(RP) 2.5E-5_RP

  • PARAM_MKINIT_BOMEX
    nametypedefault valuecomment
    PERTURB_AMP_PT real(RP) 0.1_RP
    PERTURB_AMP_QV real(RP) 2.5E-5_RP

  • PARAM_MKINIT_INTERPORATION
    nametypedefault valuecomment
    BASENAME_ORG character(len=H_LONG) ''

  • PARAM_MKINIT_SEABREEZE
    nametypedefault valuecomment
    LAND_SIZE real(RP)

  • PARAM_MKINIT_GRAYZONE
    nametypedefault valuecomment
    PERTURB_AMP real(RP) 0.0_RP
    RANDOM_LIMIT integer 0
    RANDOM_FLAG integer 0 0 -> no perturbation

  • PARAM_MKINIT_BOXAERO
    nametypedefault valuecomment
    INIT_DENS real(RP) 1.12_RP [kg/m3]
    INIT_TEMP real(RP) 298.18_RP [K]
    INIT_PRES real(RP) 1.E+5_RP [Pa]
    INIT_SSLIQ real(RP) 0.01_RP [%]

History Output
No history output

Function/Subroutine Documentation

◆ mkinit_setup()

subroutine, public mod_mkinit::mkinit_setup ( )

Setup.

Definition at line 228 of file mod_mkinit.f90.

References i_barocwave, i_bomex, i_boxaero, i_bubblecouple, i_cavityflow, i_coldbubble, i_dycoms2_rf01, i_dycoms2_rf02, i_dycoms2_rf02_dns, i_gravitywave, i_grayzone, i_heatisland, i_ignore, i_interporation, i_khwave, i_lambwave, i_landcouple, i_mountainwave, i_oceancouple, i_planestate, i_real, i_rico, i_seabreeze, i_squallline, i_supercell, i_tracerbubble, i_triplecouple, i_turbulence, i_urbancouple, i_warmbubble, i_warmbubbleaero, i_wk1982, scale_grid_index::ia, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::ja, scale_grid_index::ka, mkinit_type, and scale_process::prc_mpistop().

Referenced by mod_rm_prep::scalerm_prep().

228  implicit none
229 
230  character(len=H_SHORT) :: MKINIT_initname = 'NONE'
231 
232  namelist / param_mkinit / &
233  mkinit_initname, &
234  flg_intrp
235 
236  integer :: ierr
237  !---------------------------------------------------------------------------
238 
239  if( io_l ) write(io_fid_log,*)
240  if( io_l ) write(io_fid_log,*) '++++++ Module[make init] / Categ[preprocess] / Origin[SCALE-RM]'
241 
242  !--- read namelist
243  rewind(io_fid_conf)
244  read(io_fid_conf,nml=param_mkinit,iostat=ierr)
245  if( ierr < 0 ) then !--- missing
246  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
247  elseif( ierr > 0 ) then !--- fatal error
248  write(*,*) 'xxx Not appropriate names in namelist PARAM_MKINIT. Check!'
249  call prc_mpistop
250  endif
251  if( io_nml ) write(io_fid_nml,nml=param_mkinit)
252 
253  allocate( pres(ka,ia,ja) )
254  allocate( temp(ka,ia,ja) )
255  allocate( pott(ka,ia,ja) )
256  allocate( qsat(ka,ia,ja) )
257  allocate( qv(ka,ia,ja) )
258  allocate( qc(ka,ia,ja) )
259  allocate( velx(ka,ia,ja) )
260  allocate( vely(ka,ia,ja) )
261 
262  allocate( pres_sfc(1,ia,ja) )
263  allocate( temp_sfc(1,ia,ja) )
264  allocate( pott_sfc(1,ia,ja) )
265  allocate( qsat_sfc(1,ia,ja) )
266  allocate( qv_sfc(1,ia,ja) )
267  allocate( qc_sfc(1,ia,ja) )
268 
269  allocate( rndm(ka,ia,ja) )
270  allocate( bubble(ka,ia,ja) )
271  allocate( rect(ka,ia,ja) )
272 
273  select case(trim(mkinit_initname))
274  case('NONE')
275  mkinit_type = i_ignore
276  case('PLANESTATE')
277  mkinit_type = i_planestate
278  case('TRACERBUBBLE')
279  mkinit_type = i_tracerbubble
280  case('COLDBUBBLE')
281  mkinit_type = i_coldbubble
282  call bubble_setup
283  case('LAMBWAVE')
284  mkinit_type = i_lambwave
285  call bubble_setup
286  case('GRAVITYWAVE')
287  mkinit_type = i_gravitywave
288  call bubble_setup
289  case('KHWAVE')
290  mkinit_type = i_khwave
291  case('TURBULENCE')
292  mkinit_type = i_turbulence
293  case('MOUNTAINWAVE')
294  mkinit_type = i_mountainwave
295  call bubble_setup
296  case('WARMBUBBLE')
297  mkinit_type = i_warmbubble
298  call bubble_setup
299  case('SUPERCELL')
300  mkinit_type = i_supercell
301  call bubble_setup
302  case('SQUALLLINE')
303  mkinit_type = i_squallline
304  case('WK1982')
305  mkinit_type = i_wk1982
306  call bubble_setup
307  case('DYCOMS2_RF01')
308  mkinit_type = i_dycoms2_rf01
309  case('DYCOMS2_RF02')
310  mkinit_type = i_dycoms2_rf02
311  case('RICO')
312  mkinit_type = i_rico
313  case('BOMEX')
314  mkinit_type = i_bomex
315  case('INTERPORATION')
316  mkinit_type = i_interporation
317  case('LANDCOUPLE')
318  mkinit_type = i_landcouple
319  case('OCEANCOUPLE')
320  mkinit_type = i_oceancouple
321  case('URBANCOUPLE')
322  mkinit_type = i_urbancouple
323  case('TRIPLECOUPLE')
324  mkinit_type = i_triplecouple
325  case('BUBBLECOUPLE')
326  mkinit_type = i_bubblecouple
327  call bubble_setup
328  case('SEABREEZE')
329  mkinit_type = i_seabreeze
330  case('HEATISLAND')
331  mkinit_type = i_heatisland
332  case('DYCOMS2_RF02_DNS')
333  mkinit_type = i_dycoms2_rf02_dns
334  case('REAL')
335  mkinit_type = i_real
336  case('GRAYZONE')
337  mkinit_type = i_grayzone
338  case('BOXAERO')
339  mkinit_type = i_boxaero
340  case('WARMBUBBLEAERO')
341  mkinit_type = i_warmbubbleaero
342  call bubble_setup
343  case('CAVITYFLOW')
344  mkinit_type = i_cavityflow
345  case('BAROCWAVE')
346  mkinit_type = i_barocwave
347  case default
348  write(*,*) 'xxx Unsupported TYPE:', trim(mkinit_initname)
349  call prc_mpistop
350  endselect
351 
352  return
subroutine, public prc_mpistop
Abort MPI.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mkinit()

subroutine, public mod_mkinit::mkinit ( )

Driver.

Definition at line 358 of file mod_mkinit.f90.

References mod_admin_restart::admin_restart_write(), mod_atmos_admin::atmos_phy_mp_type, mod_atmos_driver::atmos_surface_get(), scale_const::const_undef8, scale_grid::grid_cx, scale_grid::grid_cy, scale_grid::grid_cz, scale_grid::grid_fx, scale_grid::grid_fxg, scale_grid::grid_fy, scale_grid::grid_fyg, i_barocwave, i_bomex, i_boxaero, i_bubblecouple, i_cavityflow, i_coldbubble, i_dycoms2_rf01, i_dycoms2_rf02, i_dycoms2_rf02_dns, i_gravitywave, i_grayzone, i_heatisland, i_ignore, i_interporation, i_khwave, i_lambwave, i_landcouple, i_mountainwave, i_oceancouple, i_planestate, i_real, i_rico, i_seabreeze, i_squallline, i_supercell, i_tracerbubble, i_triplecouple, i_turbulence, i_urbancouple, i_warmbubble, i_warmbubbleaero, i_wk1982, scale_grid_index::ia, scale_grid_index::iag, scale_grid_index::ie, scale_grid_index::ihalo, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::is, scale_grid_index::ja, scale_grid_index::jag, scale_grid_index::je, scale_grid_index::jhalo, scale_grid_index::js, scale_grid_index::ke, scale_grid_index::ks, mod_land_driver::land_surface_set(), scale_landuse::landuse_write(), mkinit_type, mod_ocean_driver::ocean_surface_set(), scale_process::prc_mpistop(), scale_tracer::qa, mod_atmos_vars::qtrc, mod_admin_time::time_doatmos_restart, mod_admin_time::time_doland_restart, mod_admin_time::time_doocean_restart, mod_admin_time::time_dourban_restart, tke_setup(), and mod_urban_driver::urban_surface_set().

Referenced by mod_rm_prep::scalerm_prep().

358  use scale_const, only: &
360  use scale_landuse, only: &
362  use mod_atmos_admin, only: &
364  use mod_atmos_driver, only: &
366  use mod_ocean_driver, only: &
368  use mod_land_driver, only: &
370  use mod_urban_driver, only: &
372  use mod_admin_restart, only: &
374  use mod_admin_time, only: &
379  implicit none
380 
381  integer :: iq
382  !---------------------------------------------------------------------------
383 
384  if ( mkinit_type == i_ignore ) then
385  if( io_l ) write(io_fid_log,*)
386  if( io_l ) write(io_fid_log,*) '++++++ SKIP MAKING INITIAL DATA ++++++'
387  else
388  if( io_l ) write(io_fid_log,*)
389  if( io_l ) write(io_fid_log,*) '++++++ START MAKING INITIAL DATA ++++++'
390 
391  !--- Initialize variables
392 #ifndef DRY
393  do iq = 2, qa
394  qtrc(:,:,:,iq) = 0.0_rp
395  enddo
396 #endif
397 
398  pres(:,:,:) = const_undef8
399  temp(:,:,:) = const_undef8
400  pott(:,:,:) = const_undef8
401  qsat(:,:,:) = const_undef8
402  qv(:,:,:) = const_undef8
403  qc(:,:,:) = const_undef8
404  velx(:,:,:) = const_undef8
405  vely(:,:,:) = const_undef8
406 
407  rndm(:,:,:) = const_undef8
408 
409  pres_sfc(:,:,:) = const_undef8
410  temp_sfc(:,:,:) = const_undef8
411  pott_sfc(:,:,:) = const_undef8
412  qsat_sfc(:,:,:) = const_undef8
413  qv_sfc(:,:,:) = const_undef8
414  qc_sfc(:,:,:) = const_undef8
415 
416  if ( atmos_phy_mp_type == 'SUZUKI10' ) then
417  if( io_l ) write(io_fid_log,*) '*** Aerosols for SBM are included ***'
418  call sbmaero_setup
419  endif
420 
421  select case(mkinit_type)
422  case(i_planestate)
423  call mkinit_planestate
424  case(i_tracerbubble)
425  call mkinit_tracerbubble
426  case(i_coldbubble)
427  call mkinit_coldbubble
428  case(i_lambwave)
429  call mkinit_lambwave
430  case(i_gravitywave)
431  call mkinit_gravitywave
432  case(i_khwave)
433  call mkinit_khwave
434  case(i_turbulence)
435  call mkinit_turbulence
436  case(i_mountainwave)
437  call mkinit_mountainwave
438  case(i_warmbubble)
439  call mkinit_warmbubble
440  case(i_supercell)
441  call mkinit_supercell
442  case(i_squallline)
443  call mkinit_squallline
444  case(i_wk1982)
445  call mkinit_wk1982
446  case(i_dycoms2_rf01)
447  call mkinit_dycoms2_rf01
448  case(i_dycoms2_rf02)
449  call mkinit_dycoms2_rf02
450  case(i_rico)
451  call mkinit_rico
452  case(i_bomex)
453  call mkinit_bomex
454  case(i_interporation)
455  call mkinit_interporation
456  case(i_oceancouple)
457  call mkinit_planestate
458  call mkinit_oceancouple
459  case(i_landcouple)
460  call mkinit_planestate
461  call mkinit_landcouple
462  case(i_urbancouple)
463  call mkinit_planestate
464  call mkinit_landcouple ! tentative
465  call mkinit_urbancouple
466  case(i_triplecouple)
467  call mkinit_planestate
468  call mkinit_oceancouple
469  call mkinit_landcouple
470  call mkinit_urbancouple
471  case(i_bubblecouple)
472  call mkinit_planestate
473  call mkinit_warmbubble
474  call mkinit_oceancouple
475  call mkinit_landcouple
476  call mkinit_urbancouple
477  case(i_seabreeze)
478  call mkinit_planestate
479  call mkinit_seabreeze
480  case(i_heatisland)
481  call mkinit_planestate
482  call mkinit_heatisland
483  case(i_dycoms2_rf02_dns)
484  call mkinit_dycoms2_rf02_dns
485  case(i_real)
486  call mkinit_real
487  case(i_grayzone)
488  call mkinit_grayzone
489  case(i_boxaero)
490  call mkinit_boxaero
491  case(i_warmbubbleaero)
492  call mkinit_warmbubbleaero
493  case(i_cavityflow)
494  call mkinit_cavityflow
495  case(i_barocwave)
496  call mkinit_barocwave
497  case default
498  write(*,*) 'xxx Unsupported TYPE:', mkinit_type
499  call prc_mpistop
500  endselect
501 
502  call tke_setup
503 
504  if( io_l ) write(io_fid_log,*) '++++++ END MAKING INITIAL DATA ++++++'
505 
506  ! setup surface condition
507  call ocean_surface_set( countup = .false. )
508  call land_surface_set ( countup = .false. )
509  call urban_surface_set( countup = .false. )
510  call atmos_surface_get
511 
512  ! output boundary file
513  call landuse_write
514 
515  ! output restart file
516  time_doocean_restart = .true.
517  time_doland_restart = .true.
518  time_dourban_restart = .true.
519  time_doatmos_restart = .true.
521 
522  endif
523 
524  return
module ATMOS admin
subroutine, public prc_mpistop
Abort MPI.
module URBAN driver
logical, public time_doatmos_restart
execute atmosphere restart output in this step?
logical, public time_doocean_restart
execute ocean restart output in this step?
subroutine, public urban_surface_set(countup)
Set surface boundary to other model.
subroutine, public atmos_surface_get
Get surface boundary condition.
module LANDUSE
module OCEAN driver
subroutine, public ocean_surface_set(countup)
Put surface boundary to other model.
module ATMOSPHERE driver
subroutine, public landuse_write
Write landuse data.
module administrator for restart
module CONSTANT
Definition: scale_const.F90:14
character(len=h_short), public atmos_phy_mp_type
logical, public time_dourban_restart
execute urban restart output in this step?
real(dp), parameter, public const_undef8
undefined value (REAL8)
Definition: scale_const.F90:42
subroutine, public admin_restart_write
Write data to restart files.
logical, public time_doland_restart
execute land restart output in this step?
module ADMIN TIME
module LAND driver
subroutine, public land_surface_set(countup)
Put surface boundary to other model.
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rect_setup()

subroutine mod_mkinit::rect_setup ( )

Bubble.

Definition at line 626 of file mod_mkinit.f90.

References scale_atmos_phy_ae_kajino13::atmos_phy_ae_kajino13_mkinit(), scale_const::const_pi, scale_const::const_undef8, mod_atmos_vars::dens, faero(), scale_grid::grid_cx, scale_grid::grid_cy, scale_grid::grid_cz, scale_grid_index::ia, scale_grid_index::ie, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::is, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::js, scale_grid_index::ke, scale_grid_index::ks, scale_atmos_phy_mp_suzuki10::nbin, scale_atmos_phy_mp_suzuki10::nccn, scale_process::prc_mpistop(), scale_atmos_hydrometeor::qhe, scale_atmos_hydrometeor::qhs, mod_atmos_vars::qtrc, and mod_atmos_vars::rhot.

Referenced by read_sounding().

626  use scale_const, only: &
628  implicit none
629 
630  ! Bubble
631  logical :: RCT_eachnode = .false. ! Arrange rectangle at each node? [kg/kg]
632  real(RP) :: RCT_CZ = 2.e3_rp ! center location [m]: z
633  real(RP) :: RCT_CX = 2.e3_rp ! center location [m]: x
634  real(RP) :: RCT_CY = 2.e3_rp ! center location [m]: y
635  real(RP) :: RCT_RZ = 2.e3_rp ! rectangle z width [m]: z
636  real(RP) :: RCT_RX = 2.e3_rp ! rectangle x width [m]: x
637  real(RP) :: RCT_RY = 2.e3_rp ! rectangle y width [m]: y
638 
639  namelist / param_rect / &
640  rct_eachnode, &
641  rct_cz, &
642  rct_cx, &
643  rct_cy, &
644  rct_rz, &
645  rct_rx, &
646  rct_ry
647 
648  real(RP) :: CZ_offset
649  real(RP) :: CX_offset
650  real(RP) :: CY_offset
651  real(RP) :: dist
652 
653  integer :: ierr
654  integer :: k, i, j
655  !---------------------------------------------------------------------------
656 
657  if( io_l ) write(io_fid_log,*)
658  if( io_l ) write(io_fid_log,*) '++++++ Module[mkinit rectangle] / Categ[preprocess] / Origin[SCALE-RM]'
659 
660  !--- read namelist
661  rewind(io_fid_conf)
662  read(io_fid_conf,nml=param_rect,iostat=ierr)
663  if( ierr < 0 ) then !--- missing
664  write(*,*) 'xxx Not found namelist. Check!'
665  call prc_mpistop
666  elseif( ierr > 0 ) then !--- fatal error
667  write(*,*) 'xxx Not appropriate names in namelist PARAM_RECT. Check!'
668  call prc_mpistop
669  endif
670  if( io_nml ) write(io_fid_nml,nml=param_rect)
671 
672  rect(:,:,:) = const_undef8
673 
674  if ( rct_eachnode ) then
675  cz_offset = grid_cz(ks)
676  cx_offset = grid_cx(is)
677  cy_offset = grid_cy(js)
678  else
679  cz_offset = 0.0_rp
680  cx_offset = 0.0_rp
681  cy_offset = 0.0_rp
682  endif
683 
684  do j = 1, ja
685  do i = 1, ia
686  do k = ks, ke
687 
688  ! make tracer rectangle
689  dist = 2.0_rp * max( &
690  abs(grid_cz(k) - cz_offset - rct_cz)/rct_rz, &
691  abs(grid_cx(i) - cx_offset - rct_cx)/rct_rx, &
692  abs(grid_cy(j) - cy_offset - rct_cy)/rct_ry &
693  & )
694  if ( dist <= 1.0_rp ) then
695  rect(k,i,j) = 1.0_rp
696  else
697  rect(k,i,j) = 0.0_rp
698  end if
699  enddo
700  enddo
701  enddo
702 
703  return
subroutine, public prc_mpistop
Abort MPI.
module CONSTANT
Definition: scale_const.F90:14
real(dp), parameter, public const_undef8
undefined value (REAL8)
Definition: scale_const.F90:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ faero()

real(rp) function mod_mkinit::faero ( real(rp), intent(in)  f0,
real(rp), intent(in)  r0,
real(rp), intent(in)  x,
real(rp), intent(in)  alpha,
real(rp), intent(in)  rhoa 
)

Definition at line 868 of file mod_mkinit.f90.

References scale_const::const_pi.

Referenced by rect_setup().

868  use scale_const, only: &
869  pi => const_pi
870  implicit none
871 
872  real(RP), intent(in) :: x, f0, r0, alpha, rhoa
873  real(RP) :: faero
874  real(RP) :: rad
875  !---------------------------------------------------------------------------
876 
877  rad = ( exp(x) * 3.0_rp / 4.0_rp / pi / rhoa )**(1.0_rp/3.0_rp)
878 
879  faero = f0 * (rad/r0)**(-alpha)
880 
881  return
module CONSTANT
Definition: scale_const.F90:14
real(rp), public const_pi
pi
Definition: scale_const.F90:34
Here is the caller graph for this function:

◆ flux_setup()

subroutine mod_mkinit::flux_setup ( )

flux setup

Definition at line 887 of file mod_mkinit.f90.

References mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_rain, mod_atmos_phy_mp_vars::atmos_phy_mp_sflx_snow, mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_downall, mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_lw_dn, mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_lw_up, mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_sw_dn, mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_sw_up, mod_atmos_phy_rd_vars::atmos_phy_rd_toaflx_lw_dn, mod_atmos_phy_rd_vars::atmos_phy_rd_toaflx_lw_up, mod_atmos_phy_rd_vars::atmos_phy_rd_toaflx_sw_dn, mod_atmos_phy_rd_vars::atmos_phy_rd_toaflx_sw_up, scale_grid_index::ie, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::is, scale_grid_index::je, scale_grid_index::js, and scale_process::prc_mpistop().

Referenced by interporation_fact(), and read_sounding().

887  use mod_atmos_phy_mp_vars, only: &
888  sflx_rain => atmos_phy_mp_sflx_rain, &
889  sflx_snow => atmos_phy_mp_sflx_snow
890  use mod_atmos_phy_rd_vars, only: &
891  sflx_lw_up => atmos_phy_rd_sflx_lw_up, &
892  sflx_lw_dn => atmos_phy_rd_sflx_lw_dn, &
893  sflx_sw_up => atmos_phy_rd_sflx_sw_up, &
894  sflx_sw_dn => atmos_phy_rd_sflx_sw_dn, &
895  toaflx_lw_up => atmos_phy_rd_toaflx_lw_up, &
896  toaflx_lw_dn => atmos_phy_rd_toaflx_lw_dn, &
897  toaflx_sw_up => atmos_phy_rd_toaflx_sw_up, &
898  toaflx_sw_dn => atmos_phy_rd_toaflx_sw_dn, &
899  sflx_rad_dn => atmos_phy_rd_sflx_downall
900  implicit none
901 
902  ! Flux from Atmosphere
903  real(RP) :: FLX_rain = 0.0_rp ! surface rain flux [kg/m2/s]
904  real(RP) :: FLX_snow = 0.0_rp ! surface snow flux [kg/m2/s]
905  real(RP) :: FLX_LW_dn = 0.0_rp ! surface downwad long-wave radiation flux [J/m2/s]
906  real(RP) :: FLX_SW_dn = 0.0_rp ! surface downwad short-wave radiation flux [J/m2/s]
907 
908  namelist / param_mkinit_flux / &
909  flx_rain, &
910  flx_snow, &
911  flx_lw_dn, &
912  flx_sw_dn
913 
914  integer :: i, j
915  integer :: ierr
916  !---------------------------------------------------------------------------
917 
918  !--- read namelist
919  rewind(io_fid_conf)
920  read(io_fid_conf,nml=param_mkinit_flux,iostat=ierr)
921  if( ierr < 0 ) then !--- missing
922  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
923  elseif( ierr > 0 ) then !--- fatal error
924  write(*,*) 'xxx Not appropriate names in namelist PARAM_MKINIT_FLUX. Check!'
925  call prc_mpistop
926  endif
927  if( io_nml ) write(io_fid_nml,nml=param_mkinit_flux)
928 
929  do j = js, je
930  do i = is, ie
931  sflx_rain(i,j) = flx_rain
932  sflx_snow(i,j) = flx_snow
933 
934  sflx_lw_up(i,j) = 0.0_rp
935  sflx_lw_dn(i,j) = flx_lw_dn
936  sflx_sw_up(i,j) = 0.0_rp
937  sflx_sw_dn(i,j) = flx_sw_dn
938 
939  toaflx_lw_up(i,j) = 0.0_rp
940  toaflx_lw_dn(i,j) = 0.0_rp
941  toaflx_sw_up(i,j) = 0.0_rp
942  toaflx_sw_dn(i,j) = 0.0_rp
943 
944  sflx_rad_dn(i,j,1,1) = flx_sw_dn
945  sflx_rad_dn(i,j,1,2) = 0.0_rp
946  sflx_rad_dn(i,j,2,1) = flx_lw_dn
947  sflx_rad_dn(i,j,2,2) = 0.0_rp
948  enddo
949  enddo
950 
951  return
subroutine, public prc_mpistop
Abort MPI.
module Atmosphere / Physics Cloud Microphysics
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_rain
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_dn
module Atmosphere / Physics Radiation
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_dn
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_downall
real(rp), dimension(:,:), allocatable, public atmos_phy_mp_sflx_snow
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_toaflx_lw_up
Here is the call graph for this function:
Here is the caller graph for this function:

◆ land_setup()

subroutine mod_mkinit::land_setup ( )

Land setup.

Definition at line 957 of file mod_mkinit.f90.

References scale_grid_index::ie, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::is, scale_grid_index::je, scale_grid_index::js, mod_land_vars::land_sfc_albedo, mod_land_vars::land_sfc_temp, mod_land_vars::land_temp, mod_land_vars::land_water, and scale_process::prc_mpistop().

Referenced by interporation_fact().

957  use mod_land_vars, only: &
958  land_temp, &
959  land_water, &
960  land_sfc_temp, &
962  implicit none
963 
964  ! Land state
965  real(RP) :: LND_TEMP ! soil temperature [K]
966  real(RP) :: LND_WATER = 0.15_rp ! soil moisture [m3/m3]
967  real(RP) :: SFC_TEMP ! land skin temperature [K]
968  real(RP) :: SFC_albedo_LW = 0.01_rp ! land surface albedo for LW (0-1)
969  real(RP) :: SFC_albedo_SW = 0.20_rp ! land surface albedo for SW (0-1)
970 
971  integer :: i, j
972  integer :: ierr
973 
974  namelist /param_mkinit_land/ &
975  lnd_temp, &
976  lnd_water, &
977  sfc_temp, &
978  sfc_albedo_lw, &
979  sfc_albedo_sw
980 
981  lnd_temp = thetastd
982  sfc_temp = thetastd
983 
984  !--- read namelist
985  rewind(io_fid_conf)
986  read(io_fid_conf,nml=param_mkinit_land,iostat=ierr)
987  if( ierr < 0 ) then !--- missing
988  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
989  elseif( ierr > 0 ) then !--- fatal error
990  write(*,*) 'xxx Not appropriate names in namelist PARAM_MKINIT_LAND. Check!'
991  call prc_mpistop
992  endif
993  if( io_nml ) write(io_fid_nml,nml=param_mkinit_land)
994 
995  do j = js, je
996  do i = is, ie
997  land_temp(:,i,j) = lnd_temp
998  land_water(:,i,j) = lnd_water
999  land_sfc_temp(i,j) = sfc_temp
1000  land_sfc_albedo(i,j,i_lw) = sfc_albedo_lw
1001  land_sfc_albedo(i,j,i_sw) = sfc_albedo_sw
1002  end do
1003  end do
1004 
1005  return
subroutine, public prc_mpistop
Abort MPI.
integer, parameter, public i_lw
real(rp), dimension(:,:), allocatable, public land_sfc_temp
land surface skin temperature [K]
integer, parameter, public i_sw
real(rp), dimension(:,:,:), allocatable, public land_temp
temperature of each soil layer [K]
real(rp), dimension(:,:,:), allocatable, public land_sfc_albedo
land surface albedo (0-1)
module LAND Variables
real(rp), dimension(:,:,:), allocatable, public land_water
moisture of each soil layer [m3/m3]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ocean_setup()

subroutine mod_mkinit::ocean_setup ( )

Ocean setup.

Definition at line 1011 of file mod_mkinit.f90.

References scale_grid_index::ie, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::is, scale_grid_index::je, scale_grid_index::js, mod_ocean_vars::ocean_sfc_albedo, mod_ocean_vars::ocean_sfc_temp, mod_ocean_vars::ocean_sfc_z0e, mod_ocean_vars::ocean_sfc_z0h, mod_ocean_vars::ocean_sfc_z0m, mod_ocean_vars::ocean_temp, and scale_process::prc_mpistop().

Referenced by interporation_fact(), and read_sounding().

1011  use mod_ocean_vars, only: &
1012  ocean_temp, &
1013  ocean_sfc_temp, &
1014  ocean_sfc_albedo, &
1015  ocean_sfc_z0m, &
1016  ocean_sfc_z0h, &
1018  implicit none
1019 
1020  ! Ocean state
1021  real(RP) :: OCN_TEMP ! ocean temperature [K]
1022  real(RP) :: SFC_TEMP ! ocean skin temperature [K]
1023  real(RP) :: SFC_albedo_LW = 0.04_rp ! ocean surface albedo for LW (0-1)
1024  real(RP) :: SFC_albedo_SW = 0.05_rp ! ocean surface albedo for SW (0-1)
1025  real(RP) :: SFC_Z0M = 1.0e-4_rp ! ocean surface roughness length (momentum) [m]
1026  real(RP) :: SFC_Z0H = 1.0e-4_rp ! ocean surface roughness length (heat) [m]
1027  real(RP) :: SFC_Z0E = 1.0e-4_rp ! ocean surface roughness length (vapor) [m]
1028 
1029  integer :: i, j
1030  integer :: ierr
1031 
1032  namelist /param_mkinit_ocean/ &
1033  ocn_temp, &
1034  sfc_temp, &
1035  sfc_albedo_lw, &
1036  sfc_albedo_sw, &
1037  sfc_z0m, &
1038  sfc_z0h, &
1039  sfc_z0e
1040 
1041  ocn_temp = thetastd
1042  sfc_temp = thetastd
1043 
1044  !--- read namelist
1045  rewind(io_fid_conf)
1046  read(io_fid_conf,nml=param_mkinit_ocean,iostat=ierr)
1047  if( ierr < 0 ) then !--- missing
1048  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
1049  elseif( ierr > 0 ) then !--- fatal error
1050  write(*,*) 'xxx Not appropriate names in namelist PARAM_MKINIT_OCEAN. Check!'
1051  call prc_mpistop
1052  endif
1053  if( io_nml ) write(io_fid_nml,nml=param_mkinit_ocean)
1054 
1055 
1056  do j = js, je
1057  do i = is, ie
1058  ocean_temp(i,j) = ocn_temp
1059  ocean_sfc_temp(i,j) = sfc_temp
1060  ocean_sfc_albedo(i,j,i_lw) = sfc_albedo_lw
1061  ocean_sfc_albedo(i,j,i_sw) = sfc_albedo_sw
1062  ocean_sfc_z0m(i,j) = sfc_z0m
1063  ocean_sfc_z0h(i,j) = sfc_z0h
1064  ocean_sfc_z0e(i,j) = sfc_z0e
1065  end do
1066  end do
1067 
1068  return
real(rp), dimension(:,:,:), allocatable, public ocean_sfc_albedo
ocean surface albedo (0-1)
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0e
ocean surface roughness length for vapor [m]
real(rp), dimension(:,:), allocatable, public ocean_temp
temperature at uppermost ocean layer [K]
integer, parameter, public i_lw
integer, parameter, public i_sw
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0m
ocean surface roughness length for momentum [m]
real(rp), dimension(:,:), allocatable, public ocean_sfc_temp
ocean surface skin temperature [K]
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0h
ocean surface roughness length for heat [m]
module OCEAN Variables
Here is the call graph for this function:
Here is the caller graph for this function:

◆ urban_setup()

subroutine mod_mkinit::urban_setup ( )

Urban setup.

Definition at line 1074 of file mod_mkinit.f90.

References scale_grid_index::ie, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::is, scale_grid_index::je, scale_grid_index::js, scale_process::prc_mpistop(), mod_urban_vars::urban_qc, mod_urban_vars::urban_rainb, mod_urban_vars::urban_raing, mod_urban_vars::urban_rainr, mod_urban_vars::urban_roff, mod_urban_vars::urban_sfc_albedo, mod_urban_vars::urban_sfc_temp, mod_urban_vars::urban_tb, mod_urban_vars::urban_tbl, mod_urban_vars::urban_tc, mod_urban_vars::urban_tg, mod_urban_vars::urban_tgl, mod_urban_vars::urban_tr, mod_urban_vars::urban_trl, and mod_urban_vars::urban_uc.

Referenced by interporation_fact().

1074  use mod_urban_vars, only: &
1075  urban_tr, &
1076  urban_tb, &
1077  urban_tg, &
1078  urban_tc, &
1079  urban_qc, &
1080  urban_uc, &
1081  urban_trl, &
1082  urban_tbl, &
1083  urban_tgl, &
1084  urban_rainr, &
1085  urban_rainb, &
1086  urban_raing, &
1087  urban_roff, &
1088  urban_sfc_temp, &
1090  implicit none
1091 
1092  ! urban state
1093  real(RP) :: URB_ROOF_TEMP ! Surface temperature of roof [K]
1094  real(RP) :: URB_BLDG_TEMP ! Surface temperature of building [K
1095  real(RP) :: URB_GRND_TEMP ! Surface temperature of ground [K]
1096  real(RP) :: URB_CNPY_TEMP ! Diagnostic canopy air temperature
1097  real(RP) :: URB_CNPY_HMDT = 0.0_rp ! Diagnostic canopy humidity [-]
1098  real(RP) :: URB_CNPY_WIND = 0.0_rp ! Diagnostic canopy wind [m/s]
1099  real(RP) :: URB_ROOF_LAYER_TEMP ! temperature in layer of roof [K]
1100  real(RP) :: URB_BLDG_LAYER_TEMP ! temperature in layer of building [
1101  real(RP) :: URB_GRND_LAYER_TEMP ! temperature in layer of ground [K]
1102  real(RP) :: URB_ROOF_RAIN = 0.0_rp ! temperature in layer of roof [K]
1103  real(RP) :: URB_BLDG_RAIN = 0.0_rp ! temperature in layer of building [
1104  real(RP) :: URB_GRND_RAIN = 0.0_rp ! temperature in layer of ground [K]
1105  real(RP) :: URB_RUNOFF = 0.0_rp ! temperature in layer of ground [K]
1106  real(RP) :: URB_SFC_TEMP ! Grid average of surface temperature [K]
1107  real(RP) :: URB_ALB_LW = 0.0_rp ! Grid average of surface albedo for LW (0-1)
1108  real(RP) :: URB_ALB_SW = 0.0_rp ! Grid average of surface albedo for SW (0-1)
1109 
1110  integer :: i, j
1111  integer :: ierr
1112 
1113  namelist /param_mkinit_urban/ &
1114  urb_roof_temp, &
1115  urb_bldg_temp, &
1116  urb_grnd_temp, &
1117  urb_cnpy_temp, &
1118  urb_cnpy_hmdt, &
1119  urb_cnpy_wind, &
1120  urb_roof_layer_temp, &
1121  urb_bldg_layer_temp, &
1122  urb_grnd_layer_temp, &
1123  urb_roof_rain, &
1124  urb_bldg_rain, &
1125  urb_grnd_rain, &
1126  urb_runoff, &
1127  urb_sfc_temp, &
1128  urb_alb_lw, &
1129  urb_alb_sw
1130 
1131  urb_roof_temp = thetastd
1132  urb_bldg_temp = thetastd
1133  urb_grnd_temp = thetastd
1134  urb_cnpy_temp = thetastd
1135  urb_roof_layer_temp = thetastd
1136  urb_bldg_layer_temp = thetastd
1137  urb_grnd_layer_temp = thetastd
1138 
1139  urb_sfc_temp = thetastd
1140 
1141  !--- read namelist
1142  rewind(io_fid_conf)
1143  read(io_fid_conf,nml=param_mkinit_urban,iostat=ierr)
1144  if( ierr < 0 ) then !--- missing
1145  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
1146  elseif( ierr > 0 ) then !--- fatal error
1147  write(*,*) 'xxx Not appropriate names in namelist PARAM_MKINIT_URBAN. Check!'
1148  call prc_mpistop
1149  endif
1150  if( io_nml ) write(io_fid_nml,nml=param_mkinit_urban)
1151 
1152 
1153  do j = js, je
1154  do i = is, ie
1155  urban_tr(i,j) = urb_roof_temp
1156  urban_tb(i,j) = urb_bldg_temp
1157  urban_tg(i,j) = urb_grnd_temp
1158  urban_tc(i,j) = urb_cnpy_temp
1159  urban_qc(i,j) = urb_cnpy_hmdt
1160  urban_uc(i,j) = urb_cnpy_wind
1161  urban_trl(:,i,j) = urb_roof_layer_temp
1162  urban_tbl(:,i,j) = urb_bldg_layer_temp
1163  urban_tgl(:,i,j) = urb_grnd_layer_temp
1164  urban_rainr(i,j) = urb_roof_rain
1165  urban_rainb(i,j) = urb_bldg_rain
1166  urban_raing(i,j) = urb_grnd_rain
1167  urban_roff(i,j) = urb_runoff
1168  urban_sfc_temp(i,j) = urb_sfc_temp
1169  urban_sfc_albedo(i,j,i_lw) = urb_alb_lw
1170  urban_sfc_albedo(i,j,i_sw) = urb_alb_sw
1171  end do
1172  end do
1173 
1174  return
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:,:), allocatable, public urban_qc
real(rp), dimension(:,:), allocatable, public urban_tb
module URBAN Variables
real(rp), dimension(:,:), allocatable, public urban_raing
real(rp), dimension(:,:), allocatable, public urban_uc
integer, parameter, public i_lw
integer, parameter, public i_sw
real(rp), dimension(:,:), allocatable, public urban_tr
real(rp), dimension(:,:,:), allocatable, public urban_tgl
real(rp), dimension(:,:), allocatable, public urban_roff
real(rp), dimension(:,:,:), allocatable, public urban_sfc_albedo
real(rp), dimension(:,:), allocatable, public urban_tc
real(rp), dimension(:,:), allocatable, public urban_rainr
real(rp), dimension(:,:), allocatable, public urban_tg
real(rp), dimension(:,:), allocatable, public urban_sfc_temp
real(rp), dimension(:,:,:), allocatable, public urban_trl
real(rp), dimension(:,:,:), allocatable, public urban_tbl
real(rp), dimension(:,:), allocatable, public urban_rainb
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tke_setup()

subroutine mod_mkinit::tke_setup ( )

TKE setup.

Definition at line 1180 of file mod_mkinit.f90.

References scale_const::const_eps, scale_atmos_phy_tb::i_tke, scale_grid_index::ia, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::ja, scale_grid_index::ka, scale_process::prc_mpistop(), and mod_atmos_vars::qtrc.

Referenced by mkinit().

1180  use scale_const, only: &
1181  eps => const_eps
1182  use scale_atmos_phy_tb, only: &
1183  i_tke
1184  implicit none
1185 
1186  real(RP) :: TKE_CONST
1187 
1188  namelist / param_mkinit_tke / &
1189  tke_const
1190 
1191  integer :: k, i, j
1192  integer :: ierr
1193  !---------------------------------------------------------------------------
1194 
1195  tke_const = eps
1196 
1197  !--- read namelist
1198  rewind(io_fid_conf)
1199  read(io_fid_conf,nml=param_mkinit_tke,iostat=ierr)
1200  if( ierr < 0 ) then !--- missing
1201  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
1202  elseif( ierr > 0 ) then !--- fatal error
1203  write(*,*) 'xxx Not appropriate names in namelist PARAM_MKINIT_TKE. Check!'
1204  call prc_mpistop
1205  endif
1206  if( io_nml ) write(io_fid_nml,nml=param_mkinit_tke)
1207 
1208  if ( i_tke > 0 ) then
1209  do j = 1, ja
1210  do i = 1, ia
1211  do k = 1, ka
1212  qtrc(k,i,j,i_tke) = tke_const
1213  enddo
1214  enddo
1215  enddo
1216  end if
1217 
1218  return
subroutine, public prc_mpistop
Abort MPI.
module CONSTANT
Definition: scale_const.F90:14
module ATMOSPHERE / Physics Turbulence
real(rp), public const_eps
small number
Definition: scale_const.F90:36
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_sounding()

subroutine mod_mkinit::read_sounding ( real(rp), dimension(ka), intent(out)  DENS,
real(rp), dimension(ka), intent(out)  VELX,
real(rp), dimension(ka), intent(out)  VELY,
real(rp), dimension(ka), intent(out)  POTT,
real(rp), dimension (ka), intent(out)  QV 
)

Read sounding data from file.

Definition at line 1225 of file mod_mkinit.f90.

References mod_atmos_admin::atmos_phy_ae_type, mod_atmos_admin::atmos_phy_mp_type, scale_const::const_grav, scale_const::const_ohm, scale_const::const_radius, mod_atmos_vars::dens, gtool_file::filegetshape(), flux_setup(), scale_grid::grid_cx, scale_grid::grid_cy, scale_grid::grid_cz, scale_grid::grid_domain_center_y, scale_grid::grid_fx, scale_grid::grid_fy, scale_grid::grid_fyg, scale_grid::grid_fz, scale_atmos_hydrometeor::i_nc, scale_atmos_hydrometeor::i_qc, scale_atmos_hydrometeor::i_qv, scale_grid_index::ia, scale_grid_index::ie, interporation_fact(), scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_get_available_fid(), scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::is, scale_grid_index::ja, scale_grid_index::jag, scale_grid_index::je, scale_grid_index::jhalo, scale_grid_index::js, scale_grid_index::ka, scale_grid_index::ke, scale_grid_index::ks, mod_atmos_vars::momx, mod_atmos_vars::momy, mod_atmos_vars::momz, scale_atmos_phy_mp_suzuki10::nccn, ocean_setup(), scale_process::prc_mpistop(), scale_tracer::qa, scale_atmos_hydrometeor::qhe, mod_atmos_vars::qtrc, scale_random::random_get(), scale_grid_real::real_cz, scale_grid_real::real_fz, rect_setup(), mod_atmos_vars::rhot, and scale_tracer::tracer_name.

Referenced by interporation_fact().

1225  use scale_atmos_hydrometeor, only: &
1226  i_qv
1227  implicit none
1228 
1229  real(RP), intent(out) :: DENS(KA)
1230  real(RP), intent(out) :: VELX(KA)
1231  real(RP), intent(out) :: VELY(KA)
1232  real(RP), intent(out) :: POTT(KA)
1233  real(RP), intent(out) :: QV (KA)
1234 
1235  real(RP) :: TEMP(KA)
1236  real(RP) :: PRES(KA)
1237  real(RP) :: QC (KA)
1238 
1239  character(len=H_LONG) :: ENV_IN_SOUNDING_file = ''
1240 
1241  integer, parameter :: EXP_klim = 100
1242  integer :: EXP_kmax
1243 
1244  real(RP) :: SFC_THETA ! surface potential temperature [K]
1245  real(RP) :: SFC_PRES ! surface pressure [hPa]
1246  real(RP) :: SFC_QV ! surface watervapor [g/kg]
1247 
1248  real(RP) :: EXP_z (EXP_klim+1) ! height [m]
1249  real(RP) :: EXP_pott(EXP_klim+1) ! potential temperature [K]
1250  real(RP) :: EXP_qv (EXP_klim+1) ! water vapor [g/kg]
1251  real(RP) :: EXP_u (EXP_klim+1) ! velocity u [m/s]
1252  real(RP) :: EXP_v (EXP_klim+1) ! velocity v [m/s]
1253 
1254  real(RP) :: fact1, fact2
1255  integer :: k, kref
1256  integer :: fid
1257  integer :: ierr
1258 
1259  namelist /param_mkinit_sounding/ &
1260  env_in_sounding_file
1261 
1262  !--- read namelist
1263  rewind(io_fid_conf)
1264  read(io_fid_conf,nml=param_mkinit_sounding,iostat=ierr)
1265 
1266  if( ierr < 0 ) then !--- missing
1267  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
1268  elseif( ierr > 0 ) then !--- fatal error
1269  write(*,*) 'xxx Not appropriate names in namelist PARAM_MKINIT_SOUNDING. Check!'
1270  call prc_mpistop
1271  endif
1272  if( io_nml ) write(io_fid_nml,nml=param_mkinit_sounding)
1273 
1274  !--- prepare sounding profile
1275  if( io_l ) write(io_fid_log,*) '+++ Input sounding file:', trim(env_in_sounding_file)
1276  fid = io_get_available_fid()
1277  open( fid, &
1278  file = trim(env_in_sounding_file), &
1279  form = 'formatted', &
1280  status = 'old', &
1281  iostat = ierr )
1282 
1283  if ( ierr /= 0 ) then
1284  write(*,*) 'xxx [mod_mkinit/read_sounding] Input file not found!'
1285  endif
1286 
1287  !--- read sounding file till end
1288  read(fid,*) sfc_pres, sfc_theta, sfc_qv
1289 
1290  if( io_l ) write(io_fid_log,*) '+++ Surface pressure [hPa]', sfc_pres
1291  if( io_l ) write(io_fid_log,*) '+++ Surface pot. temp [K]', sfc_theta
1292  if( io_l ) write(io_fid_log,*) '+++ Surface water vapor [g/kg]', sfc_qv
1293 
1294  do k = 2, exp_klim
1295  read(fid,*,iostat=ierr) exp_z(k), exp_pott(k), exp_qv(k), exp_u(k), exp_v(k)
1296  if ( ierr /= 0 ) exit
1297  enddo
1298 
1299  exp_kmax = k - 1
1300  close(fid)
1301 
1302  ! Boundary
1303  exp_z(1) = 0.0_rp
1304  exp_pott(1) = sfc_theta
1305  exp_qv(1) = sfc_qv
1306  exp_u(1) = exp_u(2)
1307  exp_v(1) = exp_v(2)
1308  exp_z(exp_kmax+1) = 100.e3_rp
1309  exp_pott(exp_kmax+1) = exp_pott(exp_kmax)
1310  exp_qv(exp_kmax+1) = exp_qv(exp_kmax)
1311  exp_u(exp_kmax+1) = exp_u(exp_kmax)
1312  exp_v(exp_kmax+1) = exp_v(exp_kmax)
1313 
1314  do k = 1, exp_kmax+1
1315  exp_qv(k) = exp_qv(k) * 1.e-3_rp ! [g/kg]->[kg/kg]
1316  enddo
1317 
1318  ! calc in dry condition
1319  pres_sfc = sfc_pres * 1.e2_rp ! [hPa]->[Pa]
1320  pott_sfc = sfc_theta
1321  if ( i_qv > 0 ) then
1322  qv_sfc = sfc_qv * 1.e-3_rp ! [g/kg]->[kg/kg]
1323  else
1324  qv_sfc = 0.0_rp
1325  end if
1326  qc_sfc = 0.0_rp
1327 
1328  !--- linear interpolate to model grid
1329  do k = ks, ke
1330  qc(k) = 0.0_rp
1331 
1332  do kref = 2, exp_kmax+1
1333  if ( grid_cz(k) > exp_z(kref-1) &
1334  .AND. grid_cz(k) <= exp_z(kref ) ) then
1335 
1336  fact1 = ( exp_z(kref) - grid_cz(k) ) / ( exp_z(kref)-exp_z(kref-1) )
1337  fact2 = ( grid_cz(k) - exp_z(kref-1) ) / ( exp_z(kref)-exp_z(kref-1) )
1338 
1339  pott(k) = exp_pott(kref-1) * fact1 &
1340  + exp_pott(kref ) * fact2
1341  qv(k) = exp_qv(kref-1) * fact1 &
1342  + exp_qv(kref ) * fact2
1343  velx(k) = exp_u(kref-1) * fact1 &
1344  + exp_u(kref ) * fact2
1345  vely(k) = exp_v(kref-1) * fact1 &
1346  + exp_v(kref ) * fact2
1347  endif
1348  enddo
1349  enddo
1350  if ( i_qv < 1 ) qv = 0.0_rp
1351 
1352  ! make density & pressure profile in moist condition
1353  call hydrostatic_buildrho( dens(:), & ! [OUT]
1354  temp(:), & ! [OUT]
1355  pres(:), & ! [OUT]
1356  pott(:), & ! [IN]
1357  qv(:), & ! [IN]
1358  qc(:), & ! [IN]
1359  temp_sfc(1,1,1), & ! [OUT]
1360  pres_sfc(1,1,1), & ! [IN]
1361  pott_sfc(1,1,1), & ! [IN]
1362  qv_sfc(1,1,1), & ! [IN]
1363  qc_sfc(1,1,1) ) ! [IN]
1364 
1365  return
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:,:,:), allocatable, target, public dens
Here is the call graph for this function:
Here is the caller graph for this function:

◆ interporation_fact()

subroutine mod_mkinit::interporation_fact ( real(rp), intent(out)  fact0,
real(rp), intent(out)  fact1,
integer, intent(out)  idx0,
integer, intent(out)  idx1,
real(rp), intent(in)  x,
real(rp), dimension(nx), intent(in)  x_org,
integer, intent(in)  nx,
logical, intent(in)  loop 
)

Definition at line 4868 of file mod_mkinit.f90.

References mod_atmos_admin::atmos_phy_ae_type, mod_atmos_vars::dens, flux_setup(), scale_grid::grid_cx, scale_grid::grid_cxg, scale_grid::grid_cz, scale_grid::grid_domain_center_x, scale_atmos_hydrometeor::i_qv, scale_grid_index::ia, scale_grid_index::ie, scale_grid_index::imax, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::is, scale_grid_index::ja, scale_grid_index::je, scale_grid_index::js, scale_grid_index::ka, scale_grid_index::ke, scale_grid_index::ks, land_setup(), scale_landuse::landuse_calc_fact(), scale_landuse::landuse_frac_land, scale_landuse::landuse_frac_urban, mod_atmos_vars::momx, mod_atmos_vars::momy, mod_atmos_vars::momz, ocean_setup(), scale_process::prc_mpistop(), scale_rm_process::prc_num_x, mod_atmos_vars::qtrc, scale_random::random_get(), read_sounding(), mod_realinput::realinput_atmos(), mod_realinput::realinput_surface(), mod_atmos_vars::rhot, and urban_setup().

Referenced by read_sounding().

4868  implicit none
4869 
4870  real(RP), intent(out) :: fact0
4871  real(RP), intent(out) :: fact1
4872  integer, intent(out) :: idx0
4873  integer, intent(out) :: idx1
4874  real(RP), intent(in) :: x
4875  integer, intent(in) :: nx
4876  real(RP), intent(in) :: x_org(nx)
4877  logical, intent(in) :: loop
4878 
4879  real(RP) :: xwork
4880  integer :: i
4881 
4882  if ( x < x_org(1) ) then
4883  if ( loop ) then
4884  xwork = x_org(1) - ( x_org(2) - x_org(1) )**2 / ( x_org(3) - x_org(2) )
4885  fact0 = ( x_org(1) - x ) / ( x_org(1) - xwork )
4886  fact1 = ( x - xwork ) / ( x_org(1) - xwork )
4887  idx0 = nx
4888  idx1 = 1
4889  else
4890  fact0 = ( x_org(2) - x ) / ( x_org(2) - x_org(1) )
4891  fact1 = ( x - x_org(1) ) / ( x_org(2) - x_org(1) )
4892  idx0 = 1
4893  idx1 = 2
4894  end if
4895  else if ( x > x_org(nx) ) then
4896  if ( loop ) then
4897  xwork = x_org(nx) + ( x_org(nx) - x_org(nx-1) )**2 / ( x_org(nx-1) - x_org(nx-2) )
4898  fact0 = ( xwork - x ) / ( xwork - x_org(nx) )
4899  fact1 = ( x - x_org(nx) ) / ( xwork - x_org(nx) )
4900  idx0 = nx
4901  idx1 = 1
4902  else
4903  fact0 = ( x_org(nx) - x ) / ( x_org(nx) - x_org(nx-1) )
4904  fact1 = ( x - x_org(nx-1) ) / ( x_org(nx) - x_org(nx-1) )
4905  idx0 = nx-1
4906  idx1 = nx
4907  end if
4908  else
4909  do i = 2, nx
4910  if ( x <= x_org(i) ) then
4911  fact0 = ( x_org(i) - x ) / ( x_org(i) - x_org(i-1) )
4912  fact1 = ( x - x_org(i-1) ) / ( x_org(i) - x_org(i-1) )
4913  idx0 = i-1
4914  idx1 = i
4915  exit
4916  end if
4917  end do
4918  end if
4919 
4920  return
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ mkinit_type

integer, public mod_mkinit::mkinit_type = -1

Definition at line 105 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

105  integer, public :: MKINIT_TYPE = -1

◆ i_ignore

integer, parameter, public mod_mkinit::i_ignore = 0

Definition at line 106 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

106  integer, public, parameter :: I_IGNORE = 0

◆ i_planestate

integer, parameter, public mod_mkinit::i_planestate = 1

Definition at line 108 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

108  integer, public, parameter :: I_PLANESTATE = 1

◆ i_tracerbubble

integer, parameter, public mod_mkinit::i_tracerbubble = 2

Definition at line 109 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

109  integer, public, parameter :: I_TRACERBUBBLE = 2

◆ i_coldbubble

integer, parameter, public mod_mkinit::i_coldbubble = 3

Definition at line 110 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

110  integer, public, parameter :: I_COLDBUBBLE = 3

◆ i_lambwave

integer, parameter, public mod_mkinit::i_lambwave = 4

Definition at line 112 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

112  integer, public, parameter :: I_LAMBWAVE = 4

◆ i_gravitywave

integer, parameter, public mod_mkinit::i_gravitywave = 5

Definition at line 113 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

113  integer, public, parameter :: I_GRAVITYWAVE = 5

◆ i_khwave

integer, parameter, public mod_mkinit::i_khwave = 6

Definition at line 114 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

114  integer, public, parameter :: I_KHWAVE = 6

◆ i_turbulence

integer, parameter, public mod_mkinit::i_turbulence = 7

Definition at line 115 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

115  integer, public, parameter :: I_TURBULENCE = 7

◆ i_mountainwave

integer, parameter, public mod_mkinit::i_mountainwave = 8

Definition at line 116 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

116  integer, public, parameter :: I_MOUNTAINWAVE = 8

◆ i_warmbubble

integer, parameter, public mod_mkinit::i_warmbubble = 9

Definition at line 118 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

118  integer, public, parameter :: I_WARMBUBBLE = 9

◆ i_supercell

integer, parameter, public mod_mkinit::i_supercell = 10

Definition at line 119 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

119  integer, public, parameter :: I_SUPERCELL = 10

◆ i_squallline

integer, parameter, public mod_mkinit::i_squallline = 11

Definition at line 120 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

120  integer, public, parameter :: I_SQUALLLINE = 11

◆ i_wk1982

integer, parameter, public mod_mkinit::i_wk1982 = 12

Definition at line 121 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

121  integer, public, parameter :: I_WK1982 = 12

◆ i_dycoms2_rf01

integer, parameter, public mod_mkinit::i_dycoms2_rf01 = 13

Definition at line 122 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

122  integer, public, parameter :: I_DYCOMS2_RF01 = 13

◆ i_dycoms2_rf02

integer, parameter, public mod_mkinit::i_dycoms2_rf02 = 14

Definition at line 123 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

123  integer, public, parameter :: I_DYCOMS2_RF02 = 14

◆ i_rico

integer, parameter, public mod_mkinit::i_rico = 15

Definition at line 124 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

124  integer, public, parameter :: I_RICO = 15

◆ i_interporation

integer, parameter, public mod_mkinit::i_interporation = 16

Definition at line 126 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

126  integer, public, parameter :: I_INTERPORATION = 16

◆ i_landcouple

integer, parameter, public mod_mkinit::i_landcouple = 17

Definition at line 128 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

128  integer, public, parameter :: I_LANDCOUPLE = 17

◆ i_oceancouple

integer, parameter, public mod_mkinit::i_oceancouple = 18

Definition at line 129 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

129  integer, public, parameter :: I_OCEANCOUPLE = 18

◆ i_urbancouple

integer, parameter, public mod_mkinit::i_urbancouple = 19

Definition at line 130 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

130  integer, public, parameter :: I_URBANCOUPLE = 19

◆ i_triplecouple

integer, parameter, public mod_mkinit::i_triplecouple = 20

Definition at line 131 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

131  integer, public, parameter :: I_TRIPLECOUPLE = 20

◆ i_bubblecouple

integer, parameter, public mod_mkinit::i_bubblecouple = 21

Definition at line 132 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

132  integer, public, parameter :: I_BUBBLECOUPLE = 21

◆ i_seabreeze

integer, parameter, public mod_mkinit::i_seabreeze = 22

Definition at line 134 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

134  integer, public, parameter :: I_SEABREEZE = 22

◆ i_heatisland

integer, parameter, public mod_mkinit::i_heatisland = 23

Definition at line 135 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

135  integer, public, parameter :: I_HEATISLAND = 23

◆ i_dycoms2_rf02_dns

integer, parameter, public mod_mkinit::i_dycoms2_rf02_dns = 24

Definition at line 137 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

137  integer, public, parameter :: I_DYCOMS2_RF02_DNS = 24

◆ i_real

integer, parameter, public mod_mkinit::i_real = 25

Definition at line 139 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

139  integer, public, parameter :: I_REAL = 25

◆ i_grayzone

integer, parameter, public mod_mkinit::i_grayzone = 26

Definition at line 141 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

141  integer, public, parameter :: I_GRAYZONE = 26

◆ i_boxaero

integer, parameter, public mod_mkinit::i_boxaero = 27

Definition at line 142 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

142  integer, public, parameter :: I_BOXAERO = 27

◆ i_warmbubbleaero

integer, parameter, public mod_mkinit::i_warmbubbleaero = 28

Definition at line 143 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

143  integer, public, parameter :: I_WARMBUBBLEAERO = 28

◆ i_cavityflow

integer, parameter, public mod_mkinit::i_cavityflow = 29

Definition at line 145 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

145  integer, public, parameter :: I_CAVITYFLOW = 29

◆ i_barocwave

integer, parameter, public mod_mkinit::i_barocwave = 30

Definition at line 146 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

146  integer, public, parameter :: I_BAROCWAVE = 30

◆ i_bomex

integer, parameter, public mod_mkinit::i_bomex = 31

Definition at line 147 of file mod_mkinit.f90.

Referenced by mkinit(), and mkinit_setup().

147  integer, public, parameter :: I_BOMEX = 31