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

An error occurred during the precursor restart coupling with openfast #1394

Open
May0048 opened this issue Dec 7, 2024 · 5 comments
Open

Comments

@May0048
Copy link

May0048 commented Dec 7, 2024

When I am surfacing the examples in the user manual.

  1. when I generate the file ‘avg_theta.dat’ according to the following steps, I get an error as shown in the figure below.
  2. When I follow all the instructions in the previous example, it doesn't generate the file ‘... /precursor/abl_forces.txt’.
    This prevents me from doing the rest of the calculations, which part of me is the problem?
    bdae033013d7d9d32da65c7e7b1ad43
    8d86e04a1f965567622f6ee73ac4800
    2deb1d12861b550fd3ad01701cf19e3
@mbkuhn
Copy link
Contributor

mbkuhn commented Dec 9, 2024

  1. It looks like your python setup does not have netCDF installed. Because the abl_statistics file is output in netCDF format, this module is required. You'll need to use pip install or another approach for getting the netCDF python module installed.
  2. Does your precursor input file contain the line "forcing_timetable_output_file"? If you could share your full precursor input file and the resulting list of contents of your precursor run directory.

@May0048
Copy link
Author

May0048 commented Dec 10, 2024

  1. It looks like your python setup does not have netCDF installed. Because the abl_statistics file is output in netCDF format, this module is required. You'll need to use pip install or another approach for getting the netCDF python module installed.
  2. Does your precursor input file contain the line "forcing_timetable_output_file"? If you could share your full precursor input file and the resulting list of contents of your precursor run directory.

Thank you for your reply.
My second problem is now solved, thank you very much.
For the first problem, I ran the calculations on a computer that had previously installed the netCDF python module and I still got the error, which may be due to the fact that the abl_statistics file I generated was not in netCDF format, as shown in the picture. Next, do I need to modify the input file to change its output format, is it by the following, sampling.output_format = netcdf or ABL.stats_output_format = netcdf?
0231bbbdf1ccdb3df2dc56719f26974

@May0048
Copy link
Author

May0048 commented Dec 10, 2024

I have tried to run it with the above two scenarios and I get the error in the picture below, am I compiling it incorrectly? How should I add netCFD during compilation and what should I do to solve this problem?
1733824815509

@mbkuhn
Copy link
Contributor

mbkuhn commented Dec 10, 2024

Yes, it looks like this is because amr-wind was not compiled with NetCDF. The ascii output abl_statistics14400.txt does have information that can be used to prepare the inflow-outflow simulation (with the turbines), but because it is in a different format, the script we provide (calc_inflowoutflow_stats.py) won't be able to process it. When amr-wind is installed with NetCDF, it becomes the default format for abl_statistics output. You correctly turned it on with the line ABL.stats_output_format = netcdf, but because amr-wind was not compiled with NetCDF, the code will not be able to proceed.

To compile AMR-Wind with NetCDF, the cmake variable AMR_WIND_ENABLE_NETCDF needs to be turned on. Here is the cmake reference link if you are using cmake directly. https://exawind.github.io/amr-wind/user/build.html#cmakeval-AMR_WIND_ENABLE_NETCDF . If you are using exawind-manager, the easiest way to add netcdf is to change the specs of your build environment. You can do that by modifying the spack.yaml file or by the spack rm/add commands. I'll explain the latter approach. Looking at the spack.yaml file within your build directory, there should be a line under specs: that looks something like this: amr-wind@main+openfast. It may be slightly different, depending on how you set things up. Copy that entry. Then, with the build environment activated, enter the command spack rm amr-wind. This removes your current spec related to amr-wind. Then enter the command spack add amr-wind@main+openfast+netcdf, where you have added +netcdf to the spec that you copied. Now, the environment is updated to include netCDF, and the next steps are to concretize and install. Do spack concretize -f and then spack install to get everything set up and compiled.

@May0048
Copy link
Author

May0048 commented Dec 11, 2024

Yes, it looks like this is because amr-wind was not compiled with NetCDF. The ascii output abl_statistics14400.txt does have information that can be used to prepare the inflow-outflow simulation (with the turbines), but because it is in a different format, the script we provide (calc_inflowoutflow_stats.py) won't be able to process it. When amr-wind is installed with NetCDF, it becomes the default format for abl_statistics output. You correctly turned it on with the line ABL.stats_output_format = netcdf, but because amr-wind was not compiled with NetCDF, the code will not be able to proceed.

To compile AMR-Wind with NetCDF, the cmake variable AMR_WIND_ENABLE_NETCDF needs to be turned on. Here is the cmake reference link if you are using cmake directly. https://exawind.github.io/amr-wind/user/build.html#cmakeval-AMR_WIND_ENABLE_NETCDF . If you are using exawind-manager, the easiest way to add netcdf is to change the specs of your build environment. You can do that by modifying the spack.yaml file or by the spack rm/add commands. I'll explain the latter approach. Looking at the spack.yaml file within your build directory, there should be a line under specs: that looks something like this: amr-wind@main+openfast. It may be slightly different, depending on how you set things up. Copy that entry. Then, with the build environment activated, enter the command spack rm amr-wind. This removes your current spec related to amr-wind. Then enter the command spack add amr-wind@main+openfast+netcdf, where you have added +netcdf to the spec that you copied. Now, the environment is updated to include netCDF, and the next steps are to concretize and install. Do spack concretize -f and then spack install to get everything set up and compiled.

Thank you for your sincere reply. I have tried to download netCDF using cmake but it has been unsuccessful. I will continue to try again in the next two days. Also, if I want to simulate a floating offshore wind turbine, which other modules should I open? AMR_WIND-INABLE-OPENFAST or AMR_WIND-INABLE-W2A?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants