Ignore:
Timestamp:
Apr 21, 2017, 9:14:10 PM (8 years ago)
Author:
lfita
Message:

Improving `copute_opersvarsfiles' by:

Adding `contoperation': which is used for calculations on result of previous operations without using a variable from a file
Adding:

'arctan', arctangent [-pi, pi]
'norm_meanminmax',[NOTnormdims]: normalization of data as: (val-<val>)/(max(val)-min(val)) except along dimensions [NOTnormdims] (':' list of dimension names, or 'any' for using all dimensions)
'norm_minmax',[NOTnormdims]: normalization of data as: [2val-(max(val)-min(val)]/[max(val)+min(val)] except along dimensions [NOTnormdims] (':' list of dimension names, or 'any' for using all dimensions)
'norm_meanstd',[NOTnormdims]: normalization of data as: (val-<val>)/stdev(val) except along dimensions [NOTnormdims] (':' list of dimension names, or 'any' for using all dimensions)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/documentation/ncmanage/compute_opersvarsfiles.html

    r1519 r1535  
    3030      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'add': adding [var] ([prevalues] + [var])<BR>
    3131      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'addc',[modval1]: add [modval1] to [prevalues]<BR>
     32      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'arctan', arctangent [-p1, pi]<BR>
    3233      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'centerderiv',[N],[ord],[dim]: un-scaled center [N]-derivative of order [ord] along dimension [dim] of [var]<BR>
    3334      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'div': dividing by [var] ([prevalues] / [var])<BR>
     
    3940      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'mul': multiplying by [var] ([prevvalues] * [var])<BR>
    4041      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'mulc',[modval1]: [prevalues] multiplied by [modval1]<BR>
     42      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'norm_meanminmax',[NOTnormdims]: normalization of data as: (val-<val>)/(max(val)-min(val)) except along <BR>
     43      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dimensions [NOTnormdims] (':' list of dimension names, or 'any' for using all dimensions)<BR>
     44      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'norm_minmax',[NOTnormdims]: normalization of data as: [2val-(max(val)-min(val)]/[max(val)+min(val)]<BR>
     45      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except along dimensions [NOTnormdims] (':' list of dimension names, or 'any' for using all dimensions)<BR>
     46      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'norm_meanstd',[NOTnormdims]: normalization of data as: (val-<val>)/stdev(val) except along <BR>
     47      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dimensions [NOTnormdims] (':' list of dimension names, or 'any' for using all dimensions)<BR>
     48       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;dimensions [NOTnormdims] (':' list of dimension names)<BR>
    4149      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'pot': powering with [var] ([prevalues] ** [var])<BR>
    4250      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'potc',[modval1]: [prevalues] ** [modval1]<BR>
     
    6068    </DIV>
    6169    <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
     70    * Transforming temperature from Kelvin to &deg;C<BR>
     71    &nbsp;&nbsp;  $ python ${pyHOME}/nc_var.py -o compute_opersvarsfiles -S 'west_east|XLONG|-1;south_north|XLAT|-1;Time|Times|3@subc,273.15|wrfout_d01_2001-11-11_00:00:00|T2' -v 'tempC,air!temperature,C'<BR>
     72    * Computing the x-derivative of first order<BR>
     73    &nbsp;&nbsp;  $ python ${pyHOME}/nc_var.py -o compute_opersvarsfiles -S 'lon|lon|-1;lat|lat|-1;time_counter|time_counter|-1@forwrdderiv,1,1,2|histday.nc|t2m' -v 'tasderiv,x-derivative|of|air|temperature,K' <BR>
     74    * Normalizing a variable by substracting its mean and weighting by its standard-deviation<BR>
     75    &nbsp;&nbsp; $ python ${pyHOME}/nc_var.py -o compute_opersvarsfiles -S 'west_east|XLONG|-1;south_north|XLAT|-1;Time|WRFtime|-1@norm_meanstd,Time|wrfout_d01_1995-01-01_00:00:00|T2' -v 'tasnorm,normalized!2m!temperature!substracting!mean!and!weighting!by!standard!deviation,K' <BR>
     76    * Getting height of the frist level from surface from a WRF file<BR>
     77    &nbsp;&nbsp; $ python $pyHOME/nc_var.py -o compute_opersvarsfiles -S 'west_east|XLONG|-1;south_north|XLAT|-1;bottom_top_stag|ZNW|1@addc,0|wrfout_d01_1995-01-01_00:00:00|PH%west_east|XLONG|-1;south_north|XLAT|-1;bottom_top_stag|ZNW|1@add|wrfout_d01_1995-01-01_00:00:00|PHB%contoperation@divc,9.81%west_east|XLONG|-1;south_north|XLAT|-1;Time|WRFtime|-1@sub|wrfout_d01_1995-01-01_00:00:00|HGT' -v 'height1lev,height!above!surface!of!first!level,m'
     78    * Computing wind-direction from a WRF file<BR>
     79    &nbsp;&nbsp; $ python $pyHOME/nc_var.py -o compute_opersvarsfiles -S 'west_east|XLONG|-1;south_north|XLAT|-1;Time|WRFtime|-1@addc,0|wrfout_d01_1995-01-01_00:00:00|V10%west_east|XLONG|-1;south_north|XLAT|-1;Time|WRFtime|-1@arctan|wrfout_d01_1995-01-01_00:00:00|U10%contoperation@mulc,57.2957795131' -v 'wsdir,2m!wind!direction,Degrees'
    6480    </DIV>
    6581  </BODY>
Note: See TracChangeset for help on using the changeset viewer.