WEMC Tech Blog 5.5: Metadata Generation for CSV Files

For any data produced with the intention of being downloaded and used by other users, it important to include information on the dataset. For example, details on the data origins should be provided, such as who produced the dataset, who can be contacted about the data and when/where it was produced. In addition, properties on the dataset itself, such as variable names and units of measurement all help the end user in comprehending the data.

For our current project C3S Energy (part of the C3S operational services), we are producing CSV files as various outputs from computations on climate and energy data. The raw data originates from a variety of sources, contains a range of units and time scales and with varying resolution between datasets. It is therefore critical to produce accurate metadata to represent these differences in our CSV files. There is no ‘standard’ format for including metadata in CSV files, so we followed the common approach (in climate science) of displaying the metadata in the first column of the CSV file, with one row per line of information. This approach makes it very easy for non-technical users to open and understand the CSV data in Excel, similarly users utilising a more programmatic approach can simply skip these lines when opening the file with languages like Python and R.

This blog serves as a ‘follow on’ from Tech Blog #5 and outlines constructing a python function that references the same JSON lookup table.

First, define the function and split the filename by it’s delimiters into a list of items:

[pastacode lang=”python” manual=”def%20mdata(fname)%3A%0A%20%20%20%20flist%20%3D%20fname.split(‘_’)%0A%20%20%20%20mdate%20%3D%20now.strftime(%22%25Y-%25m-%25d%22)” message=”” highlight=”” provider=”manual”/]

We are only dealing with CSV and NetCDF files in C3S Energy, detect which one and save as variable:

