Exemple #1
0
 class DensParticle(ptype[mode]):
     density = Variable('density', dtype=np.float32)
class SampleParticle(JITParticle):
#    EKE=Variable('EKE', initial=0., dtype=np.float32)
#    #Now the part to determine the age of the particle
    Age=Variable('Age',initial=0.,dtype=np.float32)#agr is gonna be in seconds
    prev_time=Variable('prev_time',initial=attrgetter('time'),to_write=False)
class debris(JITParticle):

    ##########################################################################
    # TEMPORARY VARIABLES FOR TRACKING PARTICLE POSITION/STATUS ##############
    ##########################################################################

    # ISO code of current cell (>0 if in any coastal cell)
    iso = Variable('iso', dtype=np.int32, initial=0, to_write=False)

    # Sink ID of current cell (>0 if in specific sink cell)
    sink_id = Variable('sink_id', dtype=np.int16, initial=0, to_write=False)

    # Time at sea (Total time since release)
    ot = Variable('ot', dtype=np.int32, initial=0, to_write=False)

    # Time at coast (Time time spent in coastal cells)
    ct = Variable('ct', dtype=np.int32, initial=0, to_write=False)

    ##########################################################################
    # PROVENANCE IDENTIFIERS #################################################
    ##########################################################################

    # CHECK VARIABLE NAME!!!!!!!!!!!!!!!!!!!!!!

    # Country ISO code
    origin_iso = Variable('source_id', dtype=np.int32, to_write=True)

    # Original longitude
    lon0 = Variable('lon0', dtype=np.float32, to_write=True)

    # Original latitude
    lat0 = Variable('lat0', dtype=np.float32, to_write=True)

    # Source cell ID (Initial mass of plastic from direct coastal input)
    cp0 = Variable('cp0', dtype=np.float32, to_write=True)

    # Source cell ID (Initial mass of plastic from riverine input)
    rp0 = Variable('rp0', dtype=np.float32, to_write=True)

    ##########################################################################
    # ANTIBEACHING VARIABLES #################################################
    ##########################################################################

    # Particle distance from land
    cd = Variable('cd', dtype=np.float32, initial=0., to_write=False)

    # Velocity away from coast (to prevent beaching) - x component
    uc = Variable('uc', dtype=np.float32, initial=0., to_write=False)

    # Velocity away from coast (to prevent beaching) - y component
    vc = Variable('vc', dtype=np.float32, initial=0., to_write=False)

    ##########################################################################
    # TEMPORARY VARIABLES FOR TRACKING BEACHING AT SPECIFIED SINK SITES ######
    ##########################################################################

    # Sink status (memory of time in current sink cell - in time-steps)
    actual_sink_status = Variable('actual_sink_status',
                                  dtype=np.int32,
                                  initial=0,
                                  to_write=False)

    # Sink status (memory of ID of current sink cell)
    actual_sink_id = Variable('actual_sink_id',
                              dtype=np.int32,
                              initial=0,
                              to_write=False)

    # Sink t0 (memory of time when current sink cell was reached - in time-steps)
    actual_sink_t0 = Variable('actual_sink_t0',
                              dtype=np.int32,
                              initial=0,
                              to_write=False)

    # Sink ct (memory of time spent in coastal cells when arriving at current sink cell - in time-steps)
    actual_sink_ct = Variable('actual_sink_ct',
                              dtype=np.int32,
                              initial=0,
                              to_write=False)

    ##########################################################################
    # RECORD OF ALL EVENTS ###################################################
    ##########################################################################

    # Number of events
    e_num = Variable('e_num', dtype=np.int16, initial=0, to_write=True)

    # Events
    e0 = Variable('e0', dtype=np.int64, initial=0, to_write=True)
    e1 = Variable('e1', dtype=np.int64, initial=0, to_write=True)
    e2 = Variable('e2', dtype=np.int64, initial=0, to_write=True)
    e3 = Variable('e3', dtype=np.int64, initial=0, to_write=True)
    e4 = Variable('e4', dtype=np.int64, initial=0, to_write=True)
    e5 = Variable('e5', dtype=np.int64, initial=0, to_write=True)
    e6 = Variable('e6', dtype=np.int64, initial=0, to_write=True)
    e7 = Variable('e7', dtype=np.int64, initial=0, to_write=True)
    e8 = Variable('e8', dtype=np.int64, initial=0, to_write=True)
    e9 = Variable('e9', dtype=np.int64, initial=0, to_write=True)
    e10 = Variable('e10', dtype=np.int64, initial=0, to_write=True)
    e11 = Variable('e11', dtype=np.int64, initial=0, to_write=True)
    e12 = Variable('e12', dtype=np.int64, initial=0, to_write=True)
    e13 = Variable('e13', dtype=np.int64, initial=0, to_write=True)
    e14 = Variable('e14', dtype=np.int64, initial=0, to_write=True)
    e15 = Variable('e15', dtype=np.int64, initial=0, to_write=True)
    e16 = Variable('e16', dtype=np.int64, initial=0, to_write=True)
    e17 = Variable('e17', dtype=np.int64, initial=0, to_write=True)
    e18 = Variable('e18', dtype=np.int64, initial=0, to_write=True)
    e19 = Variable('e19', dtype=np.int64, initial=0, to_write=True)
    e20 = Variable('e20', dtype=np.int64, initial=0, to_write=True)
    e21 = Variable('e21', dtype=np.int64, initial=0, to_write=True)
    e22 = Variable('e22', dtype=np.int64, initial=0, to_write=True)
    e23 = Variable('e23', dtype=np.int64, initial=0, to_write=True)
    e24 = Variable('e24', dtype=np.int64, initial=0, to_write=True)
