-
Notifications
You must be signed in to change notification settings - Fork 1
/
libstd_nc.ftn
872 lines (707 loc) · 23.7 KB
/
libstd_nc.ftn
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
863
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
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
c
c Librairies des substituts aux sous-routines RPN de rmnxlib
c
subroutine gdadgd(d, s1, s2, fm1, fm2, ni, nj, cut)
implicit none
integer ni, nj, cut
real d(ni,nj), s1(ni,nj), s2(ni,nj)
real fm1, fm2
integer i, j
do j = (1 cut), (nj-cut)
do i = (1 cut), (ni-cut)
d(i,j) = fm1 * s1(i,j) fm2 * s2(i,j)
enddo
enddo
return
end
c*************************************************
subroutine gdmpgd(d, s1, s2, fm, ni, nj, cut)
implicit none
integer ni, nj, cut
real d(ni,nj), s1(ni,nj), s2(ni,nj)
real fm
integer i, j
do j = (1 cut), (nj-cut)
do i = (1 cut), (ni-cut)
d(i,j) = fm * s1(i,j) * s2(i,j)
enddo
enddo
return
end
c*************************************************
subroutine gdadcn(d, s, cn, ni, nj, cut)
implicit none
integer ni, nj, cut
real d(ni,nj), s(ni,nj)
real cn
integer i, j
do j = (1 cut), (nj-cut)
do i = (1 cut), (ni-cut)
d(i,j) = cn s(i,j)
enddo
enddo
return
end
c*************************************************
subroutine gdmpcn(d, s, cn, ni, nj, cut)
implicit none
integer ni, nj, cut
real d(ni,nj), s(ni,nj)
real cn
integer i, j
do j = (1 cut), (nj-cut)
do i = (1 cut), (ni-cut)
d(i,j) = cn * s(i,j)
enddo
enddo
return
end
c*************************************************
subroutine gddvgd(d, s1, s2, fm, ni, nj, cut)
implicit none
integer ni, nj, cut
real d(ni,nj), s1(ni,nj), s2(ni,nj)
real fm
integer i, j
do j = (1 cut), (nj-cut)
do i = (1 cut), (ni-cut)
if (s2(i,j).ne.0.0) then
d(i,j) = fm * s1(i,j) / s2(i,j)
else
d(i,j) = 0.0
endif
enddo
enddo
return
end
c*************************************************
subroutine gdsqrt(d, s, fm, ni, nj, cut)
implicit none
integer ni, nj, cut
real d(ni,nj), s(ni,nj)
real fm
integer i, j
do j = (1 cut), (nj-cut)
do i = (1 cut), (ni-cut)
d(i,j) = fm * sqrt(s(i,j))
enddo
enddo
return
end
c*
c**********************************************************************
subroutine coriol(co, d60, pi, pj, ni, nj)
implicit none
integer ni, nj
real co(ni, nj), d60, pi, pj
*notes - sin(lat) = (re2-r2) / (re2 r2)
* - re = (earth radius) * (1 sin(60))/d60
* - mean earth radius = 6371 km.
* - cf = 2.0 * omega
real re, re2, r2
real x, y, y2, cf
integer i, j
cf = 1.458e-4
re = 1.866025 * 6.371e6 / d60
re2 = re*re
do j = 1, nj
y = float(j) - pj
y2 = y * y
do i = 1, ni
x = float(i) - pi
r2 = x * x y2
co(i,j) = cf * (re2-r2) / (re2 r2)
enddo
enddo
return
end
c*
c**********************************************************************
subroutine ccard(cles, def, val, ncles, npos)
implicit none
c* Subroutine to process arguments to a fortran program
c* This only works if iargc() and getarg are available...
c*
c* Maximum 100 keys and arguments
c*
c* No distinction between upper and lower case
c*
integer max_n
parameter (max_n = 100)
integer ncles, npos
character*(*) cles(ncles), def(ncles), val(ncles)
character*1024 cle_up(max_n)
integer argc, arg_num, count, iargc, keynum, keynum2, noval
character*1024 argv(max_n), argp, clep, clep2
integer dummy_len
character*1024 dummy
integer real_len
c* Get number of arguments
argc = iargc()
c* Process all arguments
arg_num = 1
do while (arg_num.le.argc)
c* Get argument in argv
call getarg(arg_num, argv(arg_num))
c* Put arg uppercase if a key
do keynum = 1, ncles
clep = cles(keynum)
dummy_len = real_len(clep)
if (clep(dummy_len:dummy_len).eq.'.') then
clep(dummy_len:dummy_len) = ' '
endif
argp = argv(arg_num)
if (argp(1:1).eq.'-') then
if (argp(2:real_len(argp)).eq.clep) then
call caseup(argv(arg_num), argv(arg_num))
endif
endif
enddo
arg_num = arg_num 1
enddo
c* Parse all keys
do keynum=1,ncles
c* Put all keys uppercase
cle_up(keynum) = ''
call caseup(cle_up(keynum), cles(keynum))
enddo
c* Parse all args
arg_num = 1
do while (arg_num.le.argc)
if ((argv(arg_num).eq.'-H').or.(argv(arg_num).eq.'-HELP').or.
$ (argv(arg_num).eq.'-h').or.(argv(arg_num).eq.'-help'))
$ then
c* Write help if help key is there, and stop
call write_help(cles, def, ncles)
stop
else
c* Parse all keys
keynum = 1
do while (keynum.le.ncles)
c* If arg is a key
clep = cle_up(keynum)
dummy_len = real_len(clep)
if (clep(dummy_len:dummy_len).eq.'.') then
clep(dummy_len:dummy_len) = ' '
endif
argp = argv(arg_num)
if (argp(2:real_len(argp)).eq.clep) then
dummy = ''
c* If there is an arg following the current one
if ( (arg_num 1).le.argc) then
c* Read next arg
dummy = argv(arg_num 1)
dummy_len = real_len(dummy)
if (dummy(dummy_len:dummy_len).eq.'.') then
dummy(dummy_len:dummy_len) = ' '
endif
noval = 0
c* Parse all keys to see if next arg is a key or not
c* If a key, there is no value associated with current key
do keynum2 = 1, ncles
if (dummy(2:dummy_len).eq.cle_up(keynum2))
$ then
noval = 1
endif
enddo
c* If a value is associated with the current key, put val to user's value
if (noval.eq.0) then
val(keynum) = dummy
arg_num = arg_num 1
else
c* If no value is associated with the current key, put val to def
val(keynum) = def(keynum)
endif
else
c* Last arg, so no value for that key => we put def
val(keynum) = def(keynum)
endif
c* End loop
keynum = ncles 1
else
c* Check next key
keynum = keynum 1
endif
enddo
endif
arg_num = arg_num 1
enddo
end
c****************************************************
subroutine caseup(cle_out, cle_in)
implicit none
c* Convert from lowercase to uppercase all chars
integer len_key, ch, ascii_num, real_len
integer ichar
character *(*) cle_out, cle_in
len_key = real_len(cle_in)
do ch=1,len_key
ascii_num = ichar(cle_in(ch:ch))
if ( (ascii_num.ge.97).and.(ascii_num.le.122)) then
cle_out(ch:ch) = char(ichar(cle_in(ch:ch)) - 32)
else
cle_out(ch:ch) = cle_in(ch:ch)
endif
enddo
return
end
c****************************************************
subroutine write_help(cles, def, ncles)
implicit none
c* Subroutine to show help message
integer ncles, count, len, real_len
character*(*) cles(ncles), def(ncles)
character*1024 temp, temp2
print*
print*
print*,'Call arguments :'
print*
do count=1,ncles
temp = cles(count)
temp2 = def(count)
len = real_len(temp)
if (temp(len:len).eq.'.') then
temp(len:len) = ' '
len = len - 1
endif
write(*,10000) '-'//temp(1:len), temp2(1:real_len(temp2))
10000 format(a20,1x,'default = ',a)
enddo
print*
return
end
integer function find_next(ligne, i, ch)
implicit none
character*(*) ligne
character*1 ch
integer i, real_len, len
len = real_len(ligne)
do while ((ligne(i:i).ne.ch).and.(i.le.len))
i = i 1
enddo
if (i.le.len) then
find_next = i
else
find_next = -1
endif
return
end
integer function find_2next(ligne, i, ch)
implicit none
character*(*) ligne
character*1 ch
integer i, real_len, len
len = real_len(ligne)
do while ((ligne(i:i).ne.ch).and.(i.lt.len))
i = i 1
enddo
i = i 1
do while ((ligne(i:i).ne.ch).and.(i.lt.len))
i = i 1
enddo
if (i.lt.len) then
find_2next = i
else
find_2next = -1
endif
return
end
character*(*) function getchar(ligne, i1, i2)
implicit none
character*(*) ligne
integer i1, i2, i3, i, real_len, len
len = real_len(ligne)
i = i1
do while (ligne(i:i).eq." ")
i = i 1
enddo
if (ligne(i:i).eq."'") then
i = i 1
i3 = i2 - 1
else
i3 = i2
endif
read(ligne(i:i3),'(a)') getchar
return
end
subroutine banner_debut(pgm, ver)
implicit none
character*50 pgm
character*10 ver
integer time, clock, clock_time
character*24 ctime, date
real clock_start
common /clock/ clock_start
save /clock/
#ifdef sgi
clock_time = 0
#else
#ifdef Linux
clock_time = 0
#else
call cpu_time(clock_start)
#endif
#endif
date = ctime(time())
print*,'1'
write(*, 60) pgm, ver, date
60 format(' *******************************************************
$*************************************'/
$ 3x,'*',90x,'*'/,3x,'*',10x,a50,16x,'V',a10,3x,'*'/,
$ 3x,'*',90x,'*'/,3x,'*',90x,'*'/,
$ 3x,'*',10x,a24,26x,26x,4x,'*'/,
$ 3x,'*',90x,'*'/,3x,'*',10x,'BEGIN EXECUTION',
$ 65x,'*'/,3x,'*',90x,'*'/,' ********************************
$************************************************************'/)
return
end
subroutine banner_fin(pgm, status)
implicit none
character*50 pgm
character*10 status
integer time, clock, clock_time
real clktime, clock_finish
character*24 ctime, date
real clock_start
common /clock/ clock_start
save /clock/
#ifdef sgi
clock_time = 0
clktime = float(clock_time) / float(1000000)
#else
#ifdef Linux
clock_time = 0
clktime = float(clock_time) / float(1000000)
#else
call cpu_time(clock_finish)
clktime = clock_finish - clock_start
#endif
#endif
date = ctime(time())
write(*, '(a1)') '1'
write(*, 60) pgm, status, date, clktime
60 format(' *******************************************************
$*************************************'/
$ 3x,'*',90x,'*'/,3x,'*',10x,a50,16x,1x,a10,3x,'*'/,
$ 3x,'*',90x,'*'/,
$ 3x,'*',10x,a24,26x,26x,4x,'*'/,
$ 3x,'*',90x,'*'/,3x,'*',10x,'END EXECUTION ',
$ 65x,'*'/,3x,'*',90x,'*'/,3x,'*',10x,'CP SECS = ',f10.3,
$ 60x,'*'/,3x,'*',90x,'*'/,' ********************************
$************************************************************'/)
return
end
subroutine qqexit(status)
implicit none
integer status
call exit(status)
return
end
************************************************************************
c
c Librairies I/O NETCDF
c
************************************************************************
c
c***********************************************************************
c---- Fonction GDLL ---
c***********************************************************************
integer function gdll(lat, lon, latname, lonname,
$ iun, varid, ni, nj)
implicit none
! ----------------------------------------------------------
! Ecrite par Christian Page -
! Juillet 2017 -
! GLOBC -
! CERFACS -
! ----------------------------------------------------------
include 'netcdf.inc'
integer ier
integer ni, nj
integer varid, iun
integer ndims
integer i, j
logical wrap
integer dimids(NF_MAX_VAR_DIMS), xtype
integer latid, lonid
character*(NF_MAX_NAME) latname, lonname
real lat(ni,nj), lon(ni,nj)
real, dimension (:), allocatable :: lat1d
real, dimension (:), allocatable :: lon1d
real*8, dimension (:), allocatable :: lat1dd
real*8, dimension (:), allocatable :: lon1dd
character*256 strerr
ier = nf_inq_varndims(iun, varid, ndims)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot inquire variable number of dimensions. Input file ID:',iun
call handle_err(ier,strerr)
endif
if (ndims .ne. 3) then
print*
print*,'gdll: Critical Problem: coordinate number of dimensions is not 3: ', ndims
print*
gdll = -1
return
endif
c
c Expected dimensions order with ncdump: float psl(time, lat, lon) !!is reversed!! in fortran
c
ier = nf_inq_vardimid(iun, varid, dimids)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot inquire variable dimension ID. Input file ID:',iun,
$ ' Variable ID:',varid
call handle_err(ier,strerr)
endif
ier = nf_inq_dimname(iun, dimids(2), latname)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot inquire dimension name. Input file ID:',iun,
$ ' Dimension ID:',dimids(2)
call handle_err(ier,strerr)
endif
ier = nf_inq_varid(iun, latname, latid)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot inquire dimension variable ID. Input file ID:',iun,
$ ' Dimension variable name:',latname
call handle_err(ier,strerr)
endif
ier = nf_inq_vartype(iun, latid, xtype)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot inquire variable type. Input file ID:',iun,
$ ' Variable ID:',latid
call handle_err(ier,strerr)
endif
if (xtype .eq. NF_FLOAT) then
allocate ( lat1d(nj) )
ier = nf_get_var_real(iun, latid, lat1d)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot read variable dimension. Input file ID:',iun,
$ ' Variable: latitude'
call handle_err(ier,strerr)
endif
do j=1,nj
do i=1,ni
lat(i,j) = lat1d(j)
enddo
enddo
deallocate( lat1d )
else if (xtype .eq. NF_DOUBLE) then
allocate ( lat1dd(nj) )
ier = nf_get_var_double(iun, latid, lat1dd)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot read variable dimension. Input file ID:',iun,
$ ' Variable: latitude'
call handle_err(ier,strerr)
endif
do j=1,nj
do i=1,ni
lat(i,j) = real(lat1dd(j))
enddo
enddo
deallocate( lat1dd )
else
write(strerr,*) 'gdll: variable type is not float or double. Input file ID:',iun,
$ ' Variable: latitude'
endif
print*, 'gdll: READ latitude successful'
ier = nf_inq_dimname(iun, dimids(1), lonname)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot inquire dimension name. Input file ID:',iun,
$ ' Dimension ID:',dimids(1)
call handle_err(ier,strerr)
endif
ier = nf_inq_varid(iun, lonname, lonid)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot inquire dimension variable ID. Input file ID:',iun,
$ ' Dimension variable name:',lonname
call handle_err(ier,strerr)
endif
ier = nf_inq_vartype(iun, lonid, xtype)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot inquire variable type. Input file ID:',iun,
$ ' Variable ID:',lonid
call handle_err(ier,strerr)
endif
if (xtype .eq. NF_FLOAT) then
allocate ( lon1d(ni) )
ier = nf_get_var_real(iun, lonid, lon1d)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot read variable dimension. Input file ID:',iun,
$ ' Variable: longitude'
call handle_err(ier,strerr)
endif
do j=1,nj
do i=1,ni
lon(i,j) = lon1d(i)
enddo
enddo
deallocate( lon1d )
else if (xtype .eq. NF_DOUBLE) then
allocate ( lon1dd(ni*ni*ni) )
ier = nf_get_var_double(iun, lonid, lon1dd)
if (ier .ne. nf_noerr) then
write(strerr,*) 'gdll: Cannot read variable dimension. Input file ID:',iun,
$ ' Variable: longitude'
call handle_err(ier,strerr)
endif
do j=1,nj
do i=1,ni
lon(i,j) = real(lon1dd(i))
enddo
enddo
deallocate( lon1dd )
else
write(strerr,*) 'gdll: variable type is not float or double. Input file ID:',iun,
$ ' Variable: longitude'
endif
print*, 'gdll: READ longitude successful'
c Wrap longitudes to positive (no negative values) if the 0 deg is within the domain.
wrap = .false.
do j=1,nj
do i=1,ni
c If we have non-increasing longitudes, we assume we have 359 then 0.
if (lon(i,j).lt.0.0) then
wrap = .true.
exit
endif
enddo
enddo
if (wrap .eqv. .true.) then
c If longitude is greater than last one, must wrap it by 360 deg.
do j=1,nj
do i=1,ni
if (lon(i,j).lt.0.0) then
lon(i,j) = lon(i,j) 360.0
endif
enddo
enddo
endif
gdll = 0
return
end
c***********************************************************************
c---- Fonction GDLLFXY ---
c***********************************************************************
integer function gdllfxy(slat, slon, x, y, lat, lon, ni, nj)
implicit none
! ----------------------------------------------------------
! Ecrite par Christian Page -
! Juillet 2017 -
! GLOBC -
! CERFACS -
! ----------------------------------------------------------
integer ni, nj
real x, y
real slat, slon
real lat(ni,nj), lon(ni, nj)
real dlat, dlon, latsw, lonsw
integer i, j
dlon = lon(2,1) - lon(1,1)
lonsw = lon(1,1)
dlat = lat(1,2) - lat(1,1)
latsw = lat(1,1)
slon = (x-1.0)*dlon lonsw
slon = mod((slon 360.0), 360.0)
slat = (y-1.0)*dlat latsw
gdllfxy = 0
return
end
c***********************************************************************
c---- Fonction GDXYFLL ---
c***********************************************************************
integer function gdxyfll(x, y, slat, slon, lat, lon, ni, nj)
implicit none
! ----------------------------------------------------------
! Ecrite par Christian Page -
! Juillet 2017 -
! GLOBC -
! CERFACS -
! ----------------------------------------------------------
integer ni, nj
real x, y
real slat, slon
real lat(ni,nj), lon(ni, nj)
real dlat, dlon, latsw, lonsw
if (slon.lt.lon(1,1)) then
slon = slon 360.0
endif
if (slon.gt.lon(ni,1)) then
slon = slon - 360.0
endif
dlon = lon(2,1) - lon(1,1)
lonsw = lon(1,1)
dlat = lat(1,2) - lat(1,1)
latsw = lat(1,1)
x = (dlon - lonsw)/dlon 1.0
y = (dlat - latsw)/dlat 1.0
gdxyfll = 0
return
end
c***********************************************************************
c---- Fonction GDLLSVAL ---
c***********************************************************************
integer function gdllsval(zout, zin, xlat, xlon, lat, lon,
$ ni, nj)
implicit none
! ----------------------------------------------------------
! Ecrite par Christian Page -
! Juillet 2017 -
! GLOBC -
! CERFACS -
! ----------------------------------------------------------
integer ni, nj
real xlat, xlon
real zout
real zin(ni,nj)
real lat(ni,nj), lon(ni, nj)
real x, y
integer ier
integer gdxyfll, gdxysval
ier = gdxyfll(x, y, xlat, xlon, lat, lon, ni, nj)
ier = gdxysval(zout, zin, x, y, ni, nj)
gdllsval = 0
return
end
c***********************************************************************
c---- Fonction GDXYSVAL ---
c***********************************************************************
integer function gdxysval(zout, zin, x, y, ni, nj)
implicit none
! ----------------------------------------------------------
! Ecrite par Christian Page -
! Juillet 2017 -
! GLOBC -
! CERFACS -
! ----------------------------------------------------------
integer ni, nj
real x, y
real zout
real zin(ni,nj)
integer ier
real zlin
real*8 dx, dy, y2, y3
integer i, j
i = min(ni-1,max(1,ifix(x)))
j = min(nj-1,max(1,ifix(y)))
dx = x - float(i)
dy = y - float(j)
y2 = zlin(dble(zin(i,j )),dble(zin(i 1,j )),dx)
y3 = zlin(dble(zin(i,j 1)),dble(zin(i 1,j 1)),dx)
zout = zlin(y2,y3,dy)
gdxysval = 0
return
end
c***********************************************************************
c---- Fonction ZLIN ---
c***********************************************************************
real function zlin(zz1, zz2, zdx)
implicit none
! ----------------------------------------------------------
! Ecrite par Christian Page -
! Juillet 2017 -
! GLOBC -
! CERFACS -
! ----------------------------------------------------------
real*8 zz1, zz2, zdx
zlin = zz1 (zz2 - zz1) * zdx
return
end