Skip to content

Commit

Permalink
Merge branch 'feature/SatDiagnUpdates' of ssh://github.com/jdshutter/…
Browse files Browse the repository at this point in the history
…geos-chem into dev+alpha.4

This merge brings the Satellite netCDF diagnostics of Joshua Shutter
(cf geoschem/geos-chem PR #1134) into the 14.0.0 development branch
of GEOS-Chem.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed May 20, 2022
2 parents 78e19dd + 93b696f commit 2f4403b
Show file tree
Hide file tree
Showing 9 changed files with 2,207 additions and 189 deletions.
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ Viral Shah
Jingyuan Shao
Lu Shen
Tomas Sherwen
Joshua Shutter
Sam Silva
Nicole Smith-Downey
Anne Laerke Soerensen
Expand Down
26 changes: 14 additions & 12 deletions GeosCore/diag51_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ MODULE DIAG51_MOD
INTEGER :: IU_ND51

! Arrays
INTEGER, ALLOCATABLE :: GOOD(:)
INTEGER, ALLOCATABLE :: GOOD_CT(:)
INTEGER, ALLOCATABLE :: COUNT_CHEM3D(:,:,:)
REAL(fp), ALLOCATABLE :: GOOD(:)
REAL(fp), ALLOCATABLE :: GOOD_CT(:)
REAL(fp), ALLOCATABLE :: COUNT_CHEM3D(:,:,:)
REAL(fp),ALLOCATABLE :: Q(:,:,:,:)

CONTAINS
Expand Down Expand Up @@ -295,7 +295,7 @@ SUBROUTINE GET_LOCAL_TIME( Input_Opt, State_Grid )
! GOOD indicates which boxes have local times between HR1 and HR2
IF ( LT >= Input_Opt%ND51_HR1 .and. &
LT <= Input_Opt%ND51_HR2 ) THEN
GOOD(I) = 1
GOOD(I) = 1e+0_fp
ENDIF
ENDDO

Expand Down Expand Up @@ -551,9 +551,11 @@ SUBROUTINE ACCUMULATE_DIAG51( Input_Opt, State_Chm, &
!--------------------------------------

! Accumulate data
Q(X,Y,K,W) = Q(X,Y,K,W) + &
( Spc(id_OH)%Conc(I,J,L) * GOOD(X) ) * &
( State_Met%AIRDEN(I,J,L) * CONV_OH )
! NOTE: 1.0e+3_fp added by for correct unit conversion
! -- Joshua Sutter + Bob Yantosca (20 May 2022)
Q(X,Y,K,W) = Q(X,Y,K,W) + &
( State_Chm%Species(I,J,L,id_OH) * GOOD(X) ) * &
( State_Met%AIRDEN(I,J,L) * CONV_OH * 1.0e+3_fp)


ELSE IF ( N == 502 .and. IS_NOy ) THEN
Expand Down Expand Up @@ -1083,7 +1085,7 @@ SUBROUTINE ACCUMULATE_DIAG51( Input_Opt, State_Chm, &
ENDDO
!$OMP END PARALLEL DO

GOOD(:) = 0
GOOD(:) = 0e+0_fp

ENDIF

Expand Down Expand Up @@ -1942,22 +1944,22 @@ SUBROUTINE INIT_DIAG51( Input_Opt, State_Grid, RC )
! Array denoting where LT is between HR1 and HR2
ALLOCATE( GOOD( State_Grid%NX ), STAT=AS )
IF ( AS /= 0 ) CALL ALLOC_ERR( 'GOOD' )
GOOD = 0
GOOD = 0e+0_fp

! Counter of "good" times per day at each grid box
ALLOCATE( GOOD_CT( ND51_NI ), STAT=AS )
IF ( AS /= 0 ) CALL ALLOC_ERR( 'GOOD_CT' )
GOOD_CT = 0
GOOD_CT = 0e+0_fp

! Accumulating array
ALLOCATE( Q( ND51_NI, ND51_NJ, ND51_NL, Input_Opt%N_ND51),STAT=AS)
IF ( AS /= 0 ) CALL ALLOC_ERR( 'Q' )
Q = 0d0
Q = 0e+0_fp

! Accumulating array
ALLOCATE( COUNT_CHEM3D( ND51_NI, ND51_NJ, ND51_NL ), STAT=AS )
IF ( AS /= 0 ) CALL ALLOC_ERR( 'COUNT_CHEM3D' )
COUNT_CHEM3D = 0
COUNT_CHEM3D = 0e+0_fp

END SUBROUTINE INIT_DIAG51
!EOC
Expand Down
Loading

0 comments on commit 2f4403b

Please sign in to comment.