Skip to main content
Ctrl+K

Geodata 0.1.0 documentation

Quickstart

  • Installation
  • Supported Input/Output Formats

Dataset Specific Tutorials

  • ERA5 Related Tutorials
    • ERA5 Analysis Process
    • Download ERA5 Dataset and Create ERA5 Cutouts
    • Generating Outputs with ERA5 Data
  • MERRA2 Related Tutorials
    • MERRA2 Analysis Process
    • Download MERRA2 Data and Create MERRA2 Cutouts
    • Generating Outputs with MERRA2 Data
  • Advanced: Structure of Weather Data Configuration

Mask

  • Tutorial: Typical Mask Workflow
  • Tutorial: Incorporating Mask into Cutout Workflow
  • Mask Troubleshooting

Visualization

  • Visualization Examples

Modeling

  • Wind Models
    • Tutorial: Estimate Wind Speed with Interpolation
    • Tutorial: Estimate Wind Speed with Extrapolation

License

  • License

API Reference

  • geodata
    • geodata.model
      • geodata.model.wind
        • geodata.model.wind.extrapolate
        • geodata.model.wind.interpolate
        • geodata.model.wind.WindExtrapolationModel
        • geodata.model.wind.WindInterpolationModel
    • geodata.pv
      • geodata.pv.irradiation
        • geodata.pv.irradiation.DiffuseHorizontalIrrad
        • geodata.pv.irradiation.TiltedDiffuseIrrad
        • geodata.pv.irradiation.TiltedDirectIrrad
        • geodata.pv.irradiation.TiltedGroundIrrad
        • geodata.pv.irradiation.TiltedIrradiation
      • geodata.pv.orientation
        • geodata.pv.orientation.get_orientation
        • geodata.pv.orientation.make_latitude_optimal
        • geodata.pv.orientation.make_constant
        • geodata.pv.orientation.SurfaceOrientation
      • geodata.pv.solar_panel_model
        • geodata.pv.solar_panel_model.SolarPanelModel
      • geodata.pv.solar_position
        • geodata.pv.solar_position.SolarPosition
    • geodata.config
    • geodata.mask
      • geodata.mask.load_mask
      • geodata.mask.open_tif
      • geodata.mask.ras_to_xarr
      • geodata.mask.create_temp_tif
      • geodata.mask.save_opened_raster
      • geodata.mask.save_raster
      • geodata.mask.crop_raster
      • geodata.mask.reproject_raster
      • geodata.mask.apply_fn_to_raster
      • geodata.mask.filter_raster
      • geodata.mask.trim_raster
      • geodata.mask.filter_area
      • geodata.mask.convert_shape_crs
      • geodata.mask.show
      • geodata.mask.show_all
    • geodata.plot
      • geodata.plot.ds_ts_aggregate
      • geodata.plot.time_series
      • geodata.plot.heatmap
      • geodata.plot.heatmap_animation
      • geodata.plot.save_animation
    • geodata.resource
      • geodata.resource.get_windturbineconfig
      • geodata.resource.get_solarpanelconfig
      • geodata.resource.solarpanel_rated_capacity_per_unit
      • geodata.resource.windturbine_rated_capacity_per_unit
      • geodata.resource.windturbine_smooth
    • geodata.Cutout
      • geodata.Cutout.datasetfn
      • geodata.Cutout.grid_coordinates
      • geodata.Cutout.grid_cells
      • geodata.Cutout.add_mask
      • geodata.Cutout.add_grid_area
      • geodata.Cutout.mask
      • geodata.Cutout.heat_demand
      • geodata.Cutout.temperature
      • geodata.Cutout.soil_temperature
      • geodata.Cutout.solar_thermal
      • geodata.Cutout.wind
      • geodata.Cutout.windspd
      • geodata.Cutout.windwpd
      • geodata.Cutout.pv
      • geodata.Cutout.pm25
    • geodata.Dataset
      • geodata.Dataset.datasetfn
      • geodata.Dataset.datasetfn_opendap
      • geodata.Dataset.get_data
      • geodata.Dataset.trim_variables
      • geodata.Dataset.grid_coordinates
      • geodata.Dataset.grid_cells
    • geodata.Mask
      • geodata.Mask.add_layer
      • geodata.Mask.remove_layer
      • geodata.Mask.rename_layer
      • geodata.Mask.get_res
      • geodata.Mask.get_bounds
      • geodata.Mask.find_inner_bound
      • geodata.Mask.crop_layer
      • geodata.Mask.trim_layer
      • geodata.Mask.filter_layer
      • geodata.Mask.merge_layer
      • geodata.Mask.remove_merge_layer
      • geodata.Mask.add_shape_layer
      • geodata.Mask.extract_shapes
      • geodata.Mask.remove_shapes
      • geodata.Mask.load_merged_xr
      • geodata.Mask.load_shape_xr
      • geodata.Mask.close_files
      • geodata.Mask.save_mask
      • geodata.Mask.from_name
  • .md

