<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __write_noaas(dat, path):
 """ Use the filename - text data pairs to write the data as NOAA text files :param dict dat: NOAA data to be written :return none: """

    for filename, text in dat.items():
        try:
            with open(os.path.join(path, filename), "w+") as f:
                f.write(text)
        except Exception as e:
            print("write_noaas: There was a problem writing the NOAA text file: {}: {}".format(filename, e))
    return