Skip to content

Commit

Permalink
prevent double counting of water continuum
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholaswogan committed Oct 25, 2023
1 parent 6013086 commit 77ef0c3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/radtran/clima_radtran_types_create.f90
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,22 @@ module function create_OpticalProperties(datadir, optype, species_names, &
!!! Continuum !!!
!!!!!!!!!!!!!!!!!
if (allocated(sop%water_continuum)) then

! Make sure water continuum is not already accounted for with CIA
if (allocated(sop%cia)) then
do i = 1,op%ncia
if (trim(sop%cia(i)) == 'H2O-H2O') then
err = 'Optical property "water-continuum" is on, but water '// &
'continuum is already accounted for with H2O-H2O CIA.'
return
elseif (trim(sop%cia(i)) == 'H2O-N2') then
err = 'Optical property "water-continuum" is on, but water '// &
'continuum is already accounted for with H2O-N2 CIA.'
return
endif
enddo
endif

allocate(op%cont)
filename = datadir//"/water_continuum/"//trim(sop%water_continuum)//".h5"
op%cont = create_WaterContinuum(sop%water_continuum, filename, species_names, op%wavl, err)
Expand Down

0 comments on commit 77ef0c3

Please sign in to comment.