The way I understand it, is that port charges are all estimated until the ship actually sails, fees and taxes, for the entire ship, vary by the number of passengers, the time actually spent in port among other things.
When a cruise is first offered for sale, estimated taxes are collected at a rate calculated by factors know at the time, docking costs etc, as the cruise gets nearer more reliable information in known and the tax amount collected for new bookings may be adjusted, either up or down.
When the ship sales and the final passenger count and fees charged by each port are known, then the total fees are divided by the passenger count to give a per passenger cruise total. If a passenger was initially charged less than this amount, the cruise line eats the difference, if the passenger was initially charged more, then the amount is refunded as OBC.
In the event a port is missed, the percentage of the total port charges that was associated with that port is refunded based on the percentage that was estimated originally. So if on initial estimation the missed port was estimated to be 20% of the total then 20% of the amount paid is refunded, as the estimates change through the booking process two passengers may be credited difference percentages, dependent on the estimated charges for that port at the time they paid, and the amount collected with their booking.
Just my understanding, may not be correct