Psalm 107 begins with an exhortation/command to those of us who are redeemed--"Oh give thanks to the LORD, for He is good, For His lovingkindness is everlasting." While not using the word "thanks," the writer in typical Hebrew fashion, comes back to the thought in the conclusion of the Psalm. ". . . give heed to these things, And consider the lovingkindnesses of the LORD."
As we read through the Psalm we find obvious points for thanksgiving. They are what we can call the redemption statements. Each is introduced by the statement, "He delivered/saved/brought them out of their distresses." Each of these lines is followed by a further description of the Lord's deliverance to each distressed group.