How to use the tonic.tonic.NcVar function in tonic

To help you get started, we’ve selected a few tonic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github UW-Hydro / tonic / tonic / models / vic / vic2netcdf.py View on Github external
def read_domain(domain_dict):

    print('reading domain file: {0}'.format(domain_dict['filename']))
    f = Dataset(domain_dict['filename'])

    domain = {'lon': NcVar(f, domain_dict['longitude_var']),
              'lat': NcVar(f, domain_dict['latitude_var'])}

    if domain_dict['copy_vars']:
        for varname in domain_dict['copy_vars']:
            domain[varname] = NcVar(f, varname)

    f.close()

    return domain
# -------------------------------------------------------------------- #
github UW-Hydro / tonic / tonic / models / vic / vic2netcdf.py View on Github external
def read_domain(domain_dict):

    print('reading domain file: {0}'.format(domain_dict['filename']))
    f = Dataset(domain_dict['filename'])

    domain = {'lon': NcVar(f, domain_dict['longitude_var']),
              'lat': NcVar(f, domain_dict['latitude_var'])}

    if domain_dict['copy_vars']:
        for varname in domain_dict['copy_vars']:
            domain[varname] = NcVar(f, varname)

    f.close()

    return domain
# -------------------------------------------------------------------- #
github UW-Hydro / tonic / tonic / models / vic / vic2netcdf.py View on Github external
def read_domain(domain_dict):

    print('reading domain file: {0}'.format(domain_dict['filename']))
    f = Dataset(domain_dict['filename'])

    domain = {'lon': NcVar(f, domain_dict['longitude_var']),
              'lat': NcVar(f, domain_dict['latitude_var'])}

    if domain_dict['copy_vars']:
        for varname in domain_dict['copy_vars']:
            domain[varname] = NcVar(f, varname)

    f.close()

    return domain
# -------------------------------------------------------------------- #