Skip to content

Commit

Permalink
correct gyre calls from RSP2 for gyre 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Debraheem committed Nov 29, 2024
1 parent 686f390 commit 8a2cab8
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down Expand Up @@ -185,7 +185,7 @@ end subroutine extras_startup
subroutine gyre_linear_analysis_and_set_velocities(s,restart,ierr)
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m
type (star_info), pointer :: s
logical, intent(in) :: restart
integer, intent(out) :: ierr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down Expand Up @@ -514,7 +514,7 @@ end subroutine data_for_extra_profile_columns
subroutine gyre_linear_analysis_and_set_velocities(s,restart,ierr)
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m
type (star_info), pointer :: s
logical, intent(in) :: restart
integer, intent(out) :: ierr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
use gyre_lib
use gyre_mesa_m

implicit none

Expand Down
20 changes: 10 additions & 10 deletions star/job/gyre_in_mesa_extras_set_velocities.inc
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
r_old(nz_max), r_new(nz_max), v_old(nz_max), v_new(nz_max))
npts(:) = 0

call gyre_init('gyre.in')
call init('gyre.in')

call gyre_set_constant('G_GRAVITY', standard_cgrav)
call gyre_set_constant('C_LIGHT', clight)
call gyre_set_constant('A_RADIATION', crad)
call set_constant('G_GRAVITY', standard_cgrav)
call set_constant('C_LIGHT', clight)
call set_constant('A_RADIATION', crad)

call gyre_set_constant('M_SUN', Msun)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
call set_constant('M_SUN', Msun)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)

call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')

mode_l = 0 ! mode l (e.g. 0 for p modes, 1 for g modes)
! should match gyre.in mode l
Expand All @@ -74,7 +74,7 @@
end if

!write(*,*) 'call gyre_set_model'
call gyre_set_model(global_data, point_data, s%gyre_data_schema)
call set_model(global_data, point_data, s%gyre_data_schema)

write(*, 100) 'order', 'freq (Hz)', &
'P (sec)', 'P (day)', 'growth', 'cycles to double'
Expand All @@ -87,7 +87,7 @@
ipar(4) = 3 ! max number of modes to output per call
ipar(5) = 0 ! num_written

call gyre_get_modes(mode_l, process_mode_, ipar, rpar)
call get_modes(mode_l, process_mode_, ipar, rpar)

if (s% x_ctrl(4) == 1d0) then
mode = 2
Expand Down
20 changes: 10 additions & 10 deletions star/rsp2_utils/run_star_extras_rsp2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
ierr = 0
call star_ptr(id, s, ierr)
if (ierr /= 0) return
if (.not. restart) then
if (.not. restart) then
num_periods = 0
run_num_steps_end_prev = 0
run_num_iters_end_prev = 0
Expand Down Expand Up @@ -76,14 +76,14 @@
best_cycles_to_double = 0
end if
if (.not. s% x_logical_ctrl(5)) then
call gyre_init('gyre.in')
call gyre_set_constant('G_GRAVITY', standard_cgrav)
call gyre_set_constant('C_LIGHT', clight)
call gyre_set_constant('A_RADIATION', crad)
call gyre_set_constant('M_SUN', Msun)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
call init('gyre.in')
call set_constant('G_GRAVITY', standard_cgrav)
call set_constant('C_LIGHT', clight)
call set_constant('A_RADIATION', crad)
call set_constant('M_SUN', Msun)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
else
call gyre_in_mesa_extras_set_velocities(s,restart,ierr)
end if
Expand Down Expand Up @@ -300,7 +300,7 @@
integer, intent(in) :: id
integer, intent(out) :: ierr
ierr = 0
call gyre_final()
call final()
end subroutine rsp2_extras_after_evolve


Expand Down

0 comments on commit 8a2cab8

Please sign in to comment.