SIAM Conference Galway 2017 – Comparison of Correlations Between Wind and Solar Radiation

Combining wind and solar power generation has potential to make renewable energy less variable. This is done to take advantage of the fact that it tends to be cloudy when it’s windy and calm when it’s sunny [1] [2]. Preliminary site assessment for wind and solar
power generation is commonly done by making use of reanalysis data. A reanalysis is a dataset generated using weather observations and a modified forecast model to produce a gridded representation of past weather events. In this study, the correlation between wind speed and solar radiation from two popular reanalysis datasets, ERA- Interim and MERRA2 , have been compared to correlations based on observed data from four Irish weather stations, along with mast observations from Cabauw, Netherlands.



WRF required fields:

  • 3D, pressure levels: Temperature=T, Winds=U, V, Relative Humidity=RH, Geopotential Height=PHIS
  • 2D: Surface Pressure=PS, Sea Level Pressure=SLP, Skin Temperature=TS, 2-meter Temperature=T2M, 2-meter specific humidity=QV2M, 10-meter U,V=U10M,V10M
  • Constant: LANDSEA mask=FRLAND, Soil Height, PHIS
  • Optional: Soil Temperature and Soil Moisture, needed for Noah LSM. Water equivalent snow depth=PRECSNOLAND.

Area I download for GFS forecasts: leftlon=-55, rightlon=20, toplat=70, bottomlat=30

MERRA2 Data info from File Specification by Bosilovich et al. here:

  • inst3_3d_asm_Np (M2I3NPASM): Assimilated Meteorological Fields
    • RH : relative humidity after moist, 1
    • T : air temperature, K
    • U : eastward wind, m/s
    • V : northward wind m/s
    • PHIS : surface geopotential height,  m2/s2
  • inst1_2d_asm_Nx (M2I1NXASM): Single-Level Diagnostics
    • PS : surface pressure, Pa
    • SLP : sea level pressure, Pa
    • TS : surface skin temperature, K
    • T2M : 2-meter air temperature, K
    • QV2M : 2-meter specific humidity, kg/kg
    • U10M : 10-meter eastward wind, m/s
    • V10M : 10-meter northward wind, m/s
  • const_2d_asm_Nx (M2C0NXASM): Constant Model Parameters
    • FRLAND : fraction of land, 1
    • PHIS : surface geopotential height, m2/s2

To download data, start here:”MERRA-2″

Then type in the dataset name in the search box. Select the dataset. Click on Subset > Subsetter. Enter lat/lon values. Download list of files. Issue wget command:

wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --auth-no-challenge=on --keep-session-cookies --content-disposition -i myfile.dat

The constants files are different, download those directly from the online archive. Downloading requires earthdata login.


Dealing with GRIB2 data

We use python for our data analysis and plotting.

The wonderful xarray package ( has no problem with NetCDF, but doesn’t like GRIB2. GFS data are in GRIB2, however, so it would be nicve if we could convert them easily to NetCDF.

We can do this by using the great wgrib2 tool (

To install wgrib2 (on ORR2 or SONIC, for example), do the following:

  1. Make a directory for wgrib2 and move there:
    mkdir wgrib2
    cd wgrib2
  2. Get wgrib2 and unpack it:
    tar -xzf wgrib2.tgz
  3. Move into the directory, set environment variables and make wgrib2:
    cd grib2/
    export CC=gcc
    export FC=gfortran
  4. Now you can convert a GFS GRIB2 file to NetCDF!
    wgrib2/grib2/wgrib2/wgrib2 gec00.t12z.pgrb2f00 -netcdf

    It’d be a good idea to add the wgrib2 executable directory to your PATH, so you can call it from any directory.