1 | Resume climat GrIce2sea |
---|
2 | |
---|
3 | !============================================== climat_GrIce2sea_years_mod.f90 |
---|
4 | module climat_Grice2sea_years_mod |
---|
5 | use module3d_phy |
---|
6 | use lect_climref_Ice2sea |
---|
7 | use netcdf |
---|
8 | use io_netcdf_grisli |
---|
9 | implicit none |
---|
10 | |
---|
11 | real,dimension(:),allocatable :: time_snap !> date des snapshots indice : nb de nb_snap) |
---|
12 | real,dimension(:,:,:),allocatable :: smb_snap !> bilan de masse des snapshots indices : nx,ny,nb_snap |
---|
13 | real :: ecart_snap !> ecart temporel entre les snapshots |
---|
14 | real :: time_depart_snaps !> temps du debut premier snapshot |
---|
15 | integer :: nb_snap !> nombre de snapshots |
---|
16 | |
---|
17 | ! declaration pour le bilan de masse |
---|
18 | real,dimension(nx,ny) :: bm_time !> bilan de masse interpole entre 2 snapshots |
---|
19 | real,dimension(nx,ny) :: grad_bm !> gradient du bilan de masse |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | contains |
---|
24 | !--------------------------------------------------------------------------------- |
---|
25 | subroutine input_clim |
---|
26 | |
---|
27 | !lecture namelist |
---|
28 | namelist/clim_snap/nb_snap,time_depart_snaps,ecart_snap,file_smb_snap |
---|
29 | |
---|
30 | ! lecture du fichier smb |
---|
31 | call Read_Ncdf_var('z',file_smb_snap,tab3D) ! ce sont des anomalies |
---|
32 | smb_snap (i,j,k) = smb_snap(i,j,k) + bm(i,j) ! ajoute les valeurs de reference |
---|
33 | |
---|
34 | ! ecriture de verification |
---|
35 | call write_ncdf_var(trim('smb'),dimtestname,trim(file_smb_snap),tab3D,'double') |
---|
36 | |
---|
37 | end subroutine input_clim |
---|
38 | !-------------------------------------------------------------------------------- |
---|
39 | |
---|
40 | !-------------------------------------------------------------------------------- |
---|
41 | subroutine init_forclim |
---|
42 | |
---|
43 | !lecture namelist |
---|
44 | namelist/lapse_rates/T_lapse_rate |
---|
45 | |
---|
46 | call input_clim |
---|
47 | |
---|
48 | end subroutine init_forclim |
---|
49 | !-------------------------------------------------------------------------------- |
---|
50 | |
---|
51 | !-------------------------------------------------------------------------------- |
---|
52 | subroutine forclim |
---|
53 | |
---|
54 | call massb_Ice2sea_fixe !---------------- A remplacer |
---|
55 | |
---|
56 | call grad_smb !-----------------------------> A faire |
---|
57 | call massb_Ice2sea_RCM |
---|
58 | |
---|
59 | end subroutine forclim |
---|
60 | !-------------------------------------------------------------------------------- |
---|
61 | end module climat_Grice2sea_years_mod |
---|
62 | |
---|
63 | !======================================================= lect_climat_years_Ice2sea_mod.f90 |
---|
64 | |
---|
65 | module lect_clim_years_Ice2sea |
---|
66 | use module3D_phy |
---|
67 | use interface_input |
---|
68 | use no_ablation |
---|
69 | |
---|
70 | |
---|
71 | !-------------------------------------------------------------------------------- |
---|
72 | subroutine input_climat_ref() |
---|
73 | |
---|
74 | !lecture namelist |
---|
75 | namelist/clim_smb_T_gen/smb_file,coef_smb_unit,temp_annual_file |
---|
76 | |
---|
77 | ! lecture fichiers climat actuel |
---|
78 | |
---|
79 | call lect_input(3,'smb',1,bm,smb_file,trim(dirnameinp)//trim(runname)//'.nc') |
---|
80 | bm(:,:) = bm(:,:)*coef_smb_unit |
---|
81 | |
---|
82 | call lect_input(3,'Tann',1,Tann,temp_annual_file,trim(dirnameinp)//trim(runname)//'.nc') |
---|
83 | |
---|
84 | end subroutine input_climat_ref |
---|
85 | |
---|
86 | |
---|
87 | end module lect_climref_Ice2sea |
---|
88 | |
---|
89 | !============================================================== massb-GrIce2sea_fixe.f90 |
---|
90 | |
---|
91 | subroutine massb_Ice2sea_fixe ! calcule le mass balance |
---|
92 | |
---|
93 | use module3D_phy |
---|
94 | use climat_Grice2sea_mod |
---|
95 | |
---|
96 | Tann (:,:) = Ta0 (:,:) + T_lapse_rate * (S(:,:)-S0(:,:)) |
---|
97 | Ts(:,:) = Tann(:,:) |
---|
98 | |
---|
99 | ! bm est inchange |
---|
100 | end subroutine massb_Ice2sea_fixe |
---|
101 | |
---|
102 | !!============================================================== massb-GrIce2sea_RCM.f90 |
---|
103 | |
---|
104 | subroutine massb_Ice2sea_RCM ! calcule le mass balance |
---|
105 | |
---|
106 | use module3D_phy |
---|
107 | use climat_Grice2sea_mod |
---|
108 | |
---|
109 | Tann (:,:) = Ta0 (:,:) + T_lapse_rate * (S(:,:)-S0(:,:)) |
---|
110 | Ts(:,:) = Tann(:,:) |
---|
111 | |
---|
112 | |
---|
113 | ! |
---|
114 | ! calcule bm_time par interpolation entre deux snapshots |
---|
115 | ! avant prend la valeur de reference |
---|
116 | ! apres prend la derniere valeur |
---|
117 | |
---|
118 | |
---|
119 | |
---|
120 | |
---|
121 | |
---|
122 | call grad_smb !-----------------------------> A faire |
---|
123 | |
---|
124 | ! attribue bm |
---|
125 | bm(:,:) = bm_time(:,:) + grad_smb(:,:) |
---|
126 | |
---|
127 | end subroutine massb_Ice2sea_RCM |
---|
128 | !--------------------------------------------------------------------------- |
---|
129 | |
---|
130 | !--------------------------------------------------------------------------- |
---|
131 | subroutine grad_smb |
---|
132 | |
---|
133 | use module3D_phy |
---|
134 | use climat_Grice2sea_mod |
---|
135 | |
---|
136 | grad_smb (:,:) = 0. |
---|
137 | |
---|
138 | end subroutine grad_smb |
---|
139 | |
---|
140 | |
---|
141 | !============================================================================== |
---|