--- trunk/phylmd/Interface_surf/interfoce_lim.f 2014/09/09 12:54:30 106 +++ trunk/Sources/phylmd/Interface_surf/interfoce_lim.f 2016/05/09 19:56:28 191 @@ -4,22 +4,21 @@ contains - SUBROUTINE interfoce_lim(itime, dtime, jour, knindex, debut, lmt_sst, & - pctsrf_new) + SUBROUTINE interfoce_lim(dtime, jour, knindex, debut, lmt_sst, pctsrf_new) + ! lecture conditions limites ! Cette routine sert d'interface entre le modèle atmosphérique et ! un fichier de conditions aux limites. ! Laurent FAIRHEAD, February 2000 - use abort_gcm_m, only: abort_gcm USE dimphy, ONLY: klon USE indicesol, ONLY: is_lic, is_oce, is_sic, is_ter, nbsrf - USE netcdf, ONLY: nf90_noerr, nf90_nowrite + USE netcdf, ONLY: nf90_nowrite use netcdf95, only: NF95_CLOSE, nf95_get_var, NF95_INQ_VARID, nf95_open - use nr_util, only: assert_eq + use nr_util, only: assert + 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 @@ -36,8 +35,6 @@ ! Local: - integer knon ! nombre de points dans le domaine a traiter - INTEGER, save:: lmt_pas ! frequence de lecture des conditions limites ! (en pas de physique) @@ -55,7 +52,7 @@ ! -------------------------------------------------- - knon = assert_eq(size(knindex), size(lmt_sst), "interfoce_lim knon") + call assert(size(knindex) == size(lmt_sst), "interfoce_lim knon") if (debut .and. .not. allocated(sst_lu)) then lmt_pas = nint(86400. / dtime) ! pour une lecture une fois par jour @@ -67,7 +64,7 @@ if ((jour - jour_lu) /= 0) deja_lu = .false. ! Tester d'abord si c'est le moment de lire le fichier - if (mod(itime - 1, lmt_pas) == 0 .and. .not. deja_lu) then + if (mod(itap - 1, lmt_pas) == 0 .and. .not. deja_lu) then call NF95_OPEN ('limit.nc', NF90_NOWRITE, ncid) ! Fraction "ocean"