/[lmdze]/trunk/phylmd/Interface_surf/interfsur_lim.f
ViewVC logotype

Annotation of /trunk/phylmd/Interface_surf/interfsur_lim.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 312 - (hide annotations)
Fri Dec 7 14:17:11 2018 UTC (5 years, 5 months ago) by guez
File size: 1696 byte(s)
In procedure interfsur_lim, deja_lu_sur is redundant with jour_lu_sur.

1 guez 54 module interfsur_lim_m
2    
3     implicit none
4    
5     contains
6    
7 guez 301 SUBROUTINE interfsur_lim(jour, knindex, albedo, z0_new)
8 guez 54
9 guez 150 ! Cette routine sert d'interface entre le mod\`ele atmosph\'erique et
10 guez 54 ! un fichier de conditions aux limites.
11    
12 guez 104 ! Laurent FAIRHEAD, February 2000
13 guez 54
14 guez 301 use conf_gcm_m, only: lmt_pas
15 guez 98 USE dimphy, ONLY: klon
16     use netcdf, only: NF90_NOWRITE
17     use netcdf95, only: NF95_close, NF95_GET_VAR, NF95_INQ_VARID, NF95_OPEN
18 guez 191 use time_phylmdz, only: itap
19 guez 54
20 guez 98 integer, intent(IN):: jour ! jour a lire dans l'annee
21 guez 54
22 guez 106 integer, intent(in):: knindex(:) ! (knon)
23 guez 150 ! index des points de la surface \`a traiter
24 guez 98
25 guez 156 real, intent(out):: albedo(:) ! (knon) albedo lu
26 guez 282 real, intent(out):: z0_new(:) ! (knon) longueur de rugosit\'e lue
27 guez 98
28     ! Local:
29    
30 guez 301 integer:: jour_lu_sur = - 1
31 guez 54
32 guez 98 ! Champs lus dans le fichier de conditions aux limites :
33 guez 301 real, save:: alb_lu(klon), rug_lu(klon)
34 guez 98
35     integer ncid, varid
36    
37 guez 54 !------------------------------------------------------------
38    
39     ! Tester d'abord si c'est le moment de lire le fichier
40 guez 312 if (mod(itap - 1, lmt_pas) == 0 .and. jour /= jour_lu_sur) then
41 guez 98 call NF95_OPEN('limit.nc', NF90_NOWRITE, ncid)
42 guez 54
43     ! Lecture Albedo
44 guez 98 call NF95_INQ_VARID(ncid, 'ALB', varid)
45     call NF95_GET_VAR(ncid, varid, alb_lu, start=(/1, jour/))
46 guez 54
47 guez 150 ! Lecture rugosit\'e
48 guez 98 call NF95_INQ_VARID(ncid, 'RUG', varid)
49     call NF95_GET_VAR(ncid, varid, rug_lu, start=(/1, jour/))
50 guez 54
51 guez 98 call NF95_CLOSE(ncid)
52 guez 54 jour_lu_sur = jour
53     endif
54    
55     ! Recopie des variables dans les champs de sortie
56 guez 156 albedo = alb_lu(knindex)
57 guez 282 z0_new = rug_lu(knindex)
58 guez 54
59     END SUBROUTINE interfsur_lim
60    
61     end module interfsur_lim_m

  ViewVC Help
Powered by ViewVC 1.1.21