Initialize tracer fields not present in the IC or RESTART - NOAA-GFDL/CEFI-regional-MOM6 GitHub Wiki

The latest dev/cefi COBALT provides flexibility to initialize newly added tracers independently, without modifying the original IC or restart datasets.

Below are a few more details on how this behaves under different scenarios:

1. When GENERIC_TRACER_IC_FILE is used for tracer initialization:

In this case, the code will first attempt to read tracer fields from the file specified in GENERIC_TRACER_IC_FILE. If any specific tracer field is missing, the code will then check the field_table to see if those tracers are defined there.

For example, if pcmlim_aclm_ndi is missing from your IC file and you want this tracer field to be initialized with 0, you can add the following line to your field_table :

  pcmlim_aclm_ndi_requires_restart = f

make sure enforce_src_info = f in your field_table

In this setup,pcmlim_aclm_ndi will be initialized as 0 (default value in the codes).

If instead you want to initialize pcmlim_aclm_ndi with non-zero values, add the following lines in field_table:

pcmlim_aclm_ndi_requires_src_info = t
pcmlim_aclm_ndi_src_file = INPUT/init_ocean_cobalt.res.nc
pcmlim_aclm_ndi_src_var_name = mu_mem_ndi
pcmlim_aclm_ndi_src_var_unit = none
pcmlim_aclm_ndi_dest_var_name = pcmlim_aclm_ndi
pcmlim_aclm_ndi_dest_var_unit = none
pcmlim_aclm_ndi_src_var_record = 1
pcmlim_aclm_ndi_src_var_gridspec = NONE
pcmlim_aclm_ndi_valid_min = 0.0

In this case, you must provide init_ocean_cobalt.res.nc in your INPUT folder so that pcmlim_aclm_ndi can be initialized from the data in the file.

2. If your model starts from restart files generated from previous runs but some tracer fields are missing:

You can follow the same approach as in the first scenario by adding the following line to your field_table to initialize as 0:

  pcmlim_aclm_ndi_requires_restart = f

or again from data:

pcmlim_aclm_ndi_requires_src_info = t
pcmlim_aclm_ndi_src_file = INPUT/init_ocean_cobalt.res.nc
pcmlim_aclm_ndi_src_var_name = mu_mem_ndi
pcmlim_aclm_ndi_src_var_unit = none
pcmlim_aclm_ndi_dest_var_name = pcmlim_aclm_ndi
pcmlim_aclm_ndi_dest_var_unit = none
pcmlim_aclm_ndi_src_var_record = 1
pcmlim_aclm_ndi_src_var_gridspec = NONE
pcmlim_aclm_ndi_valid_min = 0.0

Additionally, you will need to set TRACERS_MAY_REINIT = True in MOM_override to allow the model to reinitialize this specific tracer field.

Important: Remember to change TRACERS_MAY_REINIT back to False after the first segment run. Otherwise, the model will continue to reinitialize this tracer field from 0 or the provided data in every subsequent run.