cf.example_domain¶
-
cf.
example_domain
(n, _func=<function example_field>)[source]¶ Return an example domain construct.
New in version (cfdm): 1.8.9.0
See also
- Parameters
- n:
int
Select the example domain construct to return, one of:
n
Description
0
A domain construct dimension coordinate constructs with bounds.
1
A domain construct with at least one of every possible type of metadata construct.
2
A domain construct dimension coordinate constructs with bounds. series at each latitude-longitude location.
3
A domain construct for discrete sampling geometry (DSG) “timeSeries” features.
4
A domain construct or discrete sampling geometry (DSG) “timeSeriesProfile” features.
5
A domain construct dimension coordinate constructs with bounds.
6
A domain construct that has polygon geometry coordinate cells with interior ring variables.
7
A domain construct that has rotated pole dimension coordinate constructs and 2-d latitude and longitude auxiliary coordinate constructs.
See the examples for details.
- _func: function
The function that creates the field construct from which the domain construct is derived.
- n:
- Returns
Domain
The example domain construct.
Examples:
>>> f = cf.example_domain(0) >>> print(f) 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]
>>> f = cf.example_domain(1) >>> print(f) 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)) = [--, ..., b'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 = cf.example_domain(2) >>> print(f) 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 = cf.example_domain(3) >>> print(f) 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)) = [b'station1', ..., b'station4'] : long_name=station information(cf_role=timeseries_id(4)) = [-10, ..., -7]
>>> f = cf.example_domain(4) >>> print(f) 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)) = [b'station1', b'station2', b'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 = cf.example_domain(5) >>> print(f) 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 = cf.example_domain(6) >>> print(f) 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)) = [b'x1', b'y2'] : ncvar%z(cf_role=timeseries_id(2), 3, 4) = [[[1.0, ..., --]]] m Coord references: grid_mapping_name:latitude_longitude
>>> f = cf.example_domain(7) >>> print(f) 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