- Timestamp:
- Oct 26, 2016, 5:33:41 PM (8 years ago)
- Location:
- trunk/tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/documentation/nctransform/field_stats.html
r1216 r1237 15 15 <DIV CLASS="valhelp"> 16 16 field_stats(values, ncfile, varn)<BR> 17 [values]= [stats],[fillVals] <BR>18 19 20 21 17 [values]= [stats],[fillVals],[countVals]<BR> 18 [stats]: kind of statistics <BR> 19 'full': all statistics given variable<BR> 20 [fillVals]: ':' list of _fillValues ('None' for any)<BR> 21 [countVals]: ':' list of Values@cond to use to count conditions ('None' for any)<BR> 22 22 [ncfile]= name of the netCDF file to use<BR> 23 23 [varn]= variable name to use ('all' for all variables)<BR> -
trunk/tools/documentation/nctransform/intro.html
r1225 r1237 7 7 <BODY> 8 8 <DIV CLASS="valheader"> 9 Plotting functions9 netCDF managing functions 10 10 </DIV> 11 11 <DIV CLASS="valintro"> 12 List of available functions to plot figures. Most of them follow a similar structure:<BR>12 List of available functions to manage netCDD files. Most of them follow a similar structure:<BR> 13 13 <PRE><CODE> 14 14 $ python nc_var.py -o [operation] -f [file(or files)] -S [values] -v [variables] … … 36 36 </OL> 37 37 In order to use some of the functions, is necessary to compile previously the related Fortran subroutines and link them to python. It is already prepared for different computers via specific <SPAN CLASS="codetxt">Makefile.[machine].[compiler]</SPAN><BR> 38 Available fun tions:38 Available functions: 39 39 <UL> 40 40 <LI><SPAN CLASS="codetxt">addvals:</SPAN> Function to add values to a given variable at a given dimension</LI> … … 47 47 <LI><SPAN CLASS="codetxt">chgtimestep:</SPAN> Function to change the values of a given time-step of a variable inside a netCDF for values from a nother file</LI> 48 48 <LI><SPAN CLASS="codetxt">chvarname:</SPAN> Changing the name of the variable</LI> 49 <LI><SPAN CLASS="codetxt">cleaning_varsfile:</SPAN> Function to keep a list of varibales from a file</LI> 50 <LI><SPAN CLASS="codetxt">DatesFiles:</SPAN> Function to find different time values on a series of WRF files in a folder</LI> 49 <LI><SPAN CLASS="codetxt">cleaning_varsfile:</SPAN> Function to keep a list of variabales from a file</LI> 50 <LI><SPAN CLASS="codetxt">compute_opersvarsfiles:</SPAN> Function to compute opersvarfiles: operation of variables from different files (OPER1.FILE1_VAR1 OPER2.FILE2_VAR2), operations are going to be sequentially</LI> 51 made<LI><SPAN CLASS="codetxt">DatesFiles:</SPAN> Function to find different time values on a series of WRF files in a folder</LI> 51 52 <LI><SPAN CLASS="codetxt">DataSetSection:</SPAN> Function to get a section (values along a dimension) of a given data-set</LI> 52 53 <LI><SPAN CLASS="codetxt">DataSetSection_multidims:</SPAN> Function to get a section (values along multiple dimensions) of a given data-set</LI> … … 70 71 <LI><SPAN CLASS="codetxt">get_Variables:</SPAN> Function to get a list of variables from an existing file</LI> 71 72 <LI><SPAN CLASS="codetxt">getvalues_lonlat:</SPAN> Function to retrieve the values from the closest grid point to a set of longitude, latitude values</LI> 72 <LI><SPAN CLASS="codetxt">grattr:</SPAN> Function to read a global at ribute</LI>73 <LI><SPAN CLASS="codetxt">grattr:</SPAN> Function to read a global attribute</LI> 73 74 <LI><SPAN CLASS="codetxt">grmattr:</SPAN> Removing a global attribute</LI> 74 75 <LI><SPAN CLASS="codetxt">idims:</SPAN> Give all the dimensions names of a file</LI> … … 81 82 <LI><SPAN CLASS="codetxt">LMDZ_toCF:</SPAN> Function to pass a LMDZ original file to CF-conventions</LI> 82 83 <LI><SPAN CLASS="codetxt">maskvar:</SPAN> Function to mask a variable using a mask. It is assumed that mask[...,dimM,dimJ,dimK] and </LI> 83 <LI><SPAN CLASS="codetxt">model_characteristics:</SPAN> Function to provide major characteris itcs of a given model output</LI>84 <LI><SPAN CLASS="codetxt">model_characteristics:</SPAN> Function to provide major characteristics of a given model output</LI> 84 85 <LI><SPAN CLASS="codetxt">ncreplace:</SPAN> Function to replace something from a netCDF file</LI> 85 <LI><SPAN CLASS="codetxt">ncstepdiff:</SPAN> Function to compute differenc ies between time-steps (deacumulate) a netCDF file</LI>86 <LI><SPAN CLASS="codetxt">ncstepdiff:</SPAN> Function to compute differences between time-steps (de-accumulate) a netCDF file</LI> 86 87 <LI><SPAN CLASS="codetxt">netcdf_concatenation:</SPAN> Function to concatenate netCDF files for a given set of variables</LI> 87 88 <LI><SPAN CLASS="codetxt">netcdf_fold_concatenation:</SPAN> Function to concatenate netCDF files in a given folder for a given set of variables</LI> 88 89 <LI><SPAN CLASS="codetxt">netcdf_fold_concatenation_HMT:</SPAN> Function to concatenate netCDF files in a given folder for a given set of variables giving Header, Middle, Tail for the name files</LI> 89 <LI><SPAN CLASS="codetxt">reproject:</SPAN> Function to re project values to another one</LI>90 <LI><SPAN CLASS="codetxt">reproject:</SPAN> Function to re-project values to another one</LI> 90 91 <LI><SPAN CLASS="codetxt">Partialmap_Entiremap:</SPAN> Function to transform from a partial global map (e.g.: only land points) to an entire one Coincidence of points is done throughout a first guess from fractions of the total domain of search</LI> 91 92 <LI><SPAN CLASS="codetxt">Partialmap_EntiremapFor:</SPAN> Function to transform from a partial global map (e.g.: only land points) to an entire one using Fortran code Coincidence of points is done throughout a first guess from fractions of the total domain of search</LI> 92 93 <LI><SPAN CLASS="codetxt">Partialmap_EntiremapForExact:</SPAN> Function to transform from a partial global map (e.g.: only land points) to an entire one using Fortran code with exact location Coincidence of points is done throughout a first guess from fractions of the total domain of search</LI> 93 94 <LI><SPAN CLASS="codetxt">pinterp:</SPAN> Function to vertically interpolate using subroutines from the p_interp.F90 NCAR program</LI> 94 <LI><SPAN CLASS="codetxt">remapnn:</SPAN> Function to remap to the nearest neigh tbor a variable using projection from another file</LI>95 <LI><SPAN CLASS="codetxt">remapnn:</SPAN> Function to remap to the nearest neighbor a variable using projection from another file</LI> 95 96 <LI><SPAN CLASS="codetxt">seasmean:</SPAN> Function to compute the seasonal mean of a variable</LI> 96 97 <LI><SPAN CLASS="codetxt">sellonlatbox:</SPAN> Function to select a lotlan box from a data-set</LI> 97 98 <LI><SPAN CLASS="codetxt">sellonlatlevbox:</SPAN> Function to select a lotlan box and a given level from a data-set</LI> 98 99 <LI><SPAN CLASS="codetxt">selvar:</SPAN> Function to select a series of variables from a netcdf file. Variables with </LI> 99 <LI><SPAN CLASS="codetxt">setvar_asciivalues:</SPAN> Function to set de values of a variable with an ASCII file (common </LI>100 <LI><SPAN CLASS="codetxt">setvar_asciivalues:</SPAN> Function to set the values of a variable with an ASCII file (common </LI> 100 101 <LI><SPAN CLASS="codetxt">sorttimesmat:</SPAN> Function to sort the time values of a given file</LI> 101 102 <LI><SPAN CLASS="codetxt">spacemean:</SPAN> Function to retrieve a space mean series from a multidimensional variable of a file</LI> 102 103 <LI><SPAN CLASS="codetxt">SpatialWeightedMean:</SPAN> Function to compute the spatial mean using weights from a netCDF file</LI> 103 104 <LI><SPAN CLASS="codetxt">statcompare_files:</SPAN> Python script to statistically compare two different files</LI> 104 <LI><SPAN CLASS="codetxt">subbasin:</SPAN> Function to retrieve the subbasin (all the sub-flows until a a given lon,lat)</LI>105 <LI><SPAN CLASS="codetxt">subbasin:</SPAN> Function to retrieve the subbasin (all the sub-flows until a a given lon,lat)</LI> 105 106 <LI><SPAN CLASS="codetxt">submns:</SPAN> Function to retrieve a series of months from a file</LI> 106 107 <LI><SPAN CLASS="codetxt">subyrs:</SPAN> Function to retrieve a series of years from a file</LI> … … 119 120 <LI><SPAN CLASS="codetxt">varrm:</SPAN> Removing a variable from a file</LI> 120 121 <LI><SPAN CLASS="codetxt">VarVal_FillValue:</SPAN> Function to transform a given value from a given variable to _FillValue in a netCDF file</LI> 121 <LI><SPAN CLASS="codetxt">vrattr:</SPAN> Function to remove an at ribute from a variable</LI>122 <LI><SPAN CLASS="codetxt">vrattr:</SPAN> Function to remove an attribute from a variable</LI> 122 123 <LI><SPAN CLASS="codetxt">WRF_d0Nref:</SPAN> Function for the generation of an extra WRF domain from a given one </LI> 123 124 <LI><SPAN CLASS="codetxt">WRF_CFlonlat_creation:</SPAN> Function to add a CF-convention longitude/latitude variables in a WRF file</LI> -
trunk/tools/documentation/nctransform/nctransform.html
r1212 r1237 7 7 <BODY> 8 8 <DIV CLASS="colmenu"> 9 <A CLASS="lc" HREF="compute_opersvarsfiles.html" TARGET="value">compute_opersvarsfiles</A><BR> 9 10 <A CLASS="lc" HREF="field_stats.html" TARGET="value">field_stats</A><BR> 10 11 </DIV> -
trunk/tools/nc_var.py
r1233 r1237 32 32 ## e.g. # nc_var.py -o field_stats_dim -f /home/lluis/PY/wrfout_d01_2001-11-11_00:00:00 -S 'full,None,None,west_east,XLONG,False' -v 'T2' 33 33 ## e.g. # 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' 34 ## e.g. # 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 35 34 36 35 37 from optparse import OptionParser -
trunk/tools/nc_var_tools.py
r1236 r1237 6884 6884 def compute_opersvarsfiles(values, varinfo): 6885 6885 """ Function to compute opersvarfiles: operation of variables from different files 6886 (OPER1.FILE1_VAR1 OPER2.FILE2_VAR2), operations are going to be se cuentially6887 made6886 (OPER1.FILE1_VAR1 OPER2.FILE2_VAR2), operations are going to be sequentially made 6887 compute_opersvarsfiles(values, varinfo) 6888 6888 values= '%' separated list of dimension ranges and file,operation,variable to compute 6889 6889 [dimranges1]@[operfile1var]%[dimranges2]@[operfile2var]%[...[dimrangesM]@[operfileMvar]]
Note: See TracChangeset
for help on using the changeset viewer.