date_to_julian Function

public function date_to_julian(date_array, ref_year) result(res)

Returns Julian day from an array with date and time

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: date_array(6)

Datetime [y,m,d,h,m,s]

integer, intent(in) :: ref_year

Reference year

Return Value integer

Julian day


Calls

proc~~date_to_julian~~CallsGraph proc~date_to_julian date_to_julian proc~date_to_number date_to_number proc~date_to_julian->proc~date_to_number sngl sngl proc~date_to_number->sngl

Called by

proc~~date_to_julian~~CalledByGraph proc~date_to_julian date_to_julian proc~get_sun_angles get_sun_angles proc~get_sun_angles->proc~date_to_julian proc~uemep_annual_mean_pdf_correction_no2_o3 uEMEP_annual_mean_pdf_correction_NO2_O3 proc~uemep_annual_mean_pdf_correction_no2_o3->proc~get_sun_angles proc~correct_annual_mean_chemistry correct_annual_mean_chemistry proc~correct_annual_mean_chemistry->proc~uemep_annual_mean_pdf_correction_no2_o3 program~uemep uEMEP program~uemep->proc~correct_annual_mean_chemistry

Source Code

    function date_to_julian(date_array, ref_year) result(res)
        !! Returns Julian day from an array with date and time
        integer, intent(in) :: date_array(6) !! Datetime [y,m,d,h,m,s]
        integer, intent(in) :: ref_year !! Reference year
        integer :: res !! Julian day

        ! Local variables
        integer :: b(6)

        b(1) = date_array(1)
        b(2) = 1
        b(3) = 1
        b(4) = 0
        b(5) = 0
        b(6) = 0

        res = int(date_to_number(date_array, ref_year) - date_to_number(b, ref_year) + 1)
    end function date_to_julian