You need to use the mask() macro function. Let us suppose that the field is stored in fieldset g. Then the macro code goes like this

How can I set the values of a field to zero over a given area?

Step-by-step guide

You need to use the mask() macro function. Let us suppose that the field is stored in fieldset g. Then the macro code goes like this:


  1. #Define a mask for the area (Southern Hemisphere in this case). It contains 
    #1s for the points within the area and 0s for points outside the area.
    
    mask_sh=mask(g,[0,-180,-90,180])
    
    #We take the "inverse" of this mask and multiply the original field with it.
    #Now, r contains the original values from g outside the mask area, and
    #0s inside the mask area.
    
    r=g*(1-mask_sh)



Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.