From a51cda0394b12f3d8ee96bf815b134b54a3505bf Mon Sep 17 00:00:00 2001 From: Melissa Sulprizio Date: Tue, 9 Jan 2024 15:34:38 -0500 Subject: [PATCH 1/2] Add fix to cldj_interface_mod.F90 to avoid floating-point exception in GCHP The following line in GeosCore/cldj_interface_mod.F90 was causing a floating- point exception error in GCHP integration tests: ! Set top of atmosphere relative humidity to 10% of layer below RRR(State_Grid%NZ+1) = RRR(State_Grid%NZ) * 1.d-1 This is resolved by moving the lines for setting RRR to before the loop over the number of layers with clouds. Signed-off-by: Melissa Sulprizio --- GeosCore/cldj_interface_mod.F90 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/GeosCore/cldj_interface_mod.F90 b/GeosCore/cldj_interface_mod.F90 index ff18516f6..dca60d968 100644 --- a/GeosCore/cldj_interface_mod.F90 +++ b/GeosCore/cldj_interface_mod.F90 @@ -483,6 +483,11 @@ 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 humidity from input meteorology field + ! Convert relative humidity [unitless] from percent to fraction + RRR(1:State_Grid%NZ) = State_Met%RH(I,J,1:State_Grid%NZ) / 100.d0 + 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 @@ -522,14 +527,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] !----------------------------------------------------------------- From 326c63cd7bbd26df82dff5bec7a70f5e47afd935 Mon Sep 17 00:00:00 2001 From: Melissa Sulprizio Date: Tue, 9 Jan 2024 16:15:00 -0500 Subject: [PATCH 2/2] Fix comments in cldj_interface_mod.F90 for clarity Signed-off-by: Melissa Sulprizio --- GeosCore/cldj_interface_mod.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GeosCore/cldj_interface_mod.F90 b/GeosCore/cldj_interface_mod.F90 index dca60d968..2408b5321 100644 --- a/GeosCore/cldj_interface_mod.F90 +++ b/GeosCore/cldj_interface_mod.F90 @@ -483,9 +483,11 @@ 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 humidity from input meteorology field - ! Convert relative humidity [unitless] from percent to fraction + ! 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)