### Is your feature request related to a problem? Please describe. Currently, the lsos is computed in a lengthly function within the trainer. ### Describe the solution you'd like Refactor the current loss function into a standalone class. Design document: [link](https://ecmwf-weathergen.onlyoffice.com/doceditor?fileId=1919226&share=UklrRklBUjlENVc2alpYdkFMQ2NSVWtLTEcrTnZWTFU3ZC9vSk9yUjZUYz0_IjFlYTRiMjQzLWZhMjUtNDBiMy04OTg1LWQyNTYyMzY0NDZjYyI) ### Describe alternatives you've considered _No response_ ### Additional context _No response_ ### Organisation ECMWF