NCAR / DART

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

pop_assimilate.csh inflation file trouble #15

Closed timhoar closed 4 years ago

timhoar commented 4 years ago

I am currently working with DART in ocean data assimilation with fully coupled CESM. I have made some modifications to the pop_assimilate.csh, such that the code works correctly in the Manhattan DART. It works well when I disabled the time-evluation of inflation. (&filter_nml :: inf_initial_from_restart = .false.) Now I am trying to set (&filter_nml :: inf_initial_from_restart = .true.) to enable time-evluation. I have noticed that some namelist entries such as inf_in_file_name, inf_out_file_name , inf_diag_file_name seems not supported in Manhattan. And my code always fails to find the restart file for inflation_ics. The instructions in pop_assimilate.csh is a little confusing, seems like some old features are involved. I wonder if you can give me some suggestions about the time-evluation of inflation in current version. Thanks.

p.s. In case you have many different copies of the pop_assimilate.csh, I attached the one I am using with (&filter_nml :: inf_initial_from_restart = .false.) currently.

timhoar commented 4 years ago

Apparently you are using Manhattan DART in ocean data assimilation with fully coupled CESM. As you have discovered, the models/CESM directory is quite out-of-date and we have not updated it to run with Manhattan.

If you only intend on assimilating ocean observations, you should be using the models/POP directory, not models/CESM. When we finish updating models/CESM to be Manhattan-ready, it will be used to assimilate observations into multiple active CESM model components ... ocean observations will impact the ocean state, atmospheric observations will impact the atmospheric state, etc. The initial implemetation will require the use of multiple DART 'filter' programs - as described in the models/CESM/README document.

To be more helpful about the inflation file issue ...

There is a dependency in the use of adaptive inflation. You can either:

1) start from a single value that is specified in the namelist and specify that reading from restart files is .false.:

   inf_flavor                  = 2,                       0
   inf_initial_from_restart    = .false.,                 .false.
   inf_sd_initial_from_restart = .false.,                 .false.
   inf_initial                 = 1.02,                     1.02
   inf_lower_bound             = 1.0,                     1.0
   inf_upper_bound             = 10.0,                     2.0
   inf_damping                 = 0.9,                     0.9
   inf_sd_initial              = 0.6,                     0.6
   inf_sd_lower_bound          = 0.6,                     0.6
   inf_sd_max_change           = 1.05,                    1.05

After the first assimilation cycle, DART (filter, specifically) will write out netCDF files with the inflation values for every state variable. Since you are writing the 'output' stage (a necessity when using adaptive inflation), the output netCDF files will be called: output_priorinf_[mean,sd].nc The POP assimilate scripting must then rename the file to have the model timestamp in preparation for the next assimilation cycle.

The next assimilation cycle must have

   inf_initial_from_restart    = .true.,                 .false.
   inf_sd_initial_from_restart = .true.,                 .false.

and the assimilate.csh script must link the output inflation files from the previous cycle to the expected input names. I suggest you look at the models/POP/shell_scripts/assimilate.csh script for guidance.

-OR-

2) you can run 'fill_inflation_restart' before you start an assimilation experiment and put the files into the RUN directory with the expected naming convention - as described in the models/POP/shell_scripts/assimilate.csh file. In this case, you should have

   inf_initial_from_restart    = .true.,                 .false.
   inf_sd_initial_from_restart = .true.,                 .false.

assimilation_code/programs/fill_inflation_restart/fill_inflation_restart.html has instructions on how to run fill_inflation_restart.

timhoar commented 4 years ago

Thank you very much for your instructions. I have updated the codes, and then it works for CESM ocean-only data assimilation (cam_no_assimilate), the time-evolution of inflation flavor 2 also works correctly. I have copied blocks from models/POP to models/CESM, and change some paths accordingly (since the assimilation is taken place in RUNDIR/assimilate_pop rather than RUNDIR for POP). Now the pop_assimilate.csh can work in CESM for ocean model assimilation. I have attached the pop_assimilate.csh, I hope it can contribute a bit to make model/CESM Manhattan-ready. pop_assimilate.txt (Ed note: I had to change the file extension to be able to upload it to GitHub - TJH)

timhoar commented 4 years ago

I am glad you were able to extrapolate from the models/POP assimilate.csh to the models/CESM pop_assimilate.csh !

Just so you know:

We moved our DART repository to GitHub almost a year ago. Your pop_assimilate.csh still has SVN keywords in it, which were removed during the conversion to Git. The svn repository has been in readonly status for about a year. All fugure development, bugfixes, and upgrades will be through the GitHub repository. The changes you suggested for pop_assimilate.csh will appear on the DART GitHub site https://github.com/NCAR/DART when we make a new bugfix or release to Manhattan.