HYPE
All Classes Namespaces Files Functions Variables Pages
Functions/Subroutines | Variables
timeroutines Module Reference

Functions/Subroutines

integer function, public period_length (sdate, edate)
 
integer function, public day_of_month (year, month)
 
integer function, public numdays_of_year (date)
 
subroutine, public calculate_time_for_model (idt, date)
 
subroutine, public set_timestep_variables (tstep, stepunit, fdate)
 
subroutine, public calculate_timesteps_to_monday (fdate, tstep)
 
subroutine, public get_dayno_from_monthday (datumIn, daysAmount)
 
subroutine, public add_date_to_array (onedate, dim, n, datearray)
 
subroutine, public check_if_date_in_period (dim, n, datearray, begindate, enddate, status)
 

Variables

integer, parameter float = KIND(1.0)
 

Detailed Description

Module contains procedures relating to time calculations.

Function/Subroutine Documentation

◆ add_date_to_array()

subroutine, public timeroutines::add_date_to_array ( type(datetype), intent(in)  onedate,
integer, intent(in)  dim,
integer, intent(inout)  n,
type(datetype), dimension(dim), intent(inout)  datearray 
)

Add new date to date-array in order. Already existing dates are not added.

Parameters
[in]onedatedate to be added
[in]dimsize of array
[in,out]nnumber of dates in array
[in,out]datearrayarray of dates

◆ calculate_time_for_model()

subroutine, public timeroutines::calculate_time_for_model ( integer, intent(in)  idt,
type(datetype), intent(in)  date 
)

Calculates the time variables available for the model.

Consequences Module modvar variables current_time is set.

Parameters
[in]idtindex of current timestep
[in]datecurrent date
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_timesteps_to_monday()

subroutine, public timeroutines::calculate_timesteps_to_monday ( type(datetype), intent(in)  fdate,
integer, intent(out)  tstep 
)

Set Monday time step variable. The first Monday of the simulation will be idt=1+tstep (tstep>0). For negative tstep; the first Monday of the simulation will be idt=1+tstep+timesteps_per_week.

Consequences Module worldvar variable dtmonday is set in calling routine

Parameters
[in]fdatefirst date of simulation
[out]tsteptime steps to first monday
+ Here is the call graph for this function:

◆ check_if_date_in_period()

subroutine, public timeroutines::check_if_date_in_period ( integer, intent(in)  dim,
integer, intent(in)  n,
type(datetype), dimension(dim), intent(in)  datearray,
type(datetype), intent(in)  begindate,
type(datetype), intent(in)  enddate,
logical, intent(inout)  status 
)

Check if dates are within period.

Parameters
[in]dimsize of array
[in]nnumber of elements in array
[in]datearraydate array to be checked
[in]begindatebegin date of period
[in]enddateend date of period
[in,out]statusflag for any date withing period
+ Here is the caller graph for this function:

◆ day_of_month()

integer function, public timeroutines::day_of_month ( integer, intent(in)  year,
integer, intent(in)  month 
)

Calculates the number of days in month during year.

Parameters
[in]yearyear in format YYYY
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_dayno_from_monthday()

subroutine, public timeroutines::get_dayno_from_monthday ( integer, intent(in)  datumIn,
integer, intent(out)  daysAmount 
)

Calculate daynumber of year from month-day (mmdd)

Parameters
[in]datuminmonth day (mmdd): 31st of January = 0131
[out]daysamountCorresponding amount of days since beginning of year

◆ numdays_of_year()

integer function, public timeroutines::numdays_of_year ( type(datetype), intent(in)  date)

Calculates the number of days of year.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ period_length()

integer function, public timeroutines::period_length ( type(datetype), intent(in)  sdate,
type(datetype), intent(in)  edate 
)

Calculates the number of time steps between sdate and edate.

Parameters
[in]sdatestart date
[in]edateend date
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_timestep_variables()

subroutine, public timeroutines::set_timestep_variables ( integer, intent(in)  tstep,
character(len=*), intent(in)  stepunit,
type(datetype), intent(in)  fdate 
)

Set time step variables.

Consequences Module modvar variables seconds_per_timestep and timesteps_per_day are set. Module worldvar variable steplen and idtlag are set.

Parameters
[in]tsteptime step read from file
[in]stepunitunit of time step read from file
[in]fdatefirst date of simulation
+ Here is the call graph for this function:

Variable Documentation

◆ float

integer, parameter timeroutines::float = KIND(1.0)
private