work--surface domain management import numpy as class surfacedomain(object)def __init__(selflonlat)self lon array(lonself lat array(lat[xallyalln meshgrid(self lonself latself _lonall xall self _latall yall del xallyall sowhat does this surfacedomain class illustrate about oop applied to the geosciencespretend you have multiple surfacedomain instances that you want to communicate to each otherwhere the bounds of one are taken from (or interpolated withthe bounds of anothere calculations for each domain instance are farmed out to separate processorand you're stitching domains togetherin the above schematicgray areas are surfacedomain instances and the thickdark lines are the overlapping boundaries between the domain instances in procedural programmingto manage this set of overlapping domainscomparing oop vs you might create grand domain encompassing all points in all the domains procedural for to make an index that keeps track of which domains abut one another the subdomain index records who contributes data to these boundary regions alternatelymanagement you might create function that processes only the neighboring domainsbut example this function will be called from scope that has access to all the domains ( via common blockbutto manage this set of overlapping domainsyou don' really need such global view nor access to all domains in facta global index or common block means that if you change your domain layoutyou have to hand-code change to your index/common block ratherwhat you actually need is only to be able to interact with your neighbor so why not just write method that takes your neighboring surfacedomain instances as arguments