Changeset 940 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 24, 2016, 9:52:21 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r939 r940 5708 5708 5709 5709 if endv == -1: iendv = len(objdim) 5710 print 'Lluis endv, begv, intv:', ibegv, iendv, iintv,':', begv, endv, intv5711 5710 dimsize = (iendv - ibegv + 1)/iintv - 1 5712 5711 else: … … 5716 5715 iendv = len(objdim) - 1 5717 5716 iintv = 0 5718 print fname + '; Lluis dimn beg end int:', ibegv, iendv, iintv5719 5717 else: 5720 5718 if len(objdim) > 1: … … 5729 5727 iintv = 0 5730 5728 5731 print fname + '; Lluis begv, endv:', ibegv, iendv, iintv, '<>', begv, endv, intv5732 5729 if ibegv != iendv: 5733 5730 dimsecslice[dims] = slice(ibegv,iendv,iintv) … … 5745 5742 5746 5743 ncoobj.sync() 5747 print fname + '; Lluis: dimsecslice:', dimsecslice5748 5744 # Creating variables 5749 5745 ## … … 5757 5753 if not gen.searchInlist(list(vardims),dimn): 5758 5754 # removing monotones 5759 print fname + '; Lluis looking for monotones!'5760 5755 varslice = [] 5761 5756 filevardims = [] 5762 5757 for dimname in varobj.dimensions: 5763 5758 lendim = len(nciobj.dimensions[dimname]) 5764 print fname + '; Lluis monotone?:', dimname,' len;', lendim5765 5759 if lendim > 1: 5766 5760 varslice.append(slice(0, lendim)) … … 5776 5770 if dimname == dimn: 5777 5771 varslice.append(dimsecslice[dimn]) 5778 filevardims.append(dimname) 5772 if type(dimsecslice[dimn]) == type(slice(1)): 5773 filevardims.append(dimname) 5779 5774 else: 5780 5775 Ldim = len(nciobj.dimensions[dimname]) … … 5785 5780 varslice.append(0) 5786 5781 5787 print fname + '; Lluis varslice:', varslice,' filevardims:', filevardims5788 5782 varvals = varobj[tuple(varslice)] 5789 5783 5790 print fname + ': Lluis filevardims:', filevardims5791 5784 # Adding fill value attribute 5792 5785 ##
Note: See TracChangeset
for help on using the changeset viewer.