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 | compute_opersvarsfiles |
---|
11 | </DIV> |
---|
12 | <DIV CLASS="valimg"> |
---|
13 | Function to compute opersvarfiles: operation of variables from different files (OPER1.FILE1_VAR1 OPER2.FILE2_VAR2), operations are going to be sequentially |
---|
14 | </DIV> |
---|
15 | <DIV CLASS="valhelp"> |
---|
16 | compute_opersvarsfiles(values, varinfo)<BR> |
---|
17 | NOTE: Values from the first file (with always operation 'add') <BR> |
---|
18 | [prevalues]: values from the previous operations <BR> |
---|
19 | values= '%' separated list of dimension ranges and file,operation,variable to compute<BR> |
---|
20 | [dimranges1]@[operfile1var]%[dimranges2]@[operfile2var]%[...[dimrangesM]@[operfileMvar]]<BR> |
---|
21 | dimranges: ';' separated list of dimension, dimension-variable names and their ranges ('|' separated)<BR> |
---|
22 | [dim1]|[dimv1]|[range];[dim2]|[dimv2]|[range];[...|[dimN]|[dimvN]|[range]]<BR> |
---|
23 | with [range] as:<BR> |
---|
24 | -1, all the values<BR> |
---|
25 | -9, last values<BR> |
---|
26 | int, a single value<BR> |
---|
27 | [beg,end,frq], from a beginning to an end with a given frequency<BR> |
---|
28 | operfilevar: [oper]|[file]|[var] '|' separated list of triplets of [operation], [file], [variable name to use]<BR> |
---|
29 | * [oper]: operations (being [prevalues] the values computed until the operation)<BR> |
---|
30 | 'add': adding [var] ([prevalues] + [var])<BR> |
---|
31 | 'addc',[modval1]: add [modval1] to [prevalues]<BR> |
---|
32 | 'centerderiv',[N],[ord],[dim]: un-scaled center [N]-derivative of order [ord] along dimension [dim] of [var]<BR> |
---|
33 | 'div': dividing by [var] ([prevalues] / [var])<BR> |
---|
34 | 'divc',[modval1]: [prevalues] divide by [modval1]<BR> |
---|
35 | 'forwrdderiv',[N],[ord],[dim]: un-scaled forward [N]-derivative of order [ord] along dimension [dim] of [var]<BR> |
---|
36 | 'inv': inverting [prevalues] (1/[prevalues])<BR> |
---|
37 | 'lowthres',[modval1],[modval2]: if [prevalues] < [modval1]; prevalues = [modval2]<BR> |
---|
38 | 'lowthres@oper',[modval1],[oper],[modval2]: if [prevalues] < [modval1]; prevalues = [oper] (operation as [modval2])<BR> |
---|
39 | 'mul': multiplying by [var] ([prevvalues] * [var])<BR> |
---|
40 | 'mulc',[modval1]: [prevalues] multiplied by [modval1]<BR> |
---|
41 | 'pot': powering with [var] ([prevalues] ** [var])<BR> |
---|
42 | 'potc',[modval1]: [prevalues] ** [modval1]<BR> |
---|
43 | 'repl',[modval1]: replace values of [prevalues] with values from [operfile2var] except <BR> |
---|
44 | values in second file = [modval1]<BR> |
---|
45 | 'replbig',[modval1]: replace values of [prevalues] with values from [operfile2var] except <BR> |
---|
46 | values in second file > [modval1]<BR> |
---|
47 | 'repless',[modval1]: replace values of [prevalues] with values from [operfile2var] except <BR> |
---|
48 | values in second file < [modval1]<BR> |
---|
49 | 'sub': substracting [var] ([prevalues] - [var])<BR> |
---|
50 | 'subc',[modval1]: remove [modval1] of [prevalues]<BR> |
---|
51 | 'upthres',[modval1],[modval2]: if [prevalues] > [modval1]; prevalues = [modval2]<BR> |
---|
52 | 'upthres@oper',[modval1],[oper],[modval2]: if [prevalues] > [modval1]; prevalues = [oper] (operation with [modval2])<BR> |
---|
53 | * [file]: name of the file<BR> |
---|
54 | * [var]: variable to use ('None' for the case with constant operations: 'addc', 'divc', 'inv', 'lowthres', <BR> |
---|
55 | 'lowthres@oper', 'mulc', 'potc', 'subc', 'upthres', 'upthres@oper'<BR> |
---|
56 | varinfo= [varname],[Lvarname],[varunits]<BR> |
---|
57 | varname: name of the final variable <BR> |
---|
58 | Lvarname: long name of the final variable ('!' for spaces)<BR> |
---|
59 | varunits: units of the final variable ('!' for spaces)<BR> |
---|
60 | </DIV> |
---|
61 | <DIV CLASS="valins"> |
---|
62 | $ python ${pyHOME}/nc_var.py -o compute_opersvarsfiles -S 'west_east|XLONG|-1;south_north|XLAT|-1;Time|Times|3@add|wrfout_d01_2001-11-11_00:00:00|T2%west_east|XLONG|-1;south_north|XLAT|-1;Time|Times|3@subc,273.15|wrfout_d01_2001-11-11_00:00:00|None' -v 'tempC,air!temperature,C'<BR> |
---|
63 | $ python ${pyHOME}/nc_var.py -o compute_opersvarsfiles -S 'lon|lon|-1;lat|lat|-1;time_counter|time_counter|-1@forwrdderiv,1,1,2|/ccc/store/cont003/gen7593/fitaborl/etudes/DynamicoESM/aquaplanet/AR40/19800101000000-19810101000000/histday.nc|t2m' -v 'tasderiv,x-derivative|of|air|temperature,K |
---|
64 | </DIV> |
---|
65 | </BODY> |
---|
66 | </HTML> |
---|
67 | |
---|