###############################
######## Model Core ###########
###############################

core: nmm                   # The dynamic core options:
                                # nmm
                                # gfs
                                # fim
                                # arw


###############################
##### Grid Specifications #####
###############################

im:   401                   # I gridpoints
jm:   325                   # J gridpoints
lm:    60                   # Number of atmospheric layers

tph0d:  0.0                 # Central geographic latitude of grid (degrees)
tlm0d:  0.0                 # Central geographic longitude of grid (degrees, positive east)

wbd:    0.0                 # Grid's western boundary (rotated degrees)
sbd:    0.0                 # Grid's southern boundary (rotated degrees)


##############################
##### Grid Decomposition #####
##############################

inpes:  INPES                   # Number of compute tasks in the I direction
jnpes:  JNPES                  # Number of compute tasks in the J direction

###############################
#### Specify the I/O tasks ####
###############################
                                                                                                                                             
quilting:              true    # Do you want asynchronous quilting/history writes?
read_groups:           0
read_tasks_per_group:  0
write_groups:          WRITE_GROUPS
write_tasks_per_group: WRITE_TASKS

##########################################
##### Fundamental Timestep (seconds) #####
##########################################

dt_int: 6                   # Integer seconds
dt_num: 1                   # Numerator of fractional second
dt_den: 4                   # Denominator of fractional second

filt_dt_int: 2                   # Integer seconds
filt_dt_num: 0                   # Numerator of fractional second
filt_dt_den: 3                   # Denominator of fractional second

###############################
##### Forecast Start Time #####
###############################

start_year:   YSTART
start_month:  MSTART
start_day:    DSTART
start_hour:   HSTART
start_minute: 0
start_second: 0

tstart:       TSTART            # The starting forecast hour

###########################
##### Forecast Length #####
###########################

nhours_fcst:    LENGTH   # Length of the forecast (hours)
minutes_history: 60      # Frequency of history output (minutes)
nhours_dfini:   0        # Initial hour for history output (hours)

restart:        REST     # True--> A restarted run
minutes_restart: RESINT    # Frequency of restart output (minutes)

avg_max_length: 3600        # length of accumulation period for average and
                            # min/max fields (seconds) 

rst_out_00:     false       # True--> Write 00h history in restarted run
write_last_restart: WRTLAST # True--> Write last restart file
freerun:        true        # True--> Original
                            # False--> 5X divergence dumping in NDAS forec.

#########################
##### General modes #####
#########################

global:  false              # True--> Global ; False--> Regional
hydro:   false              # True--> Hydrostatic ;  False--> Nonhydrostatic
adiabatic: false            # True--> Adiabatic ;  False--> Diabatic
oper:      true


###########################
#####  Printouts      #####
###########################

print_all:     false        # Print all statements to err file
print_diag:    false        # Print diagnostics (CALL FIELD_STATS)
print_esmf:    false        # Print ESMF return signals
print_output:  false        # Print info on records written into history/restart file
print_timing:  true         # Print timing info (CPU time)

####################
##### Ensemble #####
####################

ENS_SPS:      false
RUN_CONTINUE: false
total_member: 1
PE_MEMBER01:   0

####################
##### Dynamics #####
####################

lnsh: 5
lnsv: 5
 
secadv:  true               # True--> 2nd order advection ; False--> 4th order advection
                                                  
secdif:  true               # True--> 2nd order diffusion ; False--> 4th order diffusion
smag2:   0.3                # Smagorinsky constant for 2nd order diffusion
                                        
codamp:  12.0                # Divergence damping constant
wcor:    0.18                # Divergence correction factor
 
pwrc:    1.0                # Fourier filter factor
                
idtad:   2                  # Number of adjustment timesteps between passive advection calls

advect_tracers:  true      # Will tracers be advected?
idtadt:  2                  # Number of adjustment timesteps between tracer advection calls (normally 1)

num_tracers_met:   4         # Number of specified meterological "tracer" scalars (e.g., water)
num_tracers_chem:  0         # Number of specified chem/aerosol "tracer" scalars
                 
###################################
##### Digital Filtering options ###
###################################

filter_method: FILTEROPTION          # 0--->none ; 1--->DFL ; 2---> DDFI ; 3--->TDFI

nsecs_dfl: 1800             # HALF foward filter window (s)          (DFL)
nsecs_bckddfi: 1800         # HALF backward integration duration (s) (DDFI)
nsecs_fwdddfi: 3600         # HALF foward filter window (s)          (DDFI)
nsecs_bcktdfi: 600         # HALF backward filter window (s)        (TDFI)
nsecs_fwdtdfi: 600         # HALF forward filter window (s)         (TD

