Changeset 717
- Timestamp:
- Jul 4, 2012, 12:46:05 PM (12 years ago)
- Location:
- trunk/UTIL/PYTHON
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/myplot.py
r702 r717 204 204 205 205 ## Author: AS + TN + AC 206 def reducefield (input,d4=None,d3=None,d2=None,d1=None,yint=False,alt=None,anomaly=False,redope=None,mesharea=None ):206 def reducefield (input,d4=None,d3=None,d2=None,d1=None,yint=False,alt=None,anomaly=False,redope=None,mesharea=None,unidim=999): 207 207 ### we do it the reverse way to be compliant with netcdf "t z y x" or "t y x" or "y x" 208 208 ### it would be actually better to name d4 d3 d2 d1 as t z y x … … 234 234 ### now the main part 235 235 if dimension == 2: 236 #### this is needed for 1d-type files (where dim=2 but axes are time-vert and not lat-lon) 237 if unidim == 1: d2=d4 ; d1=d3 ; d4=None ; d3=None 236 238 if mesharea is None: mesharea=np.ones(shape) 237 239 if max(d2) >= shape[0]: error = True -
trunk/UTIL/PYTHON/planetoplot.py
r701 r717 418 418 if varname: ### what is shaded. 419 419 what_I_plot, error = reducefield( all_var[index_f], d4=indextime, d1=indexlon, d2=indexlat, d3=indexvert, \ 420 yint=yintegral, alt=vert, anomaly=anomaly, redope=redope, mesharea=area 420 yint=yintegral, alt=vert, anomaly=anomaly, redope=redope, mesharea=area, unidim=is1d) 421 421 if mult != 2718.: what_I_plot = what_I_plot*mult 422 422 else: what_I_plot = np.log10(what_I_plot) ; print "log plot"
Note: See TracChangeset
for help on using the changeset viewer.