NCAR / DART

Data Assimilation Research Testbed
https://dart.ucar.edu/
Apache License 2.0
187 stars 140 forks source link

MARBL-DART #701

Closed robin-armstrong closed 1 month ago

robin-armstrong commented 1 month ago

Description:

Contains model-mods for data assimilation with the Marine Biogeochemistry Library (MARBL/MOM6).

also fixes #614

Testing Datasets:

A test package for MARBL_joint_estimation can be found at /glade/u/home/rarmstrong/DART_test_package.

hkershaw-brown commented 1 month ago

Thanks for this Robin!

For reviewers, summary of July 11th 2024 meeting as todo list:

model mom6-marbl:

observation converter(s):

General git tidiness:

Other:

Testing:

backup of this branch since we're rewriting history: https://github.com/hkershaw-brown/DART/tree/marbl-dart

hkershaw-brown commented 1 month ago

note for test package, I switched to inflation not read from file

hkershaw@dec1004:/glade/work/hkershaw/DART/marbl/DART_test_package/test/DART$ diff input.nml input.nml.robin 
1,6d0
< &probit_transform_nml
< /
< 
< &algorithm_info_nml
< /
< 
73,74c67,68
<    inf_initial_from_restart    = .false.,                 .false.,
<    inf_sd_initial_from_restart = .false.,                  .false.,
---
>    inf_initial_from_restart    = .true.,                 .false.,
>    inf_sd_initial_from_restart = .true.,                  .false.,
108a103
>    filter_kind                     = 1,
mgharamti commented 1 month ago

I checked out the code and I was not able to run any of the DART executables. Here is the error that I was getting:

ERROR FROM:
  source : ensemble_manager_mod.f90
  routine: set_up_ens_distribution
  message: not enough MPI tasks for the model size, suggest at least ***** tasks

So, it turns out the length of the state vector is 7036994676854122!! I realize the issue is in computing the variable model_size. Right now, the function get_model_size in the model_mod is computing it using local variables. When someone calls get_model_size() outside the model_mod, this fails. So, the correct approach is to compute model_size inside static_init_model as I outlined in my previous review and then get_model_size should simply look like this:

function get_model_size()
integer(i8) :: get_model_size
get_model_size = model_size 
end function get_model_size

With this change, I can now run model_mod_check and the model_size is now correctly computed as 3434. It's still puzzling to me that this version of the code was running during Robin's internship. Could it be that we have a different version?

hkershaw-brown commented 1 month ago

pushed robins branch to https://github.com/NCAR/DART/tree/marbl-dart