source: TOOLS/CMIP6_FORCING/AER_STRAT/volc.sh @ 3766

Last change on this file since 3766 was 3766, checked in by oboucher, 6 years ago

adding zoom case

  • Property svn:executable set to *
File size: 16.5 KB
Line 
1dirpwd=`pwd`
2
3vv='v3'
4
5#--choose the resolution
6#--only LR and zoom works fully for now !
7#lmdz='VVLR'
8#lmdz='VLR_L79'
9#lmdz='VLR'
10#lmdz='LR'
11#lmdz='MR'
12#--added for Frederique Cheruy
13lmdz='zoom_128x89'
14
15dirout='/data/'${USER}'/CMIP6/VOLC/'${lmdz}'_'${vv}'/'
16echo $dirout
17if [ ! -d ${dirout} ] ; then mkdir -p ${dirout} ; fi
18
19cat > process_volc.pro << EOF
20pro regrid
21;--version sans longitude
22;--latitude - level - wavelength - time
23;--sep 2017: add lat and month z variations of model layers
24;--Olivier Boucher
25;
26lmdz='${lmdz}'
27;
28if (lmdz eq 'VVLR') then begin
29dimlonlmdz=48
30dimlatlmdz=37
31dimz=19
32output='/data/${USER}/CMIP6/VOLC/VVLR_${vv}/'
33latfirst=90.
34latinc=-180./float(dimlatlmdz-1)
35latitudelmdz=latfirst+latinc*indgen(dimlatlmdz)
36endif
37
38if (lmdz eq 'VLR') then begin
39dimlonlmdz=96
40dimlatlmdz=96
41dimz=39
42output='/data/${USER}/CMIP6/VOLC/VLR_${vv}/'
43latfirst=90.
44latinc=-180./float(dimlatlmdz-1)
45latitudelmdz=latfirst+latinc*indgen(dimlatlmdz)
46endif
47
48if (lmdz eq 'VLR_L79') then begin
49dimlonlmdz=96
50dimlatlmdz=96
51dimz=79
52output='/data/${USER}/CMIP6/VOLC/VLR_L79_${vv}/'
53latfirst=90.
54latinc=-180./float(dimlatlmdz-1)
55latitudelmdz=latfirst+latinc*indgen(dimlatlmdz)
56endif
57
58if (lmdz eq 'LR') then begin
59dimlonlmdz=144
60dimlatlmdz=143
61dimz=79
62output='/data/${USER}/CMIP6/VOLC/LR_${vv}/'
63latfirst=90.
64latinc=-180./float(dimlatlmdz-1)
65latitudelmdz=latfirst+latinc*indgen(dimlatlmdz)
66endif
67
68if (lmdz eq 'MR') then begin
69dimlonlmdz=256
70dimlatlmdz=257
71dimz=79
72output='/data/${USER}/CMIP6/VOLC/MR_${vv}/'
73latfirst=90.
74latinc=-180./float(dimlatlmdz-1)
75latitudelmdz=latfirst+latinc*indgen(dimlatlmdz)
76endif
77
78if (lmdz eq 'zoom_128x89') then begin
79dimlonlmdz=128
80dimlatlmdz=89
81dimz=79
82output='/data/${USER}/CMIP6/VOLC/${lmdz}_${vv}/'
83latitudelmdz=[90., 86.85495, 83.8430634, 80.9792252, 78.2779922, 75.7526321, 73.4137878, 71.2680206, 69.3164978, $
84              67.5542145,   65.9702301, 64.5487747, 63.2709846, 62.1167107, 61.0660896, 60.1005592, 59.2034454, $
85              58.360157,    57.5581551, 56.7868576, 56.0374718, 55.302887,  54.5775719, 53.8574829, 53.1399384, $
86              52.4233971,   51.7071419, 50.9909439, 50.2747459, 49.5585518, 48.8423538, 48.1261597, 47.4099655, $
87              46.6937675,   45.9775734, 45.2613792, 44.5451813, 43.8289604, 43.1125679, 42.395504,  41.6765518, $
88              40.9534645,   40.2226982, 39.4792557, 38.7165909, 37.9265213, 37.099102,  36.2225075, 35.2828789, $
89              34.2642632,   33.1487236, 31.9167614, 30.5481758, 29.0234509, 27.32551,   25.4415455, 23.3643932, $
90              21.0930786,   18.6323872, 15.9917059, 13.1835403, 10.2221146, 7.12228632, 3.89880991, 0.565921485,$
91              -2.86286402, -6.37483072, -9.95808029, -13.6015415, -17.2949867, -21.029068, -24.7953758, -28.5864811, $
92             -32.3959961, -36.2186012, -40.0500298, -43.8870316, -47.7272758, -51.5692215, -55.4119453, -59.2549667, $
93             -63.0980797, -66.9412079, -70.7843399, -74.6274719, -78.4706039, -82.313736, -86.156868, -90.]
94endif
95
96NSW=6
97NLW=16
98;
99;--script only works on ciclad
100dir='/prodigfs/project/input4MIPs/VOLC/${vv}/'
101filename=dir+'CMIP_1850_2014_extinction_550nm_${vv}.nc'
102NETCDFREAD,filename,'altitude',altitude,dimaltitude
103NETCDFREAD,filename,'ext550',ext550,dimext
104;
105filename=dir+'CMIP_IPSL-CM6_radiation_${vv}.nc'
106;
107NETCDFREAD,filename,'altitude',altitude,dimaltitude
108NETCDFREAD,filename,'latitude',latitude,dimlatitude
109NETCDFREAD,filename,'wl1_sun',wl1_sun,solar_bands
110NETCDFREAD,filename,'wl2_sun',wl2_sun,solar_bands
111NETCDFREAD,filename,'wl1_earth',wl1_earth,terrestrial_bands
112NETCDFREAD,filename,'wl2_earth',wl2_earth,terrestrial_bands
113NETCDFREAD,filename,'month',month,dimmonth
114NETCDFREAD,filename,'ext_sun',ext_sun,dimext
115NETCDFREAD,filename,'omega_sun',omega_sun,dimext
116NETCDFREAD,filename,'g_sun',g_sun,dimext
117NETCDFREAD,filename,'ext_earth',ext_earth,dimext
118NETCDFREAD,filename,'omega_earth',omega_earth,dimext
119NETCDFREAD,filename,'g_earth',g_earth,dimext
120;
121print ,'wl1_sun=', wl1_sun
122print ,'wl2_sun=', wl2_sun
123print ,'wl1_ear=', wl1_earth
124print ,'wl2_ear=', wl2_earth
125;
126print ,'min max ext_sun=', min(ext_sun),   max(ext_sun)
127print ,'min max ome_sun=', min(omega_sun), max(omega_sun)
128;for nl=0, NSW-1 do begin
129;print ,'min max ome_sun nl=', nl, min(omega_sun(*,*,*,nl)), max(omega_sun(*,*,*,nl))
130;endfor
131print ,'min max ggg_sun=', min(g_sun),     max(g_sun)
132print ,'min max ext_ear=', min(ext_earth), max(ext_earth)
133;
134dimlat=dimlatitude(0)
135dimalt=dimaltitude(0)
136dimtime=dimmonth(0)
137;
138;--vertical resolution in Beiping's code
139dz=0.5
140;
141month_in_year=12
142;;month_in_year=1
143;
144;--compute optical depth of input data
145;--dimension ext_sun(l,k,j,nl)
146;ext_sun0=ext_sun(0,*,*,*)
147;print , 'size ext_sun0=', size(ext_sun0)
148;tau_sun=TOTAL(ext_sun0,2)*dz
149;print ,'min max tau_sun l=0 =', min(tau_sun),   max(tau_sun)
150;
151zz=fltarr(dimz)
152;
153;---approximate altitudes of LMDZ - L19 and L39
154;---NOT RECOMMENDED
155;
156if (dimz eq 19) then begin
157zz=[ 0.07125416, 0.2402302, 0.4865242, 0.8627044, 1.426484, 2.244528,    $
158    3.394085, 4.952366, 6.950302, 9.26943, 11.59338, 13.71214, 15.83651, $
159    18.27338, 21.16397, 24.63156, 28.9039, 34.57184, 44.51565] ;
160endif
161;
162if (dimz eq 39) then begin
163zz=[0.0338988, 0.1106602, 0.2139233, 0.3609663, 0.5685416, 0.8534464,     $
164    1.233232, 1.726868, 2.355076, 3.139813, 4.101937, 5.25541, 6.596076,  $
165    8.085103, 9.636482, 11.13441, 12.50023, 13.75765, 15.00424, 16.32207, $
166    17.74403, 19.27899, 20.93219, 22.70941, 24.61736, 26.66389, 28.85831, $
167    31.21178, 33.73778, 36.45278, 39.37709, 42.53607, 45.96209, 49.69786, $
168    53.80379, 58.37727, 63.61497, 70.07092, 80.52708]
169endif
170;
171;---exact altitudes of LMDZ -- L79
172;--only exists for LR and zoom_128x89 at the moment
173if (dimz eq 79) then begin
174  filename='./zalt_zonmean_${lmdz}_l79_rev.nc'
175  NETCDFREAD,filename,'GEOP',zz,dimzz
176  NETCDFREAD,filename,'LAT',zzlat,dimzzlat
177  NETCDFREAD,filename,'TIME_COUNTER',zztime,dimzztime
178  dimzzilat=dimzzlat[0]
179  dimzzitime=dimzztime[0]
180  ;--becareful zz comes with four dimensions
181  ;--lon lat k time
182  print, 'GEOP size=', size(zz)
183  ;--becareful zzlat comes with South Pole first
184  print, 'LAT from zalt field=', zzlat
185  if (dimzzilat ne dimlatlmdz) then begin
186    print , 'PB dimension latitude'
187  endif
188endif
189;
190;
191;--reconstructing the vertical coordinate at interfaces (in unit km)
192;--and reverse lat axis for zzi  i==>ii
193;--and reverse zz axis for zzi   dimz-1-k==>k
194;--and forget about lon axis : index 0 in zz
195zzi=fltarr(dimzzilat,dimzzitime,dimz+1)
196for i=0, dimzzilat-1 do begin
197 ii=dimzzilat-1-i
198 for t=0, dimzzitime-1 do begin
199  zzi(ii,t,0)=0.0
200  for k=1, dimz-1 do begin
201   zzi(ii,t,k)=(zz(0,i,dimz-1-(k-1),t)+zz(0,i,dimz-1-k,t))/2.0
202  endfor
203  zzi(ii,t,dimz)=100.00
204 endfor
205endfor
206print, 'zzi=',zzi
207;
208lev=indgen(dimz)+1
209;
210dimzori=dimalt
211zziori=fltarr(dimzori+1)
212zziori(0)=altitude(0)-0.25
213for k=1, dimzori do begin
214 zziori(k)=altitude(k-1)+0.25
215endfor
216;
217;--550 nm properties
218tau_550_lmdz=fltarr(dimlatlmdz,dimz,month_in_year)
219;
220;--SW properties
221tau_sun_lmdz=fltarr(dimlatlmdz,dimz,NSW,month_in_year)
222ome_sun_lmdz=fltarr(dimlatlmdz,dimz,NSW,month_in_year)
223ggg_sun_lmdz=fltarr(dimlatlmdz,dimz,NSW,month_in_year)
224;
225tau_sun_lmdz_ave=fltarr(dimlatlmdz,dimz,NSW,month_in_year)
226ome_sun_lmdz_ave=fltarr(dimlatlmdz,dimz,NSW,month_in_year)
227ggg_sun_lmdz_ave=fltarr(dimlatlmdz,dimz,NSW,month_in_year)
228;
229;--LW properties tau_abs
230tau_ear_lmdz=fltarr(dimlatlmdz,dimz,NLW,month_in_year)
231;
232tau_ear_lmdz_ave=fltarr(dimlatlmdz,dimz,NLW,month_in_year)
233;
234tau_sun_lmdz_ave(*,*,*,0)=1.e-15
235ome_sun_lmdz_ave(*,*,*,0)=1.e-15
236ggg_sun_lmdz_ave(*,*,*,0)=0.0
237tau_ear_lmdz_ave(*,*,*,0)=1.e-15
238;
239for year=0, dimtime/month_in_year-1 do begin
240;for year=141, 141 do begin ;--Pinatubo
241;
242tau_550_lmdz(*,*,*)=1.e-15
243tau_sun_lmdz(*,*,*,*)=1.e-15
244ome_sun_lmdz(*,*,*,*)=1.e-15
245ggg_sun_lmdz(*,*,*,*)=0.0
246tau_ear_lmdz(*,*,*,*)=1.e-15
247;
248chyr=strcompress(1850+year,/rem)
249;
250for mth=0,month_in_year-1 do begin
251;
252;--timestep
253l=mth+month_in_year*year
254print,'year mth l=',chyr, mth, l
255;
256;regridding
257for j=0, dimlatlmdz-1  do begin
258;
259;--finding latitude in beiping luo data
260jj=0
261for jluo=0,dimlat-2 do begin
262  if (latitudelmdz(j) gt (latitude(jluo)+latitude(jluo+1))/2. ) then begin
263    jj=jluo+1
264  endif
265endfor
266;
267for k=0, dimz-1 do begin
268for kori=0, dimzori-1 do begin
269;
270;fraction de la maille kori qui se trouve dans la maille k
271frac= max([0.0,min([zzi(j,mth,k+1),zziori(kori+1)])-max([zzi(j,mth,k),zziori(kori)])])/(zziori(kori+1)-zziori(kori))
272;
273tau_550_lmdz(j,k,mth)=tau_550_lmdz(j,k,mth)+ext550(l,kori,jj)*dz*frac
274;
275for nl=0, NSW-1 do begin
276  tau_sun_lmdz(j,k,nl,mth)=tau_sun_lmdz(j,k,nl,mth)+ext_sun(l,kori,jj,nl)*dz*frac
277  ome_sun_lmdz(j,k,nl,mth)=ome_sun_lmdz(j,k,nl,mth)+omega_sun(l,kori,jj,nl)*ext_sun(l,kori,jj,nl)*dz*frac
278  ggg_sun_lmdz(j,k,nl,mth)=ggg_sun_lmdz(j,k,nl,mth)+g_sun(l,kori,jj,nl)*omega_sun(l,kori,jj,nl)*ext_sun(l,kori,jj,nl)*dz*frac
279;
280  tau_sun_lmdz_ave(j,k,nl,0)=tau_sun_lmdz_ave(j,k,nl,0)+ext_sun(l,kori,jj,nl)*dz*frac
281  ome_sun_lmdz_ave(j,k,nl,0)=ome_sun_lmdz_ave(j,k,nl,0)+omega_sun(l,kori,jj,nl)*ext_sun(l,kori,jj,nl)*dz*frac
282  ggg_sun_lmdz_ave(j,k,nl,0)=ggg_sun_lmdz_ave(j,k,nl,0)+g_sun(l,kori,jj,nl)*omega_sun(l,kori,jj,nl)*ext_sun(l,kori,jj,nl)*dz*frac
283endfor
284;
285for nl=0, NLW-1 do begin
286  tau_ear_lmdz(j,k,nl,mth)=tau_ear_lmdz(j,k,nl,mth)+ext_earth(l,kori,jj,nl)*(1.-omega_earth(l,kori,jj,nl))*dz*frac
287  tau_ear_lmdz_ave(j,k,nl,0)=tau_ear_lmdz_ave(j,k,nl,0)+ext_earth(l,kori,jj,nl)*(1.-omega_earth(l,kori,jj,nl))*dz*frac
288endfor
289;
290endfor
291;--end lat loop
292;
293endfor
294endfor
295;--end k loops
296;
297endfor
298;--end month loop
299;
300;renormalizing intensive SW properties
301ggg_sun_lmdz(*,*,*,*)=ggg_sun_lmdz(*,*,*,*)/ome_sun_lmdz(*,*,*,*)
302ome_sun_lmdz(*,*,*,*)=ome_sun_lmdz(*,*,*,*)/tau_sun_lmdz(*,*,*,*)
303;
304;saving netcdf file
305;
306print ,'min max ext_sun lmdz=', min(tau_sun_lmdz), max(tau_sun_lmdz)
307print ,'min max ome_sun lmdz=', min(ome_sun_lmdz), max(ome_sun_lmdz)
308;for nl=0, NSW-1 do begin
309;print ,'min max ome_sun lmdz nl =', nl, min(ome_sun_lmdz(*,*,nl,*)), max(ome_sun_lmdz(*,*,nl,*))
310;endfor
311print ,'min max ggg_sun lmdz=', min(ggg_sun_lmdz), max(ggg_sun_lmdz)
312print ,'min max ext_ear lmdz=', min(tau_ear_lmdz), max(tau_ear_lmdz)
313;
314print ,'min max ext_sun lmdz l=1=', min(tau_sun_lmdz(*,*,*,0)), max(tau_sun_lmdz(*,*,*,0))
315print ,'min max ome_sun lmdz l=1=', min(ome_sun_lmdz(*,*,*,0)), max(ome_sun_lmdz(*,*,*,0))
316print ,'min max ggg_sun lmdz l=1=', min(ggg_sun_lmdz(*,*,*,0)), max(ggg_sun_lmdz(*,*,*,0))
317print ,'min max ext_ear lmdz l=1=', min(tau_ear_lmdz(*,*,*,0)), max(tau_ear_lmdz(*,*,*,0))
318;
319;--compute optical depth of output data
320;tau_sun=TOTAL(tau_sun_lmdz,2)
321;print ,'min max tau_sun_lmdz vert=', min(tau_sun),   max(tau_sun)
322;
323opticstruct={lat:fltarr(dimlatlmdz),lev:fltarr(dimz),             $
324             wav:fltarr(NSW),time:fltarr(month_in_year),          $
325             tau_sun:fltarr(dimlatlmdz,dimz,NSW,month_in_year),   $
326             ome_sun:fltarr(dimlatlmdz,dimz,NSW,month_in_year),   $
327             ggg_sun:fltarr(dimlatlmdz,dimz,NSW,month_in_year) }
328;
329opticstruct.lat=latitudelmdz
330opticstruct.lev=lev
331opticstruct.wav=(wl1_sun(0:NSW-1)+wl2_sun(0:NSW-1))/2.
332opticstruct.time=float(indgen(month_in_year)+1)
333opticstruct.tau_sun=tau_sun_lmdz
334opticstruct.ome_sun=ome_sun_lmdz
335opticstruct.ggg_sun=ggg_sun_lmdz
336;
337attributes = {units:strarr(7),long_name:strarr(7)}
338attributes.units =     ['degrees_north','level','meters','month','-','-','-']
339attributes.long_name = ['latitude','level','wavelength','time','tau_sun','ome_sun','g_sun']
340;
341dimensions = {isdim:intarr(7), links:intarr(4,7)}
342       dimensions.isdim =  [1,1,1,1,0,0,0]  ; (1=dimension, 0=variable)
343       dimensions.links = [ [-1,-1,-1,-1],[-1,-1,-1,-1],   $
344                            [-1,-1,-1,-1],[-1,-1,-1,-1],   $
345                            [0,1,2,3],[0,1,2,3],[0,1,2,3]  ]
346;
347netcdfwrite,output+'tauswstrat.2D.'+chyr+'.nc',opticstruct,clobber=1, $
348            attributes=attributes, dimensions=dimensions
349;
350opticstruct={lat:fltarr(dimlatlmdz),lev:fltarr(dimz),             $
351             wav:fltarr(NLW),time:fltarr(month_in_year),          $
352             tau_ear:fltarr(dimlatlmdz,dimz,NLW,month_in_year) }
353;
354opticstruct.lat=latitudelmdz
355opticstruct.lev=lev
356opticstruct.wav=(wl1_earth+wl2_earth)/2.
357opticstruct.time=float(indgen(month_in_year)+1)
358opticstruct.tau_ear=tau_ear_lmdz
359;
360attributes = {units:strarr(5),long_name:strarr(5)}
361attributes.units = ['degrees_north','level','cm-1','month','-']
362attributes.long_name = ['latitude','level','wavenumber','time','tau_ear']
363;
364dimensions = {isdim:intarr(5), links:intarr(4,5)}
365       dimensions.isdim =  [1,1,1,1,0]  ; (1=dimension, 0=variable)
366       dimensions.links = [ [-1,-1,-1,-1],[-1,-1,-1,-1],   $
367                            [-1,-1,-1,-1],[-1,-1,-1,-1],   $
368                            [0,1,2,3]  ]
369;
370netcdfwrite,output+'taulwstrat.2D.'+chyr+'.nc',opticstruct,clobber=1, $
371            attributes=attributes, dimensions=dimensions
372;
373opticstruct={lat:fltarr(dimlatlmdz),lev:fltarr(dimz),             $
374             time:fltarr(month_in_year),                          $
375             tau550:fltarr(dimlatlmdz,dimz,month_in_year) }
376;
377opticstruct.lat=latitudelmdz
378opticstruct.lev=lev
379opticstruct.time=float(indgen(month_in_year)+1)
380opticstruct.tau550=tau_550_lmdz
381;
382attributes = {units:strarr(4),long_name:strarr(4)}
383attributes.units = ['degrees_north','level','month','-']
384attributes.long_name = ['latitude','level','time','tau550']
385;
386dimensions = {isdim:intarr(4), links:intarr(3,4)}
387       dimensions.isdim =  [1,1,1,0]  ; (1=dimension, 0=variable)
388       dimensions.links = [ [-1,-1,-1],[-1,-1,-1],   $
389                            [-1,-1,-1],[0,1,2]  ]
390;
391netcdfwrite,output+'tau550strat.2D.'+chyr+'.nc',opticstruct,clobber=1, $
392            attributes=attributes, dimensions=dimensions
393;
394endfor
395;--end loop on years
396;
397;now deal with average conditions
398ggg_sun_lmdz_ave(*,*,*,0)=ggg_sun_lmdz_ave(*,*,*,0)/ome_sun_lmdz_ave(*,*,*,0)
399ome_sun_lmdz_ave(*,*,*,0)=ome_sun_lmdz_ave(*,*,*,0)/tau_sun_lmdz_ave(*,*,*,0)
400tau_sun_lmdz_ave(*,*,*,0)=tau_sun_lmdz_ave(*,*,*,0)/float(dimtime)
401tau_ear_lmdz_ave(*,*,*,0)=tau_ear_lmdz_ave(*,*,*,0)/float(dimtime)
402;
403for mth=1, month_in_year-1 do begin
404ggg_sun_lmdz_ave(*,*,*,mth)=ggg_sun_lmdz_ave(*,*,*,0)
405ome_sun_lmdz_ave(*,*,*,mth)=ome_sun_lmdz_ave(*,*,*,0)
406tau_sun_lmdz_ave(*,*,*,mth)=tau_sun_lmdz_ave(*,*,*,0)
407tau_ear_lmdz_ave(*,*,*,mth)=tau_ear_lmdz_ave(*,*,*,0)
408endfor
409;
410opticstruct={lat:fltarr(dimlatlmdz),lev:fltarr(dimz),             $
411             wav:fltarr(NSW),time:fltarr(month_in_year),          $
412             tau_sun:fltarr(dimlatlmdz,dimz,NSW,month_in_year),   $
413             ome_sun:fltarr(dimlatlmdz,dimz,NSW,month_in_year),   $
414             ggg_sun:fltarr(dimlatlmdz,dimz,NSW,month_in_year) }
415;
416opticstruct.lat=latitudelmdz
417opticstruct.lev=lev
418opticstruct.wav=(wl1_sun(0:NSW-1)+wl2_sun(0:NSW-1))/2.
419opticstruct.time=float(indgen(month_in_year))
420opticstruct.tau_sun=tau_sun_lmdz_ave
421opticstruct.ome_sun=ome_sun_lmdz_ave
422opticstruct.ggg_sun=ggg_sun_lmdz_ave
423;
424attributes = {units:strarr(7),long_name:strarr(7)}
425attributes.units =     ['degrees_north','level','meters','month','-','-','-']
426attributes.long_name = ['latitude','level','wavelength','time','tau_sun','ome_sun','g_sun']
427;
428dimensions = {isdim:intarr(7), links:intarr(4,7)}
429       dimensions.isdim =  [1,1,1,1,0,0,0]  ; (1=dimension, 0=variable)
430       dimensions.links = [ [-1,-1,-1,-1],[-1,-1,-1,-1],   $
431                            [-1,-1,-1,-1],[-1,-1,-1,-1],   $
432                            [0,1,2,3],[0,1,2,3],[0,1,2,3]  ]
433;
434netcdfwrite,output+'tauswstrat.2D.ave.nc',opticstruct,clobber=1, $
435            attributes=attributes, dimensions=dimensions
436;
437opticstruct={lat:fltarr(dimlatlmdz),lev:fltarr(dimz),             $
438             wav:fltarr(NLW),time:fltarr(month_in_year),          $
439             tau_ear:fltarr(dimlatlmdz,dimz,NLW,month_in_year) }
440;
441opticstruct.lat=latitudelmdz
442opticstruct.lev=lev
443opticstruct.wav=(wl1_earth+wl2_earth)/2.
444opticstruct.time=float(indgen(month_in_year))
445opticstruct.tau_ear=tau_ear_lmdz_ave
446;
447attributes = {units:strarr(5),long_name:strarr(5)}
448attributes.units = ['degrees_north','level','cm-1','month','-']
449attributes.long_name = ['latitude','level','wavenumber','time','tau_ear']
450;
451dimensions = {isdim:intarr(5), links:intarr(4,5)}
452       dimensions.isdim =  [1,1,1,1,0]  ; (1=dimension, 0=variable)
453       dimensions.links = [ [-1,-1,-1,-1],[-1,-1,-1,-1],   $
454                            [-1,-1,-1,-1],[-1,-1,-1,-1],   $
455                            [0,1,2,3]  ]
456;
457netcdfwrite,output+'taulwstrat.2D.ave.nc',opticstruct,clobber=1, $
458            attributes=attributes, dimensions=dimensions
459;
460end
461EOF
462
463cat > volc.job << EOF2
464#PBS -N process_volc
465#PBS -S /bin/bash
466#PBS -q week # there exist: short, day, days3, week...
467#PBS -k eo  # to write the output of stdin
468### Max memory
469#PBS -l vmem=10gb   # virtual memory
470#PBS -l  mem=10gb
471
472cd $dirpwd
473
474idl << eof
475.r netcdf
476.r process_volc
477regrid
478eof
479EOF2
480
481#qsub volc.job
Note: See TracBrowser for help on using the repository browser.