fix: unit conversion and indexing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user