Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netcdf sampling giving unexpected values when more labels are specified #1443

Closed
delloiacono opened this issue Jan 14, 2025 · 5 comments · Fixed by #1449
Closed

Netcdf sampling giving unexpected values when more labels are specified #1443

delloiacono opened this issue Jan 14, 2025 · 5 comments · Fixed by #1449
Assignees
Labels
bug:amr-wind Something isn't working

Comments

@delloiacono
Copy link

Bug description

I am using netcdf for sampling. If more than one labels is specified for the same sampling post-processing, the sampling data assume unexpected values.

Steps to reproduce

Steps to reproduce the behavior:

  1. Compiler used

    • GCC
  2. Operating system

    • Linux
  3. Hardware:

    • CPU
  4. Input file attachments
    sampling_error.txt

  5. Error (paste or attach):

No fatal error

Expected behavior

Expected results are obtained with more sampling post-processing, each one with only one label (file below):
sampling.txt
The rest of input file is exactly the same.

AMR-Wind information

==============================================================================
                AMR-Wind (https://github.com/exawind/amr-wind)

  AMR-Wind version :: v3.2.0-9-gbaefdc9c
  AMR-Wind Git SHA :: baefdc9c1efcc909f9210060c6de707d91d16600
  AMReX version    :: 24.09-45-g6d9c25b989f1

  Exec. time       :: Thu Jan  9 11:48:14 2025
  Build time       :: Dec 18 2024 11:57:39
  C++ compiler     :: GNU 12.3.0

  MPI              :: ON    (Num. ranks = 160)
  GPU              :: OFF
  OpenMP           :: OFF

  Enabled third-party libraries: 
    NetCDF    4.9.2
    OpenFAST  

           This software is released under the BSD 3-clause license.           
 See https://github.com/Exawind/amr-wind/blob/development/LICENSE for details. 
------------------------------------------------------------------------------
@delloiacono delloiacono added the bug:amr-wind Something isn't working label Jan 14, 2025
@marchdf
Copy link
Contributor

marchdf commented Jan 14, 2025

Hi, thanks for reaching out. This is a curious one. We have a regression test that does exactly what you suggest is not working and it works fine there: https://github.com/Exawind/amr-wind/tree/main/test/test_files/abl_sampling_netcdf. Could you start with that input file and make sure it runs in your setup? If it does work, can you compare that to your input file and see where the difference is? If you can't figure it out, feel free to post the full input file that did not work and any other files necessary to reproduce.

@rthedin
Copy link

rthedin commented Jan 14, 2025

I can confirm the reported issue. I ran into it yesterday. I was going to post an issue today. This only happens with netcdf and not native. If I request 3 labels, the first one is correct, the second one is scaled by a scalar >1, and the third is all zero. If I request any of the 3 by themselves, the output is correct. See reproducible input file attached. I've tried only on version 3.20.

setup_neutral.precursor.i.startAt0.txt

@delloiacono
Copy link
Author

@marchdf in the regression test you linked only the post-processing "volume_sampling" has more than one label. There is something similar also for the plane sampling?
Also, in this regression test, is the sampling output the expected one? Because my simulation also doesn't crash, but when I read the netcdf file the values of the sampled field seem to be non-physical, as @rthedin reported too.

@moprak-nrel
Copy link
Contributor

@marchdf and I can reproduce the issue, we are working toward a fix.

In the meanwhile, a workaround would either be to stick with multiple incflo.post_processing = sampler1 sampler2 sampler3 with single sampler1.labels = plane or to use the native format.

@marchdf
Copy link
Contributor

marchdf commented Jan 15, 2025

In case it wasn't clear, I fixed this in #1449. Thanks for bringing to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:amr-wind Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants