15 |
! L. Fairhead 02/2000 |
! L. Fairhead 02/2000 |
16 |
|
|
17 |
use abort_gcm_m, only: abort_gcm |
use abort_gcm_m, only: abort_gcm |
18 |
|
use netcdf |
19 |
|
|
20 |
! Parametres d'entree |
! Parametres d'entree |
21 |
! input: |
! input: |
62 |
|
|
63 |
! quelques variables pour netcdf |
! quelques variables pour netcdf |
64 |
|
|
|
include "netcdf.inc" |
|
65 |
integer , save :: nid, nvarid |
integer , save :: nid, nvarid |
66 |
integer, dimension(2), save :: start, epais |
integer, dimension(2), save :: start, epais |
67 |
|
|
85 |
|
|
86 |
! Ouverture du fichier |
! Ouverture du fichier |
87 |
|
|
88 |
ierr = NF_OPEN ('limit.nc', NF_NOWRITE, nid) |
ierr = NF90_OPEN ('limit.nc', NF90_NOWRITE, nid) |
89 |
if (ierr.NE.NF_NOERR) then |
if (ierr.NE.NF90_NOERR) then |
90 |
abort_message & |
abort_message & |
91 |
= 'Pb d''ouverture du fichier de conditions aux limites' |
= 'Pb d''ouverture du fichier de conditions aux limites' |
92 |
call abort_gcm(modname, abort_message, 1) |
call abort_gcm(modname, abort_message, 1) |
101 |
|
|
102 |
! Lecture Albedo |
! Lecture Albedo |
103 |
|
|
104 |
ierr = NF_INQ_VARID(nid, 'ALB', nvarid) |
ierr = NF90_INQ_VARID(nid, 'ALB', nvarid) |
105 |
if (ierr /= NF_NOERR) then |
if (ierr /= NF90_NOERR) then |
106 |
abort_message = 'Le champ <ALB> est absent' |
abort_message = 'Le champ <ALB> est absent' |
107 |
call abort_gcm(modname, abort_message, 1) |
call abort_gcm(modname, abort_message, 1) |
108 |
endif |
endif |
109 |
ierr = NF_GET_VARA_REAL(nid, nvarid, start, epais, alb_lu) |
ierr = NF90_GET_VAR(nid, nvarid, alb_lu, start, epais) |
110 |
if (ierr /= NF_NOERR) then |
if (ierr /= NF90_NOERR) then |
111 |
abort_message = 'Lecture echouee pour <ALB>' |
abort_message = 'Lecture echouee pour <ALB>' |
112 |
call abort_gcm(modname, abort_message, 1) |
call abort_gcm(modname, abort_message, 1) |
113 |
endif |
endif |
114 |
|
|
115 |
! Lecture rugosité |
! Lecture rugosité |
116 |
|
|
117 |
ierr = NF_INQ_VARID(nid, 'RUG', nvarid) |
ierr = NF90_INQ_VARID(nid, 'RUG', nvarid) |
118 |
if (ierr /= NF_NOERR) then |
if (ierr /= NF90_NOERR) then |
119 |
abort_message = 'Le champ <RUG> est absent' |
abort_message = 'Le champ <RUG> est absent' |
120 |
call abort_gcm(modname, abort_message, 1) |
call abort_gcm(modname, abort_message, 1) |
121 |
endif |
endif |
122 |
ierr = NF_GET_VARA_REAL(nid, nvarid, start, epais, rug_lu) |
ierr = NF90_GET_VAR(nid, nvarid, rug_lu, start, epais) |
123 |
if (ierr /= NF_NOERR) then |
if (ierr /= NF90_NOERR) then |
124 |
abort_message = 'Lecture echouee pour <RUG>' |
abort_message = 'Lecture echouee pour <RUG>' |
125 |
call abort_gcm(modname, abort_message, 1) |
call abort_gcm(modname, abort_message, 1) |
126 |
endif |
endif |
128 |
|
|
129 |
! Fin de lecture |
! Fin de lecture |
130 |
|
|
131 |
ierr = NF_CLOSE(nid) |
ierr = NF90_CLOSE(nid) |
132 |
deja_lu_sur = .true. |
deja_lu_sur = .true. |
133 |
jour_lu_sur = jour |
jour_lu_sur = jour |
134 |
endif |
endif |