Skip to content

bug: Default values for assimilation_period_{days|seconds} for MOM6 and POP are -1 which is not allowed in DART. #1029

@hkershaw-brown

Description

@hkershaw-brown

🐛 Your bug may already be reported!
🪱 🦟

Describe the bug

  1. List the steps someone needs to take to reproduce the bug.
    Run filter with the default values of input.nml in the source code
    I'm using fparser to get all the defaults from the dart code.
    but this bug is these two default settings in model_mod:

    &model_nml
        assimilation_period_days = -1
        assimilation_period_seconds = -1
    
  2. What was the expected outcome?
    Filter to run to completion

  3. What actually happened?
    The code errors out in set time because the days, seconds are negative

It looks to be just POP and MOM6 that have this -1 -1 initialization.

Error Message

ERROR FROM:
  source : time_manager_mod.f90
  routine: set_time
  message:  seconds, days are           -1          -1  cannot be negative

The call is in static_init_model so it will cause any program using model to fail.

Breakpoint 2, time_manager_mod::set_time (set_time=..., seconds=-1, days=-1)
    at /glade/derecho/scratch/hkershaw/DART/Crocodile/comp_test/DART/assimilation_code/modules/utilities/time_manager_mod.f90:166
166	   call error_handler(E_ERR,'set_time',errstring,source)
(gdb) list
161	
162	! Negative time offset is illegal
163	
164	write(errstring,*)'seconds, days are ',seconds, days_in,' cannot be negative'
165	if(seconds < 0 .or. days_in < 0) &
166	   call error_handler(E_ERR,'set_time',errstring,source)
167	
168	! Make sure seconds greater than a day are fixed up.
169	! Extra parens to force the divide before the multiply are REQUIRED 
170	! on some compilers to prevent them from combining constants first 
(gdb) bt
#0  time_manager_mod::set_time (set_time=..., seconds=-1, days=-1)
    at /glade/derecho/scratch/hkershaw/DART/Crocodile/comp_test/DART/assimilation_code/modules/utilities/time_manager_mod.f90:166
#1  0x0000000000439bae in model_mod::static_init_model ()
    at /glade/derecho/scratch/hkershaw/DART/Crocodile/comp_test/DART/models/MOM6/model_mod.f90:174
#2  0x0000000000476719 in assim_model_mod::static_init_assim_model ()
    at /glade/derecho/scratch/hkershaw/DART/Crocodile/comp_test/DART/assimilation_code/modules/assimilation/assim_model_mod.f90:75
#3  0x00000000005ad7ab in filter_mod::filter_initialize_modules_used ()
    at /glade/derecho/scratch/hkershaw/DART/Crocodile/comp_test/DART/assimilation_code/modules/assimilation/filter_mod.f90:1276
#4  0x00000000005a576e in filter_mod::filter_main ()
    at /glade/derecho/scratch/hkershaw/DART/Crocodile/comp_test/DART/assimilation_code/modules/assimilation/filter_mod.f90:361
#5  0x000000000053ec53 in filter ()
    at /glade/derecho/scratch/hkershaw/DART/Crocodile/comp_test/DART/assimilation_code/programs/filter/filter.f90:20

Which model(s) are you working with?

MOM6, POP

Version of DART

Which version of DART are you using?
You can find the version using git describe --tags

v11.19.1
MOM6 since the creation of the MOM6 model mod Apr 21, 2023
Looks to have been present in POP since 2009

Have you modified the DART code?

No

Build information

Please describe:

  1. NSF NCAR supercomputer Derecho).
  2. intel

I don't think the defaults should cause a fail
1 day, 0 seconds a good default for MOM and POP?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingPOPParallel Ocean Program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions