Skip to content

Commit

Permalink
Merge pull request #971 from sergeynk/hddm3d_fix
Browse files Browse the repository at this point in the history
Fix for 2nd order DDM-3D and deposition sensitivity output routine
  • Loading branch information
fisidi authored May 18, 2023
2 parents 17ce8e2 + a274118 commit b39c238
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CCTM/src/ddm3d/DDM3D_CHEM.F
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ Subroutine SOLVE_DDM3D_CHEM( C,R,L,CHEMSTEP,OLD2NEW,NEW2OLD )
END DO
C Added by A.Digar
DO S = 1, NUMB_MECH_SPC
PROD(S) = 0.0
PRD(S) = 0.0
J = JOLD2NEW(S,1)
SOLD(J) = SENGRID( C, R, L, NP, CGRID_INDEX(S) )
IF (ABS(SOLD( J )) .LT. 1.e-25 ) SOLD(J) = 0.0
Expand Down
2 changes: 1 addition & 1 deletion CCTM/src/ddm3d/DDM3D_DEFN.F
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Module DDM3D_DEFN

c Emissisons module variables
Integer, Allocatable, Save :: S_NSTREAMS( : ) ! Number of emissions streams per parameter
Character( 16 ), Allocatable, Save :: S_STREAMLBL( :,: ) ! Emissions stream names per parameter (max = 99)
Character( 32 ), Allocatable, Save :: S_STREAMLBL( :,: ) ! Emissions stream names per parameter (max = 99)
Integer, Allocatable, Save :: S_NRGN( : ) ! Number of emissions streams per parameter
Character( 16 ), Allocatable, Save :: S_RGNLBL( :,: ) ! Emissions stream names per parameter (max = 99)
Character( 16 ), Allocatable, Save :: S_SPCLIST( :,: ) ! User-specified species list
Expand Down
9 changes: 6 additions & 3 deletions CCTM/src/vdiff/acm2_m3dry/vdiffproc.F
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ SUBROUTINE VDIFF ( CGRID, JDATE, JTIME, TSTEP )
INTEGER MDATE, MTIME, MSTEP ! internal simulation date&time
CHARACTER(LEN=8), PARAMETER :: NAME_NH3_EMIS = 'NH3_Emis'
CHARACTER(LEN=8), PARAMETER :: NAME_NH3_FLUX = 'NH3_Flux'
CHARACTER(LEN=16) :: SPCBASE

#ifdef isam
REAL NH3_SUM
Expand Down Expand Up @@ -549,7 +550,7 @@ END SUBROUTINE SA_OPWDDEP

#ifdef sens
IF ( .NOT. OPEN3( CTM_SDRYDEP_1, FSNONIO, PNAME ) ) THEN
XMSG = 'Could not open ' // TRIM(CTM_SDRYDEP_1`)
XMSG = 'Could not open ' // TRIM(CTM_SDRYDEP_1)
CALL M3EXIT( PNAME, JDATE, JTIME, XMSG, XSTAT1 )
END IF
#endif
Expand Down Expand Up @@ -758,14 +759,16 @@ END SUBROUTINE SA_OPWDDEP
C WT - write out dry deposition sensitivities
DO V = 1, N_SPC_DDEP
S = DD2DV( V )
SPCNAME = DDEP_SPC( V )( 1:12 ) ! <- these lines have to
SPCBASE = DDEP_SPC( V )( 1:12 ) ! <- these lines have to
! WRITE( LOGDEV,'(A)')'DDEP_SPC value: ' // TRIM( SPCBASE )
DO NP = 1, NPMAX
SPCNAME = TRIM( SPCNAME ) //'_' // SEN_PAR( NP ) ! <- match what is in opddep.F
SPCNAME = TRIM( SPCBASE ) //'_' // SEN_PAR( NP ) ! <- match what is in opddep.F
DO R = 1, NROWS
DO C = 1, NCOLS
WRDD( C,R ) = S_DDEP( S, C, R, NP )
ENDDO
ENDDO
! WRITE( LOGDEV,'(A)')'WRITE3D for ' // TRIM( SPCNAME )

IF ( .NOT. WRITE3( CTM_SDRYDEP_1, SPCNAME,
& MDATE, MTIME, WRDD ) ) THEN
Expand Down

0 comments on commit b39c238

Please # to comment.