radar_init: 0

########################################
##### Read/Write Global Summations #####
########################################

use_allreduce:  true        # False--> use mpi send/recv for global sums
                            # True--> use mpi_allreduce for global sums

read_global_sums:  false    # Read in global summations or not
write_global_sums: false    # Write out global summations or not


##################################
### Precipitation Assimilation####
##################################

pcpflg:  false              # True--> assimilation on ; False--> assimilation off
pcphr: 6
write_prec_adj: false        # True--> create baseline prec. files ; False--> regular run


###########################
### Gravity Wave Drag  ####
###########################

gwdflg:  false               # True--> GWD on ; False--> GWD off

cdmb:       0.5             # tunable parameter for adjusting mountain blocking
cleffamp:   1.00            # tunable parameter, depends on resolution
sigfac:     3.00            # tunable parameter
factop:     0.50            # de-acceleration limiter
rlolev:    50.00            # critical pressure level (check units)
dpmin:      0.00            # minimum thickness of the reference layer (check units)

##################################
##### Physics Scheme Options #####
##################################
#---------------------------------
shortwave: rrtm             # Radiation schemes
longwave:  rrtm        
                                # gfdl--> GFDL (shortwave and longwave)
                                # gsfc--> Goddard shortwave
                                # dudh--> Dudhia shortwave
                                # rrtm--> RRTM longwave

np3d: 3                     # cloud properties for radiation
                                # 3--> ferrier's microphysics cloud scheme (only stratiform cloud)
                                # 4--> zhao/carr/sundqvist microphysics cloud (now available in the NMMB)
                                # 5--> NAM stratiform + convective cloud optical depth and fraction (GFDL type convective cloud)
                                # 8--> Thompson microphysics and special Thompson rrtm SW radiation

cldfraction: default        # cloud fraction scheme for radiation
                                # default  --> according to the choice of np3d
                                # thompson --> thompson

co2tf:  1                       # co2tf--> Read (0) or generate internally (1)
                                #          the GFDL CO2 transmission functions

#---------------------------------
convection:  none        # Convection scheme
                                # bmj --> Betts-Miller-Janjic
                                # kf  --> Kain-Fritsch
                                # sas --> Simplified Arakawa-Schubert
                                # gd  --> Grell-Devenyi
                                # none--> No convection

#---------------------------------
microphysics:  fer_hires     # Microphysics scheme
                                # fer--> Ferrier
                                # fer_hires--> Ferrier operational
                                # kes--> Kessler
                                # lin--> Lin
                                # tho--> Thompson
                                # wsm3--> WSM3
                                # gfs--> GFS microphy

spec_adv:    .true.       # Individual cloud species advected
lmprate:  .false.           # .true.: 4D array called MPRATES containing
                            # 3D microphysics source/sink terms
                            # .false.: One 3D array called MPRATES
                            # with zero values

#---------------------------------
turbulence:  myj            # Turbulence schemes
                                # myj--> Mellor-Yamada-Janjic
                                # gfs--> GFS PBL

#---------------------------------
                                                                                                                                              
sfc_layer:  myj             # Surface layer schemes
                                # myj--> Mellor-Yamada-Jamnjic
                                # mm5--> MM5 sfc layer
                                                                                                                                              
#---------------------------------
                                                                                                                                              
land_surface:  noah         # Land surface schemes
                                # noah--> NOAH scheme
                                # liss--> Janjic LSM

ucmcall: 0                  # Use (1) or do not use (0) the Urban Canopy Model
ivegsrc: 1                     # Use (1) or do not use (0) IGBP types

#---------------------------------
                                                                                                                                              
gfs:  false                 # Select entire GFS physics suite

################################################
##### Parameter for fer_hires microphysics #####
################################################

rhgrd:     1.0        # threshold RH for onset of condensation (fer_hires only)

######################################
##### Shallow Convection Switches ####
######################################

fres:     0.25               # resolution factor for dsp's (default)
fr:       1.00               # land factor for dsp's (dafault)
fsl:      0.75               # reduction factor for "slow" dsp's over land (dafault)
fss:      0.75               # reduction factor for "slow" dsp's over water (dafault)

entrain:    .false.         ! entrainment
newall:     .false.         ! new cloud used at all shallow points
newswap:    .true.          ! new clouds at swap shallow points
newupup:    .false.         ! new cloud used for both heat and moisture up shallow pts.
nodeep:     .true.          ! all deep convection diverted to shallow swap algorythm

#############################
##### Physics Timesteps #####
#############################

