calculating trajectories with batch files

Topics about the HYSPLIT trajectory model.
Post Reply
jade
Posts: 1
Joined: March 23rd, 2016, 11:06 pm
Registered HYSPLIT User: No

calculating trajectories with batch files

Post by jade »

I want to calculate thousands of trajectories in DOS with two batch files, and I do not need to simulate the pollutant concentration. But I can't get the endpoit file after each simulation. I revised these two batch file from the files I downloaded from some website. Please help me check that what is wrong with these two batch files. Many thanks.





the notice after each simulation in dos is:
notice: using namelist file
setup.cfg

Calculation Started ... please be patient
900
Started Trajectory Drawing
Last Changed Rev: 761
Last Changed Date: 2015-06-16 10:00:16 -0400 (Tue, 16 Jue 2015)

ERROR: no trajectories to plot
900
Started Trajectory Drawing
Last Changed Rev: 761
Last Changed Date: 2015-06-16 10:00:16 -0400 (Tue, 16 Jue 2015)

ERROR: no trajectories to plot
900






The message I got after each simulation is as below:
Simulation Date (CCYYMMDD): 20160324
Simulation Time (HHMMSS.S): 125654.893
WARNING: metini - FLUXES not found in data (kg,kt) 1 1
Setting KBLS=2 to use the wind/temp profiles!
Simulation Date (CCYYMMDD): 20160324
Simulation Time (HHMMSS.S): 125656.288
WARNING: metini - FLUXES not found in data (kg,kt) 2 1
Setting KBLS=2 to use the wind/temp profiles!

KG KT DATA SIZE NX NY
1 1 CDC1 278.0 144 73
1 2 CDC1 278.0 144 73

NOTICE main: number meteo grids and times - 1 2

HYSPLIT4
Last Changed Rev: 761
Last Changed Date: 2015-06-16 10:00:16 -0400 (Tue, 16 Jun 2015)

------------- Start Namelist configuration -------------------
Internal grid parameters (nlvl,aa,bb,cc): 19 30.00000
-25.00000 5.000000
&SETUP
INITD = 0,
KHMAX = 9999,
NUMPAR = 0,
MAXPAR = 0,
MAXDIM = 0,
QCYCLE = 0.0000000E+00,
P10F = 0.0000000E+00,
KMIXD = 0,
KMIX0 = 0,
FRME = 0.0000000E+00,
FRMR = 0.0000000E+00,
KRND = 0,
DELT = 0.0000000E+00,
KDEF = 0,
TKERD = 0.0000000E+00,
TKERN = 0.0000000E+00,
NDUMP = 0,
NCYCL = 0,
TRATIO = 0.7500000 ,
ISOT = -99,
MGMIN = 100,
KMSL = 2,
NSTR = 0,
MHRS = 9999,
NVER = 0,
CPACK = 0,
CMASS = 0,
ICHEM = 0,
EFILE = ,
VSCALE = 100.0000 ,
VSCALEU = 100.0000 ,
VSCALES = 100.0000 ,
K10M = 1,
VDIST = ,
KHINP = 0,
PINBC = ,
HSCALE = 10800.00 ,
TOUT = 60,
TM_PRES = 1,
TM_TPOT = 0,
TM_TAMB = 0,
TM_RAIN = 0,
TM_MIXD = 1,
TM_TERR = 0,
TM_DSWF = 0,
TM_RELH = 0,
TM_SPHU = 0,
TM_MIXR = 0,
DXF = 1.000000 ,
DYF = 1.000000 ,
DZF = 9.9999998E-03,
PINPF = ,
POUTF = ,
NINIT = 0,
KAGL = 1,
KPUFF = 0,
KBLT = 1,
KZMIX = 0,
TVMIX = 1.000000 ,
KBLS = 1,
CONAGE = 0,
KSPL = 0,
FRHS = 0.0000000E+00,
FRVS = 0.0000000E+00,
FRTS = 0.0000000E+00,
FRHMAX = 0.0000000E+00,
SPLITF = 0.0000000E+00,
MESSG = MESSAGE ,
NBPTYP = 1,
RHB = 80,
RHT = 60,
OUTDT = 0,
DECAY = 1,
KWET = 1,
KRAND = 1,
CAPEMIN = -1.000000
/
------------- End Namelist configuration -------------------
NOTICE advrng: (kg ,xyr,xy1) - 1 144 73 1 1
NOTICE metpos: (mtime,ftime) - 49093200 0
NOTICE metpos: (mtime,ftime) - 49093560 0
NOTICE advpnt: (kg,nx,ny,nz) - 1 144 73 19
NOTICE sfcinp: reading ASCDATA.CFG
NOTICE sfcinp: record terminator = CR/LF
NOTICE metgrd: (kg, xyr,xy1) - 1 144 73 1 1
NOTICE metinp: CDC1 1 1693 144 73 1 1 49093200 93 5 5 12
NOTICE metinp: CDC1 1 1787 144 73 1 1 49093560 93 5 5 18
FATAL ERROR: Fraction release height exceeds limits (0> F <=2.0)!
Number, Fraction, MixDepth: 1 500.0000 921.0129







