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 | ; |
---|
32 | ; EXAMPLES |
---|
33 | ; ======== |
---|
34 | ; |
---|
35 | ; :: |
---|
36 | ; |
---|
37 | ; IDL> oaflux_mask_30N30S |
---|
38 | ; |
---|
39 | ; TODO |
---|
40 | ; ==== |
---|
41 | ; |
---|
42 | ; hard coded directory - usage of ${TROPFLUX_ID} |
---|
43 | ; |
---|
44 | ; coding rules |
---|
45 | ; |
---|
46 | ; EVOLUTIONS |
---|
47 | ; ========== |
---|
48 | ; |
---|
49 | ; - fplod 20101216T141137Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
50 | ; |
---|
51 | ; * minimal header |
---|
52 | ; |
---|
53 | ; - jv 2010 |
---|
54 | ; |
---|
55 | ; * creation |
---|
56 | ; |
---|
57 | ;- |
---|
58 | ; |
---|
59 | PRO oaflux_mask_30N30S |
---|
60 | |
---|
61 | @common |
---|
62 | |
---|
63 | ; |
---|
64 | ;; Read oaflux grid and mask |
---|
65 | ; |
---|
66 | dir='/Volumes/vialardj/OAFLUX/' |
---|
67 | dir='/Users/jv/data/OAFLUX/' |
---|
68 | |
---|
69 | yy=2004 & cy=string(yy,format='(i4.4)') |
---|
70 | fi=dir+'lh_oaflux_'+cy+'.nc' |
---|
71 | initncdf, fi |
---|
72 | lh=ncdf_lec(fi,var='lhtfl',count=[jpi,jpj,1]) & lh=float(lh) |
---|
73 | valmask=1.e20 |
---|
74 | ind=where(lh ge 32000,compl=nind) & lh(ind)=valmask & lh(nind)=-0.1*lh(nind) |
---|
75 | mask_out=(lh ne valmask) |
---|
76 | domdef, 0.,360.,-30.,30. |
---|
77 | |
---|
78 | lon=reform(glamt(*,0)) |
---|
79 | ind1=where(lon le 20.) |
---|
80 | ind2=where(lon ge 30.) |
---|
81 | |
---|
82 | lat_out=reform(gphit(0,firstyt:lastyt)) |
---|
83 | |
---|
84 | lon_out=[reform(glamt(ind2,0)),reform(glamt(ind1,0))+360] |
---|
85 | |
---|
86 | mask_out=mask_out([ind2,ind1],firstyt:lastyt)*1. |
---|
87 | |
---|
88 | |
---|
89 | ncfile='!'+dir+'mask_oaflux_30N30S.nc' |
---|
90 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
91 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
92 | msk_attr={long_name:'land sea mask',short_name:'msk',axis:'YX'} |
---|
93 | globattr={description:'OAFLUX mask over the Indian Ocean: 40E-120E, 30S-30N'} |
---|
94 | |
---|
95 | ncfields = 'msk[longitude,latitude]=mask_out:msk_attr; ' $ |
---|
96 | + 'longitude[]=lon_out:lon_attr; ' $ |
---|
97 | + 'latitude[]=lat_out:lat_attr; ' $ |
---|
98 | + ' @ globattr' |
---|
99 | |
---|
100 | @ncdf_quickwrite |
---|
101 | |
---|
102 | END |
---|