Coder Social home page Coder Social logo

openwind's Introduction

README

OpenWind depends on Nansat (https://github.com/nansencenter/nansat).

Installation

  • Add the top level folder openwind/ to your PYTHONPATH
  • Add the subfolder openwind/openwind/ to your PATH (for command line usage)

Command line usage:

./sar_wind.py -s SAR_filename -w winddir -f figure_filename -n netCDF_filename -p pixelsize
  • SAR_filename is a file readable by Nansat, containing Normalised Radar Cross Section (NRCS)

  • winddir is either:

    • a file readable by Nansat, containing wind direction (U10 and V10)
    • an integer indicating constant wind direction (0 from North, 90 from East etc)
    • a string 'wind_archive': matching wind field is obtained from local file archive. See mapper_wind_archive_template.py for configuration.
    • the string 'online' [DEFAULT]: NCEP GFS model wind is downloaded from NCEP NOMADS, if available for the time of the SAR image
  • pixelsize is given in meters (500 m by default). Use pixelsize='fullres' for no resizing (usually not recommended).

To see explanation of all features:

./sar_wind.py -h

Python usage:

>>> from openwind import SARWind

>>> s = SARWind(SAR_filename, winddir, pixelsize)

See above (command line usage) for specification of the input parameters.

To plot the result and save as figure:

>>> s.plot() # to plot SAR wind overlaid wind vectors.

>>> s.plot(filename, show=False) # Save to file

If winddir is not specified when the SARWind object is generated with the Python API, wind speed is not automatically calculated. This allows modification of the SAR image (e.g. resizing or cropping) before wind speed calculation:

>>> from openwind import SARWind

>>> s = SARWind(SAR_filename)

>>> s.crop(lonlim=[5, 6], latlim=[60, 61])

>>> s.calculate_wind(winddir)

Notes:

  • GDAL might need to be compiled with the option --with-jasper to be able to read the downloaded NCEP GFS GRIB2-files

Acknowledgments

OpenWind is developed with support from the Norwegian Space Centre.

Thanks to the Royal Netherlands Meteorological Institute (http://www.knmi.nl/scatterometer/cmod5/) for making the cmod5 software available.

References

Hersbach, H., Comparison of C-Band Scatterometer CMOD5.N Equivalent Neutral Winds with ECMWF J. Atm. Oceanic Technol., 2010, 27, 721-736, doi:10.1175/2009JTECHO698.1.

Portabella, M. and A.C.M. Stoffelen, On Scatterometer Ocean Stress J. Atm. Oceanic Technol., 2009, 26, 2, 368-382, doi:10.1175/2008JTECHO578.1.

Verhoef, A., M. Portabella, A. Stoffelen and H. Hersbach, CMOD5.n - the CMOD5 GMF for neutral winds Document external project: 2008, SAF/OSI/CDOP/KNMI/TEC/TN/165, EUMETSAT, 2008.

Hersbach, H., A. Stoffelen and S. de Haan, An Improved C-band scatterometer ocean geophysical model function: CMOD5 J. Geophys. Res., 2007, 112, C03006, doi:10.1029/2006JC003743.

Portabella, M., Wind field retrieval from satellite radar systems. Thesis: University of Barcelona, 2002, Barcelona, Spain, 207p.

Haan, S. de and A. Stoffelen, CMOD5 Document external project: 2001, SAF/OSI/KNMI/TEC/TN/140, EUMETSAT, 2001.

openwind's People

Contributors

knutfrode avatar mortenwh avatar

Watchers

 avatar  avatar  avatar

openwind's Issues

Make openwind.SARwind a class instead of a function

Current usage is:

>>> s = Nansat(SAR_filename)
>>> w = Nansat(wind_filename)
>>> sarwind = openwind.SARwind(s, w)  # SARwind is a function, returning a SAR wind object
>>> sarwind.plot()

New usage will be similar:

>>> sarwind = openwind.SARwind(s, w) # SARwind is here a class

where
s is either a SAR filename or Nansat object
w (optional) is either a wind filename or Nansat object, or a constant direction.

If w is not given, SAR wind will be calculated with a second call:

>>> sarwind = openwind.SARwind(SAR_filename)
(>>> sarwind.reproject(some domain) )
>>> w = Nansat(wind_filename)
>>> sarwind.calculate_wind(w)
>>> sarwind.plot()

The latter two-step process allows the possibility to reproject the SARwind object before wind calculation, taking proper care that look direction is available also after reprojection (currently not possible).
If w is not given here either, download of NCEP GFS wind is attempted.

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.