the hysplit run batch file is as below:(I only list two lines of this file)
call import_eco_reg_sand_storm_set 03 04 16 16 04 YS YS_0001_03_04_17_16_04 RP200304.gbl RP200305.gbl
call import_eco_reg_sand_storm_set 93 05 05 17 03 YS YS_0002_93_05_17_17_03 RP199305.gbl RP199306.gbl






the other setup batch file is as below (Please ignore the Chinese):
@ECHO OFF

rem example SET file to carry out forward TRAJECTORY simulations

rem *************************************
rem SET KEY DIRECTORIES
rem *************************************

rem *IF YOU HAVE YOUR NCAR GLOBAL REANALYSIS MET DATA IN A DIFFERENT DIRECTORY
rem than indicated here, the following line must be changed to indicate the
rem directory you have used...
SET GBL_DIR=f:\HYSPLIT\data\

rem SET WORK_DIR=c:\hysplit4\working_sand_storm\
SET WORK_DIR=.\

rem SET RESULTS_DIR=c:\hysplit4\results\sand_storm\
SET RESULTS_DIR=..\results\sand_storm\

rem SET EXEC_DIR=c:\hysplit4\exec\
SET EXEC_DIR=..\exec\

rem if results directory does not exist, create it:
IF NOT EXIST %RESULTS_DIR% mkdir %RESULTS_DIR%

rem *******************************************
rem STRUCTURE OF RUN, SET BAT FILES
rem *******************************************
rem parameter #1: start year (UTC)
rem parameter #2: start month (UTC)
rem parameter #3: start day (UTC)
rem parameter #4: start hour (UTC)
rem parameter #5: start minute (UTC)
rem parameter #6: site code
rem parameter #7: run name
rem parameter #8: GBL_1
rem parameter #9: GBL_2

rem ********************************************************
rem WHAT A SIMPLE TRAJECTORY CONTROL FILE LOOKS LIKE
rem ********************************************************

rem 00 00 00 00
rem 1
rem 40.0 -90.0 10.0
rem -48
rem 0
rem 10000.0
rem 1
rem ../metdata/
rem oct1618.BIN
rem ./
rem tdump

rem *****************************************************************
rem THE TYPE OF CONTROL FILE THAT THIS SET BATCH FILE CREATES
rem *****************************************************************

rem 08 08 15 05 30
rem 1
rem 38.9924 -77.0304 0.5
rem -120
rem 0
rem 10000.0
rem 2
rem f:\HYSPLIT\data\
rem RP199001.gbl
rem f:\HYSPLIT\data\
rem RP199002.gbl
rem .\
rem tdump.txt

rem *********************************************************************
rem first we will create the CONTROL file that HYSPLIT uses
rem to simulate the forward-trajectory
rem *********************************************************************

rem *********************************************************************
rem 1. UTC Starting Time for the Simulation (year, month, day, hour)

rem Default: 0 0 0 0

rem Enter the two digit values for the UTC time that the calculation is to start.
rem Use 0's to start at the beginning (or end) of the file according to the
rem direction of the calculation. All zero values in this field will force the
rem calculation to use the time of the first (or last) record of the meteorological
rem data file. In the special case where year and month are zero, day and hour are
rem treated as relative to the start or end of the file. For example, the first
rem record of the meteorological data file usually starts at 0000 UTC. An entry of
rem "00 00 01 12" would start the calculation 36 hours from the start of the data file.

ECHO %1 %2 %3 %4 %5 >control.txt

