Esempio n. 1
0
        # Meridional velocity
        'v3d': {
            'id': 'v'
        },

        # Sea surface zonal velocity
        'usurf': {
            'inherit': 'u3d',
            'select': {
                'level': slice(0, 1)
            },
            'squeeze': 'z',
        },
        # Sea surface meridional velocity
        'vsurf': {
            'inherit': 'v3d',
            'select': {
                'level': slice(0, 1)
            },
            'squeeze': 'z',
        }
    }

    positive = 'down'


# Register the class
register_dataset(HYCOMZ)
register_dataset(HYCOMZ, 'hycom')  # backward compat for the moment
Esempio n. 2
0
File: swan.py Progetto: acoat/vacumm
# therefore means  that it is reserved for developers  and  experienced
# professionals having in-depth computer knowledge. Users are therefore
# encouraged to load and test the software's suitability as regards their
# requirements in conditions enabling the security of their systems and/or
# data to be ensured and,  more generally, to use and operate it in the
# same conditions as regards security.
#
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL license and that you accept its terms.
#

from vacumm.data import register_dataset
from vacumm.data.misc.dataset import OceanSurfaceDataset


class SWAN(OceanSurfaceDataset):
    """:class:`~vacumm.data.misc.dataset.Dataset` class to read the
    SWAN wave model outputs

    Read the :class:`~vacumm.data.misc.dataset.Dataset` for more information
    """
    name = 'swan'
    domain = 'wave'
    description = "SWAN wave model"

    ncobj_specs = {}


# Register the class
register_dataset(SWAN, warn=False)
Esempio n. 3
0
File: cfsr.py Progetto: acoat/vacumm
class CFSR(AtmosDataset):
    """:class:`~vacumm.data.misc.dataset.Dataset` class to read the
    CFSR atmospheric model outputs

    Read the :class:`~vacumm.data.misc.dataset.Dataset` for more information
    """
    name = 'cfsr'
    domain='atmos'
    description = "The CFSR atmospheric model"
    ncobj_specs = {

        # surface wind
        'u10m':{
            'search':{'id':['10u', 'u10'], 'standard_names':['U-component_of_wind']},
            'squeeze':'z'
        },
        'v10m':{
            'search':{'id':['10v', 'v10'], 'standard_names':['V-component_of_wind']},
            'squeeze':'z'
        },

    }



# Register the class
register_dataset(CFSR, warn=False)



Esempio n. 4
0
class GlobCurrent(OceanDataset, AtmosSurfaceDataset):
    """:class:`~vacumm.data.misc.dataset.Dataset` class to read the
    GlobCurrent satellite-derived currents

    Read the :class:`~vacumm.data.misc.dataset.Dataset` for more information
    """
    name = 'globcurrent'
    domain = 'ocean'
    description = 'The GlobCurrent currents dataset (http://www.globcurrent.org/)'

    #: Grid type
    arakawa_grid_type = 'A'

    # Local specs
    ncobj_specs = {
        'ugbt': {
            'search': {
                'id': ['eastward_geostrophic_current_velocity']
            }
        },
        'vgbt': {
            'search': {
                'id': ['northward_geostrophic_current_velocity']
            }
        },
    }


# Register the class
register_dataset(GlobCurrent, warn=False)
Esempio n. 5
0
            'inherit': 'v3d',
            'select': {
                'level': slice(0, 1)
            },
            'squeeze': 'z',
        }
    }

    positive = 'down'


#: Alias for :class:`Nemo`
NEMO = Nemo

# Register the class
register_dataset(NEMO, warn=False)

if __name__ == '__main__':
    from vacumm.data import setup_dataset
    from vacumm.misc.plot import map2 as map
    f = setup_dataset(
        'nemo',
        dataset=
        '/tmp/oo7/oo/mfstep_sys4/best_estimate/2004/INGV_MFSTEP-SYS4_20040702_ASLV.nc'
    )
    sshmod = f.get_ssh()
    #map(sshmod[0, Ellipsis], res=None)
    f = setup_dataset(
        'nemo',
        dataset=
        '/tmp/oo7/oo/mfstep_sys4/best_estimate/2004/INGV_MFSTEP-SYS4_20040702_TEMP.nc'
Esempio n. 6
0
        # remplacer names par id a priori ?
        # depth
        #        'depth':{'search':{'id':['depth_t']}},
    }

    positive = 'up'


