FraunhoferIWES / foxes

Farm Optimization and eXtended yield Evaluation Software
MIT License
23 stars 7 forks source link

Observed wind climate (*tab) file as wind input #37

Open kikocorreoso opened 1 year ago

kikocorreoso commented 1 year ago

In several foxes-related software packages wind input is defined using a .*tab file format. This is handy because we can share same inputs between different tools.

This file format is defined here.

Do you think it would be possible and useful to add this as input or as an output postprocess tool? I.e., knowing the output from several wind states, e.g. ws=9m/s and wd=270º, calculate the estimated output of a farm using the expected wind speed distribution (percentage of time on each wind state).

SchmJo commented 1 year ago

Thanks for this issue (related question #35), I am optimistic this can be added.

SchmJo commented 1 year ago

@kikocorreoso Could you please upload an example file? I need that for developing such an interface. Thanks!

kikocorreoso commented 1 year ago

Hi,

Sorry for the delay.

I have downloaded a timeseries from NEWA at Baltic Sea, lon, lat: (14º, 55º)

The time series includes wind speed and direction at 100m above ground. From this time series I have created to tab files, 16 and 12 sectors.

In the file below you can find the timeseries, the tab files and a screenshot with the location for your reference.

dist.zip

Please, let me know if this helps or if you prefer the files at other location, other levels, etc.

Thanks in advance.

SchmJo commented 7 months ago

@kikocorreoso While reading your example tab files into xarray Datasets, I noticed that the frequencies do not add to 1000 in each sector, is this intended? The following is for the file test_(14.0,55)_12sectors_100m.tab, thanks for any comment:

<xarray.Dataset>
Dimensions:    (ws: 36, wd: 12)
Coordinates:
  * ws         (ws) float64 0.0 1.0 2.0 3.0 4.0 5.0 ... 31.0 32.0 33.0 34.0 35.0
  * wd         (wd) float64 0.0 30.0 60.0 90.0 120.0 ... 240.0 270.0 300.0 330.0
Data variables:
    frequency  (ws, wd) float64 3.261 3.6 7.572 7.643 7.249 ... 0.0 0.0 0.0 0.0
Attributes:
    description:  <None> | 'Spd 100m' | 'Dir 100m' | Created 30/06/2023
    latitude:     55.0
    longitude:    14.0
    height:       100.0
    n_sectors:    12.0
    delta_ws:     1.0
    delta_wd:     30.0
    shift_wd:     0.0

Frequency sums for each sector:
[1003.2586 1003.5989 1007.5715 1007.6418 1007.2496 1006.1642 1006.9668
 1008.4492 1013.9408 1018.2013 1011.5311 1005.4222]
SchmJo commented 7 months ago

Also, in relation to that: Which additional input is provided by the user that defines the frequency of each sector? As far as I understand, the tab file frequencies describe only how often each wind speed appears within each sector. Or am I missing something here? Thanks for helping me understand this format!

kikocorreoso commented 7 months ago

Hi @SchmJo Thanks for reviewing this.

I hope it helps.

SchmJo commented 7 months ago

Thanks! That's it, I misinterpreted line 4, now also the weights match. 👍

SchmJo commented 7 months ago

I pushed a new input states class to branch dev: TabStates, representing input from a single tab file. This example shows how to use it.

@kikocorreoso However, I am guessing you would like to use several such tab files in one calculation, e.g. one for each turbine? If so, how would you preferably provide such data as a user, as a path to a folder? Or zipped? Or am I wrong and this not your intention after all?

kikocorreoso commented 7 months ago

Hi @SchmJo Jonas,

This is excellent. Thank you so much!!!

More and more the industry is going to bigger areas with many wind farms. In these areas, sometimes hundreds of km from N to S or from E to W, we could have many measurement locations and only one measurement location is not enough to represent correctly the wind regime in the full area. An area could be windier or the wind rose could be different, etc. When we need something fast and not very detailed we use a numerical simulation of the whole area that provides the climatic conditions and we "adjust" this simulation with the climatic conditions recorded on each of the sites. So, in the end we use something like information for each WTG or for a set of WTGs associated with a measurement location.

How could be the best way to access this data and associate this data? Everything should work. I am not so worried about how to read the data but how to use this data. It would be great if I can create 5 TabStates and associate each of them to the closest WTGs or something like that.

I don't know if this makes sense.

Again, thank you very much for the effort and the patience.

tristanfabregas commented 5 months ago

Hi @kikocorreoso,

Perhaps we could consider using *.WRG which is an industry standard because it provides a spatial representation of wind speeds by sector over an area and add a new feature of "scaling speeds using a measurement device". Weighting by the inverse of the square of the distance (or some other method could be used) if there are several masts?

Thank you very much for all the work already done ! Tristan

SchmJo commented 5 months ago

Thanks for the input, the idea of adding support for WRG is already under internal discussion within the foxes dev team. But the implementation has not started yet - So the link is much appreciated.

I think for several masts triangulation is the way to go.

SchmJo commented 5 months ago

@VolLuk FYI

kikocorreoso commented 5 months ago

The WRG file is like a multi-tab file in a regular grid defined using weibull parameters instead of the frequency table from a measurement location.

This is what we use in most of our energy estimations calibrated with timeseries/tabs/whatever obtained from measurements or other sources.

In the end it helps to provide 'weights' to the wind speed in a big area in a wind direction basis.

The WRG file would be like a simplification of foxes.input.states.FieldDataNC or a generalization of foxes.input.states.StatesTable.

tristanfabregas commented 5 months ago

Thank you very much @kikocorreoso. An enhanced version of .WRG exist, called .WRB. I think this one is more useful because the file contains ambient TI and wind shear.