rem **********************************************************************
rem 2. Number of Starting Locations
rem Default: 1

ECHO 1 >>control.txt

rem **********************************************************************

rem 3. Starting Location [lat,long, height (meters above ground)]
rem ** NOTE that since we are setting KMSL = 2 in setup file below,
rem heights here are interpreted as fractions of the Planetary Boundary Layer (PBL)
rem so, when 0.5 is set below, it means that the trajectory starts in the middle
rem of the PBL for any given starting time.

rem west longitudes are negative; south latitudes are negative

if %6==YS goto site_YS
if %6==TL goto site_TL
if %6==QL goto site_QL
if %6==KQ goto site_KQ
if %6==HS goto site_HS
if %6==HT goto site_HT
if %6==SJ goto site_SJ
if %6==AT goto site_AT
if %6==AJ goto site_AJ
if %6==HL goto site_HL
if %6==GN goto site_GN
if %6==ZX goto site_ZX
if %6==XA goto site_XA


rem if site code not recognized, enter 0's for lat/long
rem which starts at center of met data
ECHO 0.0 0.0 0.5 >>control.txt
goto site_end

:site_YS
rem YS is at 41.8542 109.4035 500.0
ECHO 41.8542 109.4035 500.0 >>control.txt
goto site_end

:site_TL
rem TL site is at 37.9709 79.2708 500.0
ECHO 37.9709 79.2708 500.0 >>control.txt
goto site_end

:site_QL
rem QL site is at 38.9715 98.6065 500.0
ECHO 38.9715 98.6065 500.0 >>control.txt
goto site_end

:site_KQ
rem KQ site is at 43.9995 120.9294 500.0
ECHO 43.9995 120.9294 500.0 >>control.txt
goto site_end

:site_HS
rem HS site is at 43.0921 114.7861 500.0
ECHO 43.0921 114.7861 500.0 >>control.txt
goto site_end

:site_HT
rem HT site is at 36.8886 108.3089 500.0
ECHO 36.8886 108.3089 500.0 >>control.txt
goto site_end

:site_SJ
rem SJ site is at 34.2294 95.5130 500.0
ECHO 34.2294 95.5130 500.0 >>control.txt
goto site_end

:site_AT
rem AT site is at 46.9057 88.4035 500.0
ECHO 46.9057 88.4035 500.0 >>control.txt
goto site_end

:site_AJ
rem AJ site is at 38.5783 88.0062 500.0
ECHO 38.5783 88.0062 500.0 >>control.txt
goto site_end

:site_HL
rem HL site is at 48.5340 117.5897 500.0
ECHO 48.5340 117.5897 500.0 >>control.txt
goto site_end

:site_GN
rem GN site is at 34.5697 102.5682 500.0
ECHO 34.5697 102.5682 500.0 >>control.txt
goto site_end

:site_ZX
rem ZX site is at 33.3827 85.1577 500.0
ECHO 33.3827 85.1577 500.0 >>control.txt
goto site_end

:site_XA
rem XA site is at 49.9242 124.3956 500.0
ECHO 49.9242 124.3956 500.0 >>control.txt
goto site_end


:site_end

rem **********************************************************************
rem 4. Total Run Time for Simulation (hours)

rem Default: 48

rem Specifies the duration of the calculation in hours.
rem forward calculations. 5 days=120hours

ECHO 120 >>control.txt

rem **********************************************************************

rem 5. Vertical motion option

rem (0:data 1:isob 2:isen 3:dens 4:sigma 5:diverg 6:eta)

rem Default: 0

rem Indicates the vertical motion calculation method.
rem The default "data" selection will use the meteorological model's
rem vertical velocity fields; other options include isobaric,
rem isentropic, constant density, constant internal sigma coordinate,
rem computed from the velocity divergence, and a special transformation
rem to correct the vertical velocities when mapped from quasi-horizontal ETA
rem surfaces to HYSPLIT's internal terrain following sigma coordinate.

ECHO 0 >>control.txt

rem **********************************************************************

rem 6. Top of model domain (internal coordinates m-agl)

rem Default: 10000.0