Exemple #4
0
class VeloParticle(JITParticle):
    u = Variable('u', dtype=np.float32)
    v = Variable('v', dtype=np.float32)
Exemple #5
0
 class MyParticle(ptype[mode]):
     sample_var = Variable('sample_var', initial=0.)
Exemple #6
0
 class TestParticle(ptype[mode]):
     p = Variable('p', dtype=np.float32, initial=0.)
Exemple #7
0
 class MyParticle(ptype[mode]):
     v = Variable('v')
Exemple #8
0
class boundedParticle(JITParticle):
    # inBounds : 1 yes, 0 no
    inBounds = Variable('inBounds', dtype=np.int32, initial=1.)
Exemple #9
0
 class MyParticle(ptype[mode]):
     relDepth = Variable('relDepth', dtype=np.float32, initial=20.)
Exemple #10
0
class GalapagosParticle(JITParticle):
    age = Variable('age', initial=0.)
Exemple #11
0
class unbeachableParticle(JITParticle):
    # Beaching dynamics from https://github.com/OceanParcels/Parcelsv2.0PaperNorthSeaScripts
    # beached : 0 sea, 1 beached, 2 after non-beach dyn, 3 after beach dyn, 4 please unbeach
    beached = Variable('beached', dtype=np.int32, initial=0.)
    unbeachCount = Variable('unbeachCount', dtype=np.int32, initial=0.)
Exemple #12
0
 class MyParticle(JITParticle):
     psi = Variable('psi', dtype=np.float32, initial=fieldset.Psi)
Exemple #13
0
 class MyParticle(ptype[mode]):
     sample_var_curvilinear = Variable('sample_var_curvilinear')
     sample_var_rectilinear = Variable('sample_var_rectilinear')
Exemple #14
0
 class MyParticle(ParticleClass):
     p = Variable('p', dtype=np.float32, initial=0.)
     p_start = Variable('p_start', dtype=np.float32, initial=fieldset.P)
     age = Variable('age', dtype=np.float32, initial=0.)
Exemple #15
0
 class TestParticle(ptype[mode]):
     p0 = Variable('p0', dtype=np.int32, initial=0)
     p1 = Variable('p1', dtype=np.int32, initial=1)
Exemple #16
0
 class MyParticle(ptype[mode]):
     speed = Variable('speed', dtype=np.float32, initial=0.)
