NCAR / NCAR/DART

filter_mod default for init_time

Open
#1,041 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation
Dominant language
Fortran
Stars
263
Forks
182
Avg merge
11d 12h
Merged PRs (30d)
7

Description

Note on this,
The default for init_time_days|seconds is 0,0

https://github.com/NCAR/DART/blob/4c89e64191dd905c58baf8a0d726c1e5ae24ceb6/assimilation_code/modules/assimilation/filter_mod.f90#L170-L173

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:
https://github.com/NCAR/DART/blob/4c89e64191dd905c58baf8a0d726c1e5ae24ceb6/assimilation_code/modules/assimilation/filter_mod.f90#L549-L550

https://github.com/NCAR/DART/blob/4c89e64191dd905c58baf8a0d726c1e5ae24ceb6/assimilation_code/modules/assimilation/filter_mod.f90#L1522-L1536

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

https://docs.dart.ucar.edu/en/latest/assimilation_code/modules/assimilation/filter_mod.html#module-filter-mod

+------------------------------+---------------------+-------------------------------------------+
| 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in assimilation_code/modules/assimilation/filter_mod.f90, comparing the init_time_days and init_time_seconds defaults with filter_set_inital_time and the filter_nml handling around the referenced lines. Check the documented behavior in the filter_mod documentation and verify restart-file time handling for negative and partially specified values; done means the implementation, error behavior, and documentation agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.