Skip to content

(1) Data Organisation

salpheus edited this page Aug 18, 2022 · 2 revisions

Deciphering NAYS2DH Outputs

I've found that the most efficient way to output and store raw model outputs from NAYS2DH is using the programs csv output. These outputs are structured as follows:

I J X Y ...output variables...
1 1 1 * grid cell length 1 * grid cell width ...outputs...
2 1 2 * grid cell length 1 * grid cell width ...outputs...
... ... ... ... ...outputs...
m 1 m * grid cell length 1 * grid cell width ...outputs...

i.e. data is organised in the streamwise direction, cycling through each all m positions for each n position (where the grid has dimensions m x n, m is downstream or i-direction, and n is the cross-stream or j-direction. X and Y represent the true locations of the grid cells in metre space, i & j are the cellular co-ordinates. Does that make sense?

You can choose the time interval desired for your output it doesn't matter. Store all of your output csv in the same folder, and I name them all with the same standard name (Result_'number') and a numeric index, this can be 1, 2, 3, 4... or whatever, it just needs to be unique and allow python to iterate through all of the csvs in the folder.

Once you have your outputs in this form you should be ready to do the first routine in the BarCode ConvertFiles.ipynb


Array nomenclature

To make sure we are all on the same page, this is the nomenclature I am using to reference arrays. If you are a matlab person, array == matrix. These generally will be 2D unless we are dealing with time and space, in the full domain, wherein they will be 3D.

Most times, I will have time in the row direction (see fig, axis = 0) or in the 'page' direction (see fig, axis = 2). Columns (axis = 1) will generally be reserved for space (streamwise or cross-sectionally).

Clone this wiki locally