@@ -133,6 +133,10 @@ module MOM_forcing_type
133
133
frunoff_glc = > NULL (), & ! < frozen river glacier runoff entering ocean [R Z T-1 ~> kg m-2 s-1]
134
134
seaice_melt = > NULL () ! < snow/seaice melt (positive) or formation (negative) [R Z T-1 ~> kg m-2 s-1]
135
135
136
+ ! carbon content associated with water crossing ocean surface
137
+ real , pointer , dimension (:,:) :: &
138
+ carbon_content_lrunoff = > NULL () ! < carbon content associated with liquid runoff [R Z T-1 ~> kg m-2 s-1]
139
+
136
140
! Integrated water mass fluxes into the ocean, used for passive tracer sources [H ~> m or kg m-2]
137
141
real , pointer , dimension (:,:) :: &
138
142
netMassIn = > NULL (), & ! < Sum of water mass fluxes into the ocean integrated over a
@@ -368,6 +372,7 @@ module MOM_forcing_type
368
372
integer :: id_heat_added = - 1 , id_heat_content_massin = - 1
369
373
integer :: id_hfrainds = - 1 , id_hfrunoffds = - 1
370
374
integer :: id_seaice_melt_heat = - 1
375
+ integer :: id_carbon_content_lrunoff = - 1
371
376
372
377
! global area integrated heat flux diagnostic handles
373
378
integer :: id_total_net_heat_coupler = - 1 , id_total_net_heat_surface = - 1
@@ -1850,6 +1855,11 @@ subroutine register_forcing_type_diags(Time, diag, US, use_temperature, handles,
1850
1855
' W m-2' , conversion= US% QRZ_T_to_W_m2, &
1851
1856
standard_name= ' temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water' )
1852
1857
1858
+ handles% id_carbon_content_lrunoff = register_diag_field(' ocean_model' , ' carbon_content_lrunoff' , &
1859
+ diag% axesT1, Time, ' Carbon content of liquid runoff into ocean' , &
1860
+ ' Kg m-2 s-1' , &
1861
+ standard_name= ' carbon_flux_due_to_runoff' )
1862
+
1853
1863
if (present (use_glc_runoff)) then
1854
1864
handles% id_heat_content_frunoff_glc = register_diag_field(' ocean_model' , ' heat_content_frunoff_glc' , &
1855
1865
diag% axesT1, Time, ' Heat content (relative to 0C) of solid glacier runoff into ocean' , &
@@ -2476,6 +2486,11 @@ subroutine fluxes_accumulate(flux_tmp, fluxes, G, wt2, forces)
2476
2486
wt2* flux_tmp% heat_content_frunoff_glc(i,j)
2477
2487
enddo ; enddo
2478
2488
endif
2489
+ if (associated (fluxes% carbon_content_lrunoff) .and. associated (flux_tmp% carbon_content_lrunoff)) then
2490
+ do j= js,je ; do i= is,ie
2491
+ fluxes% carbon_content_lrunoff(i,j) = wt1* fluxes% carbon_content_lrunoff(i,j) + wt2* flux_tmp% carbon_content_lrunoff(i,j)
2492
+ enddo ; enddo
2493
+ endif
2479
2494
2480
2495
if (associated (fluxes% ustar_shelf) .and. associated (flux_tmp% ustar_shelf)) then
2481
2496
do i= isd,ied ; do j= jsd,jed
@@ -2991,6 +3006,9 @@ subroutine forcing_diagnostics(fluxes_in, sfc_state, G_in, US, time_end, diag, h
2991
3006
endif
2992
3007
endif
2993
3008
3009
+ if ((handles% id_carbon_content_lrunoff > 0 ) .and. associated (fluxes% carbon_content_lrunoff)) &
3010
+ call post_data(handles% id_carbon_content_lrunoff, fluxes% carbon_content_lrunoff, diag)
3011
+
2994
3012
! post diagnostics for boundary heat fluxes ====================================
2995
3013
2996
3014
if ((handles% id_heat_content_lrunoff > 0 ) .and. associated (fluxes% heat_content_lrunoff)) &
@@ -3486,6 +3504,7 @@ subroutine allocate_forcing_by_group(G, fluxes, water, heat, ustar, press, &
3486
3504
call myAlloc(fluxes% latent_frunoff_glc_diag,isd,ied,jsd,jed, heat)
3487
3505
3488
3506
call myAlloc(fluxes% salt_flux,isd,ied,jsd,jed, salt)
3507
+ call myAlloc(fluxes% carbon_content_lrunoff,isd,ied,jsd,jed, .true. )
3489
3508
3490
3509
if (present (heat) .and. present (water)) then ; if (heat .and. water) then
3491
3510
call myAlloc(fluxes% heat_content_cond,isd,ied,jsd,jed, .true. )
@@ -3798,6 +3817,7 @@ subroutine deallocate_forcing_type(fluxes)
3798
3817
if (associated (fluxes% latent_frunoff_diag)) deallocate (fluxes% latent_frunoff_diag)
3799
3818
if (associated (fluxes% latent_frunoff_glc_diag)) deallocate (fluxes% latent_frunoff_glc_diag)
3800
3819
if (associated (fluxes% sens)) deallocate (fluxes% sens)
3820
+ if (associated (fluxes% carbon_content_lrunoff)) deallocate (fluxes% carbon_content_lrunoff)
3801
3821
if (associated (fluxes% heat_added)) deallocate (fluxes% heat_added)
3802
3822
if (associated (fluxes% heat_content_lrunoff)) deallocate (fluxes% heat_content_lrunoff)
3803
3823
if (associated (fluxes% heat_content_frunoff)) deallocate (fluxes% heat_content_frunoff)
0 commit comments