Skip to content

Commit

Permalink
squash this commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MJHarrison-GFDL committed Mar 18, 2021
1 parent 5681882 commit 20306e9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/ocean_data_assim/MOM_oda_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module MOM_oda_driver_mod
use MOM_domains, only : domain2d, global_field, get_domain_extent
use MOM_domains, only : pass_var, redistribute_array, broadcast_domain
use MOM_diag_mediator, only : register_diag_field, diag_axis_init, post_data
use MOM_diag_mediator, only : enable_averaging
use MOM_diag_mediator, only : enable_averaging, disable_averaging
use MOM_diag_mediator, only : diag_update_remap_grids
use MOM_ensemble_manager, only : get_ensemble_id, get_ensemble_size
use MOM_ensemble_manager, only : get_ensemble_pelist, get_ensemble_filter_pelist
use MOM_error_handler, only : stdout, stdlog, MOM_error
Expand Down Expand Up @@ -214,14 +215,15 @@ subroutine init_oda(Time, G, GV, US, diag_CS, CS)
"to temperature and salinity.", &
default=.false.)
if (CS%do_bias_adjustment) then
call get_param(PF,"MOM", "BIAS_ADJUSTMENT_FACTOR", CS%bias_adjustment_multiplier, &
call get_param(PF,"MOM", "TRACER_ADJUSTMENT_FACTOR", CS%bias_adjustment_multiplier, &
"A multiplicative scaling factor for the climatological tracer tendency adjustment ", &
default=1.0)
endif
call get_param(PF,"MOM", "USE_BASIN_MASK", CS%use_basin_mask, &
"If true, add a basin mask to delineate weakly connected "//&
"ocean basins for the purpose of data assimilation.", &
default=.false.)

call get_param(PF,"MOM", "NIGLOBAL", CS%ni, &
"The total number of thickness grid points in the "//&
"x-direction in the physical domain.")
Expand Down Expand Up @@ -347,6 +349,10 @@ subroutine init_oda(Time, G, GV, US, diag_CS, CS)
call set_PElist(CS%ensemble_pelist(CS%ensemble_id,:))

if (CS%do_bias_adjustment) then
call get_param(PF, "MOM", "TEMP_SALT_ADJUSTMENT_FILE", bias_correction_file, &
"The name of the file containing temperature and salinity "//&
"tendency adjustments", default='temp_salt_adjustment.nc')

inc_file = trim(inputdir) // trim(bias_correction_file)
CS%INC_CS%T_id = init_extern_field(inc_file, "temp_increment", &
correct_leap_year_inconsistency=.true.,verbose=.true.,domain=G%Domain%mpp_domain)
Expand Down Expand Up @@ -512,7 +518,9 @@ subroutine oda(Time, CS)
call set_PElist(CS%filter_pelist)
call cpu_clock_begin(id_clock_oda_filter)
call get_profiles(Time, CS%Profiles, CS%CProfiles)
#ifdef ENABLE_ECDA
call ensemble_filter(CS%Ocean_prior, CS%Ocean_posterior, CS%CProfiles, CS%kdroot, CS%mpp_domain, CS%oda_grid)
#endif
call cpu_clock_end(id_clock_oda_filter)
!if (CS%write_obs) call save_obs_diff(CS%CProfiles) ! not fully implemented
!! switch back to ensemble member pelist
Expand Down

0 comments on commit 20306e9

Please sign in to comment.