cfdm.example_field

cfdm.example_field(n, _implementation=<CFDMImplementation: >)[source]

Return an example field construct.

New in version (cfdm): 1.8.0

Parameters
n: int

Select the example field construct to return, one of:

n

Field construct description

0

Cell method and dimension coordinate metadata constructs.

1

Cell method, dimension coordinate, auxiliary coordinate, cell measure, coordinate reference, domain ancillary and field ancillary metadata constructs.

2

A monthly time series at each latitude-longitude location.

3

Discrete sampling geometry (DSG) “timeSeries” features.

4

Discrete sampling geometry (DSG) “timeSeriesProfile” features.

5

A 12 hourly time series at each latitude-longitude location.

6

Polygon geometry coordinate cells with interior ring variables.

7

Rotated pole dimension coordinate constructs and 2-d latitude and longitude auxiliary coordinate constructs.

8

A UGRID mesh topology of face cells.

9

A UGRID mesh topology of edge cells.

10

A UGRID mesh topology of point cells.

11

Discrete sampling geometry (DSG) “trajectory” features.

See the examples for details.

_implementation: (subclass of) CFDMImplementation, optional

Define the CF data model implementation that provides the returned field constructs.

Returns
Field

The example field construct.

Examples

>>> f = cfdm.example_field(0)
>>> print(f)
Field: specific_humidity (ncvar%q)
----------------------------------
Data            : specific_humidity(latitude(5), longitude(8)) 1
Cell methods    : area: mean
Dimension coords: latitude(5) = [-75.0, ..., 75.0] degrees_north
                : longitude(8) = [22.5, ..., 337.5] degrees_east
                : time(1) = [2019-01-01 00:00:00]
>>> print(f.data.array)
[[0.007 0.034 0.003 0.014 0.018 0.037 0.024 0.029]
 [0.023 0.036 0.045 0.062 0.046 0.073 0.006 0.066]
 [0.11  0.131 0.124 0.146 0.087 0.103 0.057 0.011]
 [0.029 0.059 0.039 0.07  0.058 0.072 0.009 0.017]
 [0.006 0.036 0.019 0.035 0.018 0.037 0.034 0.013]]
>>> f = cfdm.example_field(1)
>>> print(f)
Field: air_temperature (ncvar%ta)
---------------------------------
Data            : air_temperature(atmosphere_hybrid_height_coordinate(1), grid_latitude(10), grid_longitude(9)) K
Cell methods    : grid_latitude(10): grid_longitude(9): mean where land (interval: 0.1 degrees) time(1): maximum
Field ancils    : air_temperature standard_error(grid_latitude(10), grid_longitude(9)) = [[0.76, ..., 0.32]] K
Dimension coords: atmosphere_hybrid_height_coordinate(1) = [1.5]
                : grid_latitude(10) = [2.2, ..., -1.76] degrees
                : grid_longitude(9) = [-4.7, ..., -1.18] degrees
                : time(1) = [2019-01-01 00:00:00]
Auxiliary coords: latitude(grid_latitude(10), grid_longitude(9)) = [[53.941, ..., 50.225]] degrees_N
                : longitude(grid_longitude(9), grid_latitude(10)) = [[2.004, ..., 8.156]] degrees_E
                : long_name=Grid latitude name(grid_latitude(10)) = [--, ..., kappa]
Cell measures   : measure:area(grid_longitude(9), grid_latitude(10)) = [[2391.9657, ..., 2392.6009]] km2
Coord references: grid_mapping_name:rotated_latitude_longitude
                : standard_name:atmosphere_hybrid_height_coordinate
Domain ancils   : ncvar%a(atmosphere_hybrid_height_coordinate(1)) = [10.0] m
                : ncvar%b(atmosphere_hybrid_height_coordinate(1)) = [20.0]
                : surface_altitude(grid_latitude(10), grid_longitude(9)) = [[0.0, ..., 270.0]] m
