[14] | 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 | ; |
---|
[15] | 31 | ; :ref:`guide data OAFLUX <data_in_oaflux>` |
---|
[14] | 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 | ; |
---|
[13] | 60 | PRO oaflux_mask_30N30S |
---|
| 61 | |
---|
| 62 | @common |
---|
| 63 | |
---|
| 64 | ; |
---|
| 65 | ;; Read oaflux grid and mask |
---|
| 66 | ; |
---|
| 67 | dir='/Volumes/vialardj/OAFLUX/' |
---|
| 68 | dir='/Users/jv/data/OAFLUX/' |
---|
| 69 | |
---|
| 70 | yy=2004 & cy=string(yy,format='(i4.4)') |
---|
| 71 | fi=dir+'lh_oaflux_'+cy+'.nc' |
---|
| 72 | initncdf, fi |
---|
| 73 | lh=ncdf_lec(fi,var='lhtfl',count=[jpi,jpj,1]) & lh=float(lh) |
---|
| 74 | valmask=1.e20 |
---|
| 75 | ind=where(lh ge 32000,compl=nind) & lh(ind)=valmask & lh(nind)=-0.1*lh(nind) |
---|
| 76 | mask_out=(lh ne valmask) |
---|
| 77 | domdef, 0.,360.,-30.,30. |
---|
| 78 | |
---|
| 79 | lon=reform(glamt(*,0)) |
---|
| 80 | ind1=where(lon le 20.) |
---|
| 81 | ind2=where(lon ge 30.) |
---|
| 82 | |
---|
| 83 | lat_out=reform(gphit(0,firstyt:lastyt)) |
---|
| 84 | |
---|
| 85 | lon_out=[reform(glamt(ind2,0)),reform(glamt(ind1,0))+360] |
---|
| 86 | |
---|
| 87 | mask_out=mask_out([ind2,ind1],firstyt:lastyt)*1. |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | ncfile='!'+dir+'mask_oaflux_30N30S.nc' |
---|
| 91 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
| 92 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
| 93 | msk_attr={long_name:'land sea mask',short_name:'msk',axis:'YX'} |
---|
| 94 | globattr={description:'OAFLUX mask over the Indian Ocean: 40E-120E, 30S-30N'} |
---|
| 95 | |
---|
| 96 | ncfields = '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 | |
---|
| 103 | END |
---|