Util

Functions for dates

datetime_ymd(dt)

convert [doy, year] into datetime.datetime

dy_datetime(dt)

is_leap_year(year)

if year is a leap year return True else return False

doy(Y[, M, D])

given year, month, day return day of year Astronomical Algorithms, Jean Meeus, 2d ed, 1998, chap 7

woy(time_curr[, year])

given the current datetime or doy and year, lookup the week of the year

ymd(Y[, N])

given year = Y and day of year = N, return year, month, day Astronomical Algorithms, Jean Meeus, 2d ed, 1998, chap 7

full_steps_timediff(d1, d2[, settingtime])

calculate the timesteps in weeks, months and days between 2 dates.

timestep_gen(cls)

yields a timestep

days_dt(dt)

calculate the number of days for any month

days_in_month(dt)

calculate the number of days for any month for individual (year, dayOfYear), datetime.datetime or lists of these

stressperiod_day(**kwargs)

returns a list with the number of days for each stress period.

Utility functions

class_by_bisect(value, ranges[, direction])

bisect an list for a value and return the position

make_shape_two(item[, date, length, filler])

returns a string with a given length.

load_obj_compressed(name[, ending])

Loads a prickle binary file.

save_obj(name, obj[, ending])

Save a struct or list into a prickle binary file.

load_obj(name[, ending])

Load a prickle binary file.