Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make clear obs_window_seconds and obs_window_days are unsupported #525

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions assimilation_code/modules/assimilation/filter_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ module filter_mod
integer :: first_obs_seconds = -1
integer :: last_obs_days = -1
integer :: last_obs_seconds = -1
! Assimilation window; defaults to model timestep size.
! Assimilation window; default is model timestep size.
! Changing these is currently unsupported/not implemented.
! Reserved for future use.
integer :: obs_window_days = -1
integer :: obs_window_seconds = -1
! Control diagnostic output for state variables
Expand Down Expand Up @@ -1507,7 +1509,7 @@ subroutine filter_set_initial_time(days, seconds, dart_time, read_time_from_file
type(time_type), intent(out) :: dart_time
logical, intent(out) :: read_time_from_file

if(days >= 0) then
if(days >= 0 .or. seconds >= 0) then
dart_time = set_time(seconds, days)
read_time_from_file = .false.
else
Expand All @@ -1524,7 +1526,14 @@ subroutine filter_set_window_time(dart_time)
type(time_type), intent(out) :: dart_time


if(obs_window_days >= 0) then
if(obs_window_days >= 0 .or. obs_window_seconds >= 0) then
write(msgstring, *) 'obs_window_days and obs_window_seconds are currently unsupported and will be ignored.'
call error_handler(E_MSG, 'filter_set_window_time: ', msgstring)

! we still need to set the output to something. in the current code
! this time is passed into move_ahead() where it is then ignored.
! if it is ever supported there the two lines above should be removed and
! this next line is the correct code to use.
dart_time = set_time(obs_window_seconds, obs_window_days)
else
dart_time = set_time(0, 0)
Expand Down
8 changes: 4 additions & 4 deletions assimilation_code/modules/assimilation/filter_mod.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ prior inflation and the second controls the posterior inflation.
| | | If non-negative, ignore all observations |
| | | after this time. |
+------------------------------+---------------------+-------------------------------------------+
| obs_window_days | integer | Assimilation window days; |
| | | defaults to model timestep size. |
| obs_window_days | integer | Currently unsupported. Leave as -1. |
| | | Reserved for future use. |
+------------------------------+---------------------+-------------------------------------------+
| obs_window_seconds | integer | Assimilation window seconds; |
| | | defaults to model timestep size. |
| obs_window_seconds | integer | Currently unsupported. Leave as -1. |
| | | Reserved for future use. |
+------------------------------+---------------------+-------------------------------------------+
| All variables named inf_* are arrays of length 2. The first element controls the prior, |
| the second element controls the posterior inflation. See :doc:`../../programs/filter/filter` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ program perfect_model_obs
integer :: first_obs_seconds = -1
integer :: last_obs_days = -1
integer :: last_obs_seconds = -1
! Assimilation window; default is model timestep size.
! Changing these is currently unsupported/not implemented.
! Reserved for future use.
integer :: obs_window_days = -1
integer :: obs_window_seconds = -1
logical :: output_forward_op_errors = .false.
Expand Down Expand Up @@ -295,6 +298,11 @@ subroutine perfect_main()

! 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)
! Catch if someone is trying to use an unsupported option.
if (obs_window_days >= 0 .or. obs_window_seconds >= 0) then
write(msgstring, *) 'obs_window_days and obs_window_seconds are currently unsupported and will be ignored.'
call error_handler(E_MSG, 'perfect_main', msgstring)
endif

if (read_input_state_from_file) then

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,11 @@ namelist.
| | | non-negative, ignore any observations |
| | | after this time. |
+---------------------------------------+---------------------------------------+---------------------------------------+
| obs_window_days | integer | If negative, don't use. If |
| | | non-negative, reserved for future |
| | | use. |
| obs_window_days | integer | Currently unsupported. Leave as -1. |
| | | Reserved for future use. |
+---------------------------------------+---------------------------------------+---------------------------------------+
| obs_window_seconds | integer | If negative, don't use. If |
| | | non-negative, reserved for future |
| | | use. |
| obs_window_seconds | integer | Currently unsupported. Leave as -1. |
| | | Reserved for future use. |
+---------------------------------------+---------------------------------------+---------------------------------------+
| trace_execution | logical | True means output very detailed |
| | | messages about what routines are |
Expand Down