source: lmdz_wrf/trunk/tools/documentation/ncmanage/maskvar.html @ 1859

Last change on this file since 1859 was 1525, checked in by lfita, 8 years ago

Fixing `maskvar' and including the option to use an already masked variable

File size: 2.2 KB
Line 
1<HTML>
2  <HEAD>
3    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
4    <LINK REL="stylesheet" TYPE="text/css" HREF="../PyNCplot.css"/>
5  </HEAD>
6
7  </HEAD>
8  <BODY>
9    <DIV CLASS="valheader">
10      maskvar
11    </DIV>
12    <DIV CLASS="valimg">
13      Function to mask a variable using another variable to mask it. Only need to share at least 1 dimension with the same size (no need same name)
14    </DIV>
15    <DIV CLASS="valhelp">
16    maskvar(values, filename, varparameters) <BR>
17    values= [maskfilename]:[maskvarn]:[dimsmask]:[timename] <BR>
18    &nbsp;&nbsp;  [maskfilename]= file with the mask <BR>
19    &nbsp;&nbsp;  [maskvarn]= name of the variable with the mask <BR>
20    &nbsp;&nbsp;  [dimsmask]= ',' list of [dimn]|[sec] to use for slicing [maskvar] <BR>
21    &nbsp;&nbsp;&nbsp;&nbsp;    [sec]: section <BR>
22    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      * [integer]: which value of the dimension <BR>
23    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      * -1: all along the dimension <BR>
24    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      * -9: last value of the dimension <BR>
25    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      * [beg]@[end]@[frq] slice from [beg] to [end] every [frq] <BR>
26    &nbsp;&nbsp;&nbsp;&nbsp;    * NOTE: no value provided is for all dimension range <BR>
27    &nbsp;&nbsp;  [maskvalue]= value to use for maskking ('mask' value for using an already masked variable)<BR>
28    filename= netCF file name <BR>
29    varparameters= [varn]|[dimsmask] <BR>
30    &nbsp;&nbsp;  [varn]: variable name <BR>
31    &nbsp;&nbsp;  [samedimsmask]: ',' list of name of dimensions which fits [maskvarn] slice <BR>
32    </DIV>
33    <DIV CLASS="valins">
34      $ python ${pyHOME}/nc_var.py -o maskvar -f SouthAm_Climzones.nc -S 'geo_em.d01.nc:LANDMASK:Time|0:0' -v region:lon,lat <BR>
35      &nbsp;&nbsp;SouthAm_Climzones.nc<BR>
36      &nbsp;&nbsp;&nbsp;&nbsp; lat = 999;<BR>
37      &nbsp;&nbsp;&nbsp;&nbsp; lon = 649;<BR>
38      &nbsp;&nbsp;&nbsp;&nbsp; int region(lat, lon)<BR>
39      &nbsp;&nbsp; geo_em.d01.nc <BR>
40      &nbsp;&nbsp;&nbsp;&nbsp; Time = UNLIMITED ; // (1 currently)<BR>
41      &nbsp;&nbsp;&nbsp;&nbsp; west_east = 649;<BR>
42      &nbsp;&nbsp;&nbsp;&nbsp; south_north = 999;<BR>
43      &nbsp;&nbsp;&nbsp;&nbsp; float LANDMASK(Time, south_north, west_east)
44    </DIV>
45  </BODY>
46</HTML>
47
Note: See TracBrowser for help on using the repository browser.