@@ -77,10 +77,11 @@ integer function alloc_colors_handle(ierr) result(handle)
7777 end function alloc_colors_handle
7878
7979 integer function alloc_colors_handle_using_inlist (inlist , ierr ) result(handle)
80- use colors_def, only: do_alloc_colors, colors_is_initialized
80+ use colors_def, only: Colors_General_Info, do_alloc_colors, colors_is_initialized, get_colors_ptr
8181 use colors_ctrls_io, only: read_namelist
8282 character (len=* ), intent (in ) :: inlist ! empty means just use defaults.
8383 integer , intent (out ) :: ierr ! 0 means AOK.
84+ type (Colors_General_Info), pointer :: rq
8485 ierr = 0
8586 handle = - 1
8687 if (.not. colors_is_initialized) then
@@ -91,6 +92,10 @@ integer function alloc_colors_handle_using_inlist(inlist, ierr) result(handle)
9192 if (ierr /= 0 ) return
9293 call read_namelist(handle, inlist, ierr)
9394 if (ierr /= 0 ) return
95+ call get_colors_ptr(handle, rq, ierr)
96+ if (ierr /= 0 ) return
97+ ! skip colors table setup and hooks if use_colors = .false.
98+ if (.not. rq% use_colors) return
9499 call colors_setup_tables(handle, ierr)
95100 call colors_setup_hooks(handle, ierr)
96101 end function alloc_colors_handle_using_inlist
@@ -313,4 +318,4 @@ real(dp) function get_lum_band_by_id(id, log_Teff, log_g, M_div_h, lum, ierr)
313318 get_lum_band_by_id = - 99.d0
314319 end function get_lum_band_by_id
315320
316- end module colors_lib
321+ end module colors_lib
0 commit comments