def extract_bmpstp(filename):
    """
    Extracts Bmpstp from filename. Filenames are often of the form:
        fort.Bmpstp
    or:
        fort.(Bmpstp+myid)
        
        
    """
    ii = int(filename.split('fort.')[1].split('+myid')[0]) # Extract from filename
    # Not true?
    #if ii >= 100:
    #    print(f'Warning: Bmpstp >= 100 is not supported! Filename = {filename}. Nothing will be written.')
    return ii