day_of_month Function

public function day_of_month(ida, month, year, nc)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: ida
integer, intent(in) :: month
integer, intent(in) :: year
integer, intent(in), dimension(13):: nc

Return Value integer


Calls

proc~~day_of_month~~CallsGraph proc~day_of_month day_of_month proc~is_leap_year is_leap_year proc~day_of_month->proc~is_leap_year

Contents

Source Code


Source Code

  integer function day_of_month(ida, month, year, nc)

    integer, intent(in) :: ida
    integer, dimension(13), intent(in) :: nc
    integer, intent(in) :: month, year
    integer :: n

    ! ida = current day (day of year) used in SWIM as global variable
    ! nc(month) = number of days passed in the beginning of month (common.f90) global variable in SWIM
    n = nc(month)
    if (.NOT.is_leap_year(year) .AND. month > 2 ) n = n - 1
    day_of_month = ida - n

  end function day_of_month