source: trunk/SOURCES/GrIce2sea_files/lect_climat_ref_Ice2sea_mod.f90 @ 11

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

initial import GRISLI trunk

File size: 1.8 KB
Line 
1module lect_climref_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
12contains
13
14  subroutine input_climat_ref()
15
16    namelist/clim_smb_T_gen/smb_file,coef_smb_unit,temp_annual_file
17
18428 format(A)
19    rewind(num_param)                     ! pour revenir au debut du fichier param_list.dat
20    read(num_param,clim_smb_T_gen)
21
22    write(num_rep_42,428)'!___________________________________________________________' 
23    write(num_rep_42,428)'!  module  lect_climref_Ice2sea                             '
24    write(num_rep_42,clim_smb_T_gen)
25    write(num_rep_42,428)'!___________________________________________________________' 
26
27
28! smb : surface mass balance
29
30    smb_file  = trim(dirnameinp)//trim(smb_file)
31
32    call lect_input(3,'smb',1,bm,smb_file,trim(dirnameinp)//trim(runname)//'.nc')
33
34    bm(:,:)  = bm(:,:) * coef_smb_unit
35
36
37    where ((H(:,:).lt.1.).and.(Bsoc(:,:).gt.0.))
38       bm(:,:) = bm(:,:) - 5.                     ! pour faire un masque a l'exterieur du Groenland actuel
39    end where
40
41
42    acc(:,:) = 0.
43    abl(:,:) = 0.
44
45    where (bm(:,:).gt.0.)
46       acc(:,:) = bm(:,:)   ! accumulation quand positif
47    elsewhere
48       abl(:,:) = - bm(:,:) ! ablation quand negatif
49    end where
50
51
52! surface temperature  Tann
53
54    temp_annual_file = trim(dirnameinp)//trim(temp_annual_file)
55
56    call lect_input(3,'Tann',1,Tann,temp_annual_file,trim(dirnameinp)//trim(runname)//'.nc')
57
58    ta0(:,:)   = Tann(:,:)
59    Tjuly(:,:) = Tann(:,:)
60
61
62! remarque : Tjuly, Acc et Abl ne servent normalement pas dans le reste du code
63
64  end subroutine input_climat_ref
65
66end module  lect_climref_Ice2sea
Note: See TracBrowser for help on using the repository browser.