Skip to content

Commit

Permalink
Now use SUNCOSmid as proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmielin committed May 6, 2022
1 parent 8b31bfb commit 6cd34a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 6 additions & 1 deletion GeosCore/fullchem_mod.F90
Expand Up @@ -1211,7 +1211,12 @@ SUBROUTINE Do_FullChem( Input_Opt, State_Chm, State_Diag, &
! JNO2 ranges from 0 to 0.02 and is order ~ 1e-4 at the terminator. We set this threshold
! to be slightly relaxed so it captures the terminator, but this needs some
! tweaking.
IF(ZPJ(L,RXN_NO2,I,J) .eq. 0.0_fp) THEN
!
! For some reason, RXN_NO2 as a proxy fails to propagate the sunset terminator
! even though all diagnostics seem fine, and after a while only the OH scheme applies.
! Use SUNCOSmid as a proxy to fix this. (hplin, 4/20/22)
! IF(ZPJ(L,RXN_NO2,I,J) .eq. 0.0_fp) THEN
IF(State_Met%SUNCOSmid(I,J) .le. -0.1391731e+0_fp) THEN
ICNTRL(10) = ind_NO2 ! NO2 is nighttime target species.
RCNTRL(10) = Input_Opt%AUTOREDUCE_TUNING_NO2
ENDIF
Expand Down
5 changes: 1 addition & 4 deletions KPP/fullchem/gckpp_Integrator.F90
Expand Up @@ -429,10 +429,7 @@ SUBROUTINE Rosenbrock(N,Y,Tstart,Tend, &
Autoreduce = .false.
ENDIF
!~~~> Auto-reduction threshold ratio (only if ICNTRL(10) is not zero)
AR_thr_ratio = 0.001_dp
IF (RCNTRL(10) > ZERO) THEN
AR_thr_ratio = RCNTRL(10)
ENDIF
AR_thr_ratio = RCNTRL(10)
!~~~> CALL Auto-reducing Rosenbrock method
IF ( Autoreduce .and. .not. Autoreduce_Append ) THEN
! ros_yIntegrator is the aggressively micro-optimized revision by Haipeng Lin.
Expand Down

0 comments on commit 6cd34a1

Please sign in to comment.