@@ -274,7 +274,7 @@ program w0RE_boot
274274 call csvf% initialize(verbose= .TRUE. )
275275 call csvf% open (TRIM (anaDir)// ' /FortBoots.csv' , n_cols= 5 , status_ok= status_ok)
276276 ! add header
277- call csvf% add([' config ' ])
277+ call csvf% add([' bootID ' ])
278278 call csvf% add([' xig' , ' a_s' , ' a_t' ])
279279 call csvf% add([' w0ij(xig)' ])
280280 call csvf% next_row()
@@ -283,15 +283,17 @@ program w0RE_boot
283283 call csvf% add([xig(0 ), a_s(0 ), a_t(0 ), 1.0_WP / (a_s(0 ) / w0PhysMean)])
284284 call csvf% next_row()
285285 icon = 1
286- do aa = 1 , SIZE (runName)
287- do ii = 1 , SIZE (iconList(aa)% rag)
288- write (iconStr, ' (i0)' ) iconList(aa)% rag(ii)
289- call csvf% add(TRIM (runName(aa))// ' n' // TRIM (iconStr))
290- call csvf% add([xig(icon), a_s(icon), a_t(icon), 1.0_WP / (a_s(icon) / w0PhysMean)])
291- call csvf% next_row()
292- icon = icon + 1
293- end do
286+ ! do aa = 1, SIZE(runName)
287+ do ii = 1 , nboot ! SIZE(iconList(aa)%rag)
288+ ! write (iconStr, '(i0)') iconList(aa)%rag(ii)
289+ ! write (iconStr, '(i0)') icon
290+ ! call csvf%add(TRIM(runName(aa))//'n'//TRIM(iconStr))
291+ call csvf% add(icon)
292+ call csvf% add([xig(icon), a_s(icon), a_t(icon), 1.0_WP / (a_s(icon) / w0PhysMean)])
293+ call csvf% next_row()
294+ icon = icon + 1
294295 end do
296+ ! end do
295297 call csvf% close (status_ok)
296298 ! The xi dependent
297299 do xx = 1 , SIZE (xiList)
@@ -300,7 +302,7 @@ program w0RE_boot
300302 ! add header
301303 ! These are separated so that they don't have spaces around them...
302304 ! Fortran array constructor limitation that
303- call csvf% add([' config ' ])
305+ call csvf% add([' bootID ' ])
304306 call csvf% add([' flowTimeForW0ij' ])
305307 call csvf% add([' w0ij' , ' w04i' ])
306308 call csvf% add([' RE' ])
@@ -311,18 +313,59 @@ program w0RE_boot
311313 call csvf% next_row()
312314 ! add the bootstraps
313315 icon = 1
314- do aa = 1 , SIZE (runName)
315- do ii = 1 , SIZE (iconList(aa)% rag)
316- write (iconStr, ' (i0)' ) iconList(aa)% rag(ii)
317- call csvf% add(TRIM (runName(aa))// ' n' // TRIM (iconStr))
318- call csvf% add([flowTimeForW0(xx, icon), w0ij(xx, icon), w04i(xx, icon), RE(xx, icon)] )
319- call csvf% next_row( )
320- icon = icon + 1
321- end do
316+ ! do aa = 1, SIZE(runName)
317+ do ii = 1 , nboot ! SIZE(iconList(aa)%rag)
318+ ! write (iconStr, '(i0)') iconList(aa)%rag(ii)
319+ ! call csvf%add(TRIM(runName(aa))//'n'//TRIM(iconStr))
320+ call csvf% add(icon)
321+ call csvf% add([flowTimeForW0(xx, icon), w0ij(xx, icon), w04i(xx, icon), RE(xx, icon)] )
322+ call csvf % next_row()
323+ icon = icon + 1
322324 end do
325+ ! end do
323326 call csvf% close (status_ok)
324327 end do
325328
329+ ! The mapping of bootstrap ID to sampleIDs
330+ call csvf% initialize(verbose= .TRUE. )
331+ call csvf% open (TRIM (anaDir)// ' /FortBootSampleIDs.csv' , n_cols= ncon + 1 , status_ok= status_ok)
332+ ! add header
333+ call csvf% add([' bootID' ])
334+ do aa = 1 , ncon
335+ write (iconStr, ' (i0)' ) aa
336+ call csvf% add([' ID' // TRIM (iconStr)])
337+ end do
338+ call csvf% next_row()
339+ icon = 1
340+ do ii = 1 , nboot
341+ ! Add the boot iD
342+ call csvf% add(icon)
343+ ! add all the sampleIDs used for that boot iD
344+ do aa = 1 , ncon
345+ call csvf% add(sampleIDs(ii, aa))
346+ end do
347+ call csvf% next_row()
348+ icon = icon + 1
349+ end do
350+ call csvf% close (status_ok)
351+ ! and now map the sampleID to the configuration ID
352+ call csvf% initialize(verbose= .TRUE. )
353+ call csvf% open (TRIM (anaDir)// ' /FortBootConfigIDs.csv' , n_cols= 2 , status_ok= status_ok)
354+ call csvf% add([' config' ])
355+ call csvf% add([' sampleID' ])
356+ call csvf% next_row()
357+ icon = 1
358+ do aa = 1 , SIZE (runName)
359+ do ii = 1 , SIZE (iconList(aa)% rag)
360+ call csvf% add(icon)
361+ write (iconStr, ' (i0)' ) iconList(aa)% rag(ii)
362+ call csvf% add(TRIM (runName(aa))// ' n' // TRIM (iconStr))
363+ call csvf% next_row()
364+ icon = icon + 1
365+ end do
366+ end do
367+ call csvf% close (status_ok)
368+
326369 deallocate (runName, xiList, xiNumList)
327370 deallocate (iStart, iEnd, iSep, iSkip)
328371 deallocate (iconList)
0 commit comments