WikiPrint - from Polar Technologies


A python function has been created in order to access the SPECS-EUPORIAS Data Portal in a user-friendly way, allowing the retrieval of dimensional slices of selected simulation members from the ECMWF's SYSTEM4 model. This function (? automatically cares about the proper location of the right indices for data sub-setting across the different variable dimensions, given a few simple arguments for subset definition. In addition, instead of retrieving a NetCDF file that needs to be opened and read, the requested data is directly loaded into the current python working session, according to a particular structure described below, prior to data analysis and/or representation.

The request is simply formulated via the load_system4 function:

>>> load_system4(dataset, var, season, leadMonth, lonLim, latLim, year, members=[])

The arguments of the function are described below:

Short NameLong nameUnitsInstantaneousAggregated
tasmax Maximum temperature at 2 metres K No Yes
tasmin Minimum temperature at 2 metres K No Yes
tas Mean temperature at 2 metres K Yes Yes
pr Total precipitation accumulated mm No Yes
mslp Mean sea level pressure Pa Yes Yes

The output returned by the function consists of a list of user data objects (one for each member loaded) with the following methods that provide the necessary information for data representation and analysis:


An illustrative example of the load_system4 function is described in the next lines. We will retrieve System4 simulation data for the Iberian Peninsula, considering mean surface temperature for January and the first simulation member, for the 10-year period 1990-1999. It should be noted that the user must enter here his/her authorized username and password as character strings.

>>> var = "tas"
>>> season = [1]
>>> leadMonth = 1  
>>> lonlim = [-10,5]
>>> latlim= [35,45]
>>> year=[1990,1991,1992,1993,1994,1995,1996,1997,1998,1999]
>>> members=[0]
>>> dataset="" %(username,password)
>>> ud = loadSystem4(dataset,var,season, leadMonth,lonlim, latlim, year, members=[0])

Data is now loaded into the python session. One of the most common tasks consists on the representation of data, e.g. by mapping the spatial mean of the period under consideration. It can be done easily:

>>> plot_map(temporal_mean,ud,season,var)

No image "Map_tas_J.png" attached to udg/ecoms/dataserver/interfaces/python