...
Excerpt |
---|
|
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:
Code Block |
---|
|
#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
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | ~usa |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label = "kb-how-to-articlemetview-faqs" and label = "computation" and type = "page" and space = "UDOC" |
---|
labels | kb-how-to-article |
---|
|
...