Changeset 1215 in lmdz_wrf for trunk/tools
- Timestamp:
- Oct 19, 2016, 6:35:08 PM (8 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r1204 r1215 36 36 ## e.g. # drawing.py -o draw_2lines -f /home/lluis/etudes/WRF_LMDZ/WaquaL_highres/tests/model_graphics/WRF/current/wss_wrfout_tvar_xmean.nc,/home/lluis/etudes/WRF_LMDZ/WaquaL_highres/tests/model_graphics/WRF/current/tas_wrfout_tvar_xmean.nc -v wssvarmean,tasvarmean -S 'lat:0.,20.:0.,4.:-90.,90.:y:wss,tas:red,blue:2.,2.:-:2.,2.:,:wss!tas!mean!meridional!tvar:lon:0:wss_tas_wrfout_tvar_xmean:pdf' 37 37 ## e.g. # drawing.py -o draw_2lines_time -f /home/lluis/etudes/WRF_LMDZ/WaquaL_highres/tests/model_graphics/WRF/current/wss_wrfout_xvar_ymean.nc,/home/lluis/etudes/WRF_LMDZ/WaquaL_highres/tests/model_graphics/WRF/current/tas_wrfout_xvar_ymean.nc -v wssvarmean,tasvarmean -S 'time:0.,20.:0.,4.:exct,1,d;%d:x:wss,tas:red,blue:2.,2.:-:2.,2.:,:wss!tas!mean!longitudinal!xvar:time!($[DD]$):0:wss_tas_wrfout_xvar_ymean:pdf' 38 39 ####### 40 # create_movie: Function to create a movie assuming ImageMagick installed! 41 # draw_2D_shad: plotting a fields with shading 42 # draw_2D_shad_cont: plotting two fields, one with shading and the other with contour lines 43 # draw_2D_shad_cont_time: plotting two fields, one with shading and the other with contour lines being 44 # one of the dimensions of time characteristics 45 # draw_2D_shad_line: plotting a fields with shading and another with line 46 # draw_2D_shad_line_time: plotting a fields with shading and a line with time values 47 # draw_2D_shad_time: plotting a fields with shading with time values 48 # draw_2lines: Fucntion to plot two lines in different axes (x/x2 or y/y2) 49 # draw_2lines_time: Function to plot two time-lines in different axes (x/x2 or y/y2) 50 # draw_barbs: Function to plot wind barbs 51 # draw_basins: Function to plot river basins with their discharge vector and basins id (from 'routing.nc') 52 # draw_lines: Function to draw different lines at the same time from different files 53 # draw_lines_time: Function to draw different lines at the same time from different files with times 54 # draw_Neighbourghood_evol: Function to draw the temporal evolution of a neighbourghood around a point 55 # draw_points: Function to plot a series of points 56 # draw_points_lonlat: Function to plot a series of lon/lat points 57 # draw_ptZvals: Function to plot a given list of points and values 58 # draw_timeSeries: Function to draw a time-series 59 # draw_topo_geogrid: plotting geo_em.d[nn].nc topography from WPS files 60 # draw_topo_geogrid_boxes: plotting different geo_em.d[nn].nc topography from WPS files 61 # draw_trajectories: Function to draw different trajectories at the same time 62 # draw_vals_trajectories: Function to draw values from the outputs from 'compute_tevolboxtraj' 63 # draw_vectors: Function to plot wind vectors 64 # movievalslice: Function to provide variable slice according to a geneation of a movie 65 # variable_values: Function to give back values for a given variable 66 # draw_river_desc: Function to plot rivers' description from ORCHIDEE's routing scheme 67 # draw_subbasin: Function to plot subbasin from 'routnig.nc' ORCDHIEE 68 # draw_vertical_levels: plotting vertical levels distribution 38 69 39 70 mainn = 'drawing.py' -
trunk/tools/nc_var.py
r1181 r1215 31 31 # Using 'generic_tools.py' 32 32 import generic_tools as gen 33 34 # addvals: Function to add values to a given variable at a given dimension 35 # CDO_toCF: Function to pass a CDO output file to CF-conventions 36 # chdimname: Changing the name of the dimension 37 # changevartype: Function to change the type of a variable (when possible) 38 # checkallvars: Function to check all variables of a file 39 # checkAllValues: Function to check for variables with along all their dimensions with the same value in a file 40 # checkNaNs: Function to check for NaN values over all variables in a file 41 # chgtimestep: Function to change the values of a given time-step of a variable inside a netCDF for values from a nother file 42 # chvarname: Changing the name of the variable 43 # cleaning_varsfile: Function to keep a list of varibales from a file 44 # compute_deaccum: Function to compute deaccum: deaccumulation of a variable (VAR[t+1]-VAR[t]) 45 # compute_opersvarsfiles: Function to compute opersvarfiles: operation of variables from different files 46 # compute_opervaralltime: Function to compute opervaralltime: operation of variable successible allover the time-steps 47 # compute_opervartimes: Function to compute opervartimes: operation of variable for a given sub-set of time-steps 48 # compute_tevolboxtraj: Function to compute tevolboxtraj: temporal evolution at a given point along a box following a trajectory 49 # computevar_model: Function to provide the way to compute a CF-variable providing its name 50 # DatesFiles: Function to find different time values on a series of WRF files in a folder 51 # DataSetSection: Function to get a section (values along a dimension) of a given data-set 52 # DataSetSection_multidims: Function to get a section (values along multiple dimensions) of a given data-set 53 # DataSetSection_multivars: Function to get a section (values along multiple variables) of a given data-set 54 # dimToUnlimited: Operation to create an unlimited dimension from an existing one 55 # dimVar_creation: Function to add a 1D variable with the size of a given dimension in a file 56 # fattradd: Adding attributes from a reference file 57 # fdimadd: Adding dimension from another reference file 58 # fgaddattr: Adding global attributes from a reference file 59 # field_stats: Function to retrieve statistics from a field 60 # field_stats_dim: Function to retrieve statistics from a field along dimensions 61 # file_creation: Operation to create a file with one variable with a given set of dimensions 62 # file_oper_alongdims: Function to operate a file along different dimensions of a variable 63 # filter_2dim: Function to filter along 2 dimensions (moving grid-box means of a given size) values of the netCDF file 64 # flipdim: flips the value following one dimension 65 # fvaradd: Adding variable (and all its attributes and dimensions) from a reference file to a file 66 # gaddattrk: Add a global attribute to a netCDF caring about the type. Removes previous attribute if it exist 67 # gaddattr: Add a global attribute to a netCDF. Removes previous attribute if it exist 68 # get_attribute: Function to get an attribute from a netCDF file 69 # get_namelist_vars: Function to get namelist-like values ([varname] = [value]) 70 # get_Variables: Function to get a list of variables from an existing file 71 # getvalues_lonlat: Function to retrieve the values from the closest grid point to a set of longitude, latitude values 72 # grattr: Function to read a global atribute 73 # grmattr: Removing a global attribute 74 # idims: Give all the dimensions names of a file 75 # igattrs: Give all the global attributes of a file 76 # increaseDimvar: Function to increase with 1 dimension an existing variable within a netcdf file. Values of 77 # the variable will be repeated along the new dimension 78 # isgattrs: Give a single global attribute of a file and its type 79 # isvattrs: Give a single attribute of a variable 80 # ivars: Give all the variable names of a file 81 # ivattrs: Give all the attributes of a variable and its type 82 # LMDZ_toCF: Function to pass a LMDZ original file to CF-conventions 83 # maskvar: Function to mask a variable using a mask. It is assumed that mask[...,dimM,dimJ,dimK] and 84 # model_characteristics: Function to provide major characterisitcs of a given model output 85 # ncreplace: Function to replace something from a netCDF file 86 # ncstepdiff: Function to compute differencies between time-steps (deacumulate) a netCDF file 87 # netcdf_concatenation: Function to concatenate netCDF files for a given set of variables 88 # netcdf_fold_concatenation: Function to concatenate netCDF files in a given folder for a given set of variables 89 # netcdf_fold_concatenation_HMT: Function to concatenate netCDF files in a given folder for a given set of variables 90 # giving Header, Middle, Tail for the name files 91 # reproject: Function to reproject values to another one 92 # Partialmap_Entiremap: Function to transform from a partial global map (e.g.: only land points) to an entire one 93 # Coincidence of points is done throughout a first guess from fractions of the total domain of search 94 # Partialmap_EntiremapFor: Function to transform from a partial global map (e.g.: only land points) to an entire one 95 # using Fortran code Coincidence of points is done throughout a first guess from fractions of the total domain of search 96 # Partialmap_EntiremapForExact: Function to transform from a partial global map (e.g.: only land points) to an entire 97 # one using Fortran code with exact location Coincidence of points is done throughout a first guess from fractions of 98 # the total domain of search 99 # pinterp: Function to vertically interpolate using subroutines from the p_interp.F90 NCAR program 100 # remapnn: Function to remap to the nearest neightbor a variable using projection from another file 101 # seasmean: Function to compute the seasonal mean of a variable 102 # sellonlatbox: Function to select a lotlan box from a data-set 103 # sellonlatlevbox: Function to select a lotlan box and a given level from a data-set 104 # selvar: Function to select a series of variables from a netcdf file. Variables with 105 # setvar_asciivalues: Function to set de values of a variable with an ASCII file (common 106 # sorttimesmat: Function to sort the time values of a given file 107 # spacemean: Function to retrieve a space mean series from a multidimensional variable of a file 108 # SpatialWeightedMean: Function to compute the spatial mean using weights from a netCDF file 109 # statcompare_files: Python script to statistically compare two different files 110 # subbasin: Function to retrieve the subbasin (all the sub-flows untila a given lon,lat) 111 # submns: Function to retrieve a series of months from a file 112 # subyrs: Function to retrieve a series of years from a file 113 # TimeInf: Function to print all the information from the variable time 114 # time_reset: Function to re-set the time axis of a file 115 # TimeSplitmat: Function to transform a file with CFtimes to a matrix [Nyear,Nmonth,Nday,Nhour,Nminute,Nsecond] 116 # timemean: Function to retrieve a time mean series from a multidimensional variable of a file 117 # valmod: Function to modify the value of a variable 118 # valmod_dim: Function to modify the value of a variable at a given dimension and value 119 # varaddattrk: Add an attribute to a variable caring about the type 120 # varaddattr: Add an attribute to a variable. Removes previous attribute if it exists 121 # varaddref: Function to add a variable in an existing file copying characteristics from an existing one 122 # var_creation: Operation to create a new variable in a file with a given set of dimensions 123 # varout: Function when we want to output variable values 124 # varrmattr: Removing an attribute from a variable 125 # varrm: Removing a variable from a file 126 # VarVal_FillValue: Function to transform a given value from a given variable to _FillValue in a netCDF file 127 # vrattr: Function to remove an atribute from a variable 128 # WRF_d0Nref: Function for the generation of an extra WRF domain from a given one 129 # WRF_CFlonlat_creation: Function to add a CF-convention longitude/latitude variables in a WRF file 130 # WRF_CFtime_creation: Function to add a CF-convention time unit in a WRF file 131 # WRF_CFxtime_creation: Function to add a CF-convention time unit in a WRF file using variable 'XTIME' 132 # WRF_toCF: Function to pass a WRF original file to CF-conventions 33 133 34 134 operations=['addvals', 'CDO_toCF', 'chdimname', 'changevartype', 'checkallvars', \
Note: See TracChangeset
for help on using the changeset viewer.