Test routine for the Julian date routines.
subroutine time_module_test() implicit none real(wp) :: jd, sec integer :: year,month,day,hrs,min write(*,*) '' write(*,*) '---------------' write(*,*) ' time_module_test' write(*,*) '---------------' write(*,*) '' ! JD = 2451545.0 jd = julian_date(2000,1,1,12,0,0) call calendar_date_realsec(jd,year,month,day,hrs,min,sec) write(*,*) 'jd ', jd write(*,*) 'year ', year write(*,*) 'month ', month write(*,*) 'day ', day write(*,*) 'hrs ', hrs write(*,*) 'min ', min write(*,*) 'sec ', sec if (year/=2000) error stop 'error: incorrect year' if (month/=1) error stop 'error: incorrect month' if (day/=1) error stop 'error: incorrect day' if (hrs/=12) error stop 'error: incorrect hrs' if (min/=0) error stop 'error: incorrect min' if (sec/=0.0_wp) error stop 'error: incorrect sec' write(*,*) 'PASSED' end subroutine time_module_test