-
Notifications
You must be signed in to change notification settings - Fork 170
Description
Note on this,
The default for init_time_days|seconds is 0,0
DART/assimilation_code/modules/assimilation/filter_mod.f90
Lines 170 to 173 in 4c89e64
| ! if init_time_days and seconds are negative initial time is 0, 0 | |
| ! for no restart or comes from restart if restart exists | |
| integer :: init_time_days = 0 | |
| integer :: init_time_seconds = 0 |
So you have to give
filter_nml
init_time_days = -1
to read time from a restart file
The check in filter_set_inital_time is on only on days >=0 not on both namelist inputs as the comment suggests:
DART/assimilation_code/modules/assimilation/filter_mod.f90
Lines 549 to 550 in 4c89e64
| ! Set a time type for initial time if namelist inputs are not negative | |
| call filter_set_initial_time(init_time_days, init_time_seconds, time1, read_time_from_file) |
DART/assimilation_code/modules/assimilation/filter_mod.f90
Lines 1522 to 1536 in 4c89e64
| subroutine filter_set_initial_time(days, seconds, dart_time, read_time_from_file) | |
| integer, intent(in) :: days, seconds | |
| type(time_type), intent(out) :: dart_time | |
| logical, intent(out) :: read_time_from_file | |
| if(days >= 0) then | |
| dart_time = set_time(seconds, days) | |
| read_time_from_file = .false. | |
| else | |
| dart_time = set_time(0, 0) | |
| read_time_from_file = .true. | |
| endif | |
| end subroutine filter_set_initial_time |
So not giving init_time_days
filter_nml
init_time_seconds = -1
ERROR FROM:
source : time_manager_mod.f90
routine: set_time
message: seconds, days are -1 0 cannot be negative
+------------------------------+---------------------+-------------------------------------------+
| init_time_days | integer | If negative, use the initial days read |
| | | from the state data restart file. |
| | | If positive, override the initial days |
| | | read from state data restart files. |
| | | Days since 1 Jan 1601. |
+------------------------------+---------------------+-------------------------------------------+
| init_time_seconds | integer | If negative use the initial seconds read |
| | | from the state data restart file. |
| | | If positive, override the initial seconds |
| | | read from state data restart files. |
| | | Seconds since midnight. |
+------------------------------+---------------------+-------------------------------------------+
If you only give X seconds, the time is set to (0 days, X seconds)
not (model days, X seconds)
init_time_days is controlling the true|false from read_time_from_file and days, seconds can not be set independently.