You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason this is done in two steps is because initialising a regridder is potentially quite expensive if the grids or meshes involved are large. Once initialised, a regridder can regrid many source cubes (defined on the same source grid/mesh) onto the same target. We can demonstrate this by regridding a different cube using the same regridder.
@@ -73,8 +73,8 @@ mesh_temp
73
73
```python
74
74
# Regrid the new mesh cube using the same regridder.
75
75
# Note how the time coordinate is also transposed in the result.
76
-
result_2= regridder(mesh_temp)
77
-
result_2
76
+
regridded_temperature= regridder(mesh_temp)
77
+
regridded_temperature
78
78
```
79
79
80
80
We can save time in future runs by saving and loading a regridder with `save_regridder` and `load_regridder`.
We can then plot the difference between the UM data and the data regridded from LFRic. Since all our data is now on a latlon grid we can subtract to find the difference between the regridded LFRic data and equivalent UM data and plot this with matplotlib as normal.
113
113
114
114
```python
115
-
temp_diff = result_2 - grid_temp
115
+
temp_diff = regridded_temperature - grid_temp
116
+
temp_diff.long_name ="Difference in temperature"
116
117
117
118
# We choose a colormap that makes it clear where the differences are.
0 commit comments