From: Bill P. <pa...@ki...> - 2011-09-08 14:32:42
|
On Sep 8, 2011, at 1:35 AM, 張世昕 wrote: > Because I combine another simple code with MESA, there are some > variables I want to add ( of course) that aren't included in log_columns.list . > Could you teach me how to do ? Hi, here's how to do it. in your working copy of run_star_extras, replace include 'standard_run_star_extras.dek' by the contents of the included file from star/public Don't make any edits to any of the files in star/public. You do all of this in your private copy of run_star_extras. before doing anything else, let's make sure your working copy of run_star_extras works. edit the extras_controls routine subroutine extras_controls(s, ierr) type (star_info), pointer :: s integer, intent(out) :: ierr ierr = 0 write(*,*) 'hello from extra_controls' end subroutine extras_controls then, in your work directory, do ./mk and ./rn to check that it is okay. assuming that worked, now edit the function how_many_extra_log_columns to specify the number of columns you'll add. then edit the subroutine data_for_extra_log_columns to give the names and values. these 2 routines will be called every time the system writes a new line in star.log you can also add columns to profiles by editing the routines how_many_extra_profile_columns and data_for_extra_profile_columns. good luck! -Bill |