Hello, in this case it is most likely dog urine that has soaked into the carpet and into the pad below where it cannot be easily removed at all, even with steam cleaning.
The urine is 'hydroscopic' to some degree, so that humid days, it absorbs moisture from the air and resumes giving off the urine vapors (of which ammonia is one component).
I am afraid you will not see a complete clearance of the odors until you remove both the carpet and the pad (costs more than its worth in many cases), or replace the carpeting and pad, then take measures to install a doggy door or whatever else so that the dog knows to go outside to urinate.
You may need a professional dog trainer as some dogs resent being left at home alone and retaliate by peeing on the floor... you may need to keep the dog locked outside with a heated dog house if needed when you are not home to monitor its behavior.
If that bit of advice was helpful please rate my work, its how I earn a living and will not increase your charges.
We can go from there as needed without a time limit.