Tags are a feature introduced in GYRE v2.1, which allow a much greater degree of control over calculations. They are relatively simple to use, but can be quite powerful.
Consider a GYRE calculation involving a model on the RGB. Because non-radial p-modes in the convective envelope couple with high-order g-modes in the radiative core, the frequency spacing of the non-radial modes is much smaller than that of the radial modes. In such cases, we ideally want to use a coarse frequency scan for the radial modes and a fine frequency scan for the non-radial modes. The following input file, which is designed to work with the RGB stellar model in
$GYRE_DIR/models/mesa/rgb/rgb.mesa, achieves this goal using tags:
&model model_type = 'EVOL' ! Obtain stellar structure from an evolutionary model file = 'rgb.mesa' ! File name of the evolutionary model file_format = 'MESA' ! File format of the evolutionary model / &constants / &mode l = 0 ! Harmonic degree tag = 'radial' ! Tag for namelist matching / &mode l = 1 ! Harmonic degree tag = 'non-radial' ! Tag for namelist matching / &mode l = 2 ! Harmonic degree tag = 'non-radial' ! Tag for namelist matching / &osc outer_bound_type = 'ZERO' ! Use a zero-pressure outer mechanical boundary condition tag_list = 'radial,non-radial' ! Comma-separated list of tags to match / &num ivp_solver_type = 'MAGNUS_GL4' ! 4th-order Magnus solver for initial-value integrations / &scan grid_type = 'LINEAR' ! Scan for modes using a uniform-in-frequency grid; best for p modes freq_units = 'UHZ' ! Interpret freq_min and freq_max as being in uHz freq_min = 35 ! Minimum frequency to scan from freq_max = 45 ! Maximum frequency to scan to n_freq = 50 ! Number of frequency points in scan tag_list = 'radial' ! Comma-separated list of tags to match / &scan grid_type = 'INVERSE' ! Scan for modes using a uniform-in-period grid; best for g modes freq_units = 'UHZ' ! Interpret freq_min and freq_max as being in uHz freq_min = 35 ! Minimum frequency to scan from freq_max = 45 ! Maximum frequency to scan to n_freq = 1000 ! Number of frequency points in scan tag_list = 'non-radial' ! Comma-separated list of tags to match / &shoot_grid op_type = 'CREATE_CLONE' / &shoot_grid op_type = 'RESAMP_DISPERSION' alpha_osc = 5 alpha_exp = 1 / &shoot_grid op_type = 'RESAMP_CENTER' n = 5 / &recon_grid op_type = 'CREATE_CLONE' / &output summary_file = 'gyre_ad.txt' summary_file_format = 'TXT' summary_item_list = 'l,n_pg,n_p,n_g,omega' /
Observe that each of the
&mode namelists has a
tag parameter, which serves to label the mode. When processing a given mode, GYRE selects only those non-
&mode namelists matching one of the following criteria:
- The namelist doesn't have a
- The namelist does have a
tag_listparameter, and the parameter value (a comma-separated list) contains the mode's tag as one of the list items.
In the example given above, the
&osc namelist matches both the 'radial' and 'non-radial' tags, and is therefore selected when processing the l=0, 1 and 2 modes. However, only the first
&scan namelist matches the 'radial' tag, and is therefore selected when processing the l=0 mode; and likewise, only the second
&scan namelist matches the 'non-radial' tag, and is therefore selected when processing the l=1 and l=2 modes.
In addition to the matching criteria given above, there are a couple of rules that must be obeyed by tags:
- Tag names can't contain commas (however, they can be otherwise arbitrary)
- If a
&modenamelist doesn't have a tag, then only namelists without a
tag_listparameter will match it
&outputnamelists don't support tags