# A revoir avec un object
#    imin=1
#    imax=-1
#   jmin=1
#   jmax=-1

#: Alias for :class:`WW3`
ww3 = WW3

# Register the class
register_dataset(ww3)

if __name__ == '__main__':
    from vacumm.data import DS
    from vacumm.misc.plot import map2 as map
    #map(sshmod[0, Ellipsis], res=None)
    print "test utus"
    f = DS('/home1/caparmor/vgarnier/ww3.190012.nc', 'ww3')
    stokes = f.get_utus()
    xxx
    #f.get_depth()
    xxxx
Esempio n. 7
0
        """

        list_nb_cells = []
        for l in range(10):
            for m in range(10):
                for n in range(10):
                    list_nb_cells.append((2**l * 3**m * 5**n, l, m, n))

        return sorted(list_nb_cells)


#: Alias for :class:`MesoNH`
mesonh = MesoNH

# Register the class
register_dataset(mesonh)

if __name__ == '__main__':

    nb_cell = mesonh.mesonh().nb_cells()
    print nb_cell[0:100]
    from vacumm.data import DS
    from vacumm.misc.plot import map2 as map
    #map(sshmod[0, Ellipsis], res=None)
    print "test utus"
    f = DS(
        '/temp/vgarnier/AMICO/WORKENV_METHODO/AROME/./AROME_IROISE_20110901-0000_20110910-0000.nc',
        'mesonh')
    xwind = f.get_u10m()
    xxx
    #f.get_depth()
Esempio n. 8
0
        },
        # sea surface zonal velocity
        'usurf': {
            'inherit':
            'u3d',  # relatif a la methode get_u3d et non au nom de variable
            'select': {
                'level': slice(-1, None)
            },
            'squeeze': 'z',
        },
        # sea surface meridional velocity
        'vsurf': {
            'inherit': 'v3d',  # heritage des specs
            'select': {
                'level': slice(-1, None)
            },
            'squeeze': 'z',
        }
    }


#    ncobj_specs = dict_merge(_local_obj_specs, OceanDataset.ncobj_specs)
#    ncobj_specs = dict_merge(ncobj_specs, AtmosSurfaceDataset.ncobj_specs)
#    del _local_obj_specs

#: Alias for :class:`Mars3D`
MARS3D = Mars3D

# Register the class
register_dataset(MARS3D)
Esempio n. 9
0
        # meridional current (3d)
        #useless ?        'v3d':{'search':{'id':['v']}},

        # meridional current (2d)
        #'vbt':{'search':{'id':['vomecrty']}}
    }

    positive = 'up'


#: Alias for :class:`Symphonie`
symp = Symphonie

# Register the class
register_dataset(symp)

if __name__ == '__main__':
    from vacumm.data import setup_dataset
    from vacumm.misc.plot import map2 as map
    #f = setup_dataset('symphonie', dataset='/home2/creizic/pgarreau/SIMED/SYMPHONIE/LION/GV_MFSTEP-SYS4_20040702_ASLV.nc')
    #sshmod = f.get_ssh()
    #map(sshmod[0, Ellipsis], res=None)
    #    f = DS('symphonie', dataset='/home2/creizic/pgarreau/SIMED/SYMPHONIE/SST/20100501_000118.nc')
    print "test temperature"
    f = setup_dataset(
        'symp',
        '/home2/creizic/pgarreau/SIMED/SYMPHONIE/SST/20100501_000118.nc')
    #    f = setup_dataset('symphonie', '/home2/creizic/pgarreau/SIMED/SYMPHONIE/SST/20100501_000118.nc')
    temp = f.get_temp()
    xxx