@@ -3228,53 +3228,53 @@ subroutine generic_WOMBATlite_update_from_source(tracer_list, Temp, Salt, &
3228
3228
! the bottom layers in MOM6 are usually "vanished" layers. This approach is based on what is done
3229
3229
! in COBALT v3.
3230
3230
do j = jsc,jec; do i = isc,iec;
3231
- k_bot = 0
3232
- dzt_bot = 0. 0
3233
- do k = grid_kmt(i,j), 1 , - 1
3234
- if (dzt_bot .lt. wombat % bottom_thickness) then
3235
- k_bot = k
3236
- dzt_bot = dzt_bot + dzt(i,j,k) ! [m]
3237
- wombat % sedtemp(i,j) = wombat % sedtemp(i,j) + Temp(i,j,k) * dzt(i,j,k) ! [m*degC ]
3238
- wombat% sedsalt (i,j) = wombat% sedsalt (i,j) + Salt (i,j,k) * dzt(i,j,k) ! [m*psu ]
3239
- wombat% sedno3 (i,j) = wombat% sedno3 (i,j) + wombat % f_no3 (i,j,k) * dzt(i,j,k) ! [m*mol/kg ]
3240
- wombat% seddic (i,j) = wombat% seddic (i,j) + wombat% f_dic (i,j,k) * dzt(i,j,k) ! [m*mol/kg]
3241
- wombat% sedalk (i,j) = wombat% sedalk (i,j) + wombat% f_alk (i,j,k) * dzt(i,j,k) ! [m*mol/kg]
3242
- wombat% sedhtotal (i,j) = wombat% sedhtotal (i,j) + wombat% htotal (i,j,k) * dzt(i,j,k) ! [m*mol/kg]
3243
- endif
3244
- enddo
3245
- ! Subtract off overshoot
3246
- dzt_bot_os = dzt_bot - wombat % bottom_thickness
3247
- wombat % sedtemp(i,j) = wombat % sedtemp(i,j) - Temp(i,j,k_bot) * dzt_bot_os ! [m*degC]
3248
- wombat% sedsalt (i,j) = wombat% sedsalt (i,j) - Salt (i,j,k_bot) * dzt_bot_os ! [m*psu ]
3249
- wombat% sedno3 (i,j) = wombat% sedno3 (i,j) - wombat % f_no3 (i,j,k_bot) * dzt_bot_os ! [m*mol/kg ]
3250
- wombat% seddic (i,j) = wombat% seddic (i,j) - wombat% f_dic (i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
3251
- wombat% sedalk (i,j) = wombat% sedalk (i,j) - wombat% f_alk (i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
3252
- wombat% sedhtotal (i,j) = wombat% sedhtotal (i,j) - wombat% htotal (i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
3253
- ! Convert to mol/kg
3254
- wombat % sedtemp(i,j) = wombat % sedtemp(i,j) / wombat % bottom_thickness ! [degC]
3255
- wombat% sedsalt (i,j) = wombat% sedsalt (i,j) / wombat% bottom_thickness ! [psu ]
3256
- wombat% sedno3 (i,j) = wombat% sedno3 (i,j) / wombat% bottom_thickness ! [mol/kg ]
3257
- wombat% seddic (i,j) = wombat% seddic (i,j) / wombat% bottom_thickness ! [mol/kg]
3258
- wombat% sedalk (i,j) = wombat% sedalk (i,j) / wombat% bottom_thickness ! [mol/kg]
3259
- wombat% sedhtotal (i,j) = wombat% sedhtotal (i,j) / wombat% bottom_thickness ! [mol/kg]
3260
-
3261
- ! Set seddep as full depth minus half the bottom thickness and sedmask from bottom layer
3262
- k = grid_kmt(i,j)
3263
- if (k .gt. 0 ) then
3231
+ if (grid_kmt(i,j) .gt. 0 ) then
3232
+ k_bot = 0
3233
+ dzt_bot = 0.0
3234
+ do k = grid_kmt(i,j), 1 , - 1
3235
+ if (dzt_bot .lt. wombat % bottom_thickness) then
3236
+ k_bot = k
3237
+ dzt_bot = dzt_bot + dzt(i,j,k) ! [m]
3238
+ wombat% sedtemp (i,j) = wombat% sedtemp (i,j) + Temp (i,j,k) * dzt(i,j,k) ! [m*degC ]
3239
+ wombat% sedsalt (i,j) = wombat% sedsalt (i,j) + Salt (i,j,k) * dzt(i,j,k) ! [m*psu ]
3240
+ wombat% sedno3 (i,j) = wombat% sedno3 (i,j) + wombat% f_no3 (i,j,k) * dzt(i,j,k) ! [m*mol/kg]
3241
+ wombat% seddic (i,j) = wombat% seddic (i,j) + wombat% f_dic (i,j,k) * dzt(i,j,k) ! [m*mol/kg]
3242
+ wombat% sedalk (i,j) = wombat% sedalk (i,j) + wombat% f_alk (i,j,k) * dzt(i,j,k) ! [m*mol/kg]
3243
+ wombat % sedhtotal(i,j) = wombat % sedhtotal(i,j) + wombat % htotal(i,j,k) * dzt(i,j,k) ! [m*mol/kg]
3244
+ endif
3245
+ enddo
3246
+ ! Subtract off overshoot
3247
+ dzt_bot_os = dzt_bot - wombat % bottom_thickness
3248
+ wombat% sedtemp (i,j) = wombat% sedtemp (i,j) - Temp (i,j,k_bot) * dzt_bot_os ! [m*degC ]
3249
+ wombat% sedsalt (i,j) = wombat% sedsalt (i,j) - Salt (i,j,k_bot) * dzt_bot_os ! [m*psu ]
3250
+ wombat% sedno3 (i,j) = wombat% sedno3 (i,j) - wombat% f_no3 (i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
3251
+ wombat% seddic (i,j) = wombat% seddic (i,j) - wombat% f_dic (i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
3252
+ wombat% sedalk (i,j) = wombat% sedalk (i,j) - wombat% f_alk (i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
3253
+ wombat % sedhtotal(i,j) = wombat % sedhtotal(i,j) - wombat % htotal(i,j,k_bot) * dzt_bot_os ! [m* mol/kg]
3254
+ ! Convert to mol/kg
3255
+ wombat% sedtemp (i,j) = wombat% sedtemp (i,j) / wombat% bottom_thickness ! [degC ]
3256
+ wombat% sedsalt (i,j) = wombat% sedsalt (i,j) / wombat% bottom_thickness ! [psu ]
3257
+ wombat% sedno3 (i,j) = wombat% sedno3 (i,j) / wombat% bottom_thickness ! [mol/kg]
3258
+ wombat% seddic (i,j) = wombat% seddic (i,j) / wombat% bottom_thickness ! [mol/kg]
3259
+ wombat% sedalk (i,j) = wombat% sedalk (i,j) / wombat% bottom_thickness ! [mol/kg]
3260
+ wombat % sedhtotal(i,j) = wombat % sedhtotal(i,j) / wombat % bottom_thickness ! [mol/kg]
3261
+
3262
+ ! Set seddep as full depth minus half the bottom thickness and sedmask from bottom layer
3263
+ k = grid_kmt(i,j)
3264
3264
wombat% seddep(i,j) = max (0.0 , wombat% zw(i,j,k) - (wombat% bottom_thickness / 2.0 ))
3265
3265
wombat% sedmask(i,j) = grid_tmask(i,j,k)
3266
- endif
3267
3266
3268
- ! pjb: Sum the water column concentration of DIC and the organic carbon content of the
3269
- ! sediment to approximate the interstitial (i.e., porewater) DIC concentration.
3270
- ! We assume that the organic carbon content of the sediment (p_det_sediment) in mol/m2 is
3271
- ! relevant over one meter, and therefore can be automatically converted to mol/m3 and then
3272
- ! subsequently converted through the mol/kg using Rho_0. With this assumption these arrays
3273
- ! can be added together.
3274
- ! We add these arrays together to simulate the reducing conditions of organic-rich sediments,
3275
- ! and to calculate a lower omega for calcite, which ensures greater rates of dissolution of
3276
- ! CaCO3 within the sediment as organic matter accumulates.
3277
- wombat% seddic(i,j) = wombat% seddic(i,j) + wombat% p_det_sediment(i,j,1 ) / wombat% Rho_0
3267
+ ! pjb: Sum the water column concentration of DIC and the organic carbon content of the
3268
+ ! sediment to approximate the interstitial (i.e., porewater) DIC concentration.
3269
+ ! We assume that the organic carbon content of the sediment (p_det_sediment) in mol/m2 is
3270
+ ! relevant over one meter, and therefore can be automatically converted to mol/m3 and then
3271
+ ! subsequently converted through the mol/kg using Rho_0. With this assumption these arrays
3272
+ ! can be added together.
3273
+ ! We add these arrays together to simulate the reducing conditions of organic-rich sediments,
3274
+ ! and to calculate a lower omega for calcite, which ensures greater rates of dissolution of
3275
+ ! CaCO3 within the sediment as organic matter accumulates.
3276
+ wombat% seddic(i,j) = wombat% seddic(i,j) + wombat% p_det_sediment(i,j,1 ) / wombat% Rho_0
3277
+ endif
3278
3278
enddo ; enddo
3279
3279
3280
3280
call FMS_ocmip2_co2calc(CO2_dope_vec, wombat% sedmask(:,:), &
0 commit comments