[pastacode lang=”python” manual=”%20%20%20%20if%20′.nc’%20in%20fname%3A%0A%20%20%20%20%20%20%20%20mtype%20%3D%20’NetCDF’%0A%20%20%20%20if%20′.csv’%20in%20fname%3A%0A%20%20%20%20%20%20%20%20mtype%20%3D%20’CSV'” message=”” highlight=”” provider=”manual”/]

Loop through filename items list of and JSON file in parallel:

[pastacode lang=”python” manual=”for%20i%2C%20word%20in%20enumerate(flist)%3A%0A%20%20%20%20%20%20%20%20for%20el_id%2C%20el_info%20in%20c3s.items()%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20key%20in%20el_info%3A” message=”” highlight=”” provider=”manual”/]

If items in list match JSON, add those variables for use in metadata:

[pastacode lang=”python” manual=”%20if%20key%20in%20flist%5Bi%5D%20and%20el_id%20%3D%3D%20’variable’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mtitle%20%3D%20el_info%5Bkey%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20key%20in%20flist%5Bi%5D%20and%20el_id%20%3D%3D%20’generation’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mabstract%20%3D%20el_info%5Bkey%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20el_info%5B’pos’%5D%20%3D%3D%208%20and%20i%20%3D%3D%208%20and%20len(key)%20%3D%3D%20el_info%5B’length’%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20and%20int(word%5B1%3A5%5D)%20%3E%201950%20and%20int(word%5B1%3A5%5D)%20%3C%203000%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20msedit%20%3D%20word.lstrip(%22S%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20msdate%20%3D%20msedit%5B0%3A4%5D%20%2B%20′-‘%20%2B%20msedit%5B4%3A6%5D%20%2B%20’-‘%20%2B%20msedit%5B6%3A8%5D%20%2B%20’-‘%20%2B%20msedit%5B8%3A%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20el_info%5B’pos’%5D%20%3D%3D%209%20and%20i%20%3D%3D%209%20and%20len(key)%20%3D%3D%20el_info%5B’length’%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20and%20int(word%5B1%3A5%5D)%20%3E%201950%20and%20int(word%5B1%3A5%5D)%20%3C%203000%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20meedit%20%3D%20word.lstrip(%22E%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20medate%20%3D%20meedit%5B0%3A4%5D%20%2B%20’-‘%20%2B%20meedit%5B4%3A6%5D%20%2B%20’-‘%20%2B%20meedit%5B6%3A8%5D%20%2B%20’-‘%20%2B%20meedit%5B8%3A%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20key%20in%20flist%5Bi%5D%20and%20el_id%20%3D%3D%20’temporal_resolution’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mtres%20%3D%20el_info%5Bkey%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20key%20in%20flist%5Bi%5D%20and%20el_id%20%3D%3D%20’spacial_resolution’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20msres%20%3D%20el_info%5Bkey%5D” message=”” highlight=”” provider=”manual”/]

Check title and add appropriate unit measurement as variable:

[pastacode lang=”python” manual=”%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20mtitle%20%3D%3D%20’Air%20Temperature’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’K’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Total%20Precipitation’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’m’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Global%20Horizontal%20Irradiance’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’J%20m-2’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Mean%20Sea%20Level%20Pressure’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’Pa’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Wind%20Speed’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’m%20s-1’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Evaporation’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’m%20of%20water%20equivalent’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Snow%20Depth’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’m%20of%20water%20equivalent’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Electricity%20Demand’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Hydropower%20(Reservoir)’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Hydropower%20(Run%20Of%20River)’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Wind%20Power%20Onshore’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Wind%20Power%20Offshore’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Wind’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Solar%20PV%20Power’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W'” message=”” highlight=”” provider=”manual”/]

Create a variable with metadata included:

[pastacode lang=”python” manual=”%20metadata%20%3D%20’%23%20General’%20%2B%20’%5Cn%23%23%20Title’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mtitle%20%2B%20’%5Cn%23%23%20Abstract’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mabstract%20%20%20%20%2B%20’%5Cn%23%23%20Date’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mdate%20%2B%20’%5Cn%23%23%20Date%20type’%20%2B%20’%5Cn%23%23%23%20Publication%3A%20Date%20identifies%20when%20the%20data%20was%20issued’%20%20%20%20%2B%20’%5Cn%23%23%20Unit’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20munit%20%2B%20’%5Cn%23%23%20URL’%20%2B%20’%5Cn%23%23%23%20https%3A%2F%2Fcds.climate.copernicus.eu%2F’%20%2B%20’%5Cn%23%23%20Data%20format’%20%20%20%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mtype%20%2B%20’%5Cn%23%23%20Keywords’%20%2B%20’%5Cn%23%23%23%20ERA5%2C%20reanalysis%2C%20Copernicus%2C%20C3S%2C%20C3S%20Energy%2C%20WEMC’%20%20%20%20%2B%20’%5Cn%23%23%20Point%20of%20contact’%20%2B%20’%5Cn%23%23%23%20Individual%20name’%20%2B%20’%5Cn%23%23%23%23%20Joe%20Bloggs’%20%2B%20’%5Cn%23%23%23%20Electronic%20mail%20address’%20%20%20%20%2B%20’%5Cn%23%23%23%23%20info%40wemcouncil.org’%20%2B%20’%5Cn%23%23%23%20Organisation%20name’%20%2B%20’%5Cn%23%23%23%23%20World%20Energy%20%26%20Meteorology%20Council’%20%2B%20’%5Cn%23%23%23%20Role’%20%20%20%20%2B%20’%5Cn%23%23%23%23%20Owner%3A%20Party%20that%20owns%20the%20resource’%20%2B%20’%5Cn%23%20Usage’%20%2B%20’%5Cn%23%23%20Access%20constraints’%20%20%20%20%2B%20’%5Cn%23%23%23%20Intellectual%20property%20rights%3A%20The%20IP%20of%20these%20data%20belongs%20to%20the%20EU%20Copernicus%20programme’%20%2B%20’%5Cn%23%23%20Use%20constraints’%20%20%20%20%2B%20’%5Cn%23%23%23%20Creative%20Commons’%20%2B%20’%5Cn%23%23%20Citation(s)’%20%2B%20’%5Cn%23%23%23%20NA’%20%2B%20’%5Cn%23%23%20Temporal%20extent’%20%2B%20’%5Cn%23%23%20Begin%20date’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20msdate%20%20%20%20%2B%20’%5Cn%23%23%20End%20date’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20medate%20%2B%20’%5Cn%23%23%20Temporal%20resolution’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mtres%20%2B%20’%5Cn%23%23%20Geographic%20bounding%20box’%20%20%20%20%2B%20’%5Cn%23%23%23%20westBoundLongitude%20-22.00’%20%2B%20’%5Cn%23%23%23%20eastBoundLongitude%2045.00’%20%2B%20’%5Cn%23%23%23%20southBoundLatitude%2027.00’%20%20%20%20%2B%20’%5Cn%23%23%23%20northBoundLatitude%2072.00’%20%2B%20’%5Cn%23%23%20Spatial%20resolution’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20msres%20%2B%20’%5Cn%23%20Lineage%20Statement’%20%20%20%20%2B%20’%5Cn%23%23%20Original%20Data%20Source’%20%2B%20’%5Cn%23%23%20Statement’%20%20%20%20%2B%20’%5Cn%23%23%23%20The%20original%20data%20sources%20are%20ECMWF%20ERA5%20Reanalysis%20(available%20at%3A%20https%3A%2F%2Fcds.climate.copernicus.eu)’%20%20%20%20%2B%20’%5Cn%23’%20%20%20%20%2B%20’%5CnDate’%20%20%20%20%23%20print(metadata)%0A%20%20%20%20return(metadata)” message=”” highlight=”” provider=”manual”/]

Here is the function in full:

[pastacode lang=”python” manual=”%23%20function%20to%20create%20metadata%20from%20filename%20and%20lookup%20table%0Adef%20mdata(fname)%3A%0A%20%20%20%20flist%20%3D%20fname.split(‘_’)%0A%20%20%20%20x%20%3D%200%0A%20%20%20%20mdate%20%3D%20now.strftime(%22%25Y-%25m-%25d%22)%0A%20%20%20%20if%20′.nc’%20in%20fname%3A%0A%20%20%20%20%20%20%20%20mtype%20%3D%20’NetCDF’%0A%20%20%20%20if%20′.csv’%20in%20fname%3A%0A%20%20%20%20%20%20%20%20mtype%20%3D%20’CSV’%0A%20%20%20%20for%20i%2C%20word%20in%20enumerate(flist)%3A%0A%20%20%20%20%20%20%20%20for%20el_id%2C%20el_info%20in%20c3s.items()%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20key%20in%20el_info%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20key%20in%20flist%5Bi%5D%20and%20el_id%20%3D%3D%20’variable’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mtitle%20%3D%20el_info%5Bkey%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20key%20in%20flist%5Bi%5D%20and%20el_id%20%3D%3D%20’generation’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mabstract%20%3D%20el_info%5Bkey%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20el_info%5B’pos’%5D%20%3D%3D%208%20and%20i%20%3D%3D%208%20and%20len(key)%20%3D%3D%20el_info%5B’length’%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20and%20int(word%5B1%3A5%5D)%20%3E%201950%20and%20int(word%5B1%3A5%5D)%20%3C%203000%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20msedit%20%3D%20word.lstrip(%22S%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20msdate%20%3D%20msedit%5B0%3A4%5D%20%2B%20′-‘%20%2B%20msedit%5B4%3A6%5D%20%2B%20’-‘%20%2B%20msedit%5B6%3A8%5D%20%2B%20’-‘%20%2B%20msedit%5B8%3A%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20el_info%5B’pos’%5D%20%3D%3D%209%20and%20i%20%3D%3D%209%20and%20len(key)%20%3D%3D%20el_info%5B’length’%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20and%20int(word%5B1%3A5%5D)%20%3E%201950%20and%20int(word%5B1%3A5%5D)%20%3C%203000%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20meedit%20%3D%20word.lstrip(%22E%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20medate%20%3D%20meedit%5B0%3A4%5D%20%2B%20’-‘%20%2B%20meedit%5B4%3A6%5D%20%2B%20’-‘%20%2B%20meedit%5B6%3A8%5D%20%2B%20’-‘%20%2B%20meedit%5B8%3A%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20key%20in%20flist%5Bi%5D%20and%20el_id%20%3D%3D%20’temporal_resolution’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mtres%20%3D%20el_info%5Bkey%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20key%20in%20flist%5Bi%5D%20and%20el_id%20%3D%3D%20’spacial_resolution’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20msres%20%3D%20el_info%5Bkey%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20mtitle%20%3D%3D%20’Air%20Temperature’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’K’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Total%20Precipitation’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’m’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Global%20Horizontal%20Irradiance’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’J%20m-2’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Mean%20Sea%20Level%20Pressure’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’Pa’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Wind%20Speed’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’m%20s-1’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Evaporation’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’m%20of%20water%20equivalent’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Snow%20Depth’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’m%20of%20water%20equivalent’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Electricity%20Demand’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Hydropower%20(Reservoir)’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Hydropower%20(Run%20Of%20River)’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Wind%20Power%20Onshore’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Wind%20Power%20Offshore’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Wind’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20mtitle%20%3D%3D%20’Solar%20PV%20Power’%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20munit%20%3D%20’W’%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20x%20%3D%20x%20%2B%201%0A%20%20%20%20metadata%20%3D%20’%23%20General’%20%2B%20’%5Cn%23%23%20Title’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mtitle%20%2B%20’%5Cn%23%23%20Abstract’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mabstract%20%20%20%20%2B%20’%5Cn%23%23%20Date’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mdate%20%2B%20’%5Cn%23%23%20Date%20type’%20%2B%20’%5Cn%23%23%23%20Publication%3A%20Date%20identifies%20when%20the%20data%20was%20issued’%20%20%20%20%2B%20’%5Cn%23%23%20Unit’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20munit%20%2B%20’%5Cn%23%23%20URL’%20%2B%20’%5Cn%23%23%23%20https%3A%2F%2Fcds.climate.copernicus.eu%2F’%20%2B%20’%5Cn%23%23%20Data%20format’%20%20%20%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mtype%20%2B%20’%5Cn%23%23%20Keywords’%20%2B%20’%5Cn%23%23%23%20ERA5%2C%20reanalysis%2C%20Copernicus%2C%20C3S%2C%20C3S%20Energy%2C%20WEMC’%20%20%20%20%2B%20’%5Cn%23%23%20Point%20of%20contact’%20%2B%20’%5Cn%23%23%23%20Individual%20name’%20%2B%20’%5Cn%23%23%23%23%20Joe%20Bloggs’%20%2B%20’%5Cn%23%23%23%20Electronic%20mail%20address’%20%20%20%20%2B%20’%5Cn%23%23%23%23%20info%40wemcouncil.org’%20%2B%20’%5Cn%23%23%23%20Organisation%20name’%20%2B%20’%5Cn%23%23%23%23%20World%20Energy%20%26%20Meteorology%20Council’%20%2B%20’%5Cn%23%23%23%20Role’%20%20%20%20%2B%20’%5Cn%23%23%23%23%20Owner%3A%20Party%20that%20owns%20the%20resource’%20%2B%20’%5Cn%23%20Usage’%20%2B%20’%5Cn%23%23%20Access%20constraints’%20%20%20%20%2B%20’%5Cn%23%23%23%20Intellectual%20property%20rights%3A%20The%20IP%20of%20these%20data%20belongs%20to%20the%20EU%20Copernicus%20programme’%20%2B%20’%5Cn%23%23%20Use%20constraints’%20%20%20%20%2B%20’%5Cn%23%23%23%20Creative%20Commons’%20%2B%20’%5Cn%23%23%20Citation(s)’%20%2B%20’%5Cn%23%23%23%20NA’%20%2B%20’%5Cn%23%23%20Temporal%20extent’%20%2B%20’%5Cn%23%23%20Begin%20date’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20msdate%20%20%20%20%2B%20’%5Cn%23%23%20End%20date’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20medate%20%2B%20’%5Cn%23%23%20Temporal%20resolution’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20mtres%20%2B%20’%5Cn%23%23%20Geographic%20bounding%20box’%20%20%20%20%2B%20’%5Cn%23%23%23%20westBoundLongitude%20-22.00’%20%2B%20’%5Cn%23%23%23%20eastBoundLongitude%2045.00’%20%2B%20’%5Cn%23%23%23%20southBoundLatitude%2027.00’%20%20%20%20%2B%20’%5Cn%23%23%23%20northBoundLatitude%2072.00’%20%2B%20’%5Cn%23%23%20Spatial%20resolution’%20%2B%20’%5Cn%23%23%23%20’%20%2B%20msres%20%2B%20’%5Cn%23%20Lineage%20Statement’%20%20%20%20%2B%20’%5Cn%23%23%20Original%20Data%20Source’%20%2B%20’%5Cn%23%23%20Statement’%20%20%20%20%2B%20’%5Cn%23%23%23%20The%20original%20data%20sources%20are%20ECMWF%20ERA5%20Reanalysis%20(available%20at%3A%20https%3A%2F%2Fcds.climate.copernicus.eu)’%20%20%20%20%2B%20’%5Cn%23’%20%20%20%20%2B%20’%5CnDate’%20%20%20%20%23%20print(metadata)%0A%20%20%20%20return(metadata)” message=”” highlight=”” provider=”manual”/]

This code can also be found on my github page

Luke Sanger – WEMC Data Engineer, June 2019

Recent Posts