@@ -136,11 +136,13 @@ module MOM_oda_driver_mod
136
136
logical :: do_T_bias_adjustment ! < If true, use spatio-temporally varying climatological tendency
137
137
! ! adjustment for Temperature and Salinity
138
138
logical :: do_S_bias_adjustment ! < If true, use spatio-temporally varying climatological tendency
139
- real , dimension (2 ) :: bias_adjustment_multiplier ! < A scaling for the bias adjustment
139
+ real :: T_bias_adjustment_multiplier ! < A scaling for the bias adjustment
140
+ real :: S_bias_adjustment_multiplier ! < A scaling for the bias adjustment
140
141
logical :: do_T_ml_bias_adjustment ! < If true, use machine learning-trained tendency
141
142
! ! adjustment for Temperature and Salinity
142
143
logical :: do_S_ml_bias_adjustment ! < If true, use machine learning-trained tendency
143
- real , dimension (2 ) :: ml_bias_adjustment_multiplier ! < A scaling for the bias adjustment
144
+ real :: T_ml_bias_adjustment_multiplier ! < A scaling for the bias adjustment
145
+ real :: S_ml_bias_adjustment_multiplier ! < A scaling for the bias adjustment
144
146
integer :: assim_method ! < Method: NO_ASSIM,EAKF_ASSIM or OI_ASSIM
145
147
integer :: ensemble_size ! < Size of the ensemble
146
148
integer :: ensemble_id = 0 ! < id of the current ensemble member
@@ -262,8 +264,13 @@ subroutine init_oda(Time, G, GV, US, diag_CS, CS)
262
264
" If true, add a spatio-temporally varying climatological adjustment " // &
263
265
" to salinity." , &
264
266
default= .false. )
265
- if (CS% do_T_bias_adjustment .or. CS% do_S_bias_adjustment) then
266
- call get_param(PF, mdl, " TRACER_ADJUSTMENT_FACTOR" , CS% bias_adjustment_multiplier, &
267
+ if (CS% do_T_bias_adjustment) then
268
+ call get_param(PF, mdl, " TEMP_ADJUSTMENT_FACTOR" , CS% T_bias_adjustment_multiplier, &
269
+ " A multiplicative scaling factor for the climatological tracer tendency adjustment " , &
270
+ units= " nondim" , default= 1.0 )
271
+ endif
272
+ if (CS% do_S_bias_adjustment) then
273
+ call get_param(PF, mdl, " SALT_ADJUSTMENT_FACTOR" , CS% S_bias_adjustment_multiplier, &
267
274
" A multiplicative scaling factor for the climatological tracer tendency adjustment " , &
268
275
units= " nondim" , default= 1.0 )
269
276
endif
@@ -275,8 +282,13 @@ subroutine init_oda(Time, G, GV, US, diag_CS, CS)
275
282
" If true, add a machine learning-trained adjustment " // &
276
283
" to salinity." , &
277
284
default= .false. )
278
- if (CS% do_T_ml_bias_adjustment .or. CS% do_S_ml_bias_adjustment) then
279
- call get_param(PF, mdl, " ML_TRACER_ADJUSTMENT_FACTOR" , CS% ml_bias_adjustment_multiplier, &
285
+ if (CS% do_T_ml_bias_adjustment) then
286
+ call get_param(PF, mdl, " ML_TEMP_ADJUSTMENT_FACTOR" , CS% T_ml_bias_adjustment_multiplier, &
287
+ " A multiplicative scaling factor for the machine learning tracer tendency adjustment " , &
288
+ units= " nondim" , default= 1.0 )
289
+ endif
290
+ if (CS% do_S_ml_bias_adjustment) then
291
+ call get_param(PF, mdl, " ML_SALT_ADJUSTMENT_FACTOR" , CS% S_ml_bias_adjustment_multiplier, &
280
292
" A multiplicative scaling factor for the machine learning tracer tendency adjustment " , &
281
293
units= " nondim" , default= 1.0 )
282
294
endif
@@ -774,8 +786,8 @@ subroutine get_bias_correction_tracer(Time, US, CS)
774
786
enddo
775
787
enddo
776
788
777
- CS% T_bc_tend = T_bias * CS% bias_adjustment_multiplier( 1 )
778
- CS% S_bc_tend = S_bias * CS% bias_adjustment_multiplier( 2 )
789
+ CS% T_bc_tend = T_bias * CS% T_bias_adjustment_multiplier
790
+ CS% S_bc_tend = S_bias * CS% S_bias_adjustment_multiplier
779
791
780
792
call pass_var(CS% T_bc_tend, CS% domains(CS% ensemble_id))
781
793
call pass_var(CS% S_bc_tend, CS% domains(CS% ensemble_id))
@@ -829,14 +841,11 @@ subroutine get_ML_bias_correction(Time, US, CS)
829
841
! ! Call inference subroutine with the concatenated vector
830
842
call oda_ml_inference(CS% ml_config, CS% ml_data)
831
843
832
- CS% T_ml_tend(i,j,:) = CS% ml_data% T_inc
833
- CS% S_ml_tend(i,j,:) = CS% ml_data% S_inc
844
+ CS% T_ml_tend(i,j,:) = CS% ml_data% T_inc * CS % T_ml_bias_adjustment_multiplier
845
+ CS% S_ml_tend(i,j,:) = CS% ml_data% S_inc * CS % S_ml_bias_adjustment_multiplier
834
846
endif
835
847
enddo ; enddo
836
848
837
- CS% T_ml_tend = CS% T_ml_tend * CS% ml_bias_adjustment_multiplier(1 )
838
- CS% S_ml_tend = CS% S_ml_tend * CS% ml_bias_adjustment_multiplier(2 )
839
-
840
849
call pass_var(CS% T_ml_tend, CS% domains(CS% ensemble_id))
841
850
call pass_var(CS% S_ml_tend, CS% domains(CS% ensemble_id))
842
851
0 commit comments