You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to run BOUT simulations using the Hasegawa-Wakatani example with data taken from a previous fine-grained simulation and then resized to a coarser grid. I have attached a zip file containing "old_BOUT.restart.0.nc" and "new_BOUT.restart.0.nc" and an example BOUT.inp file. The old_* file was resized using boutdata.resize and the new_* file using our own scripts built on xarray and boutdata. The reason for doing this is our scripts simply using array slicing to resize the data and calculate the correct guard cell values, rather than using interpolation, making the resizing a little faster.
We then wish to run coarse-grained simulations on this data. However, with the new_* file as input the simulation gives spurious results after a single step. I wondered if someone could take a look at the two NetCDF files - the most obvious difference is there is an 'x2' dimension in the old_* file that retains the shape of the fine-grained simulation, and some variables that are copied over from the fine data depend on 'x2' (1028), rather than 'x' (260). The new data conforms to the intended dimensions of the coarse-grained simulation with dimensions x=260,y=1,z=256. It is then confusing that BOUT handles the old data as expected (running the coarse-grained simulation) but does not handle the new data as expected.
My question is: what is BOUT doing when it reads in the NetCDF file? It seems it is possibly ignoring variables that are larger than the xyz dimensions and fixing or ignoring guard cell values in the old data. But perhaps there is some metadata value(s) in the new data that cause the simulation to break?
Any ideas much appreciated!
Dave
The text was updated successfully, but these errors were encountered:
You're actually specifying the mesh in the input file:
[mesh]nx = 260 # Note 4 guard cells in Xny = 1
nz = 256 # Periodic, so no guard cells in Zdx = 0.1
dy = 1.0
dz = 0.1
so none of the grid variables are read from the file, and these happen to be the ones on the old x2 coordinates. You could safely drop all of those variables.
It looks like there's differences in n on the order of 10% between those two files. I would guess that's the source of your issues
Thanks @ZedThree. I'll have a look at how 'n' is handled in our two coarsening scripts.
Good to know BOUT doesn't read variables from the data files if they are specified in the BOUT.inp.
Hello,
BOUT_restarts.zip
I am attempting to run BOUT simulations using the Hasegawa-Wakatani example with data taken from a previous fine-grained simulation and then resized to a coarser grid. I have attached a zip file containing "old_BOUT.restart.0.nc" and "new_BOUT.restart.0.nc" and an example BOUT.inp file. The old_* file was resized using boutdata.resize and the new_* file using our own scripts built on xarray and boutdata. The reason for doing this is our scripts simply using array slicing to resize the data and calculate the correct guard cell values, rather than using interpolation, making the resizing a little faster.
We then wish to run coarse-grained simulations on this data. However, with the new_* file as input the simulation gives spurious results after a single step. I wondered if someone could take a look at the two NetCDF files - the most obvious difference is there is an 'x2' dimension in the old_* file that retains the shape of the fine-grained simulation, and some variables that are copied over from the fine data depend on 'x2' (1028), rather than 'x' (260). The new data conforms to the intended dimensions of the coarse-grained simulation with dimensions x=260,y=1,z=256. It is then confusing that BOUT handles the old data as expected (running the coarse-grained simulation) but does not handle the new data as expected.
My question is: what is BOUT doing when it reads in the NetCDF file? It seems it is possibly ignoring variables that are larger than the xyz dimensions and fixing or ignoring guard cell values in the old data. But perhaps there is some metadata value(s) in the new data that cause the simulation to break?
Any ideas much appreciated!
Dave
The text was updated successfully, but these errors were encountered: