source: trunk/src/oaflux_mask_30N30S.pro @ 15

Last change on this file since 15 was 15, checked in by pinsard, 13 years ago

add tool to get OAFLUX ref. file

File size: 2.4 KB
Line 
1;+
2;
3; .. _oaflux_mask_30N30S.pro:
4;
5; ======================
6; oaflux_mask_30N30S.pro
7; ======================
8;
9;     .. graphviz::
10;
11;        digraph oaflux_mask_30N30S {
12;           graph [
13;           rankdir="LR",
14;           ]
15;           file_oaflux [shape=ellipse,fontname=Courier,label="/Volumes/vialardj/OAFLUX/lh_oaflux_2004.nc"];
16;           mask [shape=ellipse,fontname=Courier,label="/Users/jv/data/OAFLUX/mask_oaflux_30N30S.nc"];
17;
18;           oaflux_mask_30N30S [shape=box,
19;           fontname=Courier,
20;           color=blue,
21;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/oaflux_mask_30N30S.pro",
22;           label="${TROPFLUX}/src/oaflux_mask_30N30S.pro"];
23;
24;           {file_oaflux} -> {oaflux_mask_30N30S} -> {mask}
25;
26;          }
27;
28; SEE ALSO
29; ========
30;
31; :ref:`guide data OAFLUX <data_in_oaflux>`
32;
33; EXAMPLES
34; ========
35;
36; ::
37;
38;  IDL> oaflux_mask_30N30S
39;
40; TODO
41; ====
42;
43; hard coded directory - usage of ${TROPFLUX_ID}
44;
45; coding rules
46;
47; EVOLUTIONS
48; ==========
49;
50; - fplod 20101216T141137Z aedon.locean-ipsl.upmc.fr (Darwin)
51;
52;   * minimal header
53;
54; - jv 2010
55;
56;   * creation
57;
58;-
59;
60PRO oaflux_mask_30N30S
61
62@common
63
64;
65;; Read oaflux grid and mask
66;
67dir='/Volumes/vialardj/OAFLUX/'
68dir='/Users/jv/data/OAFLUX/'
69
70yy=2004 & cy=string(yy,format='(i4.4)')
71fi=dir+'lh_oaflux_'+cy+'.nc'
72initncdf, fi
73lh=ncdf_lec(fi,var='lhtfl',count=[jpi,jpj,1]) & lh=float(lh)
74valmask=1.e20
75ind=where(lh ge 32000,compl=nind) & lh(ind)=valmask & lh(nind)=-0.1*lh(nind)
76mask_out=(lh ne valmask)
77domdef, 0.,360.,-30.,30.
78
79lon=reform(glamt(*,0))
80ind1=where(lon le 20.)
81ind2=where(lon ge 30.)
82
83lat_out=reform(gphit(0,firstyt:lastyt))
84
85lon_out=[reform(glamt(ind2,0)),reform(glamt(ind1,0))+360]
86
87mask_out=mask_out([ind2,ind1],firstyt:lastyt)*1.
88
89
90ncfile='!'+dir+'mask_oaflux_30N30S.nc'
91lon_attr={units:'degrees_east',long_name:'Longitude'}
92lat_attr={units:'degrees_north',long_name:'Latitude'}
93msk_attr={long_name:'land sea mask',short_name:'msk',axis:'YX'}
94globattr={description:'OAFLUX mask over the Indian Ocean: 40E-120E, 30S-30N'}
95
96ncfields = 'msk[longitude,latitude]=mask_out:msk_attr; ' $
97                      + 'longitude[]=lon_out:lon_attr; ' $
98                      + 'latitude[]=lat_out:lat_attr; ' $
99                      + ' @ globattr'
100
101@ncdf_quickwrite
102
103END
Note: See TracBrowser for help on using the repository browser.