This function creates a SETUP.CFG file for HYSPLIT model.
Usage
obs_hysplit_setup(
idsp = 2,
capemin = 500,
vscales = -1,
kbls = 1,
kblt = 5,
kmixd = 0,
initd = 0,
veght = 0.5,
kmix0 = 150,
numpar = 500,
maxpar = 500,
ichem = 8,
krand = 4,
varsiwant = c("time", "indx", "lati", "long", "zagl", "zsfc", "foot", "samt", "temp",
"dswf", "mlht", "dens", "dmas", "sigw", "tlgr"),
ivmax = length(varsiwant),
outdt = 15,
extra_params,
setup = "SETUP.CFG"
)
Arguments
- idsp
particle dispersion scheme 1:HYSPLIT 2:STILT
- capemin
-1 no convection; -2 Grell convection scheme; -3 extreme convection; >0 enhanced vertical mixing when CAPE exceeds this value (J/kg)
- vscales
vertical Lagrangian time scale (sec) for stable PBL
- kbls
boundary layer stability derived from 1:fluxes 2:wind_temperature
- kblt
boundary layer turbulence parameterizations 1:Beljaars 2:Kanthar 3:TKE 4:Measured 5:Hanna
- kmixd
mixed layer obtained from 0:input 1:temperature 2:TKE 3:modified Richardson
- initd
initial distribution, particle, puff, or combination
- veght
Height below which particle's time is spent is tallied to calculate footprint for PARTICLE_STILT.DAT less than or equal to 1. 0: fraction of PBL height; greater than 1.0: heightAGL (m)
- kmix0
minimum mixing depth
- numpar
number of puffs or particles to released per cycle
- maxpar
maximum number of particles carried in simulation
- ichem
chemistry conversion modules 0:none 1:matrix 2:convert 3:dust 4: conc grid equal to met grid, 5: divide output mass by air density (kg/m3) to sum as mixing ration, 7: transport deposited particles on the ocean surface, 8: stilt mode mixing ratio and varying layer, 9: set concentration layer one to a fraction of the boundary layer, 10: restructure concentration grid into time-varying transfer matrix, 11: enable daughter produyct calculation.
- krand
0 method to calculate random number 0=precompute if NUMPAR greater than 5000 or dynamic if NUMPAR less than or equal to 5000; 1=precalculated; 2=calculated in pardsp; 3=none; 4=random initial seed number and calculated in pardsp; 10=same as 0 with random initial seed for non-dispersion applications; 11=same as 1 with random initial seed for non-dispersion applications; 12=same as 2 with random initial seed for non-dispersion applications; 13=same as 3 with random initial seed for non-dispersion applications
- varsiwant
='TIME','INDX','LONG','LATI','ZAGL','SIGW','TLGR','ZSFC', TEMP', 'SAMT','FOOT','SHTF','DMAS','DENS','RHFR','SPHU','DSWF','WOUT','MLHT','PRES' variables written to PARTICLE_STILT.DAT.
However, the default in this case is: c('time','indx', 'lati','long','zagl', 'zsfc','foot','samt', 'temp', 'dswf','mlht','dens','dmas','sigw','tlgr'
- ivmax
0 number of variables written to PARTICLE_STILT.DAT. Must equal the number of variables listed for variable VARSIWANT
- outdt
Default 15. defines the output frequency in minutes of the endpoint positions in the PARTICLE.DAT file when the STILT emulation mode is configured. The default value of 0 results in output each time step while the positive value gives the output frequency in minutes. A negative value disables output. The output frequency should be an even multiple of the time step and be evenly divisible into 60. In STILT emulation mode, the time step is forced to one minute.
- extra_params
more parameters
- setup
Default SETUP.CFG
Note
The var description comes from hysplit 5.3 manual page 214 From the hysplit user guide: STILT mode The STILT model incorporates the variation of HYSPLIT developed by Lin et al. (2003 - JGR, VOL. 108, NO. D16, 4493, doi:10.1029/2002JD003161) that can be used to estimate upwind surface fluxes from atmospheric measurements. Two changes are introduced; the mass summation is divided by air density resulting in a mixing ratio output field (ICHEM=6) and the lowest concentration summation layer (concentration layer top depth) is permitted to vary with the mixed layer depth (ICHEM=9). The ICHEM=8 switch turns on both density and varying layer depth. Two text files of particle position information (PARTICLE.DAT and PARTICLE_STILT.DAT) at each time step will also be created unless the namelist parameter OUTDT defining the output interval (min) is changed. PARTICLE_STILT.DAT follows the same format as STILT. The footprint output in PARTICLE.DAT represents particles that were below 50 particles that were below a user defined height (VEGHT).
Examples
{
# Do not run
setup_file <- tempfile()
obs_hysplit_setup(setup = setup_file)
cat(readLines(setup_file),sep = "\n")
}
#> &SETUP
#> idsp = 2,
#> capemin = 500,
#> vscales = -1.0,
#> kbls = 1,
#> kblt = 5,
#> kmixd = 0,
#> initd = 0,
#> veght = 0.5,
#> kmix0 = 150,
#> numpar = 500,
#> maxpar = 500,
#> ichem = 8,
#> krand = 4,
#> ivmax = 15,
#> varsiwant='time','indx','lati','long','zagl','zsfc','foot','samt','temp','dswf','mlht','dens','dmas','sigw','tlgr',
#> outdt = 15,
#> /