timeutils Module


Uses

  • module~~timeutils~~UsesGraph module~timeutils timeutils iso_fortran_env iso_fortran_env module~timeutils->iso_fortran_env module~phys_consts phys_consts module~timeutils->module~phys_consts module~phys_consts->iso_fortran_env

Used by

  • module~~timeutils~~UsedByGraph module~timeutils timeutils module~plasma_output_hdf5 plasma_output_hdf5 module~plasma_output_hdf5->module~timeutils program~test_sza test_sza program~test_sza->module~timeutils program~gemini3d Gemini3D program~gemini3d->module~timeutils module~potentialbcs_mumps potentialBCs_mumps program~gemini3d->module~potentialbcs_mumps module~multifluid multifluid program~gemini3d->module~multifluid module~precipbcs_mod precipBCs_mod program~gemini3d->module~precipbcs_mod module~neutral neutral program~gemini3d->module~neutral module~potential_comm potential_comm program~gemini3d->module~potential_comm module~io_aurora_hdf5 io_aurora_hdf5 module~io_aurora_hdf5->module~timeutils module~mag_hdf5~2 mag_hdf5 module~mag_hdf5~2->module~timeutils module~mag_hdf5 mag_hdf5 module~mag_hdf5->module~timeutils program~test_dayrollover test_dayrollover program~test_dayrollover->module~timeutils module~ionization ionization module~ionization->module~timeutils module~ionization->module~neutral module~potentialbcs_mumps->module~timeutils module~plasma_input_hdf5 plasma_input_hdf5 module~plasma_input_hdf5->module~timeutils module~io_aurora_hdf5~2 io_aurora_hdf5 module~io_aurora_hdf5~2->module~timeutils module~plasma_output_hdf5~2 plasma_output_hdf5 module~plasma_output_hdf5~2->module~timeutils program~test_formats test_formats program~test_formats->module~timeutils module~multifluid->module~timeutils module~multifluid->module~ionization module~multifluid->module~precipbcs_mod module~plasma_output_raw plasma_output_raw module~plasma_output_raw->module~timeutils module~precipbcs_mod->module~timeutils program~magcalc MagCalc program~magcalc->module~timeutils module~io_aurora_raw io_aurora_raw module~io_aurora_raw->module~timeutils module~mag_raw mag_raw module~mag_raw->module~timeutils module~plasma_input_raw plasma_input_raw module~plasma_input_raw->module~timeutils module~neutral->module~timeutils module~atmos atmos module~atmos->module~neutral module~glow_mod glow_mod module~glow_mod->module~ionization module~glow_dummy glow_dummy module~glow_dummy->module~ionization module~potential_comm->module~potentialbcs_mumps module~potential_worker potential_worker module~potential_worker->module~potential_comm module~potential_root potential_root module~potential_root->module~potential_comm

Contents


Variables

TypeVisibility AttributesNameInitial
real(kind=wp), private, parameter:: pi =4._wp*atan(1._wp)

Functions

private elemental function daysmonth(year, month) result(days)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: year
integer, intent(in) :: month

Return Value integer

public elemental function doy_calc(year, month, day) result(doy)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: year
integer, intent(in) :: month
integer, intent(in) :: day

Return Value integer

public elemental function sza(year, month, day, UTsec, glat, glon)

computes sza in radians CALCULATE SOLAR ZENITH ANGLE OVER A GIVEN GET OF LAT/LON

Read more…

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: year
integer, intent(in) :: month
integer, intent(in) :: day
real(kind=wp), intent(in) :: UTsec
real(kind=wp), intent(in) :: glat
real(kind=wp), intent(in) :: glon

Return Value real(kind=wp)

public pure function date_filename(outdir, ymd, UTsec) result(filename)

GENERATE A FILENAME STRING OUT OF A GIVEN DATE/TIME

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: outdir
integer, intent(in) :: ymd(3)
class(*), intent(in) :: UTsec

Return Value character(len=:), allocatable

public pure function utsec2filestem(ymd, UTsec) result(fn)

file stem is exactly 21 characters long, per Matt Z's de facto spec. FIXME: until we go to integer UTsec (microsec) we round to nearest microsecond FIXME: This corner case is from not using integers for microseconds

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: ymd(3)
class(*), intent(in) :: UTsec

UTC second: real [0.0 .. 86400.0)

Return Value character(len=21)


Subroutines

public pure subroutine dateinc(dtsec, ymd, UTsec)

increment datetime by dtsec

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in) :: dtsec

seconds to increment

integer, intent(inout) :: ymd(3)

year, month, day of month

real(kind=wp), intent(inout) :: UTsec

seconds since midnight UTC

public pure recursive subroutine day_wrap(year, month, day)

increment date if needed, according to day that is, if day is beyond month, increment month and year if needed wrap months wrap days

Arguments

Type IntentOptional AttributesName
integer, intent(inout) :: year
integer, intent(inout) :: month
integer, intent(inout) :: day