| 1090 | |
| 1091 | |
| 1092 | def make_ds(): |
| 1093 | map_ds = xr.Dataset() |
| 1094 | map_ds["a"] = make_da() |
| 1095 | map_ds["b"] = map_ds.a + 50 |
| 1096 | map_ds["c"] = map_ds.x + 20 |
| 1097 | map_ds = map_ds.chunk({"x": 4, "y": 5}) |
| 1098 | map_ds["d"] = ("z", [1, 1, 1, 1]) |
| 1099 | map_ds["z"] = [0, 1, 2, 3] |
| 1100 | map_ds["e"] = map_ds.x + map_ds.y |
| 1101 | map_ds.coords["c1"] = 0.5 |
| 1102 | map_ds.coords["cx"] = ("x", np.arange(len(map_ds.x))) |
| 1103 | map_ds.coords["cx"].attrs["test2"] = "test2" |
| 1104 | map_ds.attrs["test"] = "test" |
| 1105 | map_ds.coords["xx"] = map_ds["a"] * map_ds.y |
| 1106 | |
| 1107 | map_ds.x.attrs["long_name"] = "x" |
| 1108 | map_ds.y.attrs["long_name"] = "y" |
| 1109 | |
| 1110 | return map_ds |
| 1111 | |
| 1112 | |
| 1113 | # fixtures cannot be used in parametrize statements |