From 08b31d7289d39798c8d3b9b19acf6b1507cdc940 Mon Sep 17 00:00:00 2001 From: pmocz Date: Fri, 6 Sep 2024 12:58:47 -0400 Subject: [PATCH] change debug param name all to dbg for more consistency --- atm/private/atm_table.f90 | 10 +++---- star/private/overshoot.f90 | 16 +++++------ star/private/predictive_mix.f90 | 50 ++++++++++++++++----------------- star/private/pulse_utils.f90 | 8 +++--- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/atm/private/atm_table.f90 b/atm/private/atm_table.f90 index 1b6f976f8..68b985405 100644 --- a/atm/private/atm_table.f90 +++ b/atm/private/atm_table.f90 @@ -80,7 +80,7 @@ subroutine eval_table( & real(dp), intent(out) :: dlnP_dlnkap integer, intent(out) :: ierr - logical, parameter :: DBG = .FALSE. + logical, parameter :: dbg = .false. real(dp) :: g real(dp) :: logg @@ -125,14 +125,14 @@ subroutine eval_table( & ! Perform the table lookup - if (DBG) write(*,*) 'call get_table_values', id + if (dbg) write(*,*) 'call get_table_values', id call get_table_values( & id, Z, logg, Teff, & Pgas, dPgas_dTeff, dPgas_dlogg, & T, dT_dTeff, dT_dlogg, & ierr) if (ierr /= 0) then - if (DBG) write(*,*) 'get_table_values(_at_fixed_Z) ierr', ierr + if (dbg) write(*,*) 'get_table_values(_at_fixed_Z) ierr', ierr return end if @@ -191,7 +191,7 @@ subroutine eval_table( & endif - if (DBG .or. is_bad(lnP) .or. is_bad(lnT)) then + if (dbg .or. is_bad(lnP) .or. is_bad(lnT)) then write(*,*) 'eval_table' write(*,1) 'Teff', Teff write(*,1) 'T', T @@ -234,7 +234,7 @@ subroutine get_table_alfa_beta( & integer, parameter :: BLEND_IN_Y = 4 integer, parameter :: BLEND_CORNER_OUT = 5 - logical, parameter :: DBG = .FALSE. + logical, parameter :: dbg = .false. real(dp) :: g real(dp) :: logTeff diff --git a/star/private/overshoot.f90 b/star/private/overshoot.f90 index b0da9a261..3b4c645df 100644 --- a/star/private/overshoot.f90 +++ b/star/private/overshoot.f90 @@ -54,7 +54,7 @@ subroutine add_overshooting (s, ierr) type(star_info), pointer :: s integer, intent(out) :: ierr - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. integer :: i integer :: j @@ -79,7 +79,7 @@ subroutine add_overshooting (s, ierr) ierr = 0 - if (DEBUG) then + if (dbg) then write(*, 3) 'add_overshooting; model, n_conv_bdy=', s%model_number, s%num_conv_boundaries end if @@ -90,7 +90,7 @@ subroutine add_overshooting (s, ierr) ! Skip this boundary if it's too close to the center if (s%conv_bdy_q(i) < s%min_overshoot_q) then - if (DEBUG) then + if (dbg) then write(*,*) 'skip since s%conv_bdy_q(i) < min_overshoot_q', i endif cycle conv_bdy_loop @@ -100,7 +100,7 @@ subroutine add_overshooting (s, ierr) ! overshoot there if (s%conv_bdy_loc(i) == 1) then - if (DEBUG) then + if (dbg) then write(*,*) 'skip since s%conv_bdy_loc(i) == 1', i endif cycle conv_bdy_loop @@ -127,7 +127,7 @@ subroutine add_overshooting (s, ierr) s%burn_he_conv_region(i) .OR. & s%burn_z_conv_region(i) ) case ('any') - match_zone_type = .TRUE. + match_zone_type = .true. case default write(*,*) 'Invalid overshoot_zone_type: j, s%overshoot_zone_type(j)=', j, s%overshoot_zone_type(j) ierr = -1 @@ -142,7 +142,7 @@ subroutine add_overshooting (s, ierr) case ('shell') match_zone_loc = .NOT. is_core case ('any') - match_zone_loc = .TRUE. + match_zone_loc = .true. case default write(*,*) 'Invalid overshoot_zone_loc: j, s%overshoot_zone_loc(j)=', j, s%overshoot_zone_loc(j) ierr = -1 @@ -155,7 +155,7 @@ subroutine add_overshooting (s, ierr) case ('top') match_bdy_loc = s%top_conv_bdy(i) case ('any') - match_bdy_loc = .TRUE. + match_bdy_loc = .true. case default write(*,*) 'Invalid overshoot_bdy_loc: j, s%overshoot_bdy_loc(j)=', j, s%overshoot_bdy_loc(j) ierr = -1 @@ -164,7 +164,7 @@ subroutine add_overshooting (s, ierr) if (.NOT. (match_zone_type .AND. match_zone_loc .AND. match_bdy_loc)) cycle criteria_loop - if (DEBUG) then + if (dbg) then write(*,*) 'Overshooting at convective boundary: i, j=', i, j write(*,*) ' s%overshoot_scheme=', TRIM(s%overshoot_scheme(j)) write(*,*) ' s%overshoot_zone_type=', TRIM(s%overshoot_zone_type(j)) diff --git a/star/private/predictive_mix.f90 b/star/private/predictive_mix.f90 index 08e0ef06e..f823c43c8 100644 --- a/star/private/predictive_mix.f90 +++ b/star/private/predictive_mix.f90 @@ -52,7 +52,7 @@ subroutine add_predictive_mixing (s, ierr) type(star_info), pointer :: s integer, intent(out) :: ierr - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. integer :: i integer :: j @@ -71,14 +71,14 @@ subroutine add_predictive_mixing (s, ierr) ierr = 0 - if (DEBUG) then + if (dbg) then write(*, *) 'add_predictive_mixing; model, n_conv_bdy=', & s%model_number, s%num_conv_boundaries end if ! Loop over convective boundaries, from center to surface - mix_mask = .FALSE. + mix_mask = .false. conv_bdy_loop : do i = 1, s%num_conv_boundaries @@ -86,7 +86,7 @@ subroutine add_predictive_mixing (s, ierr) ! predictively mix there if (s%conv_bdy_loc(i) == 1) then - if (DEBUG) then + if (dbg) then write(*,*) 'skip since s%conv_bdy_loc(i) == 1', i endif cycle conv_bdy_loop @@ -113,7 +113,7 @@ subroutine add_predictive_mixing (s, ierr) s%burn_he_conv_region(i) .OR. & s%burn_z_conv_region(i) ) case ('any') - match_zone_type = .TRUE. + match_zone_type = .true. case default write(*,*) 'Invalid predictive_zone_type: j, s%predictive_zone_type(j)=', j, s%predictive_zone_type(j) ierr = -1 @@ -136,7 +136,7 @@ subroutine add_predictive_mixing (s, ierr) case ('surf') match_zone_loc = is_surf_zone case ('any') - match_zone_loc = .TRUE. + match_zone_loc = .true. case default write(*,*) 'Invalid predictive_zone_loc: j, s%predictive_zone_loc(j)=', j, s%predictive_zone_loc(j) ierr = -1 @@ -149,7 +149,7 @@ subroutine add_predictive_mixing (s, ierr) case ('top') match_bdy_loc = s%top_conv_bdy(i) case ('any') - match_bdy_loc = .TRUE. + match_bdy_loc = .true. case default write(*,*) 'Invalid predictive_bdy_loc: j, s%predictive_bdy_loc(j)=', j, s%predictive_bdy_loc(j) ierr = -1 @@ -161,7 +161,7 @@ subroutine add_predictive_mixing (s, ierr) if (s%conv_bdy_q(i) < s%predictive_bdy_q_min(j) .OR. & s%conv_bdy_q(i) > s%predictive_bdy_q_max(j)) cycle criteria_loop - if (DEBUG) then + if (dbg) then write(*,*) 'Predictive mixing at convective boundary: i, j=', i, j write(*,*) ' s%predictive_zone_type=', TRIM(s%predictive_zone_type(j)) write(*,*) ' s%predictive_zone_loc=', TRIM(s%predictive_zone_loc(j)) @@ -219,8 +219,8 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) integer, intent(out) :: ierr logical, intent(inout) :: mix_mask(:) - logical, parameter :: DEBUG = .FALSE. - logical, parameter :: DUMP_PREDICTIONS = .FALSE. + logical, parameter :: dbg = .false. + logical, parameter :: DUMP_PREDICTIONS = .false. real(dp) :: superad_thresh real(dp) :: ingest_factor @@ -330,7 +330,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) end if - if (DEBUG) then + if (dbg) then if (k_bot_cz < s%nz) then write(*,*) 'Predictive mixing: i, j, q_top, q_bot:', i, j, s%q(k_top_cz), s%q(k_bot_cz+1) else @@ -401,7 +401,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) if (.NOT. ALL(s%gradr(k_a:k_b) > s%grada_face(k_a:k_b))) then - ledoux_extension = .FALSE. + ledoux_extension = .false. else @@ -428,7 +428,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) if (iso_r /= 0) then if (SIGN(1._dp, xa_mz_burn(iso_r)-xa_ez(iso_r)) /= SIGN(1._dp, xa_ez_burn(iso_r)-xa_ez(iso_r))) then - if (DEBUG) then + if (dbg) then write(*,*) 'Exiting predictive search due to abundance reversal' end if exit search_loop @@ -457,7 +457,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) ! If the mass ingested exceeds the limit, finish the search if (m_ingest > m_ingest_limit) then - if (DEBUG) then + if (dbg) then write(*,*) 'Exiting predictive search due to ingestion limit exceeded' end if exit search_loop @@ -473,7 +473,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) if (( outward .AND. gradr(k_a) < grada(k_a)) .OR. & (.NOT. outward .AND. gradr(k_b) < grada(k_b))) then - if (DEBUG) then + if (dbg) then write(*,*) 'Exiting predictive search due to non-convective growing boundary' endif exit search_loop @@ -491,7 +491,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) endif if (superad_min <= superad_thresh) then - if (DEBUG) then + if (dbg) then write(*,*) 'Exiting predictive search due to convection-zone split' endif exit search_loop @@ -528,18 +528,18 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) end do call mesa_error(__FILE__,__LINE__,'Double predictive') else - mix_mask(k_top_mz:k_bot_mz) = .FALSE. + mix_mask(k_top_mz:k_bot_mz) = .false. endif ! Return now if no additional mixing should occur if (outward .AND. k_top_mz == k_top_cz) then - if (DEBUG) then + if (dbg) then write(*,*) 'No predictive mixing at top of zone; boundary i=', i endif return elseif (.NOT. outward .AND. k_bot_mz == k_bot_cz) then - if (DEBUG) then + if (dbg) then write(*,*) 'No predictive mixing at bottom of zone; boundary i=', i endif return @@ -553,7 +553,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) call eval_mixing_coeffs(s, k_bot_mz, k_top_mz, xa_mz_burn, & k_a, k_b, D, vc, grada, gradr, ierr) if (ierr /= 0) then - if (DEBUG) write(*,*) 'Non-zero return from eval_mixing_coeffs in do_predictive_mixing/predictive_mix' + if (dbg) write(*,*) 'Non-zero return from eval_mixing_coeffs in do_predictive_mixing/predictive_mix' return endif @@ -638,7 +638,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) end if - if (DEBUG) then + if (dbg) then write(*,*) 'Predictive mixing: i, k_a, k_b, q_a, q_b, superad_min=', i, k_a, k_b, s%q(k_a), s%q(k_b), & superad_min endif @@ -709,7 +709,7 @@ subroutine eval_mixing_coeffs (s, k_bot_mz, k_top_mz, xa_mx, k_a, k_b, D, vc, gr real(dp), intent(out) :: gradr(:) integer, intent(out) :: ierr - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. real(dp) :: xh real(dp) :: xhe @@ -912,7 +912,7 @@ subroutine eval_eos (s, k, z, x, abar, zbar, xa, & real(dp), intent(out) :: d_dlnT(:) integer, intent(out) :: ierr - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. real(dp), parameter :: LOGRHO_TOL = 1E-8_dp real(dp), parameter :: LOGPGAS_TOL = 1E-8_dp @@ -924,7 +924,7 @@ subroutine eval_eos (s, k, z, x, abar, zbar, xa, & ! pressure are as specified in the model, but with abundances ! given by xa and other input abundance parameters - ! (NEEDS FIXING TO HANDLE CASE WHEN LNPGAS_FLAG = .TRUE.) + ! (NEEDS FIXING TO HANDLE CASE WHEN LNPGAS_FLAG = .true.) call solve_eos_given_PgasT( & s, k, xa, & @@ -932,7 +932,7 @@ subroutine eval_eos (s, k, z, x, abar, zbar, xa, & logRho, res, d_dlnd, d_dlnT, d_dxa, & ierr) if (ierr /= 0) then - if (DEBUG) write(*,*) 'Non-zero return from solve_eos_given_PgasT in eval_eos/predictive_mix' + if (dbg) write(*,*) 'Non-zero return from solve_eos_given_PgasT in eval_eos/predictive_mix' return endif diff --git a/star/private/pulse_utils.f90 b/star/private/pulse_utils.f90 index ab65d46d9..0cf357c21 100644 --- a/star/private/pulse_utils.f90 +++ b/star/private/pulse_utils.f90 @@ -61,7 +61,7 @@ subroutine set_segment_indices (s, k_a, k_b, include_last_face) integer, allocatable, intent(out) :: k_b(:) logical, intent(in) :: include_last_face - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. real(dp) :: grad_mu(s%nz) logical :: mask(s%nz) @@ -102,13 +102,13 @@ subroutine set_segment_indices (s, k_a, k_b, include_last_face) call qsort(i, s%nz, -ABS(grad_mu)) - mask(i(n_mk+1:)) = .FALSE. + mask(i(n_mk+1:)) = .false. endif else - mask = .FALSE. + mask = .false. endif @@ -131,7 +131,7 @@ subroutine set_segment_indices (s, k_a, k_b, include_last_face) sg = sg + 1 k_a(sg) = k - if (DEBUG) then + if (dbg) then write(*, 100) k, grad_mu(k) 100 format('placing double point at k=', I6, 1X, '(grad_mu=', 1PE10.3, ')') endif