[go: up one dir, main page]

Menu

[r34]: / common / read_xml.f90  Maximize  Restore  History

Download this file

677 lines (603 with data), 20.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
! Read parameters using xml file , version civ1 & civ2
! Copyright (C) 1999,2010 Gauthier Delerce
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2, or (at your option)
! any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software Foundation,
! Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
!
! Gauthier Delerce <Gauthier.Delerce@civx.org>
subroutine read_xml(code,parameterFileName)
! use libxml2f90 library, http://sourceforge.net/projects/libxml2f90/
! developped by alexander.poddey@tu-clausthal.de
use libxml2f90_interface_module
use libxml2f90_module
use libxml2f90_strings_module
use ll_module
use modvsv
use modnetcdf
use modgrille
use modcorr
implicit none
character(256),intent(in),optional::parameterFileName
integer::code,index_i
integer::tmp1,tmp2
integer::sqm,q1,q2,pp,ha,de,pa,cd,rs,p4,p4d,ttt
character(120)::anul
character(256)::string(1)
integer::entier(1)
real(8)::reel(1)
character(5)::ch1,ch2
character(1)::char1
integer::i,j
real::f1,f2
logical::back
print*,"read_xml*",trim(adjustl(configfilename)),"*"
print*,"*",trim(adjustl(parameterFileName)),"*"
index_i=index(parameterFileName,'.xml',back=.true.)
if(index_i/=0) then
print*,"*",trim(adjustl(parameterFileName(1:index_i+4))),"*"
call libxml2f90__readin_file(trim(adjustl(parameterFileName(1:index_i+4))),'LIST1')
configfilename=trim(adjustl(parameterFileName))
else
call libxml2f90__readin_file(trim(adjustl(configfilename)),'LIST1')
endif
if(code==1) then ! civ1
call libxml2f90__ll_selectlist('LIST1')
call libxml2f90__ll_selecttag('ACT','civ1',1)
call libxml2f90__ll_exist('DOWN','image1',i)
if(i.lt.1) then
print*,'Name of First image must be given'
stop'read_input'
end if
call libxml2f90__ll_selecttag('DOWN','image1',1) !the 1 at the end means select the first tag
call libxml2f90__ll_getstring('image1',size(string),string) !OLD
namea=trim(adjustl(string(1)))
print*,trim(adjustl("Image1:"//namea))
call libxml2f90__ll_selecttag('UP','civ1',1)
call libxml2f90__ll_exist('DOWN','image2',i)
if(i.lt.1) then
print*,'Name of second image must be given'
stop'read_input'
end if
call libxml2f90__ll_selecttag('DOWN','image2',1)
call libxml2f90__ll_getstring('image2',size(string),string)
nameb=trim(adjustl(string(1)))
print*,trim(adjustl("Image2:"//nameb))
call libxml2f90__ll_selecttag('UP','civ1',1)
call libxml2f90__ll_exist('DOWN','outputFileName',i)
if(i.lt.1) then
print*,'Name of outputFileName must be given'
stop'read_input'
end if
call libxml2f90__ll_selecttag('DOWN','outputFileName',1)
call libxml2f90__ll_getstring('outputFileName',size(string),string)
outputFileName=trim(adjustl(string(1)))
print*,trim(adjustl("outputFileName:"//outputFileName))
call libxml2f90__ll_selecttag('UP','civ1',1)
call libxml2f90__ll_exist('DOWN','mask',i)
if(i.lt.1) then
print*,'no mask defined, using default grid'
yorn="n"
goto 11
else
call libxml2f90__ll_selecttag('DOWN','mask',1)
call libxml2f90__ll_getstring('mask',size(string),string)
maskname=trim(adjustl(string(1)))
print*,trim(adjustl("maskName:"//maskname))
if(maskname=="n") then
yorn="n"
else
yorn="y"
endif
call libxml2f90__ll_selecttag('UP','civ1',1)
endif
11 continue
call libxml2f90__ll_exist('DOWN','imageSize_X',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','imageSize_X',1)
call libxml2f90__ll_geti4('imageSize_X',size(entier),entier)
print*,trim(adjustl("imageSize_X :")),entier(1)
nx=entier(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
endif
call libxml2f90__ll_exist('DOWN','imageSize_Y',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','imageSize_Y',1)
call libxml2f90__ll_geti4('imageSize_Y',size(entier),entier)
print*,trim(adjustl("imageSize_Y :")),entier(1)
ny=entier(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
endif
call libxml2f90__ll_exist('DOWN','correlationBoxesSize_X',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','correlationBoxesSize_X',1)
call libxml2f90__ll_geti4('correlationBoxesSize_X',size(entier),entier)
print*,trim(adjustl("correlationBoxesSize_X :")),entier(1)
ibsx=entier(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
print*,"No correlation box size defined, using default 31 pixels"
ibsx=31
endif
call libxml2f90__ll_exist('DOWN','correlationBoxesSize_Y',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','correlationBoxesSize_Y',1)
call libxml2f90__ll_geti4('correlationBoxesSize_Y',size(entier),entier)
print*,trim(adjustl("correlationBoxesSize_Y :")),entier(1)
ibsy=entier(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
print*,"No correlation box size defined, using default 31 pixels"
ibsy=31
endif
call libxml2f90__ll_exist('DOWN','searchBoxesSize_X',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','searchBoxesSize_X',1)
call libxml2f90__ll_geti4('searchBoxesSize_X',size(entier),entier)
print*,trim(adjustl("searchBoxesSize_X :")),entier(1)
isrx=entier(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
print*,"No search box, using default 63 pixels"
isrx=63
endif
call libxml2f90__ll_exist('DOWN','searchBoxesSize_Y',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','searchBoxesSize_Y',1)
call libxml2f90__ll_geti4('searchBoxesSize_Y',size(entier),entier)
print*,trim(adjustl("searchBoxesSize_Y :")),entier(1)
isry=entier(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
print*,"No search box, using default 63 pixels"
isry=63
endif
call libxml2f90__ll_exist('DOWN','ro',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','ro',1)
call libxml2f90__ll_getr8('ro',size(reel),reel)
print*,trim(adjustl("ro :")),reel(1)
roi=reel(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
print*,"No smooth coeff defined, using default 1.0"
roi=1.0
endif
call libxml2f90__ll_exist('DOWN','globalShift_X',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','globalShift_X',1)
call libxml2f90__ll_getr8('globalShift_X',size(reel),reel)
print*,trim(adjustl("globalShift_X :")),reel(1)
xoffset=nint(reel(1))
call libxml2f90__ll_selecttag('UP','civ1',1)
endif
call libxml2f90__ll_exist('DOWN','globalShift_Y',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','globalShift_Y',1)
call libxml2f90__ll_getr8('globalShift_Y',size(reel),reel)
print*,trim(adjustl("globalShift_Y :")),reel(1)
yoffset=-nint(reel(1))
call libxml2f90__ll_selecttag('UP','civ1',1)
endif
call libxml2f90__ll_exist('DOWN','gridSpacing_X',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','gridSpacing_X',1)
call libxml2f90__ll_geti4('gridSpacing_X',size(entier),entier)
print*,trim(adjustl("gridSpacing_X :")),entier(1)
dxshift=entier(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
dxshift=15
endif
call libxml2f90__ll_exist('DOWN','gridSpacing_Y',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','gridSpacing_Y',1)
call libxml2f90__ll_geti4('gridSpacing_Y',size(entier),entier)
print*,trim(adjustl("gridSpacing_Y :")),entier(1)
dyshift=entier(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
dyshift=15
endif
call libxml2f90__ll_exist('DOWN','dt',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','dt',1)
call libxml2f90__ll_getr8('dt',size(reel),reel)
print*,trim(adjustl("dt :")),reel(1)
dt=reel(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
print*,"No delta time defined between image paire, using default 1.0"
dt=1.0
endif
call libxml2f90__ll_exist('DOWN','absolut_time_T0',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','absolut_time_T0',1)
call libxml2f90__ll_getr8('absolut_time_T0',size(reel),reel)
print*,trim(adjustl("absolut_time_T0 :")),reel(1)
T0=reel(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
print*,"No absolut time defined , using default 0.0"
dt=0.0
endif
T02=T0
dt2=dt
call libxml2f90__ll_exist('DOWN','pixcmx',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','pixcmx',1)
call libxml2f90__ll_getr8('pixcmx',size(reel),reel)
print*,trim(adjustl("pixcmx :")),reel(1)
pixcmx=reel(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
print*,"No pixcmx defined , using default 1.0"
pixcmx=1.0
endif
call libxml2f90__ll_exist('DOWN','pixcmy',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','pixcmy',1)
call libxml2f90__ll_getr8('pixcmy',size(reel),reel)
print*,trim(adjustl("pixcmy :")),reel(1)
pixcmy=reel(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
print*,"No pixcmy defined , using default 1.0"
pixcmy=1.0
endif
call libxml2f90__ll_exist('DOWN','grid',i)
if(i.lt.1) then
print*,'No grid are defined, creating a regular one'
fgrille="n"
goto 12
else
call libxml2f90__ll_selecttag('DOWN','grid',1)
call libxml2f90__ll_getstring('grid',size(string),string)
call libxml2f90__ll_selecttag('UP','civ1',1)
fgrille=trim(adjustl(string(1)))
endif
12 continue
if(fgrille=="n") then
new_default=.true.
else
print*,trim(adjustl("Grid file :"//fgrille))
endif
call libxml2f90__ll_exist('DOWN','convectFlow',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','convectFlow',1)
call libxml2f90__ll_getstring('convectFlow',size(string),string)
if((string(1)=="y").or.(string(1)=="1").or.(string(1)=="o")) convect_flow=1
if((string(1)=="n").or.(string(1)=="0")) convect_flow=0
call libxml2f90__ll_selecttag('UP','civ1',1)
endif
call libxml2f90__ll_exist('DOWN','corrMod',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','corrMod',1)
call libxml2f90__ll_geti4('corrMod',size(entier),entier)
print*,trim(adjustl("corrMod :")),entier(1)
corrMod=entier(1)
call libxml2f90__ll_selecttag('UP','civ1',1)
else
corrmod=0 ! default value, use Xcorr
endif
call libxml2f90__ll_exist('DOWN','hart',i)
hart=0
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','hart',1)
call libxml2f90__ll_getstring('hart',size(string),string)
call libxml2f90__ll_selecttag('UP','civ1',1)
if(string(1)=="y") then
hart=1
else
hart=0
endif
endif
correlation_min=0
intensity_min=0
char1="n"
if(char1=='y') then
call extract_char_real_real(anul,f1,f2)
level1=int(f1)
level2=int(f2)
!call extract_char_int_int(anul,level1,level2)
Print*,'SEUILLAGE ACTIF ENTRE ',level1,' ET ',level2
else
level1=0;level2=0;test_seuil=.false.
endif
!ImageToUse a c
!read(9,'(a120)') anul
img1="Z"
img2="Z"
img3="Z"
img4="Z"
if((ibsx/2*2)==ibsx) then
if(verbose) Print*,' Ibsx is even, Ibsx->Ibsx-1 '
ibsx=ibsx-1
endif
if((ibsy/2*2)==ibsy) then
if(verbose) Print*,' Ibsy is even, Ibsy->Ibsy-1 '
ibsy=ibsy-1
endif
if((isrx/2*2)==isrx) then
if (verbose) Print*,' Isrx is even, Isrx->Isrx-1 '
isrx=isrx-1
endif
if((isry/2*2)==isry) then
if (verbose) Print*,' Isry is even, Isry->Isry-1 '
isry=isry-1
endif
!print*,ibsx,ibsy,isrx,isry
if(intensity_min/=0) print*,' INTENSITY MINIMAL SET TO: ',intensity_min
ratio=1
hole=.false.
!*******************************************************************
!*******************************************************************
!*******************************************************************
!*******************************************************************
!*******************************************************************
!*******************************************************************
else ! civ 2
call libxml2f90__ll_selectlist('LIST1')
call libxml2f90__ll_selecttag('ACT','civ2',1)
call libxml2f90__ll_exist('DOWN','image1',i)
if(i.lt.1) then
print*,'Name of First image must be given'
stop'read_input'
end if
call libxml2f90__ll_selecttag('DOWN','image1',1) !the 1 at the end means select the first tag
call libxml2f90__ll_getstring('image1',size(string),string) !OLD
namea=trim(adjustl(string(1)))
print*,trim(adjustl("Image1:"//namea))
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','image2',i)
if(i.lt.1) then
print*,'Name of second image must be given'
stop'read_input'
end if
call libxml2f90__ll_selecttag('DOWN','image2',1)
call libxml2f90__ll_getstring('image2',size(string),string)
nameb=trim(adjustl(string(1)))
print*,trim(adjustl("Image2:"//nameb))
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','inputFileName',i)
if(i.lt.1) then
print*,'Name of input fileName must be given'
stop'read_input'
end if
call libxml2f90__ll_selecttag('DOWN','inputFileName',1)
call libxml2f90__ll_getstring('inputFileName',size(string),string)
inputFileName=trim(adjustl(string(1)))
print*,trim(adjustl("inputFileName:"//inputFileName))
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','outputFileName',i)
if(i.lt.1) then
print*,'Name of output fileName must be given'
stop'read_input'
end if
call libxml2f90__ll_selecttag('DOWN','outputFileName',1)
call libxml2f90__ll_getstring('outputFileName',size(string),string)
outputFileName=trim(adjustl(string(1)))
print*,trim(adjustl("outputFileName:"//outputFileName))
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','mask',i)
if(i.lt.1) then
print*,'no mask defined, using default grid'
yorn="n"
goto 16
end if
call libxml2f90__ll_selecttag('DOWN','mask',1)
call libxml2f90__ll_getstring('mask',size(string),string)
maskname=trim(adjustl(string(1)))
print*,trim(adjustl("maskName:"//maskname))
if(maskname=="n") then
yorn="n"
else
yorn="y"
endif
16 continue
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','imageSize_X',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','imageSize_X',1)
call libxml2f90__ll_geti4('imageSize_X',size(entier),entier)
print*,trim(adjustl("imageSize_X :")),entier(1)
nx=entier(1)
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','imageSize_Y',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','imageSize_Y',1)
call libxml2f90__ll_geti4('imageSize_Y',size(entier),entier)
print*,trim(adjustl("imageSize_Y :")),entier(1)
ny=entier(1)
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','correlationBoxesSize_X',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','correlationBoxesSize_X',1)
call libxml2f90__ll_geti4('correlationBoxesSize_X',size(entier),entier)
print*,trim(adjustl("correlationBoxesSize_X :")),entier(1)
ibsx=entier(1)
else
print*,"No correlation box size defined, using default 31 pixels"
ibsx=31
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','correlationBoxesSize_Y',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','correlationBoxesSize_Y',1)
call libxml2f90__ll_geti4('correlationBoxesSize_Y',size(entier),entier)
print*,trim(adjustl("correlationBoxesSize_Y :")),entier(1)
ibsy=entier(1)
else
print*,"No correlation box size defined, using default 31 pixels"
ibsy=31
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','ro',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','ro',1)
call libxml2f90__ll_getr8('ro',size(reel),reel)
print*,trim(adjustl("ro :")),reel(1)
roi=reel(1)
else
print*,"No smooth coeff defined, using default 1.0"
roi=1.0
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','gridSpacing_X',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','gridSpacing_X',1)
call libxml2f90__ll_geti4('gridSpacing_X',size(entier),entier)
print*,trim(adjustl("gridSpacing_X :")),entier(1)
dxshift=entier(1)
else
dxshift=15
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','gridSpacing_Y',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','gridSpacing_Y',1)
call libxml2f90__ll_geti4('gridSpacing_Y',size(entier),entier)
print*,trim(adjustl("gridSpacing_Y :")),entier(1)
dyshift=entier(1)
else
dyshift=15
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','dt',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','dt',1)
call libxml2f90__ll_getr8('dt',size(reel),reel)
print*,trim(adjustl("dt :")),reel(1)
dt=reel(1)
else
print*,"No delta time defined between image paire, using default 1.0"
dt=1.0
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','absolut_time_T0',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','absolut_time_T0',1)
call libxml2f90__ll_getr8('absolut_time_T0',size(reel),reel)
print*,trim(adjustl("absolut_time_T0 :")),reel(1)
T0=reel(1)
else
print*,"No absolut time defined , using default 0.0"
dt=0.0
endif
T02=T0
dt2=dt
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','pixcmx',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','pixcmx',1)
call libxml2f90__ll_getr8('pixcmx',size(reel),reel)
print*,trim(adjustl("pixcmx :")),reel(1)
pixcmx_out=reel(1)
else
print*,"No pixcmx defined , using default 1.0"
pixcmx_out=1.0
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','pixcmy',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','pixcmy',1)
call libxml2f90__ll_getr8('pixcmy',size(reel),reel)
print*,trim(adjustl("pixcmy :")),reel(1)
pixcmy_out=reel(1)
else
print*,"No pixcmy defined , using default 1.0"
pixcmy_out=1.0
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','grid',i)
if(i.lt.1) then
print*,'No grid are defined, creating a regular one'
fgrille="n"
goto 17
end if
call libxml2f90__ll_selecttag('DOWN','grid',1)
call libxml2f90__ll_getstring('grid',size(string),string)
fgrille=trim(adjustl(string(1)))
17 continue
if(fgrille=="n") then
new_default=.true.
else
print*,trim(adjustl("Grid file :"//fgrille))
endif
call defaultmesh
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','decimalShift',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','decimalShift',1)
call libxml2f90__ll_getstring('decimalShift',size(string),string)
if(string(1)=="y") then
corrdec=.true.
else
corrdec=.false.
endif
endif
call libxml2f90__ll_selecttag('UP','civ2',1)
call libxml2f90__ll_exist('DOWN','deformation',i)
if(i>=1) then
call libxml2f90__ll_selecttag('DOWN','deformation',1)
call libxml2f90__ll_getstring('deformation',size(string),string)
if(string(1)=="y") then
deform=.true.
else
deform=.false.
endif
endif
correlation_min=0
intensity_min=0
char1="n"
if(char1=='y') then
call extract_char_real_real(anul,f1,f2)
level1=int(f1)
level2=int(f2)
!call extract_char_int_int(anul,level1,level2)
Print*,'SEUILLAGE ACTIF ENTRE ',level1,' ET ',level2
else
level1=0;level2=0;test_seuil=.false.
endif
!ImageToUse a c
!read(9,'(a120)') anul
img1="Z"
img2="Z"
img3="Z"
img4="Z"
if((ibsx/2*2)==ibsx) then
if(verbose) Print*,' Ibsx is even, Ibsx->Ibsx-1 '
ibsx=ibsx-1
endif
if((ibsy/2*2)==ibsy) then
if(verbose) Print*,' Ibsy is even, Ibsy->Ibsy-1 '
ibsy=ibsy-1
endif
if((isrx/2*2)==isrx) then
if (verbose) Print*,' Isrx is even, Isrx->Isrx-1 '
isrx=isrx-1
endif
if((isry/2*2)==isry) then
if (verbose) Print*,' Isry is even, Isry->Isry-1 '
isry=isry-1
endif
!print*,ibsx,ibsy,isrx,isry
if(intensity_min/=0) print*,' INTENSITY MINIMAL SET TO: ',intensity_min
ratio=1
hole=.false.
endif
print*,'End of read_xml'
return
end