cf.CoordinateConversion.set_parameters

CoordinateConversion.set_parameters(parameters, copy=True)[source]

Set parameters.

New in version (cfdm): 1.7.0

Parameters
parameters: dict

Store the parameters from the dictionary supplied.

Parameter example:

parameters={'earth_radius': 6371007}

copy: bool, optional

If False then any parameter values provided by the parameters parameter are not copied before insertion. By default they are deep copied.

Returns

None

Examples

>>> f = cf.CoordinateConversion()
>>> f.parameters()
{}
>>> p = {'standard_parallel': 25.0,
...      'longitude_of_central_meridian': 265.0,
...      'latitude_of_projection_origin': 25.0}
>>> f.set_parameters(p)
>>> f.parameters()
{'standard_parallel': 25.0,
 'longitude_of_central_meridian': 265.0,
 'latitude_of_projection_origin': 25.0}
>>> old = f.clear_parameters()
>>> old
{'standard_parallel': 25.0,
 'longitude_of_central_meridian': 265.0,
 'latitude_of_projection_origin': 25.0}
>>> f.set_parameters(old)