With the recent code restructuring, FORCING classes no longer receive the forcing data path specified in the run file.
Instead, FORCING classes have hardcoded forcing paths.
In the new PPROVIDER class, all classes are instantiated the same, and therefore we cannot pass specific parameters to some instantiated classes.
Possible solutions:
- Pass all paths (
result_path and forcing_path) to all instantiated classes, even those who don't need them
- Pass the
PPROVIDER instance to new_class during initialization, and let the class itself grab additional parameters it might need from the PPROVIDER instance
- Require user to manually set the
forcing_path after instantiation. In practice this would be handled by the TILE class right after retreiving the FORCING instance from the PPROVIDER
Which would be the better way?
Other suggestions?
With the recent code restructuring,
FORCINGclasses no longer receive the forcing data path specified in the run file.Instead,
FORCINGclasses have hardcoded forcing paths.In the new
PPROVIDERclass, all classes are instantiated the same, and therefore we cannot pass specific parameters to some instantiated classes.Possible solutions:
result_pathandforcing_path) to all instantiated classes, even those who don't need themPPROVIDERinstance tonew_classduring initialization, and let the class itself grab additional parameters it might need from thePPROVIDERinstanceforcing_pathafter instantiation. In practice this would be handled by theTILEclass right after retreiving theFORCINGinstance from thePPROVIDERWhich would be the better way?
Other suggestions?