70 |
REAL fractint(klon) |
REAL fractint(klon) |
71 |
REAL xmin, xmax |
REAL xmin, xmax |
72 |
INTEGER ncid, varid, ndims |
INTEGER ncid, varid, ndims |
73 |
INTEGER ierr, i, nsrf, isoil |
INTEGER ierr, i, nsrf |
|
CHARACTER(len=7) str7 |
|
74 |
CHARACTER(len=2) str2 |
CHARACTER(len=2) str2 |
75 |
|
|
76 |
!--------------------------------------------------------------- |
!--------------------------------------------------------------- |
171 |
|
|
172 |
! Lecture des temperatures du sol profond: |
! Lecture des temperatures du sol profond: |
173 |
|
|
174 |
DO nsrf = 1, nbsrf |
call NF95_INQ_VARID(ncid, 'Tsoil', varid) |
175 |
DO isoil=1, nsoilmx |
call NF95_GET_VAR(ncid, varid, tsoil) |
|
IF (isoil > 99 .AND. nsrf > 99) THEN |
|
|
PRINT *, "Trop de couches ou sous-mailles" |
|
|
stop 1 |
|
|
ENDIF |
|
|
WRITE(str7, '(i2.2, "srf", i2.2)') isoil, nsrf |
|
|
ierr = NF90_INQ_VARID(ncid, 'Tsoil'//str7, varid) |
|
|
IF (ierr /= NF90_NOERR) THEN |
|
|
PRINT *, "phyetat0: Le champ <Tsoil"//str7//"> est absent" |
|
|
PRINT *, " Il prend donc la valeur de surface" |
|
|
DO i=1, klon |
|
|
tsoil(i, isoil, nsrf)=tsol(i, nsrf) |
|
|
ENDDO |
|
|
ELSE |
|
|
call NF95_GET_VAR(ncid, varid, tsoil(:, isoil, nsrf)) |
|
|
ENDIF |
|
|
ENDDO |
|
|
ENDDO |
|
176 |
|
|
177 |
!IM "slab" ocean |
!IM "slab" ocean |
178 |
! Lecture de tslab (pour slab ocean seulement): |
! Lecture de tslab (pour slab ocean seulement): |