Skip to content

In hybrid runs, MARBL initializes from IC file rather than restart file #397

@mnlevy1981

Description

@mnlevy1981

@kristenkrumhardt set up a hybrid run with MARBL tracers and noticed discontinuities in those tracers between the last month of the ref case and the first month of the hybrid. @klindsay28 noticed the ideal age tracers were initializing from restart as expected, and we compared the initialization process of the two passive tracer modules.

To fix this, we need a new logical variable in the MARBL control structure (MARBL_TRACERS_IC_FILE_IS_Z); the default will be .true. but it should be set to .false. when $RUN_TYPE == "hybrid" and $CONTINUE_RUN == False. We then need to mimic this block of code from ideal_age_example.F90:

if (CS%Z_IC_file) then
  OK = tracer_Z_init(CS%tr(:,:,:,m), h, CS%IC_file, name,&
                     G, GV, US, -1e34, 0.0) ! CS%land_val(m))
  if (.not.OK) then
    OK = tracer_Z_init(CS%tr(:,:,:,m), h, CS%IC_file, &
             trim(name), G, GV, US, -1e34, 0.0) ! CS%land_val(m))
    if (.not.OK) call MOM_error(FATAL,"initialize_ideal_age_tracer: "//&
            "Unable to read "//trim(name)//" from "//&
            trim(CS%IC_file)//".")
  endif
else
  call MOM_read_data(CS%IC_file, trim(name), CS%tr(:,:,:,m), G%Domain)
endif

but continue to use MOM_initialize_tracer_from_Z rather than tracer_Z_init.

The last step will be to update the default value for MARBL_TRACERS_IC_FILE in MOM_interface to include

$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False:
    = f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'

in a way that takes precedence over the existing checks that set it to ecosys_jan_IC_omip_latlon_1x1_180W_c231221.nc

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions