source: trunk/SOURCES/MISMIP3D_files/lect-mismip3d_mod.f90 @ 111

Last change on this file since 111 was 4, checked in by dumas, 10 years ago

initial import GRISLI trunk

File size: 3.4 KB
Line 
1!> \file lect-mismip3d_mod.f90
2!! Module pour la lecture de topography pour les experiences mismip3d
3!<
4
5!> \namespace lect_topo_mismip3
6!! Module pour la lecture de topography pour les experiences mismip3d
7!! \author Vincent Peyaud, Catherine Ritz
8!! \date march 2012
9
10!! @note Used module
11!! @note   - use module3D_phy
12!<
13
14module lect_topo_mismip3
15
16use module3D_phy
17use netcdf
18use io_netcdf_grisli
19use param_phy_mod
20
21character(len=80)                  :: topo_file        !< netcdf file : initial topography
22character(len=80)                  :: filin
23real*8, dimension(:,:),   pointer  :: tab              !< tableau 2d real ecrit dans le fichier
24
25contains
26
27  subroutine input_topo
28 
29    namelist/topo_mismip3/topo_file
30
31     if (itracebug.eq.1)  call tracebug(' entree dans input topo de MISMIP')
32
33
34    rewind(num_param)                                  ! pour revenir au debut du fichier param_list.dat
35    read(num_param,topo_mismip3)
36
37    write(num_rep_42,428)'!___________________________________________________________' 
38    write(num_rep_42,428)'!  module  lect_topo_ant_gen                                '
39    write(num_rep_42,topo_mismip3)
40    write(num_rep_42,428)'!___________________________________________________________'
41
42
43    filin     = trim(dirnameinp)//trim(topo_file)
44    write(6,*)'filin',filin
45    write(6,*)'file_ncdf',file_ncdf
46
47
48    call Read_Ncdf_var('Bsoc',filin,tab)
49    Bsoc(:,:)=tab(:,:)
50    Bsoc0(:,:) = Bsoc(:,:)
51
52    call Read_Ncdf_var('S',filin,tab)
53    S(:,:)  = tab(:,:)
54    S0(:,:) = S(:,:)
55
56    call Read_Ncdf_var('H',filin,tab)
57    H(:,:)  = tab(:,:)
58    H0(:,:) = H(:,:)
59
60    call Read_Ncdf_var('B',filin,tab)
61    B(:,:)=tab(:,:)
62
63!   on met aussi les lectures des vitesses
64!   ces variables sont dans 3D donc globales
65
66    call Read_Ncdf_var('Uslid',filin,tab)
67    Uxflgz(:,:) = tab(:,:)
68    Uyflgz(:,:) = 0.
69
70    call Read_Ncdf_var('Ubar',filin,tab)
71    Uxbar(:,:)  = tab(:,:)
72    Uybar(:,:)  = 0.
73
74    call strain_rate() 
75
76
77!   print*, B
78
79428 format(A)
80
81
82! attribution des variables xmin, ymin, ....
83! comme mismip3D est symetrique. La longueur totale est (nx-1)*dx
84! ils sont exprimes en km mais l'ecriture netcdf les remet en m
85
86    xmax = nint((nx-1)*dx/2.)/1000.
87    ymax = nint((ny-1)*dy/2.)/1000.
88    xmin = -xmax
89    ymin = -ymax
90
91
92! modification MISMIP des parametres physiques de param_phy_mod
93
94g        = 9.8                 !<  gravite en m s-2
95ro       = 910.0               !<  densities of ice
96secyear  = 3600*24*365         !<  number of s /year
97row      = 1028.0              !<  densities of ocean water
98rog      = ro*g                !<  ro*g   (glace)
99rowg     = row*g               !<  row*g  (ocean)
100romg     = rom*g               !<  rom*g  (asthenosphere)
101rofreshg = rofresh*g           !<  rofresh*g
102d00      = ro**3*g**3          !<  ro**3*g**3
103dice     = ro/row              !<  ro/row
104
105coef_Sflot = (Row-Ro)/Row      !<   S = coef_Sflot * H + sealevel pour les shelves
106coef_Bflot = -Ro/Row           !<   B = coef_Bflot * H + sealevel pour les shelves
107
108
109
110
111  do j=1,ny
112     do i=1,nx
113        if ((bsoc(i,j)+h(i,j)*ro/row -sealevel).lt.0.) then
114           flot(i,j)=.true.
115        else
116           flot(i,j)=.false.
117        endif
118     enddo
119  enddo
120
121! la glace a le droit d'aller partout
122  mk0(:,:) = 1   
123
124
125
126! coupure du shelf
127!!$  H(305:321,:) = 1.
128!!$  S(305:321,:) = 0.1
129!!$  B(305:321,:) = S(305:321,:)-H(305:321,:)
130
131
132
133  end subroutine input_topo
134
135
136end module lect_topo_mismip3
Note: See TracBrowser for help on using the repository browser.