--- trunk/Sources/phylmd/Interface_surf/interfsur_lim.f 2015/07/07 17:49:23 154 +++ trunk/Sources/phylmd/Interface_surf/interfsur_lim.f 2016/05/09 19:56:28 191 @@ -4,19 +4,18 @@ contains - SUBROUTINE interfsur_lim(itime, dtime, jour, knindex, debut, alb_new, z0_new) + SUBROUTINE interfsur_lim(dtime, jour, knindex, debut, albedo, z0_new) ! Cette routine sert d'interface entre le mod\`ele atmosph\'erique et ! un fichier de conditions aux limites. ! Laurent FAIRHEAD, February 2000 - use abort_gcm_m, only: abort_gcm USE dimphy, ONLY: klon use netcdf, only: NF90_NOWRITE use netcdf95, only: NF95_close, NF95_GET_VAR, NF95_INQ_VARID, NF95_OPEN + use time_phylmdz, only: itap - integer, intent(IN):: itime ! numero du pas de temps courant real, intent(IN):: dtime ! pas de temps de la physique (en s) integer, intent(IN):: jour ! jour a lire dans l'annee @@ -24,7 +23,7 @@ ! index des points de la surface \`a traiter logical, intent(IN):: debut ! premier appel \`a la physique (initialisation) - real, intent(out):: alb_new(:) ! (knon) albedo lu + real, intent(out):: albedo(:) ! (knon) albedo lu real, intent(out):: z0_new(:) ! (klon) longueur de rugosit\'e lue ! Local: @@ -49,7 +48,7 @@ knon = size(knindex) if (debut) then - lmt_pas = nint(86400./dtime * 1.0) ! pour une lecture une fois par jour + lmt_pas = nint(86400. / dtime) ! pour une lecture une fois par jour jour_lu_sur = jour - 1 allocate(alb_lu(klon)) allocate(rug_lu(klon)) @@ -58,7 +57,7 @@ if (jour - jour_lu_sur /= 0) deja_lu_sur = .false. ! Tester d'abord si c'est le moment de lire le fichier - if (mod(itime - 1, lmt_pas) == 0 .and. .not. deja_lu_sur) then + if (mod(itap - 1, lmt_pas) == 0 .and. .not. deja_lu_sur) then call NF95_OPEN('limit.nc', NF90_NOWRITE, ncid) ! Lecture Albedo @@ -75,8 +74,8 @@ endif ! Recopie des variables dans les champs de sortie - alb_new = alb_lu(knindex(:knon)) - z0_new(:knon) = rug_lu(knindex(:knon)) + albedo = alb_lu(knindex) + z0_new(:knon) = rug_lu(knindex) z0_new(knon + 1:) = 999999. END SUBROUTINE interfsur_lim