Skip to content

Commit

Permalink
Merge pull request #27 from MichaelBarryBMT/atm_NP_dep_diags
Browse files Browse the repository at this point in the history
Suggested fixes for atmospheric N and P deposition diagnostics
  • Loading branch information
matthipsey authored Jan 25, 2022
2 parents 51023b0 + 06401de commit 8febd3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/aed_nitrogen.F90
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,7 @@ SUBROUTINE aed_calculate_surface_nitrogen(data,column,layer_idx)
!-----------------------------------------------
! Also store deposition across the atm/water interface as a
! diagnostic variable (mmmol/m2/day).
_DIAG_VAR_S_(data%id_atm_dep) = _DIAG_VAR_S_(data%id_atm_dep) &
+ (_FLUX_VAR_T_(data%id_nox) + _FLUX_VAR_T_(data%id_amm)) * secs_per_day
_DIAG_VAR_S_(data%id_atm_dep) = (_FLUX_VAR_T_(data%id_nox) + _FLUX_VAR_T_(data%id_amm)) * secs_per_day
ENDIF

END SUBROUTINE aed_calculate_surface_nitrogen
Expand Down
10 changes: 7 additions & 3 deletions src/aed_phosphorus.F90
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,13 @@ SUBROUTINE aed_calculate_surface_phosphorus(data,column,layer_idx)
!-----------------------------------------------
! Also store deposition across the atm/water interface as a
! diagnostic variable (mmmol/m2/day).
IF (data%simPO4Adsorption) & !# id_frpads is not set unless simPO4Adsorption is true
_DIAG_VAR_S_(data%id_atm_dep) = _DIAG_VAR_S_(data%id_atm_dep) &
+ (_FLUX_VAR_T_(data%id_frp) + _FLUX_VAR_T_(data%id_frpads)) * secs_per_day
IF (data%simPO4Adsorption) THEN !# id_frpads is not set unless simPO4Adsorption is true
_DIAG_VAR_S_(data%id_atm_dep) = (_FLUX_VAR_T_(data%id_frp) + _FLUX_VAR_T_(data%id_frpads)) * secs_per_day
ELSE
_DIAG_VAR_S_(data%id_atm_dep) = _FLUX_VAR_T_(data%id_frp) * secs_per_day
END IF


ENDIF

END SUBROUTINE aed_calculate_surface_phosphorus
Expand Down

0 comments on commit 8febd3c

Please sign in to comment.