Changeset 823 in lmdz_wrf for trunk


Ignore:
Timestamp:
Jun 12, 2016, 10:26:51 PM (8 years ago)
Author:
lfita
Message:

Creation of variable name `filen' for only the name of the file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r822 r823  
    1492714927
    1492814928    Lncfile = len(ncfile)
    14929 
    14930     if ncfile[Lncfile-10:Lncfile] == 'routing.nc':
     14929    filen = ncfile[Lncfile-10:Lncfile]
     14930
     14931    if filen == 'routing.nc':
    1493114932        lonname = 'nav_lon'
    1493214933        latname = 'nav_lat'
     
    1495214953    isub = gen.index_mat(difflonlat, mindifflonlat)
    1495314954    print '    ' + fname + "initial point of subbasin '" + subname + "' in the " +   \
    14954       'matrix:', isub
     14955      'matrix:', isub, 'mindiff:', mindifflonlat
    1495514956
    1495614957    masksubbasin, subflows, subflowspt = gen.subbasin_point(outflows, isub)
     
    1498114982    newdim = onewnc.createDimension('outflow', Ndiroutflow)
    1498214983   
    14983     if ncfile == 'routing.nc':
     14984    if filen == 'routing.nc':
    1498414985        lonlatvarsFile(lons, lats[::-1,:], 'x', 'y', onewnc)
    1498514986    else:
     
    1500115002    newvar = onewnc.createVariable('subbasinmask','i',('y','x'))
    1500215003    vardef = basicvardef(newvar, 'subbasinmask', 'mask of the subbasin','1')
    15003     if ncfile == 'routing.nc':
     15004    if filen == 'routing.nc':
    1500415005        newvar[:] = masksubbasin[::-1,:]
    1500515006    else:
Note: See TracChangeset for help on using the changeset viewer.