Changeset 769 in lmdz_wrf


Ignore:
Timestamp:
May 10, 2016, 3:50:40 PM (9 years ago)
Author:
lfita
Message:

Fortran routines provide values from 1,dimx; in 'ilonlatv', they should be 0,dimx-1!!!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r768 r769  
    1435514355        else:
    1435614356            newvar = newnc.createVariable('lon','f8',('lon'))
    14357         basicvardef(newvar, 'lon', 'Longitudes','degrees_East')
     14357        basicvardef(newvar, 'longitude', 'Longitude','degrees_East')
    1435814358        newvar[:] = lonmap
    1435914359        newvar.setncattr('axis', 'X')
     
    1436414364        else:
    1436514365            newvar = newnc.createVariable('lat','f8',('lat'))
    14366         basicvardef(newvar, 'lat', 'Latitudes','degrees_North')
     14366        basicvardef(newvar, 'latitude', 'Latitude','degrees_North')
    1436714367        newvar[:] = latmap
    1436814368        newvar.setncattr('axis', 'Y')
     
    1437414374        newvarindiff = newnc.createVariable('locindiff','f4',('inpts'))
    1437514375        basicvardef(newvarindiff, 'locindiff', 'distance between input point and its final location','degree')
     14376        set_attributek(newvarindiff,'authorized_minimum_distance',mindiff,'R')
    1437614377
    1437714378# map variable
     
    1439114392
    1439214393        basicvardef(newvarin, 'inpts', 'Equivalent point from the input source', '-')
    14393         newvar.setncattr('coordinates', 'lon lat')
     14394        newvarin.setncattr('coordinates', 'lon lat')
    1439414395
    1439514396    else:
     
    1442514426    Nptsf = len(ptsf)
    1442614427    print Ninpts,'Npoints to find:', len(ptsf), ptsf[0:10], newvarindiff[ptsf[0:10]]
     14428    ipoint = ptsf[0]
    1442714429    print '  ' + fname + ': from:', Ninpts,'re-locating:',Nptsf,'points starting at',\
    1442814430      ipoint,'...'
     
    1444614448            idiff, ilonlatv = fin.module_forinterpolate.interpolate(projlon, projlat,\
    1444714449              lonvss, latvss, np.float64(mindiff), inptss)
     14450# Fortran routine provides ranges from 1,dimx!
     14451            ilonlatv = ilonlatv - 1
    1444814452            for i in range(np.min([len(idiff),fracs])):
    1444914453                newvar[ilonlatv[i,0],ilonlatv[i,1]] = ovar[iri + i]
Note: See TracChangeset for help on using the changeset viewer.