rem Sets the vertical limit of the internal meteorological grid.
rem If calculations are not required above a certain level, fewer meteorological
rem data are processed thus speeding up the computation. Trajectories will
rem terminate when they reach this level. A secondary use of this parameter is
rem to set the model's internal scaling height - the height at which the
rem internal sigma surfaces go flat relative to terrain. The default internal
rem scaling height is set to 25 km but it is set to the top of the model
rem domain if the entry exceeds 25 km. Further, when meteorological data are
rem provided on terrain sigma surfaces it is assumed that the input data
rem were scaled to a height of 20 km (RAMS) or 34.8 km (COAMPS). If a different
rem height is required to decode the input data, it should be entered on
rem this line as the negative of the height. HYSPLIT's internal scaling height
rem remains at 25 km unless the absolute value of the domain top exceeds 25 km.

ECHO 10000.0 >>control.txt

rem **********************************************************************

rem 7. Number of Input Data Grids

rem Default: 1

rem Number of simultaneous input meteorological files. The following two entries
rem (directory and name) will be repeated this number of times. A simulation
rem will terminate when the computation is off all of the grids in either
rem space or time. Trajectory calculations will check the grid each time
rem step and use the finest resolution input data available at that location
rem at that time. When multiple meteorological grids have different resolution,
rem there is an additional restriction that there should be some overlap between
rem the grids in time, otherwise it is not possible to transfer a trajectory
rem position from one grid to another.
rem 用2个气象数据栅格

ECHO 2 >>control.txt

rem ***********************************************************************

rem 8(1)- Meteorological data grid # 1 directory

rem Default: ( \main\sub\data\ )

rem Directory location of the meteorological file on the grid specified.
rem Always terminate with the appropriate slash (\ or /).

rem *****************************************************************************
rem for the purposes of this example, we will use a few global met data files
rem for particular month (Aug 2008 and Sept 2008) to "assist" with the example
rem simulations being done for Aug and Sept 2008, so that all trajectories will
rem finish even if they leave the EDAS-40km met data grid
rem *****************************************************************************

rem -- 1rd met file
rem ECHO f:\hysplit\data20160301\ >>control.txt
ECHO %GBL_DIR% >>control.txt
rem 将第8个参数写入control文件,就是第一个气象数据栅格
ECHO %8 >>control.txt

rem -- 2th met file
rem ECHO f:\hysplit\data20160301\ >>control.txt
ECHO %GBL_DIR% >>control.txt
rem 将第9个参数写入control文件,就是第二个气象数据栅格
ECHO %9 >>control.txt



rem *************************************************************************

rem 10 - Directory of trajectory output file

rem Default: ( \main\trajectory\output\ )

rem Directory location to which the text trajectory end-points file will
rem be written. Always terminate with the appropriate slash (\ or /).

rem ECHO C:/hysplit4/working_sand_storm/ >>control.txt
ECHO %WORK_DIR% >>control.txt

rem *************************************************************************

rem 11- Name of the trajectory endpoints file

rem Default: file_name

rem The trajectory end-points output file is named in this entry line.

ECHO tdump.txt >>control.txt

IF EXIST CONTROL. DEL CONTROL.
copy control.txt CONTROL.

rem *************************************
rem DONE establishing CONTROL file
rem *************************************

rem *************************************
rem now establish SETUP.CFG file
rem *************************************

IF EXIST SETUP.CFG DEL SETUP.CFG
rem copy setup_cfg_frac_pbl.txt SETUP.CFG

IF EXIST setup.txt del setup.txt

rem now figured out how to ECHO an ampersand -- have to have a ^ in front!
ECHO ^&setup > setup.txt

rem KMSL flag establishes vertical meausurement unit for start height
rem KMSL = 2 = fraction of planetary boundary layer
ECHO KMSL=2, >> setup.txt

rem The endpoint write interval TOUT(60) sets the time interval in minutes
rem at which trajectory end-point positions will be written to the output file.
rem Output intervals of less than 60 minutes can be selected.
rem This will also force the internal time step to be an even multiple
rem of the output interval. 输出的endpoint的时间间隔,

rem will set output interval to 60 minutes; then can use data with smaller grid

ECHO TOUT=60, >> setup.txt

