--- trunk/Sources/phylmd/Interface_surf/interfsur_lim.f 2015/07/16 17:39:10 156 +++ trunk/phylmd/Interface_surf/interfsur_lim.f 2018/07/20 16:46:48 282 @@ -4,19 +4,18 @@ contains - SUBROUTINE interfsur_lim(itime, dtime, jour, knindex, debut, albedo, 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 @@ -25,7 +24,7 @@ logical, intent(IN):: debut ! premier appel \`a la physique (initialisation) real, intent(out):: albedo(:) ! (knon) albedo lu - real, intent(out):: z0_new(:) ! (klon) longueur de rugosit\'e lue + real, intent(out):: z0_new(:) ! (knon) 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 @@ -76,8 +75,7 @@ ! Recopie des variables dans les champs de sortie albedo = alb_lu(knindex) - z0_new(:knon) = rug_lu(knindex) - z0_new(knon + 1:) = 999999. + z0_new = rug_lu(knindex) END SUBROUTINE interfsur_lim