@@ -212,6 +212,7 @@ subroutine init_oda(Time, G, GV, US, diag_CS, CS)
212
212
character (len= 80 ) :: remap_scheme
213
213
character (len= 80 ) :: bias_correction_file, inc_file
214
214
integer :: default_answer_date ! The default setting for the various ANSWER_DATE flags.
215
+ character (len= 160 ) :: mesg
215
216
216
217
if (associated (CS)) call MOM_error(FATAL, ' Calling oda_init with associated control structure' )
217
218
allocate (CS)
@@ -267,13 +268,15 @@ subroutine init_oda(Time, G, GV, US, diag_CS, CS)
267
268
if (CS% do_T_bias_adjustment) then
268
269
call get_param(PF, mdl, " TEMP_ADJUSTMENT_FACTOR" , CS% T_bias_adjustment_multiplier, &
269
270
" A multiplicative scaling factor for the climatological tracer tendency adjustment " , &
270
- units= " nondim" , default= 1 .0 )
271
+ units= " nondim" , default= 0 .0 )
271
272
endif
272
273
if (CS% do_S_bias_adjustment) then
273
274
call get_param(PF, mdl, " SALT_ADJUSTMENT_FACTOR" , CS% S_bias_adjustment_multiplier, &
274
275
" A multiplicative scaling factor for the climatological tracer tendency adjustment " , &
275
- units= " nondim" , default= 1 .0 )
276
+ units= " nondim" , default= 0 .0 )
276
277
endif
278
+ write (mesg,* ) ' OTA adjustment multiplier' , CS% T_bias_adjustment_multiplier, CS% S_bias_adjustment_multiplier
279
+ call MOM_mesg(" ODA init: " // trim (mesg))
277
280
call get_param(PF, mdl, " APPLY_ML_TEMP_TENDENCY_ADJUSTMENT" , CS% do_T_ml_bias_adjustment, &
278
281
" If true, add a machine learning-trained adjustment " // &
279
282
" to temperature." , &
@@ -285,13 +288,15 @@ subroutine init_oda(Time, G, GV, US, diag_CS, CS)
285
288
if (CS% do_T_ml_bias_adjustment) then
286
289
call get_param(PF, mdl, " ML_TEMP_ADJUSTMENT_FACTOR" , CS% T_ml_bias_adjustment_multiplier, &
287
290
" A multiplicative scaling factor for the machine learning tracer tendency adjustment " , &
288
- units= " nondim" , default= 1 .0 )
291
+ units= " nondim" , default= 0 .0 )
289
292
endif
290
293
if (CS% do_S_ml_bias_adjustment) then
291
294
call get_param(PF, mdl, " ML_SALT_ADJUSTMENT_FACTOR" , CS% S_ml_bias_adjustment_multiplier, &
292
295
" A multiplicative scaling factor for the machine learning tracer tendency adjustment " , &
293
- units= " nondim" , default= 1 .0 )
296
+ units= " nondim" , default= 0 .0 )
294
297
endif
298
+ write (mesg,* ) ' ML adjustment multiplier' , CS% T_ml_bias_adjustment_multiplier, CS% S_ml_bias_adjustment_multiplier
299
+ call MOM_mesg(" ODA init: " // trim (mesg))
295
300
call get_param(PF, mdl, " USE_BASIN_MASK" , CS% use_basin_mask, &
296
301
" If true, add a basin mask to delineate weakly connected " // &
297
302
" ocean basins for the purpose of data assimilation." , &
@@ -661,6 +666,9 @@ subroutine oda(Time, CS)
661
666
integer :: m
662
667
character (len= 160 ) :: mesg ! The text of an error message
663
668
integer :: yr, mon, day, hr, min, sec
669
+ integer :: isc, iec, jsc, jec
670
+
671
+ isc= CS% model_G% isc; iec= CS% model_G% iec; jsc= CS% model_G% jsc; jec= CS% model_G% jec
664
672
665
673
if ( Time >= CS% Time ) then
666
674
call cpu_clock_begin(id_clock_ensemble_filter)
@@ -700,13 +708,21 @@ subroutine oda(Time, CS)
700
708
if (CS% do_T_bias_adjustment .or. CS% do_S_bias_adjustment) call get_bias_correction_tracer(Time, CS% US, CS)
701
709
702
710
if (CS% do_T_ml_bias_adjustment .or. CS% do_S_ml_bias_adjustment) then
711
+
703
712
call get_ML_bias_correction(Time, CS% US, CS)
713
+
704
714
if (CS% do_T_ml_bias_adjustment) then
705
- CS% Ocean_background_ave% T = CS% Ocean_background_ave% T + CS% T_ml_tend * CS% assim_interval
715
+ CS% Ocean_background_ave% T(isc:iec,jsc:jec,:) = CS% Ocean_background_ave% T(isc:iec,jsc:jec,:) + &
716
+ CS% T_ml_tend(isc:iec,jsc:jec,:) * CS% assim_interval
717
+ call pass_var(CS% Ocean_background_ave% T, CS% model_G% Domain)
706
718
endif
719
+
707
720
if (CS% do_S_ml_bias_adjustment) then
708
- CS% Ocean_background_ave% S = CS% Ocean_background_ave% S + CS% S_ml_tend * CS% assim_interval
721
+ CS% Ocean_background_ave% S(isc:iec,jsc:jec,:) = CS% Ocean_background_ave% S(isc:iec,jsc:jec,:) + &
722
+ CS% S_ml_tend(isc:iec,jsc:jec,:) * CS% assim_interval
723
+ call pass_var(CS% Ocean_background_ave% S, CS% model_G% Domain)
709
724
endif
725
+
710
726
endif
711
727
712
728
! ! switch to global pelist
0 commit comments