1 | !> \file output_heino_mod.f90 |
---|
2 | !! Module de |
---|
3 | !< |
---|
4 | |
---|
5 | !> \namespace output_heino |
---|
6 | !! Module de |
---|
7 | !! \author ... |
---|
8 | !! \date ... |
---|
9 | !! @note Used module |
---|
10 | !! @note - use module3D_phy |
---|
11 | !! @note - use sliding_dragging_heino |
---|
12 | !< |
---|
13 | |
---|
14 | module output_heino |
---|
15 | |
---|
16 | USE module3D_phy |
---|
17 | use sliding_dragging_heino |
---|
18 | |
---|
19 | |
---|
20 | implicit none |
---|
21 | |
---|
22 | ! 1_initialization |
---|
23 | !------------------ |
---|
24 | REAL :: VOLtot |
---|
25 | integer :: NPtot |
---|
26 | integer :: nptemp_tot |
---|
27 | integer :: NPtemp_sed |
---|
28 | integer :: nbsed |
---|
29 | REAL :: Hmean_sed |
---|
30 | REAL :: tbmean_sed |
---|
31 | |
---|
32 | ! definition des points particuliers |
---|
33 | integer,parameter :: nbpoints=7 |
---|
34 | integer,parameter :: n1=6 ! nombre de sorties avant les points |
---|
35 | integer,dimension(nbpoints) :: ipos,jpos |
---|
36 | integer,parameter :: nbsortie=nbpoints*4+n1 |
---|
37 | |
---|
38 | |
---|
39 | ! positions en km |
---|
40 | real,dimension(nbpoints) :: xpos,ypos |
---|
41 | |
---|
42 | ! sorties pour ces points |
---|
43 | real,dimension(nbsortie) :: sortie |
---|
44 | |
---|
45 | |
---|
46 | CONTAINS |
---|
47 | |
---|
48 | subroutine init_outshort |
---|
49 | |
---|
50 | !ndisp sorite courte tous les ndisp |
---|
51 | NDISP=100 |
---|
52 | |
---|
53 | end subroutine init_outshort |
---|
54 | |
---|
55 | !_________________________________________________________________________ |
---|
56 | subroutine shortoutput |
---|
57 | |
---|
58 | if (itracebug.eq.1) call tracebug(' Heino: entree dans routine output_heino') |
---|
59 | |
---|
60 | ! 1_initialization |
---|
61 | !------------------ |
---|
62 | VOLtot=0. |
---|
63 | NPtot=0 |
---|
64 | nptemp_tot=0 |
---|
65 | NPtemp_sed=0 |
---|
66 | Hmean_sed=0. |
---|
67 | tbmean_sed=0. |
---|
68 | nbsed=0. |
---|
69 | ! definition des positions des points particuliers en km |
---|
70 | ypos(:)=2000. |
---|
71 | |
---|
72 | xpos(1)=3900. |
---|
73 | xpos(2)=3800. |
---|
74 | xpos(3)=3700. |
---|
75 | xpos(4)=3500. |
---|
76 | xpos(5)=3200. |
---|
77 | xpos(6)=2900. |
---|
78 | xpos(7)=2600. |
---|
79 | |
---|
80 | |
---|
81 | do k=1,nbpoints |
---|
82 | ipos(k)=nint(xpos(k)/dx*1000.)+1 |
---|
83 | jpos(k)=nint(ypos(k)/dx*1000.)+1 |
---|
84 | end do |
---|
85 | |
---|
86 | |
---|
87 | ! 2_preparing outputs |
---|
88 | !-------------------- |
---|
89 | do I=1,NX |
---|
90 | do J=1,NY |
---|
91 | |
---|
92 | if (mksedim(i,j).ge.1) then ! seulement le grand cercle |
---|
93 | NPtot=NPtot+1 ! nombre de points |
---|
94 | VOLtot=VOLtot+H(I,J) ! volume total |
---|
95 | if (t(i,j,nz).ge.tpmp(i,j,nz)) then ! points base temperee |
---|
96 | nptemp_tot=nptemp_tot+1 ! |
---|
97 | if (mksedim(i,j).ge.2) nptemp_sed=nptemp_sed+1 ! seulement ceux du sediment |
---|
98 | endif |
---|
99 | if (mksedim(i,j).ge.2) then |
---|
100 | Hmean_sed=Hmean_sed+H(i,j) ! epaisseur moyenne zone sediment |
---|
101 | tbmean_sed=tbmean_sed+(t(i,j,nz)-tpmp(i,j,nz))+273.15 |
---|
102 | nbsed=nbsed+1 |
---|
103 | endif |
---|
104 | endif |
---|
105 | end do |
---|
106 | end do |
---|
107 | |
---|
108 | nbsed=max(nbsed,1) ! pour eviter une division par 0. |
---|
109 | |
---|
110 | sortie(1)=time |
---|
111 | sortie(2)=voltot*dx*dx/1.e15 |
---|
112 | sortie(3)=nptemp_tot*dx*dx/1.e12 |
---|
113 | sortie(4)=hmean_sed/nbsed/1.e3 |
---|
114 | sortie(5)=nptemp_sed*dx*dx/1.e12 |
---|
115 | sortie(6)=tbmean_sed/nbsed |
---|
116 | l=n1+1 |
---|
117 | do k=1,7 |
---|
118 | i1=ipos(k) |
---|
119 | j1=jpos(k) |
---|
120 | sortie(l)=H(i1,j1)/1000. |
---|
121 | sortie(l+1)=T(i1,j1,nz)-tpmp(i1,j1,nz) |
---|
122 | sortie(l+2)=chalgliss_maj(i1,j1)/secyear |
---|
123 | ! sortie(l+2)=rog*Hmx(i1,j1)*sdx(i1,j1)*uxbar(i1,j1) |
---|
124 | ! sortie(l+3)=rog*Hmx(i1+1,j1)*sdx(i1+1,j1)*uxbar(i1+1,j1) |
---|
125 | sortie(l+3)=0.5*(uxbar(i1,j1)+uxbar(i1+1,j1)) |
---|
126 | l=l+4 |
---|
127 | end do |
---|
128 | |
---|
129 | |
---|
130 | ! 2_writing outputs |
---|
131 | !------------------ |
---|
132 | ! **** short display **** |
---|
133 | |
---|
134 | |
---|
135 | write(num_ritz,fmt='(34(es14.6,1x))') (sortie(k),k=1,nbsortie) |
---|
136 | |
---|
137 | |
---|
138 | end subroutine shortoutput |
---|
139 | |
---|
140 | end module output_heino |
---|