>>> f = cfdm.example_field(2)
>>> print(f)
Field: air_potential_temperature (ncvar%air_potential_temperature)
------------------------------------------------------------------
Data            : air_potential_temperature(time(36), latitude(5), longitude(8)) K
Cell methods    : area: mean
Dimension coords: time(36) = [1959-12-16 12:00:00, ..., 1962-11-16 00:00:00]
                : latitude(5) = [-75.0, ..., 75.0] degrees_north
                : longitude(8) = [22.5, ..., 337.5] degrees_east
                : air_pressure(1) = [850.0] hPa
>>> f = cfdm.example_field(3)
>>> print(f)
Field: precipitation_flux (ncvar%p)
-----------------------------------
Data            : precipitation_flux(cf_role=timeseries_id(4), ncdim%timeseries(9)) kg m-2 day-1
Auxiliary coords: time(cf_role=timeseries_id(4), ncdim%timeseries(9)) = [[1969-12-29 00:00:00, ..., 1970-01-07 00:00:00]]
                : latitude(cf_role=timeseries_id(4)) = [-9.0, ..., 78.0] degrees_north
                : longitude(cf_role=timeseries_id(4)) = [-23.0, ..., 178.0] degrees_east
                : height(cf_role=timeseries_id(4)) = [0.5, ..., 345.0] m
                : cf_role=timeseries_id(cf_role=timeseries_id(4)) = [station1, ..., station4]
                : long_name=station information(cf_role=timeseries_id(4)) = [-10, ..., -7]
>>> f = cfdm.example_field(4)
>>> print(f)
Field: air_temperature (ncvar%ta)
---------------------------------
Data            : air_temperature(cf_role=timeseries_id(3), ncdim%timeseries(26), ncdim%profile_1(4)) K
Auxiliary coords: time(cf_role=timeseries_id(3), ncdim%timeseries(26)) = [[1970-01-04 00:00:00, ..., --]]
                : latitude(cf_role=timeseries_id(3)) = [-9.0, 2.0, 34.0] degrees_north
                : longitude(cf_role=timeseries_id(3)) = [-23.0, 0.0, 67.0] degrees_east
                : height(cf_role=timeseries_id(3)) = [0.5, 12.6, 23.7] m
                : altitude(cf_role=timeseries_id(3), ncdim%timeseries(26), ncdim%profile_1(4)) = [[[2.07, ..., --]]] km
                : cf_role=timeseries_id(cf_role=timeseries_id(3)) = [station1, station2, station3]
                : long_name=station information(cf_role=timeseries_id(3)) = [-10, -9, -8]
                : cf_role=profile_id(cf_role=timeseries_id(3), ncdim%timeseries(26)) = [[102, ..., --]]
>>> f = cfdm.example_field(5)
>>> print(f)
Field: air_potential_temperature (ncvar%air_potential_temperature)
------------------------------------------------------------------
Data            : air_potential_temperature(time(118), latitude(5), longitude(8)) K
Cell methods    : area: mean
Dimension coords: time(118) = [1959-01-01 06:00:00, ..., 1959-02-28 18:00:00]
                : latitude(5) = [-75.0, ..., 75.0] degrees_north
                : longitude(8) = [22.5, ..., 337.5] degrees_east
                : air_pressure(1) = [850.0] hPa
>>> f = cfdm.example_field(6)
>>> print(f)
Field: precipitation_amount (ncvar%pr)
--------------------------------------
Data            : precipitation_amount(cf_role=timeseries_id(2), time(4))
Dimension coords: time(4) = [2000-01-16 12:00:00, ..., 2000-04-15 00:00:00]
Auxiliary coords: latitude(cf_role=timeseries_id(2)) = [25.0, 7.0] degrees_north
                : longitude(cf_role=timeseries_id(2)) = [10.0, 40.0] degrees_east
                : cf_role=timeseries_id(cf_role=timeseries_id(2)) = [x1, y2]
                : ncvar%z(cf_role=timeseries_id(2), 3, 4) = [[[1.0, ..., --]]] m
Coord references: grid_mapping_name:latitude_longitude
>>> f = cfdm.example_field(7)
>>> print(f)
Field: eastward_wind (ncvar%ua)
-------------------------------
Data            : eastward_wind(time(3), air_pressure(1), grid_latitude(4), grid_longitude(5)) m s-1
Cell methods    : time(3): mean
Dimension coords: time(3) = [1979-05-01 12:00:00, 1979-05-02 12:00:00, 1979-05-03 12:00:00] gregorian
                : air_pressure(1) = [850.0] hPa
                : grid_latitude(4) = [0.44, ..., -0.88] degrees
                : grid_longitude(5) = [-1.18, ..., 0.58] degrees
