Skip to content
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

Add fix to cldj_interface_mod.F90 to avoid floating-point exception in GCHP integration tests #2111

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions GeosCore/cldj_interface_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,13 @@ SUBROUTINE Run_CloudJ( Input_Opt, State_Chm, State_Diag, &
CLDF(1:State_Grid%NZ) = State_Met%CLDF(I,J,1:State_Grid%NZ)
CLDF(State_Grid%NZ+1) = CLDF(State_Grid%NZ)

! Set relative humidity from input meteorology field and convert
! from percent to fraction
RRR(1:State_Grid%NZ) = State_Met%RH(I,J,1:State_Grid%NZ) / 100.d0

! Set top of atmosphere relative humidity to 10% of layer below
RRR(State_Grid%NZ+1) = RRR(State_Grid%NZ) * 1.d-1

! Loop over # layers in cloud-j (layers with clouds)
DO L = 1, LWEPAR

Expand Down Expand Up @@ -522,14 +529,8 @@ SUBROUTINE Run_CloudJ( Input_Opt, State_Chm, State_Diag, &
REFFI(L) = IWP(L) * 0.75d0 * 2.06d0 / ( State_Met%TAUCLI(I,J,L) * 0.917d0 )
ENDIF

! Convert relative humidity [unitless] from percent to fraction
RRR(L) = State_Met%RH(I,J,L) / 100.d0

ENDDO

! Set top of atmosphere relative humidity to 10% of layer below
RRR(State_Grid%NZ+1) = RRR(State_Grid%NZ) * 1.d-1

!-----------------------------------------------------------------
! Compute concentrations per aerosol [g/m2]
!-----------------------------------------------------------------
Expand Down