-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output sea flux species dry deposition velocity with DryDep collection #2606
base: dev/14.6.0
Are you sure you want to change the base?
Changes from all commits
1c31f0c
22d647a
ec3a08d
d9ee2e2
c7cfcfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4563,6 +4563,9 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
REAL(fp), TARGET :: dflx(State_Grid%NX, & | ||
State_Grid%NY, & | ||
State_Chm%nAdvect ) | ||
REAL(fp), TARGET :: dvel(State_Grid%NX, & | ||
State_Grid%NY, & | ||
State_Chm%nAdvect ) | ||
|
||
! Pointers and Objects | ||
REAL(f4), POINTER :: Ptr2D(:,:) => NULL() | ||
|
@@ -4581,6 +4584,7 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
RC = GC_SUCCESS | ||
dflx = 0.0_fp | ||
eflx = 0.0_fp | ||
dvel = 0.0_fp | ||
colEflx = 0.0_fp | ||
ThisSpc => NULL() | ||
errMsg = '' | ||
|
@@ -4777,6 +4781,9 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
dflx(I,J,NA) = dflx(I,J,NA) + ( dep & | ||
* State_Chm%Species(NA)%Conc(I,J,1) & | ||
/ (AIRMW / ThisSpc%MW_g) ) | ||
! Get dry deposition velocity in cm/s: | ||
dvel(I,J,NA) = dvel(I,J,NA) + ( dep * State_Met%BXHEIGHT(I,J,1) * & | ||
1.0e+2_fp ) | ||
ENDIF | ||
ENDIF | ||
ENDDO ! I | ||
|
@@ -4838,6 +4845,9 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
* State_Chm%Species(N)%Conc(I,J,1) & | ||
/ ( AIRMW / ThisSpc%MW_g ) | ||
|
||
! Get dry deposition velocity in cm/s: | ||
dvel(I,J,N) = dvel(I,J,N) + ( State_Chm%DryDepFreq(I,J,ND) * & | ||
State_Met%BXHEIGHT(I,J,1) * 1.0e+2_fp ) | ||
|
||
IF ( Input_Opt%ITS_A_MERCURY_SIM .and. ThisSpc%Is_Hg0 ) THEN | ||
|
||
|
@@ -4858,8 +4868,10 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
|
||
! Free species database pointer | ||
ThisSpc => NULL() | ||
|
||
ENDDO | ||
|
||
|
||
!===================================================================== | ||
! Convert DFLX from 1/s to kg/m2/s | ||
! | ||
|
@@ -4891,12 +4903,11 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
!===================================================================== | ||
! Defining Satellite Diagnostics | ||
!===================================================================== | ||
|
||
! Define emission satellite diagnostics | ||
IF ( State_Diag%Archive_SatDiagnColEmis ) THEN | ||
DO S = 1, State_Diag%Map_SatDiagnColEmis%nSlots | ||
N = State_Diag%Map_SatDiagnColEmis%slot2id(S) | ||
State_Diag%SatDiagnColEmis(:,:,S) = colEflx(:,:,N) | ||
State_Diag%SatDiagnColEmis(I,J,S) = colEflx(I,J,N) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a bug fix we should note in the changelog. These diagnostics must have been many times larger than they should be before this fix. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lizziel: We can test this to make sure we get zero-diff output for this diagnostic |
||
ENDDO | ||
ENDIF | ||
|
||
|
@@ -4907,7 +4918,7 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
IF ( State_Diag%Archive_SatDiagnSurfFlux ) THEN | ||
DO S = 1, State_Diag%Map_SatDiagnSurfFlux%nSlots | ||
N = State_Diag%Map_SatDiagnSurfFlux%slot2id(S) | ||
State_Diag%SatDiagnSurfFlux(:,:,S) = State_Chm%SurfaceFlux(:,:,N) | ||
State_Diag%SatDiagnSurfFlux(I,J,S) = State_Chm%SurfaceFlux(I,J,N) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. Note that both of these diagnostics have bugs that are now fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changelog fixed in commit d9ee2e2. |
||
ENDDO | ||
ENDIF | ||
|
||
|
@@ -4951,7 +4962,7 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
ENDIF | ||
|
||
ENDDO | ||
ENDDO | ||
ENDDO | ||
!$OMP END PARALLEL DO | ||
|
||
!### Uncomment for debug output | ||
|
@@ -4970,7 +4981,9 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
! so we don't need to do any further special handling. | ||
!======================================================================= | ||
IF ( Input_Opt%LGTMM .or. Input_Opt%LSOILNOX .or. & | ||
State_Diag%Archive_DryDepMix .or. State_Diag%Archive_DryDep ) THEN | ||
State_Diag%Archive_DryDepMix .or. State_Diag%Archive_DryDep .or. & | ||
State_Diag%Archive_DryDepVel .or. & | ||
State_Diag%Archive_SatDiagnDryDepVel ) THEN | ||
|
||
! Loop over only the drydep species | ||
! If drydep is turned off, nDryDep=0 and the loop won't execute | ||
|
@@ -5016,6 +5029,36 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
ENDIF | ||
ENDIF | ||
|
||
!----------------------------------------------------------------- | ||
! HISTORY: Update dry deposition velocity [cm/s] | ||
! | ||
! Here we save the dry deposition velocities (stored in the | ||
! DVEL array) into the DryDepVel and SatDiagnDryDepVel History | ||
! diagnostics. This is necessary in order to capture the | ||
! air-sea deposition velocity computed by the HEMCO "SeaFlux" | ||
! extension for certain species. | ||
! | ||
! When using the full PBL mixing option (aka TURBDAY), the | ||
! DryDepVel and SatDiagnDryDepVel diagnostics will be archived | ||
! in drydep_mod.F90 instead. | ||
!----------------------------------------------------------------- | ||
|
||
! Dry deposition velocity [cm/s] | ||
IF ( State_Diag%Archive_DryDepVel ) THEN | ||
S = State_Diag%Map_DryDepVel%id2slot(ND) | ||
IF ( S > 0 ) THEN | ||
State_Diag%DryDepVel(:,:,S) = dvel(:,:,N) | ||
ENDIF | ||
ENDIF | ||
|
||
! Satellite diagnostic dry deposition velocity (cm/s): | ||
IF ( State_Diag%Archive_SatDiagnDryDepVel ) THEN | ||
S = State_Diag%Map_SatDiagnDryDepVel%id2slot(ND) | ||
IF ( S > 0 ) THEN | ||
State_Diag%SatDiagnDryDepVel(:,:,S) = dvel(:,:,N) | ||
ENDIF | ||
ENDIF | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I noted above, putting these here would only work for non-local mixing. Full mixing does not call this routine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
!----------------------------------------------------------------- | ||
! If Soil NOx is turned on, then call SOIL_DRYDEP to | ||
! archive dry deposition fluxes for nitrogen species | ||
|
@@ -5039,6 +5082,7 @@ SUBROUTINE Compute_Sflx_for_Vdiff( Input_Opt, State_Chm, State_Diag, & | |
ThisSpc => NULL() | ||
ENDDO | ||
!$OMP END PARALLEL DO | ||
|
||
ENDIF | ||
|
||
!======================================================================= | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing these diagnostics from
drydep_mod
and only setting incompute_sflx_for_vdiff
means they will always be zero if using full mixing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should now be fixed in commits d9ee2e2 and c7cfcfa.