[1494] | 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 | [maskfilename]= file with the mask <BR> |
---|
| 19 | [maskvarn]= name of the variable with the mask <BR> |
---|
| 20 | [dimsmask]= ',' list of [dimn]|[sec] to use for slicing [maskvar] <BR> |
---|
| 21 | [sec]: section <BR> |
---|
| 22 | * [integer]: which value of the dimension <BR> |
---|
| 23 | * -1: all along the dimension <BR> |
---|
| 24 | * -9: last value of the dimension <BR> |
---|
| 25 | * [beg]@[end]@[frq] slice from [beg] to [end] every [frq] <BR> |
---|
| 26 | * NOTE: no value provided is for all dimension range <BR> |
---|
[1525] | 27 | [maskvalue]= value to use for maskking ('mask' value for using an already masked variable)<BR> |
---|
[1494] | 28 | filename= netCF file name <BR> |
---|
| 29 | varparameters= [varn]|[dimsmask] <BR> |
---|
| 30 | [varn]: variable name <BR> |
---|
| 31 | [samedimsmask]: ',' list of name of dimensions which fits [maskvarn] slice <BR> |
---|
| 32 | </DIV> |
---|
| 33 | <DIV CLASS="valins"> |
---|
[1495] | 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 | SouthAm_Climzones.nc<BR> |
---|
| 36 | lat = 999;<BR> |
---|
| 37 | lon = 649;<BR> |
---|
| 38 | int region(lat, lon)<BR> |
---|
| 39 | geo_em.d01.nc <BR> |
---|
| 40 | Time = UNLIMITED ; // (1 currently)<BR> |
---|
| 41 | west_east = 649;<BR> |
---|
| 42 | south_north = 999;<BR> |
---|
| 43 | float LANDMASK(Time, south_north, west_east) |
---|
[1494] | 44 | </DIV> |
---|
| 45 | </BODY> |
---|
| 46 | </HTML> |
---|
| 47 | |
---|