From: Aaron D. <aar...@gm...> - 2011-02-26 20:43:28
|
Hi Takeshi, There are a couple of options to access the information you require. If you're only interested in the largest convection zone, search the default log_columns.list (in mesa/data/star_data/) and search for ! conditions at base of largest convection zone (by mass) and ! conditions at top of largest convection zone (by mass) where you will information on lots of quantities at the top and bottom of the largest convection zone. If you want more information about all of the convection zones, you'll have to write some code (or use the profile at every step). In order to do this, you'll use some of the "extra" routines that Bill has kindly made available. To figure out how to do the calculation, grep for conv_mx2_bot_r in mesa/star/private/. The example you're looking for is in report.f. Then, you need to set up the extra information in mesa/star/test/src/run_star_extras.f. The first thing you'll find is that this file just 'includes' standard_run_star_extras.dek, which is in mesa/star/public/. When I've needed to use one of these functions in the past, I've commented out that include line and then copied the full contents of standard_run_star_extras.dek into my run_star_extras.f. Once you've done that, you need to edit the functions/subroutines that will be used to write extra information to the log files. There are two of these: integer function how_many_extra_log_columns(s, id, id_extra) type (star_info), pointer :: s integer, intent(in) :: id, id_extra how_many_extra_log_columns = 0 end function how_many_extra_log_columns subroutine data_for_extra_log_columns(s, id, id_extra, n, names, vals, ierr) type (star_info), pointer :: s integer, intent(in) :: id, id_extra, n character (len=maxlen_log_column_name) :: names(n) double precision :: vals(n) integer, intent(out) :: ierr ierr = 0 end subroutine data_for_extra_log_columns If you wanted to add two extra columns to your log file, you'd change how_many_extra_log_columns from 0 to 2. Then edit 2 values of the arrays in the next subroutine. For example, names(1) = 'conv_mx1_top_t' names(2) = 'conv_mx1_bot_t' vals(1) = s% value_you_want_1 vals(2) = s% value_you_want_2 Then recompile the code and see what happens. I hope this is useful as a guide for how to proceed. Please let us know if you have more questions. Aaron |