Coder Social home page Coder Social logo

prepare-ocean-toolbox's Introduction

PREPARE ocean model toolbox

==============

Developed by Knut-Frode Dagestad (MET Norway, [email protected]) for the EU PREPARE project

This toolbox contains three Python scripts:

  • get_myocean.py
    • to download ocean model data from MyOcean (Copernicus Marine Service)
  • get_opendap.py
    • to download ocean model data from OPeNDAP servers
  • interpolate_ocean.py
    • to interpolate downloaded NetCDF files to another map projection

The two first scripts use information about relevant datsets (and username/password) listed in the respective files myocean_datasets.py and opendap_datasets.py. Other datasets may be added following the example of the datasets already included. For MyOcean datasets, it is recommended to browse the online catalogue at www.myocean.eu in order to become familiar with the various datasets available. For OPeNDAP servers that require log-on credentials, insert ":@" after the "http://" of the url.

No installation is required, simply add this folder to your PATH to run scripts from anywhere.

Requirements:

Usage:

Each script requires a number of arguments. Run the scripts without arguments from the command line to get specific instructions.

Hints:

  • To get an overview of the variables and dimensions contained in a dataset listed in myocean_datasets.py: Visit www.myocean.eu/web/69-myocean-interactive-catalogue.php. Use the search engine to locate the listed product and hit "MORE INFO". Select the DOCUMENTATION tab and open the PRODUCT USER MANUAL. See chapters III and V for a description of the netCDF file contents, including variable names.
  • To get an overview of the variables and dimensions contained in a dataset listed in opendap_datasets.py: Copy the url, paste it into a web browser and add ".html". The resulting listing shows the variables and their attributes, as well as facilitating a listing of the values for any variable.
  • The -v argument requires the netCDF variable name used in the datafiles (NOT the standard_name). Different datasets use different names for, e.g., the velocity components. For example, the (east,north) velocity components are named: (vozocrtx,vomecrty) for the MyOcean mediterranean datasets; (uvel,vvel) for the MyOcean baltic datasets; (water_u,water_v) for the usn_hycom datasets. See the previous hints.
  • The uppermost depth available in a particular dataset may not be at the very surface (0 m). Use a small depth range (z and Z arguments) to ensure that the uppermost data are found, e.g., "-z 0 -Z 5" will obtain all available depths in the upper 5 meters.
  • See http://trac.osgeo.org/proj/wiki/FAQ on how to make proj4-strings for interpolation_ocean.py

Examples:

To download one day of surface currents, temperature and ice coverage for the Gulf of Finland through MyOcean:

./get_myocean.py -region baltic -t 2014-12-21 12:00:00 -T 2014-12-22 12:00:00 -z Surface -Z Surface -x 22 -X 30.2 -y 58.9 -Y 60.9 -v temp -v uvel -v vvel -v ice_cov -f gulf_finland.nc

To download one week of reanalysis upper layer currents for the Aegean Sea through MyOcean: (type ./get_myocean.py -region mediterranean -reanalysis to get name of subdatasets)

./get_myocean.py -region mediterranean -reanalysis -d myov04-med-ingv-cur-rean-dm -t 2011-11-21 00:00:00 -T 2011-11-28 12:00:00 -z 0 -Z 5 -x 22 -X 27 -y 37 -Y 41 -v vozocrtx -v vomecrty -f aegean.nc

To download all data for one day from the usn-hycom model for the Black Sea

./get_opendap.py -source usn-hycom -t '2014-12-25 21:00:00' -T '2014-12-26 00:00:00' -x 40.7 -X 48.3 -y -26.5 -Y 42.3 -f blacksea.nc

To interpolate the latter data to Lambert Conformal Conic projection at 10 km grid spacing, with current components rotated to grid orientation:

./interpolate_ocean.py -i blacksea.nc -o blacksea_lcc.nc -proj4 "+proj=lcc +lat_1=38.69259533705237 +lat_2=39.02625053604863 +lat_0=40 +lon_0=-77.03638889 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs" -r 10000 -v grid

prepare-ocean-toolbox's People

Contributors

knutfrode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

prepare-ocean-toolbox's Issues

Proxy Error

Dear author,
I got prepare-ocean-toolbox on my computer. But when I ran command "./get_myocean.py -region global -t 2017-03-17 00:30:00 -T 2017-03-18 23:30:00 -z Surface -Z Surface -x 97 -X 125 -y 0 -Y 25 -v uo -v vo -f # Cur_0m-1h.nc" I got error:
11:21:45 [ERROR] Execution failed: HTTP Error 502: Proxy Error
11:21:45 [ INFO] . reason: Proxy Error
11:21:45 [ INFO] . code 502:

What I need do to fix this error?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.