27 |
|
|
28 |
! Local: |
! Local: |
29 |
|
|
|
logical, save:: deja_lu_sur |
|
|
! jour \`a lire d\'ej\`a lu pour une surface pr\'ec\'edente |
|
|
|
|
30 |
integer:: jour_lu_sur = - 1 |
integer:: jour_lu_sur = - 1 |
31 |
|
|
32 |
! Champs lus dans le fichier de conditions aux limites : |
! Champs lus dans le fichier de conditions aux limites : |
36 |
|
|
37 |
!------------------------------------------------------------ |
!------------------------------------------------------------ |
38 |
|
|
|
if (jour - jour_lu_sur /= 0) deja_lu_sur = .false. |
|
|
|
|
39 |
! Tester d'abord si c'est le moment de lire le fichier |
! Tester d'abord si c'est le moment de lire le fichier |
40 |
if (mod(itap - 1, lmt_pas) == 0 .and. .not. deja_lu_sur) then |
if (mod(itap - 1, lmt_pas) == 0 .and. jour /= jour_lu_sur) then |
41 |
call NF95_OPEN('limit.nc', NF90_NOWRITE, ncid) |
call NF95_OPEN('limit.nc', NF90_NOWRITE, ncid) |
42 |
|
|
43 |
! Lecture Albedo |
! Lecture Albedo |
49 |
call NF95_GET_VAR(ncid, varid, rug_lu, start=(/1, jour/)) |
call NF95_GET_VAR(ncid, varid, rug_lu, start=(/1, jour/)) |
50 |
|
|
51 |
call NF95_CLOSE(ncid) |
call NF95_CLOSE(ncid) |
|
deja_lu_sur = .true. |
|
52 |
jour_lu_sur = jour |
jour_lu_sur = jour |
53 |
endif |
endif |
54 |
|
|