Skip to content

Commit

Permalink
Read aerosol optics files on all threads
Browse files Browse the repository at this point in the history
Signed-off-by: Lizzie Lundgren <[email protected]>
  • Loading branch information
lizziel committed Mar 1, 2024
1 parent 7870b0f commit 6116efa
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions GeosCore/photolysis_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -916,16 +916,8 @@ SUBROUTINE RD_AOD( Input_Opt, State_Chm, RC )
ASYMAA => State_Chm%Phot%ASYMAA
PHAA => State_Chm%Phot%PHAA

#if defined( MODEL_CESM )
IF ( Input_Opt%amIRoot ) THEN
NJ1 = findFreeLUN()
ELSE
NJ1 = 0
ENDIF
#else
! Get a free LUN
NJ1 = findFreeLUN()
#endif

! IMPORTANT: aerosol_mod.F and dust_mod.F expect aerosols in this order
!
Expand Down Expand Up @@ -985,11 +977,6 @@ SUBROUTINE RD_AOD( Input_Opt, State_Chm, RC )
! If not a dry-run, read data from each species file
!--------------------------------------------------------------

#if defined( MODEL_CESM )
! Only read file on root thread if using CESM
IF ( Input_Opt%amIRoot ) THEN
#endif

! Open file
OPEN( NJ1, FILE=TRIM( THISFILE ), STATUS='OLD', IOSTAT=RC )

Expand Down Expand Up @@ -1028,14 +1015,10 @@ SUBROUTINE RD_AOD( Input_Opt, State_Chm, RC )
! Close file
CLOSE( NJ1 )

#if defined( MODEL_CESM )
ENDIF
#endif

ENDDO

#if defined( MODEL_CESM )
IF ( Input_Opt%amIRoot ) CALL freeUnit(NJ1)
CALL freeUnit(NJ1)
#endif

! Free pointers
Expand Down

0 comments on commit 6116efa

Please sign in to comment.