@@ -109,6 +109,7 @@ module MOM_surface_forcing_gfdl
109109 real :: rigid_sea_ice_mass ! < A mass per unit area of sea-ice beyond which sea-ice viscosity
110110 ! ! becomes effective [R Z ~> kg m-2], typically of order 1000 kg m-2.
111111 logical :: allow_flux_adjustments ! < If true, use data_override to obtain flux adjustments
112+ logical :: allow_carbon_flux_exchange ! < If true, allows fluxes and diagnostics of carbon in runoff.
112113
113114 logical :: restore_salt ! < If true, the coupled MOM driver adds a term to restore surface
114115 ! ! salinity to a specified value.
@@ -288,7 +289,8 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
288289 ! flux type has been used.
289290 if (fluxes% dt_buoy_accum < 0 ) then
290291 call allocate_forcing_type(G, fluxes, water= .true. , heat= .true. , ustar= .not. CS% nonBous, press= .true. , &
291- fix_accum_bug= .not. CS% ustar_gustless_bug, tau_mag= CS% nonBous, carbon= .true. )
292+ fix_accum_bug= .not. CS% ustar_gustless_bug, tau_mag= CS% nonBous,&
293+ carbon= CS% allow_carbon_flux_exchange)
292294
293295 call safe_alloc_ptr(fluxes% sw_vis_dir,isd,ied,jsd,jed)
294296 call safe_alloc_ptr(fluxes% sw_vis_dif,isd,ied,jsd,jed)
@@ -504,7 +506,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
504506 call check_mask_val_consistency(IOB% runoff_hflx(i- i0,j- j0), G% mask2dT(i,j), i, j, ' runoff_hflx' , G)
505507 endif
506508
507- if (associated (IOB% runoff_carbon)) then
509+ if (associated (IOB% runoff_carbon) .and. CS % allow_carbon_flux_exchange ) then
508510 fluxes% carbon_content_lrunoff(i,j) = US% kg_m2s_to_RZ_T * IOB% runoff_carbon(i- i0,j- j0) * G% mask2dT(i,j)
509511 if (CS% check_no_land_fluxes) &
510512 call check_mask_val_consistency(IOB% runoff_carbon(i- i0,j- j0), G% mask2dT(i,j), i, j, ' runoff_carbon' , G)
@@ -1341,7 +1343,6 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
13411343 logical :: new_sim ! False if this simulation was started from a restart file
13421344 ! or other equivalent files.
13431345 logical :: iceberg_flux_diags ! If true, diagnostics of fluxes from icebergs are available.
1344- logical :: carbon_runoff_diags ! If true, diagnostics of fluxes of carbon from runoff are available.
13451346 logical :: fix_ustar_gustless_bug ! If false, include a bug using an older run-time parameter.
13461347 logical :: test_value ! This is used to determine whether a logical parameter is being set explicitly.
13471348 logical :: explicit_bug, explicit_fix ! These indicate which parameters are set explicitly.
@@ -1714,12 +1715,12 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
17141715 call get_param(param_file, mdl, " ALLOW_ICEBERG_FLUX_DIAGNOSTICS" , iceberg_flux_diags, &
17151716 " If true, makes available diagnostics of fluxes from icebergs " // &
17161717 " as seen by MOM6." , default= .false. )
1717- call get_param(param_file, mdl, " ALLOW_CARBON_FLUX_DIAGNOSTICS " , carbon_runoff_diags , &
1718- " If true, makes available diagnostics of fluxes of carbon in runoff " // &
1719- " as seen by MOM6." , default= .false. )
1718+ call get_param(param_file, mdl, " ALLOW_CARBON_FLUX_EXCHANGE " , CS % allow_carbon_flux_exchange , &
1719+ " If true, makes available fluxes and diagnostics of carbon in runoff " // &
1720+ " within MOM6." , default= .false. )
17201721 call register_forcing_type_diags(Time, diag, US, CS% use_temperature, CS% handles, &
17211722 use_berg_fluxes= iceberg_flux_diags, &
1722- use_carbon_runoff= carbon_runoff_diags )
1723+ use_carbon_runoff= CS % allow_carbon_flux_exchange )
17231724
17241725 call get_param(param_file, mdl, " ALLOW_FLUX_ADJUSTMENTS" , CS% allow_flux_adjustments, &
17251726 " If true, allows flux adjustments to specified via the " // &
0 commit comments