ERA5 Related Tutorials

Contents

  • Creating a CDS account
  • Download data through CDS API
  • More Resources on ERA5

ERA5 Related Tutorials#

This page explains how you can setup access to ERA5 data from the Copernicus Data Store.

Creating a CDS account#

To download the ERA5 data from the CDS, you’ll need to create a free CDS account here.

Download data through CDS API#

Once your account has been created, you’ll need to set up access to the API by doing the following:

  1. Log into your CDS account and visit your profile page.

  2. Install the API key. There will be a section called Personal Access Token. You will then need to copy these two lines this into a file called .cdsapirc that you will create in your user root folder.

    • macOS/Linux: For macOS or Linux, you can create .cdsapirc by opening a terminal window and running touch ~/.cdsapirc to create the file and then echo [line 1 of the code] >> ~/.cdsapirc followed by echo [line 2 of the code] >> ~/.cdsapirc.

    • Windows: For Windows, the process is slightly more complicated. Please refer to an in-depth guide at the Copernicus Knowledge Base here.

  3. Install the CDS API client by opening a terminal/shell and running pip install ".[download]", assuming you are in Geodata’s root directory.

  4. Once you’ve installed the API key and the API client, you can confirm access by running an example in a Python script or a Jupyter notebook.

import cdsapi

c = cdsapi.Client()

c.retrieve(
    "reanalysis-era5-single-levels",
    {
        "product_type": "reanalysis",
        "format": "netcdf",
        "variable": [
            "2m_dewpoint_temperature",
            "2m_temperature",
        ],
        "year": "2011",
        "month": [
            "01",
        ],
        "day": ["01", "02", "03"],
        "time": [
            "00:00",
            "12:00",
        ],
    },
    "download.nc",
)

The above example downloads 2m temperature and 2m dewpoint temperature with data points at 00:00 and 12:00 for each day, from January 1-3, 2011, in NetCDF format.

More Resources on ERA5#

We’ve also provide a few tutorials on how to interact with the ERA5 datasets using Geodata. They can be found in the links below.

  • ERA5 Analysis Process
    • Step 1 - Setup
    • Step 2 - Download and Create Cutout
    • Step 3 - Create Cutout
    • Step 4 - Generate Outputs
  • Download ERA5 Dataset and Create ERA5 Cutouts
    • Download Dataset
    • Create Cutout
    • Prepare Cutout
    • Cutout Metadata
  • Generating Outputs with ERA5 Data
    • ERA5 Configurations and Outputs
    • Generating Temperature Outputs with MERRA2 Data
    • Example Output

previous

Supported Input/Output Formats

next

ERA5 Analysis Process

Contents
  • Creating a CDS account
  • Download data through CDS API
  • More Resources on ERA5

By Geodata Contributors

© Copyright 2024, Power Transformation Lab.