Auxiliary coords: latitude(grid_latitude(4), grid_longitude(5)) = [[52.4243, ..., 51.1163]] degrees_north
                : longitude(grid_latitude(4), grid_longitude(5)) = [[8.0648, ..., 10.9238]] degrees_east
Coord references: grid_mapping_name:rotated_latitude_longitude
>>> f = cfdm.example_field(8)
>>> print(f)
Field: air_temperature (ncvar%ta)
---------------------------------
Data            : air_temperature(time(2), ncdim%nMesh2_face(3)) K
Cell methods    : time(2): point (interval: 3600 s)
Dimension coords: time(2) = [2016-01-02 01:00:00, 2016-01-02 11:00:00] gregorian
Auxiliary coords: longitude(ncdim%nMesh2_face(3)) = [-44.0, -44.0, -42.0] degrees_east
                : latitude(ncdim%nMesh2_face(3)) = [34.0, 34.0, 34.0] degrees_north
Domain Topology : cell:face(ncdim%nMesh2_face(3), 4) = [[2, ..., --]]
Cell connects   : connectivity:edge(ncdim%nMesh2_face(3), 5) = [[0, ..., --]]
>>> f = cfdm.example_field(9)
>>> print(f)
Field: northward_wind (ncvar%v)
-------------------------------
Data            : northward_wind(time(2), ncdim%nMesh2_face(3)) ms-1
Cell methods    : time(2): point (interval: 3600 s)
Dimension coords: time(2) = [2016-01-02 01:00:00, 2016-01-02 11:00:00] gregorian
Auxiliary coords: longitude(ncdim%nMesh2_face(3)) = [-44.0, -44.0, -42.0] degrees_east
                : latitude(ncdim%nMesh2_face(3)) = [34.0, 34.0, 34.0] degrees_north
Domain Topology : cell:face(ncdim%nMesh2_face(3), 4) = [[2, ..., --]]
Cell connects   : connectivity:edge(ncdim%nMesh2_face(3), 5) = [[0, ..., --]]
>>> print(cfdm.example_field(10))
Field: air_pressure (ncvar%pa)
------------------------------
Data            : air_pressure(time(2), ncdim%nMesh2_node(7)) hPa
Cell methods    : time(2): point (interval: 3600 s)
Dimension coords: time(2) = [2016-01-02 01:00:00, 2016-01-02 11:00:00] gregorian
Auxiliary coords: longitude(ncdim%nMesh2_node(7)) = [-45.0, ..., -40.0] degrees_east
                : latitude(ncdim%nMesh2_node(7)) = [35.0, ..., 34.0] degrees_north
Topologies      : cell:point(ncdim%nMesh2_node(7), 5) = [[0, ..., --]]
>>> print(cfdm.example_field(11))
Field: mole_fraction_of_ozone_in_air (ncvar%O3)
-----------------------------------------------
Data            : mole_fraction_of_ozone_in_air(cf_role=trajectory_id(1), ncdim%trajectory(4)) ppb
Auxiliary coords: time(cf_role=trajectory_id(1), ncdim%trajectory(4)) = [[2024-02-26 09:01:00, ..., 2024-02-26 09:04:00]] standard
                : altitude(cf_role=trajectory_id(1), ncdim%trajectory(4)) = [[2577.0, ..., 2563.0]] m
                : air_pressure(cf_role=trajectory_id(1), ncdim%trajectory(4)) = [[751.0, ..., 780.0]] hPa
                : latitude(cf_role=trajectory_id(1), ncdim%trajectory(4)) = [[52.0, ..., 52.2]] degree_north
                : longitude(cf_role=trajectory_id(1), ncdim%trajectory(4)) = [[0.0, ..., 0.31]] degree_east
                : cf_role=trajectory_id(cf_role=trajectory_id(1)) = [flight1]