4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE read_sst(julien, knindex, lmt_sst) |
SUBROUTINE read_sst(julien, knindex, tsurf) |
8 |
|
|
9 |
! From interfoce_lim |
! From interfoce_lim |
10 |
|
|
11 |
use conf_gcm_m, only: lmt_pas |
! Libraries: |
|
USE dimphy, ONLY: klon |
|
12 |
USE netcdf, ONLY: nf90_nowrite |
USE netcdf, ONLY: nf90_nowrite |
13 |
use netcdf95, only: NF95_CLOSE, nf95_get_var, NF95_INQ_VARID, nf95_open |
use netcdf95, only: NF95_CLOSE, nf95_get_var, NF95_INQ_VARID, nf95_open |
14 |
use nr_util, only: assert |
use nr_util, only: assert |
15 |
|
|
16 |
|
use conf_gcm_m, only: lmt_pas |
17 |
|
USE dimphy, ONLY: klon |
18 |
use time_phylmdz, only: itap |
use time_phylmdz, only: itap |
19 |
|
|
20 |
integer, intent(IN):: julien ! jour a lire dans l'annee |
integer, intent(IN):: julien ! jour a lire dans l'annee |
22 |
integer, intent(in):: knindex(:) ! (knon) |
integer, intent(in):: knindex(:) ! (knon) |
23 |
! index des points de la surface a traiter |
! index des points de la surface a traiter |
24 |
|
|
25 |
real, intent(out):: lmt_sst(:) ! (knon) |
real, intent(out):: tsurf(:) ! (knon) |
26 |
! SST lues dans le fichier de conditions aux limites |
! SST lues dans le fichier de conditions aux limites |
27 |
|
|
28 |
! Local: |
! Local: |
34 |
|
|
35 |
! -------------------------------------------------- |
! -------------------------------------------------- |
36 |
|
|
37 |
call assert(size(knindex) == size(lmt_sst), "read_sst knon") |
call assert(size(knindex) == size(tsurf), "read_sst knon") |
38 |
|
|
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) then |
if (mod(itap - 1, lmt_pas) == 0) then |
46 |
call NF95_CLOSE(ncid) |
call NF95_CLOSE(ncid) |
47 |
endif |
endif |
48 |
|
|
49 |
lmt_sst = sst_lu(knindex) |
tsurf = sst_lu(knindex) |
50 |
|
|
51 |
END SUBROUTINE read_sst |
END SUBROUTINE read_sst |
52 |
|
|