Skip to content

Commit

Permalink
bug with radtran initializaiton
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholaswogan committed Feb 29, 2024
1 parent 58b08ee commit fa208db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/radtran/clima_radtran.f90
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ function create_Radtran_2(species_names, particle_names, s, star_f, &
character(:), allocatable, intent(out) :: err

type(Radtran) :: rad

real(dp) :: photon_scale_factor

if (nz < 1) then
err = '"nz" can not be less than 1.'
Expand Down Expand Up @@ -164,9 +166,14 @@ function create_Radtran_2(species_names, particle_names, s, star_f, &
allocate(rad%surface_emissivity(rad%ir%nw))
rad%surface_emissivity(:) = 1.0_dp

if (s%planet_is_present) then
photon_scale_factor = s%photon_scale_factor
else
photon_scale_factor = 1.0_dp
endif
! photons hitting the planet
allocate(rad%photons_sol(rad%sol%nw))
call read_stellar_flux(star_f, rad%sol%nw, rad%sol%wavl, s%photon_scale_factor, rad%photons_sol, err)
call read_stellar_flux(star_f, rad%sol%nw, rad%sol%wavl, photon_scale_factor, rad%photons_sol, err)
if (allocated(err)) return

! IR work arrays
Expand Down

0 comments on commit fa208db

Please sign in to comment.