Skip to content

Commit

Permalink
fix(recom): add variable sinking into benthos for Cocco
Browse files Browse the repository at this point in the history
Add sinking coccos into benthos

Missing part of sinking into benthos for coccos is added.
We still assume that it is zero in the namelist.recom.
  • Loading branch information
ogurses committed Sep 26, 2024
1 parent 181a3e5 commit b5d9ac8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
15 changes: 11 additions & 4 deletions src/int_recom/recom_modules.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ module recom_config

#if defined (__3Zoo2Det)
Integer :: izoo2n = 23, izoo2c =24, idetz2n = 25, &
idetz2c = 26, idetz2si = 27, idetz2calc = 28
idetz2c = 26, idetz2si = 27, idetz2calc = 28
integer, dimension(4) :: recom_det2_tracer_id = (/1025, 1026, 1027, 1028/)
#endif

#if defined (__coccos) & defined (__3Zoo2Det)
Integer :: icocn = 29, icocc = 30, icchl = 31
integer, dimension(3) :: recom_cocco_tracer_id = (/1029, 1030, 1031/)
#elif defined (__coccos) & !defined (__3Zoo2Det)
Integer :: icocn = 23, icocc = 24, icchl = 25
Integer :: icocn = 23, icocc = 24, icchl = 25
integer, dimension(3) :: recom_cocco_tracer_id = (/1023, 1024, 1025/)
#endif

#if defined (__coccos) & defined (__3Zoo2Det)
Expand All @@ -49,16 +52,20 @@ module recom_config

!!MB TEST: tracer ids for revised remineralization and sinking in oce_ale_tracer.F90
integer, dimension(8) :: recom_remin_tracer_id = (/1001, 1002, 1003, 1018, 1019, 1022, 1302, 1402/)



integer, dimension(29) :: recom_sinking_tracer_id = (/1007, 1008, 1017, 1021, 1004, 1005, 1020, 1006, &
1013, 1014, 1016, 1015, 1025, 1026, 1027, 1028, &
1029, 1030, 1031, & ! OG Cocco
1308, 1321, 1305, 1320, &
1314, 1408, 1421, 1405, 1420, 1414/)

integer, dimension(8) :: recom_det_tracer_id = (/1007, 1008, 1017, 1021, 1308, 1321, 1408, 1421/)
integer, dimension(8) :: recom_phy_tracer_id = (/1004, 1005, 1020, 1305, 1320, 1405, 1420, 1006/)
integer, dimension(6) :: recom_dia_tracer_id = (/1013, 1014, 1314, 1414, 1016, 1015/)
integer, dimension(3) :: recom_cocco_tracer_id = (/1029, 1030, 1031/)
integer, dimension(4) :: recom_det2_tracer_id = (/1025, 1026, 1027, 1028/)
! integer, dimension(3) :: recom_cocco_tracer_id = (/1029, 1030, 1031/)
! integer, dimension(4) :: recom_det2_tracer_id = (/1025, 1026, 1027, 1028/)

Real(kind=8) :: zero = 0.d0
Integer :: one = 1
Expand Down
32 changes: 24 additions & 8 deletions src/oce_ale_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,13 @@ subroutine ver_sinking_recom_benthos(tr_num,mesh)
if (any(recom_det_tracer_id == tracer_id(tr_num))) Vben = Vdet
if (any(recom_phy_tracer_id == tracer_id(tr_num))) Vben = VPhy
if (any(recom_dia_tracer_id == tracer_id(tr_num))) Vben = VDia
if (any(recom_cocco_tracer_id == tracer_id(tr_num))) Vben = VCocco ! check conditions (#if defined (__coccos)) and add the necessary tracers numbers below OG:
! Adjust iphycalc

#if defined (__coccos)
if(tracer_id(tr_num)==1020) Vben = VCocco !iphycal in case of coccos
#endif

if (allow_var_sinking .and. any(recom_det_tracer_id == tracer_id(tr_num))) then
Vben = Vdet_a * abs(zbar_3d_n(:,n)) + Vben
end if
Expand All @@ -1128,12 +1135,12 @@ subroutine ver_sinking_recom_benthos(tr_num,mesh)
! *******************************************************

#if defined(__3Zoo2Det)
if(tracer_id(tr_num)==1025 .or. & !idetz2n
tracer_id(tr_num)==1026 .or. & !idetz2c
tracer_id(tr_num)==1027 .or. & !idetz2si
tracer_id(tr_num)==1028 ) then !idetz2calc
Vben = VDet_zoo2
endif
if(tracer_id(tr_num)==1025 .or. & !idetz2n
tracer_id(tr_num)==1026 .or. & !idetz2c
tracer_id(tr_num)==1027 .or. & !idetz2si
tracer_id(tr_num)==1028 ) then !idetz2calc
Vben = VDet_zoo2
endif
#endif

Vben= Vben/SecondsPerDay ! conversion [m/d] --> [m/s] (vertical velocity, note that it is positive here)
Expand All @@ -1156,6 +1163,11 @@ subroutine ver_sinking_recom_benthos(tr_num,mesh)
! Particulate Organic Nitrogen
if( tracer_id(tr_num)==1004 .or. & !iphyn
tracer_id(tr_num)==1007 .or. & !idetn
#if defined (__coccos) & defined (__3Zoo2Det)
tracer_id(tr_num)==1029 .or. & !icocn
#elif defined (__coccos) & !defined (__3Zoo2Det)
tracer_id(tr_num)==1023 .or. & !icocn
#endif
tracer_id(tr_num)==1013 ) then !idian
! tracer_id(tr_num)==1013 .or. & !idian
! tracer_id(tr_num)==1025 ) then !idetz2n
Expand All @@ -1177,6 +1189,11 @@ subroutine ver_sinking_recom_benthos(tr_num,mesh)
! Particulate Organic Carbon
if( tracer_id(tr_num)==1005 .or. & !iphyc
tracer_id(tr_num)==1008 .or. & !idetc
#if defined (__coccos) & defined (__3Zoo2Det)
tracer_id(tr_num)==1030 .or. & !icocc
#elif defined (__coccos) & !defined (__3Zoo2Det)
tracer_id(tr_num)==1024 .or. & !icocc
#endif
tracer_id(tr_num)==1014 ) then
! tracer_id(tr_num)==1014 .or. & !idiac
! tracer_id(tr_num)==1026 ) then !idetz2c
Expand Down Expand Up @@ -1211,8 +1228,7 @@ subroutine ver_sinking_recom_benthos(tr_num,mesh)

endif

! Cal
if( tracer_id(tr_num)==1020 .or. & !iphycal
if( tracer_id(tr_num)==1020 .or. & !iphycal ! computed using Vcocco in case of coccos, otherwise Vphy
tracer_id(tr_num)==1021 ) then !idetcal
! tracer_id(tr_num)==1021 .or. & !idetcal
! tracer_id(tr_num)==1028 ) then !idetz2cal
Expand Down

0 comments on commit b5d9ac8

Please sign in to comment.