Changeset 3182 for palm/trunk/UTIL/inifor/tests/test-input-files.f90
- Timestamp:
- Jul 27, 2018 1:36:03 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/inifor/tests/test-input-files.f90
r2718 r3182 21 21 ! Current revisions: 22 22 ! ----------------- 23 ! 23 ! New test for negative start_hour and greater-than-one step_hour 24 ! 24 25 ! 25 26 ! Former revisions: … … 44 45 ONLY : PATH 45 46 USE grid, & 46 ONLY : input_file_list47 ONLY : get_input_file_list 47 48 USE test_utils 48 49 49 50 IMPLICIT NONE 50 51 51 CHARACTER(LEN= 50) :: title52 CHARACTER(LEN=60) :: title 52 53 CHARACTER(LEN=PATH), ALLOCATABLE, DIMENSION(:) :: file_list, ref_list 53 54 LOGICAL :: res 54 INTEGER :: i 55 INTEGER :: i 55 56 56 57 title = "input files - daylight saving to standard time" … … 70 71 71 72 ! Act 72 CALL input_file_list(start_date_string='2017102823',&73 start_hour=0, end_hour=5, step_hour=1,&74 path='./', prefix="laf", suffix='-test',&75 file_list=file_list)73 CALL get_input_file_list(start_date_string='2017102823', & 74 start_hour=0, end_hour=5, step_hour=1, & 75 path='./', prefix="laf", suffix='-test', & 76 file_list=file_list) 76 77 77 78 ! Assert … … 95 96 96 97 ! Act 97 CALL input_file_list(start_date_string='2016022823', & 98 start_hour=0, end_hour=1, step_hour=1, & 99 path='./', prefix="laf", suffix='-test', & 100 file_list=file_list) 98 CALL get_input_file_list(start_date_string='2016022823', & 99 start_hour=0, end_hour=1, step_hour=1, & 100 path='./', prefix="laf", suffix='-test', & 101 file_list=file_list) 102 103 ! Assert 104 DO i = 1, 2 105 res = res .AND. (TRIM(ref_list(i)) .EQ. TRIM(file_list(i))) 106 END DO 107 108 DEALLOCATE( ref_list, file_list ) 109 CALL end_test(title, res) 110 111 112 113 title = "input files - negative start_hour and step_hour > 1 hour" 114 CALL begin_test(title, res) 115 116 ! Arange 117 ! ...a date range that inlcudes a leap day (29. Feb. 2016) which should be 118 ! inlcuded in UTC time stamps. 119 ALLOCATE( ref_list(4) ) 120 ref_list(1) = './laf2017102823-test.nc' 121 ref_list(2) = './laf2017102901-test.nc' 122 ref_list(3) = './laf2017102903-test.nc' 123 ref_list(4) = './laf2017102904-test.nc' 124 125 ! Act 126 CALL get_input_file_list(start_date_string='2017102901', & 127 start_hour=-2, end_hour=3, step_hour=2, & 128 path='./', prefix="laf", suffix='-test', & 129 file_list=file_list) 130 131 PRINT *, file_list 101 132 102 133 ! Assert
Note: See TracChangeset
for help on using the changeset viewer.