...
- zero might be a valid value for many meteorological parameters, so it can't be used as a mask
- if we want to compute the mean over the field, the sea points will still be used and will simply result in a lower mean because they are all zero
So we will convert the zeros to missing values using the bitmap() and nobitmap() functions, whose documentation is reproduced here:
...
- modify the lsmvariable to have missing values where there are currently zeros (visualise to verify)
- read t2m.grib into a new variable t2m
- copy the missing value mask from lsmtot2m(plott2mto verify)
- compute and print the mean value of t2m- use the functionintegrate()
...