Jump to content

Search the Community

Showing results for tags 'how-to'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • USING THE SOFTWARE
    • WAsP
    • WAsP Engineering
    • WAsP CFD
    • Windfarm Assessment Tool
    • Scripting and automation
    • Map Editor
    • Installation and licencing
    • Fuga
    • Climate Analyst
    • WAsP Python tools
  • BEYOND THE SOFTWARE
    • Ideas and suggestions
    • News and announcements
  • WIND ATLAS
    • Global Wind Atlas
    • New European Wind Atlas

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 13 results

  1. I am new to working with .nc files. I want to calculate the annual electricity production (AEP) for offshore wind turbines around Ireland based on the spatially resolved wind speed time series data from the New European Wind Atlas. However, I encounter the problem that my resulting AEP is not located correctly after I imported it into QGIS for post-processing. Here are my working steps without aiming for a correct projection and placement : 1. I download the wind data for each month in 2018 (here displayed the URLs for January and December 2018): https://wps.neweuropeanwindatlas.eu/api/mesoscale-ts/v1/get-data-bbox?southBoundLatitude=50.5&northBoundLatitude=56.1&westBoundLongitude=-11.6&eastBoundLongitude=-5.2&height=150&variable=WS&dt_start=2018-01-01T00:00:00&dt_stop=2018-01-31T23:59:59 ... https://wps.neweuropeanwindatlas.eu/api/mesoscale-ts/v1/get-data-bbox?southBoundLatitude=50.5&northBoundLatitude=56.1&westBoundLongitude=-11.6&eastBoundLongitude=-5.2&height=150&variable=WS&dt_start=2018-12-01T00:00:00&dt_stop=2018-12-31T23:59:59 2. I utilize a Python script with xarray to calculate the AEP with the power curve of a reference turbine: # Imports import xarray as xr import numpy as np import windkit as wk import rasterio import pandas as pd from rasterio.transform import from_origin # Constants rho_air = 1.215 # kg/m³ D_r = 240 # Rotor diameter in meters P_r = 15e6 # Rated power in Watts v_cut_in = 3.0 # m/s v_cut_out = 25.0 # m/s v_rated = 10.59 # m/s A = np.pi * (D_r / 2) ** 2 # m² # Input # Loop through each month's wind speed data files for month in range(1, 13): file_path = f"R:\...\Wind speed time series\\mesoscale-ts-2018-{month:02d}.nc" print(f"Loading wind speed dataset for month {month}...") data = xr.open_dataset(file_path) # Einlesen der Daten als xarray.Dataset print(f"Dataset for month {month} loaded successfully.") # Resample the data to hourly mean data = data.resample(time='h').mean() # Load power curve power_curve_path = r"R:\...\Reference_turbine_2032.csv" print("Loading power curve...") power_curve = pd.read_csv(power_curve_path) print("Power curve loaded successfully.") # Interpolate C_p for the wind speeds wind_speeds = power_curve['Wind [m/s]'].values C_p_values = power_curve['Power Coefficient C_p [-]'].values # Interpolate C_p for each time step and location C_p_interpolated = np.interp(data['WS'].values.flatten(), wind_speeds, C_p_values, left=0, right=0) C_p_interpolated = xr.DataArray(C_p_interpolated.reshape(data['WS'].shape), dims=data['WS'].dims, coords=data['WS'].coords) # Calculate the power output based on wind speed conditions data_cond_1 = xr.where((data['WS'] >= v_cut_in) & (data['WS'] < v_rated), 0.5 * rho_air * A * C_p_interpolated * data['WS']**3, 0) data_cond_2 = xr.where((data['WS'] >= v_rated) & (data['WS'] < v_cut_out), P_r, 0) # Total monthly energy production (MEP) for the month MEP_month = data_cond_1 + data_cond_2 # Save the monthly MEP as a separate variable globals()[f'MEP_{month:02d}'] = MEP_month print(f"Monthly electricity production for month {month} calculated.") # Sum the MEPs over time to get total monthly production MEP_01_total = MEP_01.sum(dim='time') MEP_02_total = MEP_02.sum(dim='time') MEP_03_total = MEP_03.sum(dim='time') MEP_04_total = MEP_04.sum(dim='time') MEP_05_total = MEP_05.sum(dim='time') MEP_06_total = MEP_06.sum(dim='time') MEP_07_total = MEP_07.sum(dim='time') MEP_08_total = MEP_08.sum(dim='time') MEP_09_total = MEP_09.sum(dim='time') MEP_10_total = MEP_10.sum(dim='time') MEP_11_total = MEP_11.sum(dim='time') MEP_12_total = MEP_12.sum(dim='time') # Calculate AEP without losses AEP_total = (MEP_01_total + MEP_02_total + MEP_03_total + MEP_04_total + MEP_05_total + MEP_06_total + MEP_07_total + MEP_08_total + MEP_09_total + MEP_10_total + MEP_11_total + MEP_12_total) / (10**9) 3. I save the AEP as a geotiff: # Define output file path output_file_path = r"R:\...\AEP_total.tif" # Extract coordinates and pixel size lon = data['XLON'].values # Assuming XLON is the longitude coordinate lat = data['XLAT'].values # Assuming XLAT is the latitude coordinate west = lon.min() # Minimum longitude east = lon.max() # Maximum longitude north = lat.max() # Maximum latitude south = lat.min() # Minimum latitude # Calculate pixel size based on the shape of the data pixel_size_x = (east - west) / data.sizes['west_east'] pixel_size_y = (north - south) / data.sizes['south_north'] # Get the transform for the output raster transform = from_origin(west, north, pixel_size_x, pixel_size_y) # Squeeze AEP_total to remove extra dimensions AEP_total_squeezed = AEP_total.squeeze() # Save the AEP_total as a GeoTIFF with rasterio.open( output_file_path, 'w', driver='GTiff', height=AEP_total_squeezed.shape[0], width=AEP_total_squeezed.shape[1], count=1, dtype=AEP_total_squeezed.dtype, crs='EPSG:4326', # Set the CRS based on your requirements transform=transform ) as dst: dst.write(AEP_total_squeezed.values, 1) print(f"AEP_total saved to {output_file_path}.") 4. Import the .tif file into QGIS. Overall i tried several ways to get a correct projection, placement and size of my output data. In the end I need the AEP within EPSG:2157 for post-processing. For example I tired utilizing the windkit package, as well as warping the AEP file with gdal. However, I was not able to come up with a solution. The output was either located somewhere else in QGIS or was rotated and bigger. Where in my working process is the correct place to interfere and ensure that the data is processed in the correct way. Thanks a lot and best regards Lucas
  2. Hello, I am making a big "mosaic" consisting of fifteen 2x2 km CFD tiles. The mosaic does not have a rectangular shape. Nevertheless, Windfarmer uses WRG files which are rectangular in shape. Should I create within Wasp fifteen 2x2 km WRGs to feed into Windfarmer? Or, Will WAsP allow me to create a single rectangular WRG although not all the area will be covered with CFD results? Additional info: All my turbines will be placed within CFD results area, which is guaranteed through appropriate windfarm boundaries set out within Windfarmer. Thanks very much!
  3. Dear WAsP team, There is an error happened in the process of importing wind data, Exception report produced at 2023-07-01 10:34:37 根级别上的数据无效。 第 1 行,位置 1。 raised at: 2023-07-01 10:31:03 2023-07-01 10:31:03: Exception raised in: 在 System:Xml:XmlTextReaderImpl:Throw 2023-07-01 10:31:03: Message added: Could not restore from file 2023-07-01 10:31:03: Exception raised in: 在 Rvea0331:cObservedWindClimate:RestoreFromFile 2023-07-01 10:31:03: Message added: Could not restore an OWC from file 2023-07-01 10:31:03: Exception raised in: 在 Rvea0331:ObservedWindClimateClass:RestoreInstanceFromFile 2023-07-01 10:31:03: Message added: Could not restore preservable object from file 2023-07-01 10:31:03: Exception raised in: 在 Rvea0331:ObservedWindClimateClass:IRveaPreservableClass_RestoreInstanceFromFile 2023-07-01 10:31:03: Message added: Could not open the OWC data file 2023-07-01 10:31:03: Exception raised in: Rvea0334:cObservedWindClimate:OpenDataFile 2023-07-01 10:31:03: Message added: Could not insert a Observed wind climate from file 'Daily_20200101_20201231_10m' to the hierarchy 2023-07-01 10:31:03: Exception raised in: Rvea0334:cHierarchyInsertionFromFile:InsertFromFile 2023-07-01 10:31:03: Message added: There was a problem with the insertion 2023-07-01 10:31:03: Exception raised in: WAsP:cWorkspaceController:ExecuteHierarchyInsertion 2023-07-01 10:31:04: Message added: Could not insert a wind atlas 2023-07-01 10:31:04: Exception raised in: WAsP: cWorkspaceController:PerformNewWindAtlasInsertion 2023-07-01 10:31:04: Message added: The insertion was not successfully completed 2023-07-01 10:31:04: Exception raised in: WAsP:cMemberPopupMenuMediator:ProcessInsertionFromMenu Latest thread started in: Wiab0007:TextSmart:TextBox_Change The .txt file I imported is like this, Date WS[m/s] WD[º] 2020-01-01 7.38 65.31 2020-01-02 7.53 64.5 2020-01-03 6.92 60.56 2020-01-04 6.38 59.12 2020-01-05 7.83 63.56 2020-01-06 7.43 62.25 May I ask if it's the format leading to this error? or what format I should follow? Many thanks.
  4. We've just made easier access to NEWA (New European Wind Atlas) Microscale and Mesoscale Atlases through #doWIND, an instance of #daTap (REST API for data aggregation and subsetting): Microscale Atlas: https://wps.neweuropeanwindatlas.eu/api/microscale-atlas/v1/docs Mesoscale Atlas: https://wps.neweuropeanwindatlas.eu/api/mesoscale-atlas/v1/docs Using #doWIND you can aggregate and subset data based on spatial coverage and variables. The resulting data subset is provided as a NetCDF file with rich metadata connected to wind energy controlled vocabularies. To use #doWIND you don't need anything else than a web browser. Enjoy!!! #fairdata #opendata #metadata #dataengineering #api #machineactionable
  5. Hello, I would like to know how to proceed in WindPro to be able to view and use a .WRG file exported by WAsP. Could you help me? Thank you!
  6. The wind farm will apply yaw control to obtain the maximum energy gain from the wind farm. The front row wind turbines are usually adjusted so that the front row wind turbines have a yaw angle. Is yaw control considered in WAsP, and the yaw angle? How to define the positive and negative of , and what are the specific operations?
  7. I need to extract vertical wind profile from Wasp to excel so i can present it in a study how do i do it?
  8. I want to run the pywasp in my locally for a college project, how can I install Pywasp on my pc without a license, kindly help me to understand Pywasp
  9. Hi, Currently, we have a WAsP version 11.6 license and we are planning to purchase the latest version of the WAsP Engineering software (v. 4). Does the WAsP version 11 support WAsP Engineering V. 4 or do we need to purchase the new WAsP Bundle license. What is the associated cost? Please advice. Best regards, Asela Jayasinghe
  10. I can't import data from web @GWA Elevation. It shows that: Could not import .Reason: MyMap.ImportMap : MyMap.MapReaderBody: Line#0, File Record#0 TmprLatLon._ Provide: Owner=GeneralProjectionSystem, Name=GeoProjection TemplateRepository.FindByID: ID=LatLon, k=1 Access violation at address 007096BD in module 'WAsPMapEditor12_4.exe'. Read of address 00000051. what should I do it now? Please respond me as soon as possible.
  11. We have an API that converts a GeoJSON polygon bounding box to the indices used in the OpenDAP queries used to download of the mesoscale time-series. The query will return an XML file that has a complex data element, which contains the indices for the west_east and south_north dimensions. This can then be substituted into the download. https://wps.neweuropeanwindatlas.eu/cgi-bin/?SERVICE=WPS&VERSION=1.0.0&REQUEST=Execute&IDENTIFIER=opendap_helper&DataInputs=location={"type":"Polygon","coordinates":[[[14,52],[16,52],[16,54],[14,54],[14,52]]]} Additionally, several users have asked about using the OpenDAP service with Python. We have used XArray for this purpose, using a command like below: ds = xr.open_dataset("http://opendap.neweuropeanwindatlas.eu/opendap/newa/NEWA_MESOSCALE_ATLAS/2015/NEWA-2015-12-30.nc?WS[0:1:47][2:2][674:1:674][628:1:628],WD[0:1:47][2:2][674:1:674][628:1:628],time[0:1:47],height[2:2],west_east[628:1:628],south_north[674:1:674],XLON[674:1:674][628:1:628],XLAT[674:1:674][628:1:628],Times[0:1:47],crs")
  12. I just started working on a wind farm sizing project on the WAsP software and i still can't figure out how to import the wind data It's urgent Thank you
  13. It is possible to prepare a wind turbine power-curve file directly in WAsP Turbine Editor. However, sometimes it is easier to start from an existing WTG file and edit it in Excel. If you open an existing WTG file in the Turbine Editor, you can copy the entire table by clicking F11 and then paste it to Excel (Ctrl+V). Then, in Excel, you edit the numbers and copy (Ctrl+C) the numbers in the Speed, Power, and Ct columns. Finally, in the Turbine Editor, you select “Enable Edit”, single-click the top left wind speed value, and paste (Ctrl+V).
×
×
  • Create New...