Changeset 769 in lmdz_wrf
- Timestamp:
- May 10, 2016, 3:50:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r768 r769 14355 14355 else: 14356 14356 newvar = newnc.createVariable('lon','f8',('lon')) 14357 basicvardef(newvar, 'lon ', 'Longitudes','degrees_East')14357 basicvardef(newvar, 'longitude', 'Longitude','degrees_East') 14358 14358 newvar[:] = lonmap 14359 14359 newvar.setncattr('axis', 'X') … … 14364 14364 else: 14365 14365 newvar = newnc.createVariable('lat','f8',('lat')) 14366 basicvardef(newvar, 'lat ', 'Latitudes','degrees_North')14366 basicvardef(newvar, 'latitude', 'Latitude','degrees_North') 14367 14367 newvar[:] = latmap 14368 14368 newvar.setncattr('axis', 'Y') … … 14374 14374 newvarindiff = newnc.createVariable('locindiff','f4',('inpts')) 14375 14375 basicvardef(newvarindiff, 'locindiff', 'distance between input point and its final location','degree') 14376 set_attributek(newvarindiff,'authorized_minimum_distance',mindiff,'R') 14376 14377 14377 14378 # map variable … … 14391 14392 14392 14393 basicvardef(newvarin, 'inpts', 'Equivalent point from the input source', '-') 14393 newvar .setncattr('coordinates', 'lon lat')14394 newvarin.setncattr('coordinates', 'lon lat') 14394 14395 14395 14396 else: … … 14425 14426 Nptsf = len(ptsf) 14426 14427 print Ninpts,'Npoints to find:', len(ptsf), ptsf[0:10], newvarindiff[ptsf[0:10]] 14428 ipoint = ptsf[0] 14427 14429 print ' ' + fname + ': from:', Ninpts,'re-locating:',Nptsf,'points starting at',\ 14428 14430 ipoint,'...' … … 14446 14448 idiff, ilonlatv = fin.module_forinterpolate.interpolate(projlon, projlat,\ 14447 14449 lonvss, latvss, np.float64(mindiff), inptss) 14450 # Fortran routine provides ranges from 1,dimx! 14451 ilonlatv = ilonlatv - 1 14448 14452 for i in range(np.min([len(idiff),fracs])): 14449 14453 newvar[ilonlatv[i,0],ilonlatv[i,1]] = ovar[iri + i]
Note: See TracChangeset
for help on using the changeset viewer.