initial rough working

This commit is contained in:
robin committed 2024-05-06 11:11:12 +02:00
1 parent d7201962a5
commit 481375a6b7
22 files changed
+131 -159

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
#ifndef ADVECTION_ADVECTIONKERNEL_H
#define ADVECTION_ADVECTIONKERNEL_H
#include <tuple>
#include "Vel.h"
/*
* Implement this class for every integration method.
*/
class AdvectionKernel {
public:
const static int DT = 15 * 60 * 15; // 60 sec/min * 15 mins
/**
* 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.
* @param time Time since the beginning of the data
* @param latitude Latitude of particle
* @param longitude Longitude of particle
* @return A pair of latitude and longitude of particle.
*/
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.