Read in the grid dimensions info from the weights file. The weights file should have the source and destination grid information provided.