Load any supported input into data, reader picked from path.
Basename seq.* or *.seq: MONASH; .kipp: raw float64 cell stream; directory holding
profiles.index: MESA run; else KEPLER .cnv. Lets every format work wherever a .cnv
path did.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path |
Input path. |
||
| integer(kind=int32), | intent(in) | :: | ifirst |
First model number to load. |
||
| integer(kind=int32), | intent(in) | :: | ilast |
Last model number to load. |
subroutine load_convection(path, ifirst, ilast) !! Load any supported input into `data`, reader picked from path. !! !! Basename `seq.*` or `*.seq`: MONASH; `.kipp`: raw float64 cell stream; directory holding !! `profiles.index`: MESA run; else KEPLER `.cnv`. Lets every format work wherever a `.cnv` !! path did. ! Arguments character(len=*), intent(in) :: path !! Input path. integer(int32), intent(in) :: ifirst !! First model number to load. integer(int32), intent(in) :: ilast !! Last model number to load. integer(int32) :: slash character(len=:), allocatable :: basename logical :: is_mesa cnv_loaded = .false. slash = index(trim(path), '/', back=.true.) basename = path(slash + 1:len_trim(path)) if ((len_trim(basename) >= 4 .and. basename(1:4) == 'seq.') .or. & has_suffix(basename, '.seq')) then call loadmon(path, ifirst, ilast) return end if if (has_suffix(path, '.kipp')) then call loadkipp(path, ifirst, ilast) return end if inquire (file=trim(path)//'/profiles.index', exist=is_mesa) if (is_mesa) then call loadmesa(path, ifirst, ilast) else call loadconv(path, ifirst, ilast) cnv_loaded = .true. end if end subroutine load_convection