Showing 48 of 134 total issues
Function dist_precip_wind
has 12 arguments (exceeds 6 allowed). Consider refactoring. Open
def dist_precip_wind(precip, precip_temp, az, dir_round_cell, wind_speed,
Function distribute
has a Cognitive Complexity of 14 (exceeds 8 allowed). Consider refactoring. Open
def distribute(self, data, dpt, precip_temp, ta, time, wind, temp,
wind_direction=None, dir_round_cell=None, wind_speed=None,
cell_maxus=None):
"""
Distribute given a Panda's dataframe for a single time step. Calls
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function dist_precip_wind
has 34 lines of code (exceeds 30 allowed). Consider refactoring. Open
def dist_precip_wind(precip, precip_temp, az, dir_round_cell, wind_speed,
cell_maxus, tbreak, tbreak_direction, veg_type, veg_fact,
cfg, mask=None):
"""
Redistribute the precip based on wind speed and direciton
Function distribute
has 11 arguments (exceeds 6 allowed). Consider refactoring. Open
def distribute(self, data, dpt, precip_temp, ta, time, wind, temp,
Function stoporad
has 11 arguments (exceeds 6 allowed). Consider refactoring. Open
def stoporad(date_time, topo, cosz, azimuth, illum_ang, albedo_surface,
Function output
has a Cognitive Complexity of 13 (exceeds 8 allowed). Consider refactoring. Open
def output(self, current_time_step, module=None, out_var=None):
"""
Output the forcing data or model outputs for the current_time_step.
Args:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has a Cognitive Complexity of 13 (exceeds 8 allowed). Consider refactoring. Open
def __init__(self, variable_list, topo, date_time, config):
"""
Initialize the output_hru() class
Args:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function distribute_thread
has a Cognitive Complexity of 13 (exceeds 8 allowed). Consider refactoring. Open
def distribute_thread(self, smrf_queue, data_queue=None):
"""
Distribute the data using threading. All data is provided and
``distribute_thread`` will go through each time step following the
methods outlined in :mod:`smrf.distribute.solar.solar.distribute`. The
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _distribute
has a Cognitive Complexity of 13 (exceeds 8 allowed). Consider refactoring. Open
def _distribute(self, data, other_attribute=None, zeros=None):
"""
Distribute the data using the defined distribution method in
:py:attr:`config`
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function decay_alb_power
has a Cognitive Complexity of 13 (exceeds 8 allowed). Consider refactoring. Open
def decay_alb_power(veg, veg_type, start_decay, end_decay,
t_curr, pwr, alb_v, alb_ir):
"""
Find a decrease in albedo due to litter acccumulation. Decay is based on
max decay, decay power, and start and end dates. No litter decay occurs
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function distribute
has a Cognitive Complexity of 13 (exceeds 8 allowed). Consider refactoring. Open
def distribute(self, date_time, air_temp, vapor_pressure=None,
dew_point=None, cloud_factor=None):
"""
Distribute for a single time step.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function backup_input
has a Cognitive Complexity of 12 (exceeds 8 allowed). Consider refactoring. Open
def backup_input(data, config_obj):
"""
Backs up input data files so a user can rerun a run with the exact data
used for a run.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sunpath
has a Cognitive Complexity of 12 (exceeds 8 allowed). Consider refactoring. Open
def sunpath(latitude, longitude, declination, omega):
"""
Sun angle from solar declination and longtitude
Args:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _initialize
has a Cognitive Complexity of 12 (exceeds 8 allowed). Consider refactoring. Open
def _initialize(self, topo, metadata):
"""
Initialize the distribution based on the parameters in
:py:attr:`config`.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has 9 arguments (exceeds 6 allowed). Consider refactoring. Open
def __init__(self, config, mx, my, GridX, GridY,
Function initialize
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def initialize(self, topo, data):
"""Initialize the model with data
Arguments:
topo {topo class} -- Topo class
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function time_since_storm
has 8 arguments (exceeds 6 allowed). Consider refactoring. Open
def time_since_storm(precipitation, perc_snow, time_step=1/24, mass=1.0,
Function time_since_storm_pixel
has 8 arguments (exceeds 6 allowed). Consider refactoring. Open
def time_since_storm_pixel(precipitation, dpt, perc_snow, storming,
Function decay_alb_power
has 8 arguments (exceeds 6 allowed). Consider refactoring. Open
def decay_alb_power(veg, veg_type, start_decay, end_decay,
Function __init__
has 8 arguments (exceeds 6 allowed). Consider refactoring. Open
def __init__(self, mx, my, GridX, GridY, mz=None, GridZ=None,