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
    • MERRA2 Ouputs
  • Advanced: Structure of Weather Data Configuration

Mask

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

Visualization

  • Visualization Examples

Modeling

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

API Reference

  • API Reference
    • geodata
      • geodata.datasets
        • geodata.datasets.era5
        • geodata.datasets.merra2
      • geodata.model
        • geodata.model.wind
      • geodata.pv
        • geodata.pv.irradiation
        • geodata.pv.orientation
        • geodata.pv.solar_panel_model
        • geodata.pv.solar_position
      • geodata.config
      • geodata.convert
        • geodata.convert.convert_cutout
        • geodata.convert.convert_temperature
        • geodata.convert.temperature
        • geodata.convert.convert_soil_temperature
        • geodata.convert.soil_temperature
        • geodata.convert.convert_heat_demand
        • geodata.convert.heat_demand
        • geodata.convert.convert_solar_thermal
        • geodata.convert.convert_pv
        • geodata.convert.convert_wind
        • geodata.convert.convert_windspd
        • geodata.convert.convert_windwpd
        • geodata.convert.convert_pm25
        • geodata.convert.get_var
        • geodata.convert.compute_var
      • geodata.cutout
        • geodata.cutout.Cutout
        • geodata.cutout.ds_reformat_index
        • geodata.cutout.coarsen
        • geodata.cutout.calc_grid_area
        • geodata.cutout.calc_shp_area
      • geodata.dataset
        • geodata.dataset.Dataset
      • geodata.logging
        • geodata.logging.CustomFormatter
        • geodata.logging.colorize
      • geodata.mask
        • geodata.mask.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.preparation
        • geodata.preparation.cutout_do_task
        • geodata.preparation.cutout_prepare
        • geodata.preparation.cutout_produce_specific_dataseries
        • geodata.preparation.cutout_get_meta
        • geodata.preparation.cutout_get_meta_view
      • 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.utils
        • geodata.utils.NpEncoder
        • geodata.utils.make_optional_progressbar
        • geodata.utils.dummy_njit
        • geodata.utils.get_daterange
      • geodata.wind
        • geodata.wind.log_ratio
        • geodata.wind.log_law
        • geodata.wind.psi_linear
        • geodata.wind.psi_linearexp
        • geodata.wind.psi_linearexpconst
        • geodata.wind.L_vph
        • geodata.wind.winddir
        • geodata.wind.log_law_flux_linear
        • geodata.wind.log_law_flux_linearexp
        • geodata.wind.log_law_flux_linearexpconst
        • geodata.wind.extrapolate_wind_speed
      • 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
    • Supported ERA5 Outputs
    • 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 2023, Geodata Contributors.