1 | module lect_clim_years_Ice2sea |
---|
2 | |
---|
3 | use module3D_phy |
---|
4 | use interface_input |
---|
5 | use no_ablation |
---|
6 | |
---|
7 | character(len=100) :: smb_file ! fichier smb |
---|
8 | character(len=100) :: temp_annual_file ! temperature annuelles |
---|
9 | real :: coef_smb_unit ! pour corriger l'unite |
---|
10 | |
---|
11 | |
---|
12 | contains |
---|
13 | |
---|
14 | !---------------------------------------------------------------------- |
---|
15 | !< subroutine input_climat_ref : lit le climat de reference |
---|
16 | !< (idem lect_climat_ref_Ice2sea_mod.f90) |
---|
17 | !------------------------------------------------------------------------ |
---|
18 | |
---|
19 | subroutine input_climat_ref |
---|
20 | |
---|
21 | namelist/clim_smb_T_gen/smb_file,coef_smb_unit,temp_annual_file |
---|
22 | |
---|
23 | 428 format(A) |
---|
24 | rewind(num_param) ! pour revenir au debut du fichier param_list.dat |
---|
25 | read(num_param,clim_smb_T_gen) |
---|
26 | |
---|
27 | write(num_rep_42,428)'!___________________________________________________________' |
---|
28 | write(num_rep_42,428)'! module lect_climref_Ice2sea ' |
---|
29 | write(num_rep_42,clim_smb_T_gen) |
---|
30 | write(num_rep_42,428)'!___________________________________________________________' |
---|
31 | |
---|
32 | |
---|
33 | ! smb : surface mass balance |
---|
34 | |
---|
35 | smb_file = trim(dirnameinp)//trim(smb_file) |
---|
36 | |
---|
37 | call lect_input(3,'smb',1,bm,smb_file,trim(dirnameinp)//trim(runname)//'.nc') |
---|
38 | |
---|
39 | bm(:,:) = bm(:,:)*coef_smb_unit |
---|
40 | |
---|
41 | acc(:,:) = 0. |
---|
42 | abl(:,:) = 0. |
---|
43 | |
---|
44 | where (bm(:,:).gt.0.) |
---|
45 | acc(:,:) = bm(:,:) ! accumulation quand positif |
---|
46 | elsewhere |
---|
47 | abl(:,:) = - bm(:,:) ! ablation quand negatif |
---|
48 | end where |
---|
49 | |
---|
50 | |
---|
51 | ! surface temperature Tann |
---|
52 | |
---|
53 | temp_annual_file = trim(dirnameinp)//trim(temp_annual_file) |
---|
54 | |
---|
55 | call lect_input(3,'Tann',1,Tann,temp_annual_file,trim(dirnameinp)//trim(runname)//'.nc') |
---|
56 | |
---|
57 | ta0(:,:) = Tann(:,:) |
---|
58 | Tjuly(:,:) = Tann(:,:) |
---|
59 | |
---|
60 | |
---|
61 | ! remarque : Tjuly, Acc et Abl ne servent normalement pas dans le reste du code |
---|
62 | |
---|
63 | end subroutine input_climat_ref |
---|
64 | |
---|
65 | end module lect_climref_Ice2sea |
---|