fix: unit conversion and indexing

This commit is contained in:
robin
2024-04-30 12:34:10 +02:00
parent 824fb967a2
commit 0aa58537b1
6 changed files with 77 additions and 27 deletions

View File

@@ -11,7 +11,7 @@
*/
class AdvectionKernel {
public:
const static int DT = 50;
const static int DT = 100000; // Seconds
/**
* This function must take a time, latitude and longitude of a particle and must output
* a new latitude and longitude after being advected once for AdvectionKernel::DT time as defined above.
@@ -22,6 +22,11 @@ public:
*/
virtual std::pair<double, double> advect(int time, double latitude, double longitude) const = 0;
// Taken from Parcels https://github.com/OceanParcels/parcels/blob/daa4b062ed8ae0b2be3d87367d6b45599d6f95db/parcels/tools/converters.py#L155
const static double metreToDegrees(double metre) {
return metre / 1000. / 1.852 / 60.;
}
};
#endif //ADVECTION_ADVECTIONKERNEL_H