forked from EMOD-Hub/EMOD-InputData
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_input_files_directory.bat
300 lines (277 loc) · 13 KB
/
setup_input_files_directory.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
@echo off
REM ***************************************************************************
REM setup_input_files_directory.bat
REM
REM This utility creates the necessary directories and links in the InputFiles
REM directory with the structure that Diamonds needs.
REM
REM Usage: run this script w/o args from inside the InputFiles directory.
REM Original author: Bill Saunders
REM ***************************************************************************
REM Psuedocode:
REM 1- create links in current dir pointing to all files in subdir.
REM 2- mkdir all of the "dot" dirs required by Diamonds
REM 3- create links in the "dot" dirs pointing to the files as per
REM http://emod-wiki/download/attachments/1998889/InputFileFormat-Alpha-v4.xlsx
REM ***************************************************************************
REM constants
set newline=^& echo.
REM ***************************************************************************
REM add note about running from input_files_directory
echo.
echo -------------------------------------------------------------------------------
echo EMOD Input Files Directory Preperation
echo.
echo This script will create the necessary subdirectories and links for Diamonds
echo It needs to be run from the main input_files directory as specified in the
echo LegacyServer's Web.config (reference the installation documentation for more
echo information.
echo -------------------------------------------------------------------------------
echo.
echo If you are in the input_files directory, and you wish to prepare it for use
echo with Diamonds, then press lower case y and hit return. Any other key will
echo exit. Type y or n:
rem add get key to allow abort
set /p Input=
if /i "%Input%"=="y" (goto Proceed)
echo.
echo setup_input_files_directory.bat aborted, directory not setup.
echo.
exit /b
:Proceed
echo.
echo "Preparing directories and links. Already existing directories may generate"
echo "errors. Please review the output to make sure all directories and links were"
echo "created correctly."
echo.
REM ***************************************************************************
REM Link all files in subdirs to this "toplevel" dir. Ie links here pointing to the subdirs
REM mkdir all the "dot" subdirs
REM link the proper files into the toplevel
move Bihar-Like_2x2\Bihar_2x2_sandbox_demographics.dat .
move Bihar-Like_1_Node\Bihar_single_node_demographics.dat .
rem DIAM-1063
move Bihar_single_node_pool_definition_neighborhood_work_school_example.json .
move Bihar_single_node_pool_definition_two_social_group_example.json .
move Bihar_single_node_pool_type_neighborhood_work_school_example.json .
move Bihar_single_node_pool_type_two_social_group_example.json .
move Bihar-Like_2x2\Bihar_2x2_sandbox_local_migration.bin .
move Bihar-Like_Torus_10x10\Bihar_10x10_torus_demographics.dat .
move Bihar-Like_Torus_10x10\Bihar_10x10_torus_local_migration.bin .
move Garki\Garki_30arcsec_air_temperature_daily.bin .
move Garki\Garki_30arcsec_demographics.dat .
move Garki\Garki_30arcsec_land_temperature_daily.bin .
move Garki\Garki_30arcsec_local_migration.bin .
move Garki\Garki_30arcsec_rainfall_daily.bin .
move Garki\Garki_30arcsec_relative_humidity_daily.bin .
move Garki\Garki_30arcsec_air_temperature_daily.bin.json .
move Garki\Garki_30arcsec_land_temperature_daily.bin.json .
move Garki\Garki_30arcsec_rainfall_daily.bin.json .
move Garki\Garki_30arcsec_relative_humidity_daily.bin.json .
move India\India_2_5arcmin_air_migration.bin .
move India\India_2_5arcmin_demographics.dat .
move India\India_2_5arcmin_koppen_climate.bin .
move India\India_2_5arcmin_koppen_climate.bin.json .
move India\India_2_5arcmin_load_balancing.bin .
move India\India_2_5arcmin_local_migration.bin .
move India\India_2_5arcmin_regional_migration.bin .
move "India Northern"\NorthIndia_2_5arcmin_air_migration.bin .
move "India Northern"\NorthIndia_2_5arcmin_demographics.dat .
move "India Northern"\NorthIndia_2_5arcmin_koppen_climate.bin .
move "India Northern"\NorthIndia_2_5arcmin_koppen_climate.bin.json .
move "India Northern"\NorthIndia_2_5arcmin_load_balancing.bin .
move "India Northern"\NorthIndia_2_5arcmin_local_migration.bin .
move "India Northern"\NorthIndia_2_5arcmin_regional_migration_linear_population_dependence.bin .
REM for DIAM-841
Copy NorthIndia_2_5arcmin_regional_migration_linear_population_dependence.bin NorthIndia_2_5arcmin_regional_migration.bin
move "India Northern"\NorthIndia_2_5arcmin_regional_migration_no_population_dependence.bin .
move "India Northern"\NorthIndia_2_5arcmin_regional_migration_square_population_dependence.bin .
move Madagascar\Madagascar_2_5arcmin_air_temperature_daily.bin .
move Madagascar\Madagascar_2_5arcmin_koppen_climate.bin .
move Madagascar\Madagascar_2_5arcmin_land_temperature_daily.bin .
move Madagascar\Madagascar_2_5arcmin_rainfall_daily.bin .
move Madagascar\Madagascar_2_5arcmin_relative_humidity_daily.bin .
move Madagascar\Madagascar_2_5arcmin_demographics.dat .
move Madagascar\Madagascar_2_5arcmin_load_balancing_comm.bin .
move Madagascar\Madagascar_2_5arcmin_local_migration.bin .
move Madagascar\Madagascar_2_5arcmin_regional_migration.bin .
move Madagascar\Madagascar_2_5arcmin_sea_migration.dat .
move Madagascar\Madagascar_2_5arcmin_air_temperature_daily.bin.json .
move Madagascar\Madagascar_2_5arcmin_koppen_climate.bin.json .
move Madagascar\Madagascar_2_5arcmin_land_temperature_daily.bin.json .
move Madagascar\Madagascar_2_5arcmin_rainfall_daily.bin.json .
move Madagascar\Madagascar_2_5arcmin_relative_humidity_daily.bin.json .
move Muheza\Muheza_single_node_air_temperature_daily.bin .
move Muheza\Muheza_single_node_demographics.dat .
move Muheza\Muheza_single_node_land_temperature_daily.bin .
move Muheza\Muheza_single_node_rainfall_daily.bin .
move Muheza\Muheza_single_node_relative_humidity_daily.bin .
move Muheza\Muheza_single_node_air_temperature_daily.bin.json .
move Muheza\Muheza_single_node_land_temperature_daily.bin.json .
move Muheza\Muheza_single_node_rainfall_daily.bin.json .
move Muheza\Muheza_single_node_relative_humidity_daily.bin.json .
move Namawala\Namawala_single_node_air_temperature_daily.bin .
move Namawala\Namawala_single_node_demographics.dat .
move Namawala\Namawala_single_node_land_temperature_daily.bin .
move Namawala\Namawala_single_node_rainfall_daily.bin .
move Namawala\Namawala_single_node_relative_humidity_daily.bin .
move Namawala\Namawala_single_node_air_temperature_daily.bin.json .
move Namawala\Namawala_single_node_land_temperature_daily.bin.json .
move Namawala\Namawala_single_node_rainfall_daily.bin.json .
move Namawala\Namawala_single_node_relative_humidity_daily.bin.json .
move Seattle\Seattle_30arcsec_demographics.dat .
move Seattle\Seattle_30arcsec_local_migration.bin .
move Seattle\Seattle_30arcsec_regional_migration.bin .
move Singleton_Single_Node_Sandbox\Standard_single_node_demographics.dat .
move World\Global_1degree_air_migration.bin .
move World\Global_1degree_demographics.dat .
move World\Global_1degree_koppen_climate.bin .
move World\Global_1degree_load_balancing.bin .
move World\Global_1degree_local_migration.bin .
move World\Global_1degree_sea_migration_1918.dat .
move World\Global_1degree_koppen_climate.bin.json .
REM ***************************************************************************
REM mkdir all the "dot" subdirs
REM Note: meta data currently ignored (not used by Diamonds)
REM Demographic _demographics.dat
REM Local Migration _local_migration.bin
REM Air Migration _air_migration.bin
REM Regional Migration _regional_migration.bin
REM Sea Migration _sea_migration.dat
REM Air Temp _air_temperature_daily.bin
REM Air Temp (metadata) _air_temperature_daily.bin.json
REM Land Temp _land_temperature_daily.bin
REM Land Temp (metadata) _land_temperature_daily.bin.json
REM Rainfall _rainfall_daily.bin
REM Rainfall (metadata) _rainfall_daily.bin.json
REM Humidity _relative_humidity_daily.bin
REM Humidity (metadata) _relative_humidity_daily.bin.json
REM Koppen _koppen_climate.bin
REM Koppen (metadata) _koppen_climate.bin.json
REM Load Balancing _load_balancing.bin
REM Mixing Pool - Definition _pool_definition_XXXX.json
REM Mixing Pool - Pool Types _pool_types_XXXX.json
mkdir .demographics
mkdir .local_migration
mkdir .air_migration
mkdir .regional_migration
mkdir .sea_migration
mkdir .air_temperature
mkdir .land_temperature
mkdir .rainfall
mkdir .relative_humidity
mkdir .koppen
mkdir .load_balancing
REM ***************************************************************************
REM 3- create links in the "dot" dirs pointing to the files as per
REM http://emod-wiki/download/attachments/1998889/InputFileFormat-Alpha-v4.xlsx
REM
REM All files below were identified by:
REM svn ls -vR https://10.128.50.25:443/svn/Data_Files/trunk
REM Then each group was identified via the xls above and grep
REM ie: grep _local_migr filenamesonly.txt
REM ****************************************
echo Creating links in .\.demographics
cd .\.demographics
echo "" > Bihar_single_node_demographics.dat
echo "" > Bihar_2x2_sandbox_demographics.dat
echo "" > Bihar_10x10_torus_demographics.dat
echo "" > Garki_30arcsec_demographics.dat
echo "" > India_2_5arcmin_demographics.dat
echo "" > NorthIndia_2_5arcmin_demographics.dat
echo "" > Madagascar_2_5arcmin_demographics.dat
echo "" > Muheza_single_node_demographics.dat
echo "" > Namawala_single_node_demographics.dat
echo "" > Seattle_30arcsec_demographics.dat
echo "" > Standard_single_node_demographics.dat
echo "" > Global_1degree_demographics.dat
cd ..
REM ****************************************
echo Creating links in .\.local_migration
cd .\.local_migration
echo "" > Bihar_2x2_sandbox_local_migration.bin
echo "" > Bihar_10x10_torus_local_migration.bin
echo "" > Garki_30arcsec_local_migration.bin
echo "" > India_2_5arcmin_local_migration.bin
echo "" > NorthIndia_2_5arcmin_local_migration.bin
echo "" > Madagascar_2_5arcmin_local_migration.bin
echo "" > Seattle_30arcsec_local_migration.bin
echo "" > Global_1degree_local_migration.bin
cd ..
REM ****************************************
echo Creating links in .\.air_migration
cd .\.air_migration
echo "" > India_2_5arcmin_air_migration.bin
echo "" > NorthIndia_2_5arcmin_air_migration.bin
echo "" > Global_1degree_air_migration.bin
cd ..
REM ****************************************
echo Creating links in .\.regional_migration
cd .\.regional_migration
echo "" > India_2_5arcmin_regional_migration.bin
echo "" > NorthIndia_2_5arcmin_regional_migration_linear_population_dependence.bin
REM for DIAM-841
echo "" > NorthIndia_2_5arcmin_regional_migration.bin
echo "" > NorthIndia_2_5arcmin_regional_migration_no_population_dependence.bin
echo "" > NorthIndia_2_5arcmin_regional_migration_square_population_dependence.bin
echo "" > Madagascar_2_5arcmin_regional_migration.bin
echo "" > Seattle_30arcsec_regional_migration.bin
cd ..
REM ****************************************
echo Creating links in .\.sea_migration
cd .\.sea_migration
echo "" > Madagascar_2_5arcmin_sea_migration.dat
echo "" > Global_1degree_sea_migration_1918.dat
cd ..
REM ****************************************
echo Creating links in .\.air_temperature
cd .\.air_temperature
echo "" > Garki_30arcsec_air_temperature_daily.bin
echo "" > Madagascar_2_5arcmin_air_temperature_daily.bin
echo "" > Muheza_single_node_air_temperature_daily.bin
echo "" > Namawala_single_node_air_temperature_daily.bin
cd ..
REM ****************************************
echo Creating links in .\.land_temperature
cd .\.land_temperature
echo "" > Garki_30arcsec_land_temperature_daily.bin
echo "" > Madagascar_2_5arcmin_land_temperature_daily.bin
echo "" > Muheza_single_node_land_temperature_daily.bin
echo "" > Namawala_single_node_land_temperature_daily.bin
cd ..
REM ****************************************
echo Creating links in .\.rainfall
cd .\.rainfall
echo "" > Garki_30arcsec_rainfall_daily.bin
echo "" > Madagascar_2_5arcmin_rainfall_daily.bin
echo "" > Muheza_single_node_rainfall_daily.bin
echo "" > Namawala_single_node_rainfall_daily.bin
cd ..
REM ****************************************
echo Creating links in .\.relative_humidity
cd .\.relative_humidity
echo "" > Garki_30arcsec_relative_humidity_daily.bin
echo "" > Madagascar_2_5arcmin_relative_humidity_daily.bin
echo "" > Muheza_single_node_relative_humidity_daily.bin
echo "" > Namawala_single_node_relative_humidity_daily.bin
cd ..
REM ****************************************
echo Creating links in .\.koppen
cd .\.koppen
echo "" > India_2_5arcmin_koppen_climate.bin
echo "" > NorthIndia_2_5arcmin_koppen_climate.bin
echo "" > Madagascar_2_5arcmin_koppen_climate.bin
echo "" > Global_1degree_koppen_climate.bin
cd ..
REM ****************************************
echo Creating links in .\.load_balancing
cd .\.load_balancing
echo "" > India_2_5arcmin_load_balancing.bin
echo "" > NorthIndia_2_5arcmin_load_balancing.bin
echo "" > Madagascar_2_5arcmin_load_balancing_comm.bin
echo "" > Global_1degree_load_balancing.bin
cd ..
REM ***************************************************************************
echo Done with setup, check that a significant number of links were created
echo in this directory, as well as "dot" directories were created, and
echo links in them.