rem ---------------------------------------------------------------------------------
rem MGMIN (10) (Meteorological Sub-grid Size) is the minimum size in grid units
rem of the meteorological sub-grid. The sub-grid is set dynamically during the
rem calculation and depends upon the horizontal distribution of end-points and
rem the wind speed. Larger sub-grids than necessary will slow down the
rem calculation by forcing the processing of meteorological data in regions where
rem no transport or dispersion calculations are being performed. In some
rem situations, such as when the computation is between meteorological data files
rem that have no temporal overlap, the model may try to reload meteorological data
rem with a new sub-grid. This will result in a fatal error. One solution to this
rem error would be to increase the minimum grid size larger than the meteorological
rem grid to force a full-grid data load.

rem ECHO MGMIN = 100, >>setup.txt
rem ECHO MGMIN = %6, >>setup.txt

ECHO MGMIN = 100, >>setup.txt

rem *******************************************
rem Add Meteorology Output Along Trajectory
rem *******************************************

rem Sets the option to write the value of certain meteorological
rem variables along the trajectory to the trajectory output file.
rem The marker variables are set to (1) to turn on the option.
rem Multiple variables may be selected for simultaneous output
rem but only one variable may be plotted. If multiple variables
rem are selected in conjunction with the trajectory display option,
rem then only the last variable output will be shown in the graphic.
rem The variable output order is fixed in the program and cannot be changed.
rem Potential Temperature in degrees Kelvin TM_TPOT (0|1)
rem Ambient Temperature in degrees Kelvin TM_TAMB (0|1)
rem Precipitation rainfall in mm per hour TM_RAIN (0|1)
rem Mixing Depth in meters TM_MIXD (0|1)
rem Relative Humidity in percent TM_RELH (0|1)
rem Solar Radiation downward solar radiation flux in watts TM_DSWF (0|1)
rem Terrain Height in meters required for the trajectory plot to show underlying terrain TM_TERR (0|1)

rem ECHO TM_RAIN = 1 >> setup.txt

rem NOTE -- don't put comma as this is last entry of namelist file

rem ---------------------------------------------------------------------------------
ECHO / >>setup.txt
rem ---------------------------------------------------------------------------------

copy setup.txt SETUP.CFG

rem **********************************************************************
rem NOW THAT ALL INPUTS HAVE BEEN SET, DO SIMULATION
rem **********************************************************************

IF EXIST tdump.txt DEL tdump.txt

%EXEC_DIR%hyts_std

rem **********************************************************************
rem NOW MAKE A MAP OF THE RESULTS of this simulation
rem and create GIS-compatible outputs
rem **********************************************************************

rem HERE ARE COMMAND LINE OPTIONS FOR TRAJPLOT

rem Remember that you can always get the options by executing
rem the program without putting any options in...
rem This works for most of the programs in the EXEC directory

