source: trunk/src/y_site_location.pro

Last change on this file was 204, checked in by pinsard, 10 years ago

fix thanks to coding rules; typo

  • Property svn:keywords set to Id URL
File size: 1.8 KB
Line 
1;+
2;
3; ===================
4; y_site_location.pro
5; ===================
6;
7; .. function:: y_site_location(site)
8;
9; DESCRIPTION
10; ===========
11;
12;    :param site: ++
13;
14; EXAMPLES
15; ========
16;
17; .. code-block:: idl
18;
19;    site = ++
20;    result = y_site_location(site)
21;
22; SEE ALSO
23; ========
24;
25; :func:`x_site_location`
26;
27; :ref:`fig1_no_obs_map.pro`
28; :ref:`net_flux_validation_scatter_2000_2007.pro`
29; :ref:`fig16_timeseries_nino3.pro`
30; :ref:`fig2_timeline_diagram.pro`
31; :ref:`air_validation_scatter_2000_2009_v50.pro`
32; :ref:`q2m_validation_scatter_2000_2009_v50.pro`
33; :ref:`sst_validation_scatter_2000_2009_v50.pro`
34; :ref:`ws_validation_scatter_2000_2009_v50.pro`
35; :ref:`air_validation_scatter_2000_2009_basin.pro`
36; :ref:`q2m_validation_scatter_2000_2009_basin.pro`
37; :ref:`sst_validation_scatter_2000_2009_basin.pro`
38; :ref:`ws_validation_scatter_2000_2009_basin.pro`
39; :ref:`lhf_validation_scatter_2000_2009.pro`
40; :ref:`shf_validation_scatter_2000_2009.pro`
41; :ref:`lwr_validation_scatter_2000_2007.pro`
42; :ref:`swr_validation_scatter_2000_2007.pro`
43;
44; TODO
45; ====
46;
47; coding rules
48;
49; EVOLUTIONS
50; ==========
51;
52; $Id$
53;
54; $URL$
55;
56; - fplod 20110412T083358Z aedon.locean-ipsl.upmc.fr (Darwin)
57;
58;   * creation from fig2_timeline_diagram.pro
59;
60;-
61function y_site_location, site
62n1=strpos(site, 'e')
63if (n1 gt -1) then begin
64    n=strpos(site, 's')
65    if (n gt -1) then begin
66        y=strmid(site, n+1, n1-n-1)
67    endif else begin
68        n=strpos(site, 'n')
69        y=strmid(site, n+1, n1-n-1)
70    endelse
71endif else begin
72    n1=strpos(site, 'w')
73    n=strpos(site, 's')
74    if (n gt -1) then begin
75        y=strmid(site, n+1, n1-n-1)
76        y=180+(180-float(y))
77    endif else begin
78        n=strpos(site, 'n')
79        y=strmid(site, n+1, n1-n-1)
80        y=180+(180-float(y))
81    endelse
82endelse
83return,float(y)
84end
Note: See TracBrowser for help on using the repository browser.