Changeset 335 in lmdz_wrf
- Timestamp:
- Feb 27, 2015, 6:24:29 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r334 r335 10938 10938 # Circle values 10939 10939 cslicev.append(gtrajvals[it,0]) 10940 if gtrajvals[it,2]-Nrad < 0 or gtrajvals[it,2]+Nrad + 1 > dimy + 1 \ 10941 or gtrajvals[it,1]-Nrad < 0 or gtrajvals[it,1]+Nrad + 1 > dimx + 1: 10940 if gtrajvals[it,2]-Nrad < 0 or gtrajvals[it,2]+Nrad + 1 >= dimy \ 10941 or gtrajvals[it,1]-Nrad < 0 or gtrajvals[it,1]+Nrad + 1 >= dimx: 10942 10943 maxx = np.min([cxrangeslice[it][1], dimx]) 10944 maxy = np.min([cyrangeslice[it][1], dimy]) 10942 10945 cslicev.append(slice(0,dimz)) 10943 cslicev.append(slice(cyrangeslice[it][0], cyrangeslice[it][1]))10944 cslicev.append(slice(cxrangeslice[it][0], cxrangeslice[it][1]))10946 cslicev.append(slice(cyrangeslice[it][0], maxy)) 10947 cslicev.append(slice(cxrangeslice[it][0], maxx)) 10945 10948 10946 10949 cslicevnoT.append(slice(0,dimz)) … … 10949 10952 10950 10953 cslice2D.append(slice(0,dimz)) 10951 cslice2D.append(slice(0,cyrangeslice[it][1]-cyrangeslice[it][0])) 10952 cslice2D.append(slice(0,cxrangeslice[it][1]-cxrangeslice[it][0])) 10953 cslice2Dhor.append(slice(0, cyrangeslice[it][1] - \ 10954 cyrangeslice[it][0])) 10955 cslice2Dhor.append(slice(0, cxrangeslice[it][1] - \ 10956 cxrangeslice[it][0])) 10954 cslice2D.append(slice(0,maxy-cyrangeslice[it][0])) 10955 cslice2D.append(slice(0,maxx-cxrangeslice[it][0])) 10956 cslice2Dhor.append(slice(0, maxy - cyrangeslice[it][0])) 10957 cslice2Dhor.append(slice(0, maxx -cxrangeslice[it][0])) 10957 10958 10958 10959 rvarvalst = np.ones((dimz,Nrad*2+1,Nrad*2+1),dtype=np.float)* \ 10959 10960 fillValue 10961 print 'Lluis cslicev:',cslicev,'cslice2D:',cslice2D 10960 10962 rvarvalst[tuple(cslice2D)] = varobj[tuple(cslicev)] 10961 10963 for iz in range(dimz): … … 10977 10979 rstatvarvals[it,iz,4] = maskedvals2[iz,:,:].mean() 10978 10980 rstatvarvals[it,iz,5] = np.sqrt(rstatvarvals[it,iz,4] - \ 10979 rstatvarvals[it,iz,3]*rs attvarvals[it,iz,3])10981 rstatvarvals[it,iz,3]*rstatvarvals[it,iz,3]) 10980 10982 10981 10983 else:
Note: See TracChangeset
for help on using the changeset viewer.