Skip to content

Commit

Permalink
Replay import patch for ozone
Browse files Browse the repository at this point in the history
  • Loading branch information
wmputman committed Jan 21, 2024
1 parent 6ea78fd commit d2cb63e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ESMF/GOCART_GridComp/O3_GridComp/O3_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ SUBROUTINE O3_GridCompRun ( gcO3, w_c, impChem, expChem, &
REAL, ALLOCATABLE :: dryDepFreq(:,:)
REAL, ALLOCATABLE :: dO3(:,:)
INTEGER, ALLOCATABLE :: oro(:,:)
REAL, ALLOCATABLE :: tropPa(:,:)

REAL, ALLOCATABLE :: lai2D(:,:)
CHARACTER(LEN= 3) :: laiID
Expand Down Expand Up @@ -889,7 +890,8 @@ SUBROUTINE O3_GridCompRun ( gcO3, w_c, impChem, expChem, &

! Repair bad tropopause pressures, if any exist
! ---------------------------------------------
CALL Chem_UtilTroppFixer(i2, j2, tropp, VERBOSE=.TRUE., RC=status)
ALLOCATE(tropPa(i1:i2,j1:j2), _STAT)
CALL Chem_UtilTroppFixer(i2, j2, tropp, VERBOSE=.TRUE., NEWTROPP=tropPa, RC=status)
VERIFY_(status)

! Perform parameterized production and loss chemistry
Expand Down Expand Up @@ -1288,13 +1290,14 @@ SUBROUTINE doProdLoss(rc)
mask = 0

DO k=1,km
WHERE(plPa(:,:,k) <= tropp(:,:)) mask(:,:,k) = 1
WHERE(tropp(:,:) == MAPL_UNDEF) mask(:,:,k) = 0
WHERE(plPa(:,:,k) <= tropPa(:,:)) mask(:,:,k) = 1
WHERE(tropPa(:,:) == MAPL_UNDEF) mask(:,:,k) = 0
END DO

n = w_c%reg%i_O3
WHERE(mask == 1) w_c%qa(n)%data3d = (w_c%qa(n)%data3d + cdt*Pi)/(1.00 + cdt*Li)

DEALLOCATE(tropPa, _STAT)
DEALLOCATE(mask, STAT=status)
VERIFY_(status)
DEALLOCATE(Pclim, STAT=status)
Expand Down

0 comments on commit d2cb63e

Please sign in to comment.