nrads:    192               # Number of dynamics timesteps between calls to shortwave
nradl:    192               # Number of dynamics timesteps  between calls to longwave

nphs:      2                # Number of dynamics timesteps between calls to landsurface and turbulence

nprecip:   2                # Number of dynamics timesteps between calls to convection and microphysics

####
#### NOTE:  User must set nhrs_udef to true and set the emptying frequencies (nhrs_*) to the desired values
####        or else all accumulations will automatically be emptied at the frequency of history output.
####

nhrs_udef:  true            # User defined when fluxes are emptied.
                            # False--> Auto ; True--> User defined:

nhrs_prec:  3               # Frequency in hours between times when precip arrays are emptied
nhrs_heat:  3               # Frequency in hours between times when heating arrays are emptied
nhrs_clod:  3               # Frequency in hours between times when cloud arrays are emptied
nhrs_rdlw:  3               # Frequency in hours between times when LW radiation arrays are emptied
nhrs_rdsw:  3               # Frequency in hours between times when SW radiation arrays are emptied
nhrs_srfc:  3               # Frequency in hours between times when sfc evap/flux arrays are emptied


#######################################
####  Write History Specifications ####
#######################################

nemsio_input: true

write_hst_bin:           false      # True--> Write history files in binary format
write_hst_nemsio:        true      # True--> Write history files in NEMSIO format
write_rst_bin:           false      # True--> Write restart files in binary format
write_rst_nemsio:        true     # True--> Write restart files in NEMSIO format

write_nemsioctl:         true       # True--> Yes write ctl for nemsio run history files
write_fsyncflag:         true       # True--> Yes call fsync
write_donefileflag:      true       # True--> Yes write done file for nemsio run history files
write_dopost:        false  # True--> Yes run post on quilt
post_gribversion:   'grib1' # grib version for post output

io_hst_unit:             -999
io_rst_unit:             -999
io_hst_file:             'DEFERRED'
io_rst_file:             'DEFERRED'
                                                                                                                                              
#-------------------------------------------------
# If IO_FILE == 'DEFERRED', use HST_NAME_BASE
# as the first part of the history file names.
#-------------------------------------------------
hst_name_base:           'nmmb_hst'
rst_name_base:           'nmmb_rst'
io_status:               'REPLACE'
io_access:               'SEQUENTIAL'
io_form:                 'UNFORMATTED'
io_recl:                 100
io_position:             ' '
io_action:               'WRITE'
io_delim:                ' '
io_pad:                  ' '


##################################
####  Nesting Specifications  ####
##################################

my_domain_id:     5
my_parent_id:     1    
n_children:       0
my_domain_moves:  false      # Does this domain move?
ntrack: 00                    # the number of nphys steps between tracker calls

i_parent_start: 738
j_parent_start: 145

parent_child_space_ratio: 4

nest_mode:  1-way            # 1-way or 2-way interaction between parents/children
generation: 1                # If 2-way mode, in which generation is this domain?

ratio_sfc_files: 9            # Ratio of uppermost parent grid increment to this moving nest's

nrows_p_upd_w: 2              # West bndry rows of moving nest footprint updated by parent
nrows_p_upd_e: 2              # East bndry rows of moving nest footprint updated by parent
nrows_p_upd_s: 2              # South bndry rows of moving nest footprint updated by parent
nrows_p_upd_n: 2              # North bndry rows of moving nest footprint updated by parent

input_ready:   true

#######################################
####  timing info                  ####
#######################################
nhours_clocktime:   1        # Frequency in hours between clocktime diagnostic prints.
npe_print:          1       # The MPI task that will provide the clocktimes.

#######################
########  Hurricane ###
#######################
 
run_tc:             false    # true=use hwrf phys

sas_pgcon:          0.55     # convectively forced pressure gradient factor,default=0.55
sas_shal_pgcon:     -1       # convectively forced pressure gradient factor sas shallow conv,
                             # '-1' means sas_pgcon is used
sas_shalconv:       1        # 1=enable shallow conv,better with gfspblhur scheme
sas_mass_flux:      9.0e9    # mass flux limit,default=9e9
sas_mommix:         1.0      # SAS momentum mixing coef
var_ric:            1.0      # 1=use variable critical Ri# in gfspblhur
coef_ric_l:         0.16     # Regression coef for land Ric,default=0.16
coef_ric_s:         0.16     # Regression coef for sea Ric,default=0.16
alpha:              0.7      # adjustment coef for K in gfspblhur
sfenth:             0.0      # GFDL surface-layer enhancement coef
disheat:            true     # true='consider diss heating'