Changeset 831 in lmdz_wrf for trunk


Ignore:
Timestamp:
Jun 16, 2016, 11:11:27 AM (8 years ago)
Author:
lfita
Message:

Adding `searchdirection' on 'subbasin_point'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r824 r831  
    1490614906        subname: name for the subbasin ('!' for spaces)
    1490714907        sub[lon/lat]: longitude and latitude of the subbasin point
     14908        searchdirection: searching direction river-up ('left': clockwise, 'right': anti-clockwise)
    1490814909      ncfile= name of the file to use (commontly ORCHIDEE's 'routing.nc')
    1490914910    """
     
    1491514916        quit()
    1491614917
    14917     arguments = '[subnmame],[sublon],[sublat]'
     14918    arguments = '[subnmame],[sublon],[sublat],[searchdirection]'
    1491814919    gen.check_arguments(fname, values, arguments, ',')
    1491914920
     
    1492514926    sublon = np.float(values.split(',')[1])
    1492614927    sublat = np.float(values.split(',')[2])
     14928    searchdirection = values.split(',')[3]
    1492714929
    1492814930    Lncfile = len(ncfile)
     
    1496214964      'matrix:', isub
    1496314965
    14964     masksubbasin, subflows, subflowspt = gen.subbasin_point(outflows, isub)
     14966    masksubbasin, subflows, subflowspt = gen.subbasin_point(outflows, isub,          \
     14967      searchdirection)
    1496514968
    1496614969    if len(subflows.keys()) == 1:
     
    1503615039    vardef = basicvardef(newvar, 'subflow', 'reference of the sub-flow','-')
    1503715040    newvals = writing_str_nc(newvar, nsubflows, Lstr)
     15041    newattr = set_attributek(newvar,'searching_direction',searchdirection,'S')
    1503815042    onewnc.sync()
    1503915043
Note: See TracChangeset for help on using the changeset viewer.