Exemple #17
0
 class TestParticle(ptype[mode]):
     p = Variable('p', dtype=np.float32 if rngfunc == 'randint' else np.float32)
Exemple #18
0
 class MyParticle(ptype[mode]):
     zonal = Variable('zonal', dtype=np.float32, initial=0.)
     meridional = Variable('meridional', dtype=np.float32, initial=0.)
Exemple #19
0
 class MyParticle(ptype[mode]):
     sample_var = Variable('sample_var')
Exemple #20
0
 class MyParticle(ptype[mode]):
     temp0 = Variable('temp0', dtype=np.float32, initial=20.)
     temp1 = Variable('temp1', dtype=np.float32, initial=20.)
Exemple #21
0
 class SampleParticle(ptype['scipy']):
     mask = Variable('mask', initial=fieldset.mask)
Exemple #22
0
 class SampleParticle(JITParticle):
     u_kernel = Variable('u_kernel', dtype=np.float32, initial=0.)
     u_scipy = Variable('u_scipy', dtype=np.float32, initial=fieldset.U)
Exemple #23
0
class LitterParticle(JITParticle):
    # beached : 0 sea, 1 after RK, 2 after diffusion, 3 please unbeach, 4 final beached
    beached = Variable('beached', dtype=np.int32, initial=0.)
    beached_count = Variable('beached_count', dtype=np.int32, initial=0.)
Exemple #24
0
 class SamplingParticle(ptype[mode]):
     p = Variable('p')
Exemple #25
0
 class MyParticle(ParticleClass):
     p = Variable('p', dtype=np.float32, initial=0.)
     p_start = Variable('p_start', dtype=np.float32, initial=0.)
Exemple #26
0
 class MyParticle(ptype[mode]):
     temp = Variable('temp', dtype=np.float32, initial=20.)
     u1 = Variable('u1', dtype=np.float32, initial=0.)
     u2 = Variable('u2', dtype=np.float32, initial=0.)
     v1 = Variable('v1', dtype=np.float32, initial=0.)
     v2 = Variable('v2', dtype=np.float32, initial=0.)
 class MyParticle(ptype[mode]):
     sample_var = Variable('sample_var', initial=0.)
     v_once = Variable('v_once',
                       dtype=np.float64,
                       initial=0.,
                       to_write='once')
class plastic_particle(JITParticle):  #ScipyParticle): #
    u = Variable('u', dtype=np.float32, to_write=False)
    v = Variable('v', dtype=np.float32, to_write=False)
    w = Variable('w', dtype=np.float32, to_write=True)
    temp = Variable('temp', dtype=np.float32, to_write=False)
    density = Variable('density', dtype=np.float32, to_write=False)
    tpp3 = Variable('tpp3', dtype=np.float32, to_write=False)
    euph_z = Variable('euph_z', dtype=np.float32, to_write=False)
    d_phy = Variable('d_phy', dtype=np.float32, to_write=False)
    nd_phy = Variable('nd_phy', dtype=np.float32, to_write=False)
    kin_visc = Variable('kin_visc', dtype=np.float32, to_write=False)
    sw_visc = Variable('sw_visc', dtype=np.float32, to_write=False)
    a = Variable('a', dtype=np.float32, to_write=True)
    rho_tot = Variable('rho_tot', dtype=np.float32, to_write=False)
    r_tot = Variable('r_tot', dtype=np.float32, to_write=False)
    vs = Variable('vs', dtype=np.float32, to_write=True)
    vs_init = Variable('vs_init', dtype=np.float32, to_write=True)
    r_pl = Variable('r_pl', dtype=np.float32, to_write='once')
    rho_pl = Variable('rho_pl', dtype=np.float32, to_write='once')
Exemple #29
0
 class MyParticle(ptype[mode]):
     v_once = Variable('v_once',
                       dtype=np.float64,
                       initial=0.,
                       to_write='once')
     age = Variable('age', dtype=np.float32, initial=0.)
Exemple #30
0
 class TPressureParticle(ptype[mode]):
     pressure = Variable('pressure', dtype=np.float32)