rem C:\hysplit4>exec\trajplot
rem USAGE: trajplot -[options (default)]
rem -a[GIS output: (0)-none 1-GENERATE points 3-KML 4-partial KML 5-GENERATE lines]
rem -A[KML options: 0-none 1-no extra overlays 2-no endpoints 3-Both 1&2]
rem -e[End hour to plot: #, (all) ]
rem -f[Frames: (0)-all files on one 1-one per file]
rem -g[Circle overlay: ( )-auto, #circ(4), #circ:dist_km]
rem -h[Hold map at center lat-lon: (source point), lat:lon]
rem -i[Input files: name1+name2+... or +listfile or (tdump)]
rem -j[Map background file: (arlmap) or shapefiles.txt]
rem -k[Kolor: 0-B&W, (1)-Color, N:colortraj1,...colortrajN]
rem 1=red,2=blue,3=green,4=cyan,5=magenta,6=yellow,7=olive
rem -l[Label interval: ... -12, -6, 0, (6), 12, ... hrs
rem <0=with respect to traj start, >0=synoptic times)]
rem -L[LatLonLabels: none=0 auto=(1) set=2:value(tenths)]
rem -m[Map proj: (0)-Auto 1-Polar 2-Lambert 3-Merc 4-CylEqu]
rem -o[Output file name: (trajplot.ps)]
rem -p[Process file name suffix: (ps) or process ID]
rem -s[Symbol at trajectory origin: 0-no (1)-yes]
rem -v[Vertical: 0-pressure (1)-agl, 2-theta 3-meteo 4-none]
rem -z[Zoom factor: 0-least zoom, (50), 100-most zoom]

rem NOTE: leave no space between option and value

rem **********************************************************************
rem before making the map, establish the STATIONPLOT.CFG file
rem **********************************************************************

rem if STATIONPLOT.CFG file is present and in the right foramt,
rem then HYSPLIT will use it.
rem THE FORMAT FOR THE STATIONPLOT.CFG file is the following:

rem If the file STATIONPLOT.CFG exists in the root directory, plot character(s)
rem specified in that file or it plots a symbol if no characters are given.
rem The format is F6.2,1X,F7.2,1X,A :

rem 123.56x1234.67xA

rem Here's an example of a few lines of such a file:

rem 39.18 -76.54
rem 40.12 -113.71
rem -12.65 110.54 a
rem 86.23 -90.00 c

rem * for the first two points in the example above, a circle would be plotted
rem * for the 3rd point an "a" would be plotted,
rem * and for the 4th pt, a "c" would be plotted;
rem * these could be changed to any other one-character text symbols

rem for this example will use a file made for beltsville
rem or a file made for caddo lake

rem copy appropriate stationplot file information to standard file name
rem required by TRAJPLOT ("STATIONPLOT.CFG"):

rem if %6==OLF goto STATIONPLOT_OLF
rem if %6==GB_aerosol goto STATIONPLOT_GB_aerosol
rem if %6==GB_main goto STATIONPLOT_GB_main

rem if site code not recognized don't do anything:
rem goto STATIONPLOT_end

rem :STATIONPLOT_OLF
rem IF EXIST STATIONPLOT.CFG DEL STATIONPLOT.CFG
rem COPY stationplot_cfg_gb_regional_circles.txt STATIONPLOT.CFG
rem goto STATIONPLOT_end

rem :STATIONPLOT_GB_aerosol
rem IF EXIST STATIONPLOT.CFG DEL STATIONPLOT.CFG
rem COPY stationplot_cfg_gb_regional_circles.txt STATIONPLOT.CFG
rem goto STATIONPLOT_end

rem :STATIONPLOT_GB_main
rem IF EXIST STATIONPLOT.CFG DEL STATIONPLOT.CFG
rem COPY stationplot_cfg_gb_regional_circles.txt STATIONPLOT.CFG
rem goto STATIONPLOT_end

rem :STATIONPLOT_end

rem **********************************************************************
rem first run trajplot to output GIS points:
rem **********************************************************************

IF EXIST plot.ps DEL plot.ps
IF EXIST GIS_traj_ps_01.txt DEL GIS_traj_ps_01.txt
%EXEC_DIR%trajplot -itdump.txt -oplot -v1 -l6 -h -g0:1000 -m3 -a1
IF EXIST GIS_traj_ps_01.txt COPY GIS_traj_ps_01.txt GIS_POINTS.TXT
IF EXIST GIS_POINTS.TXT %EXEC_DIR%ascii2shp %7_points points <GIS_POINTS.TXT

rem **********************************************************************
rem then run trajplot to make GIS lines:
rem **********************************************************************

IF EXIST plot.ps DEL plot.ps
IF EXIST GIS_traj_ps_01.txt DEL GIS_traj_ps_01.txt
%EXEC_DIR%trajplot -itdump.txt -oplot -v1 -l6 -h -g0:1000 -m3 -a5
IF EXIST GIS_traj_ps_01.txt COPY GIS_traj_ps_01.txt GIS_LINES.TXT
IF EXIST GIS_LINES.TXT %EXEC_DIR%ascii2shp %7_lines lines <GIS_LINES.TXT

rem **********************************************************************
rem convert output map to jpg, using density of 150
rem **********************************************************************

rem this makes a jpg of about 200kB... but a little fuzzy
rem if you want a sharper image, can use density of 300 or even higher
rem but this makes the jpg sizes bigger...

IF EXIST plot.jpg DEL plot.jpg
IF EXIST plot.ps convert -density 150 plot.ps plot.jpg

rem **********************************************************************
rem COPY OUTPUT files to include RUN NAME
rem **********************************************************************

rem IF EXIST plot.ps DEL plot.ps
IF EXIST plot.jpg COPY plot.jpg %7_tot.jpg
IF EXIST plot.ps COPY plot.ps %7_tot.ps
IF EXIST tdump.txt COPY tdump.txt %7.tdp
IF EXIST CONTROL. COPY CONTROL. %7.ctl
IF EXIST MESSAGE. COPY MESSAGE. %7.msg
IF EXIST SETUP.CFG COPY SETUP.CFG %7.cfg

rem **********************************************************************
rem CREATE RESULTS SUBDIRECTORIES
rem **********************************************************************

IF NOT EXIST %RESULTS_DIR%ps\ mkdir %RESULTS_DIR%ps\
IF NOT EXIST %RESULTS_DIR%jpg\ mkdir %RESULTS_DIR%jpg\
IF NOT EXIST %RESULTS_DIR%tdp\ mkdir %RESULTS_DIR%tdp\
IF NOT EXIST %RESULTS_DIR%ctl\ mkdir %RESULTS_DIR%ctl\
IF NOT EXIST %RESULTS_DIR%msg\ mkdir %RESULTS_DIR%msg\
IF NOT EXIST %RESULTS_DIR%cfg\ mkdir %RESULTS_DIR%cfg\
IF NOT EXIST %RESULTS_DIR%lns\ mkdir %RESULTS_DIR%lns\
IF NOT EXIST %RESULTS_DIR%pts\ mkdir %RESULTS_DIR%pts\

rem **********************************************************************
rem MOVE FILE to RESULTS SUBDIRECTORIES
rem **********************************************************************

IF EXIST %7_tot.jpg MOVE %7_tot.jpg %RESULTS_DIR%jpg\
IF EXIST %7_tot.ps MOVE %7_tot.ps %RESULTS_DIR%ps\
IF EXIST %7.tdp MOVE %7.tdp %RESULTS_DIR%tdp\
IF EXIST %7.ctl MOVE %7.ctl %RESULTS_DIR%ctl\
IF EXIST %7.msg MOVE %7.msg %RESULTS_DIR%msg\
IF EXIST %7.cfg MOVE %7.cfg %RESULTS_DIR%cfg\

IF EXIST %7_points.shp MOVE %7_points.shp %RESULTS_DIR%pts\
IF EXIST %7_points.shx MOVE %7_points.shx %RESULTS_DIR%pts\
IF EXIST %7_points.dbf MOVE %7_points.dbf %RESULTS_DIR%pts\
IF EXIST %7_points.prj MOVE %7_points.prj %RESULTS_DIR%pts\

IF EXIST %7_lines.shp MOVE %7_lines.shp %RESULTS_DIR%lns\
IF EXIST %7_lines.shx MOVE %7_lines.shx %RESULTS_DIR%lns\
IF EXIST %7_lines.dbf MOVE %7_lines.dbf %RESULTS_DIR%lns\
IF EXIST %7_lines.prj MOVE %7_lines.prj %RESULTS_DIR%lns\
Fantine
Posts: 150
Joined: November 8th, 2012, 3:41 pm

Re: calculating trajectories with batch files

Post by Fantine »

Your MESSAGE file shows that you chose to use the fraction of mix layer depth (KMSL = 2) to define the trajectory's starting height. In this case, the 3rd column of starting locations in the CONTROL file should be values between 0 and 2.

If you want the input height to be above ground level (meter), set "KMSL=0" in the SETUP.CFG.

The error in your MESSAGE file =>
FATAL ERROR: Fraction release height exceeds limits (0> F <=2.0)!
Number, Fraction, MixDepth: 1 500.0000 921.0129
Cggc
Posts: 8
Joined: March 28th, 2018, 1:21 am
Registered HYSPLIT User: Yes

Re: calculating trajectories with batch files

Post by Cggc »

Jade,
I am also running into problems with my batch files for my multiple trajectory project. Can you send me or post yours as an example?

My favorite part of this forum is that I have come across many people all trying to run a large number of trajectories for many years, but there isn't one example batch script and the programmers of HYSPLIT haven't come up with something in the GUI that will allow users to do this. Strange.
glenn.rolph
Posts: 362
Joined: November 7th, 2012, 1:39 pm
Registered HYSPLIT User: Yes

Re: calculating trajectories with batch files

Post by glenn.rolph »

You might want to check out the latest version of the HYSPLIT GUI as we now allow more than 30 days in the "Run Daily" trajectory option of HYSPLIT. See also the tutorial at:

https://www.ready.noaa.gov/documents/Tu ... _freq.html

and its associated script that you could edit to do your own simulation:

https://www.ready.noaa.gov/documents/Tu ... j_freq.bat
Post Reply

Return to “Trajectory Model”