--- trunk/dyn3d/gcm.f 2014/03/26 18:16:05 92 +++ trunk/dyn3d/gcm.f 2014/09/17 10:08:00 109 @@ -29,11 +29,13 @@ USE ioconf_calendar_m, only: ioconf_calendar use jumble, only: new_unit use leapfrog_m, only: leapfrog + use netcdf95, only: nf95_close use suphec_m, only: suphec use temps, only: day_ref, annee_ref, day_end, itau_dyn use tracstoke, only: istdyn, istphy use unit_nml_m, only: unit_nml use yoethf_m, only: yoethf + use write_field, only: NbField, Ncid IMPLICIT NONE @@ -55,6 +57,8 @@ ! (mask for points in the "v" grid, first index is for longitude, ! second index is for latitude) + integer i + namelist /main_nml/true_calendar !------------------------------------------------------------ @@ -84,22 +88,16 @@ ! Lecture du fichier "start.nc" : CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0) - ! On remet le calendrier à zero si demandé : - if (annee_ref /= anneeref .or. day_ref /= dayref) then - print *, 'Attention : les dates initiales lues dans le fichier ' // & - '"start" ne correspondent pas à celles lues dans "gcm.def".' - if (raz_date) then - print *, 'On réinitialise à la date lue dans "gcm.def".' - annee_ref = anneeref - day_ref = dayref - day_ini = dayref - itau_dyn = 0 - time_0 = 0. - else - print *, 'On garde les dates du fichier "start".' - endif - ELSE - raz_date = .false. + ! On remet le calendrier à zéro si demandé : + if (raz_date) then + print *, 'On réinitialise à la date lue dans la namelist.' + annee_ref = anneeref + day_ref = dayref + day_ini = dayref + itau_dyn = 0 + time_0 = 0. + else + print *, 'On garde les dates du fichier "start".' endif CALL disvert @@ -155,6 +153,11 @@ close(unit_nml) call histclo + + do i = 1, nbfield + call nf95_close(Ncid(i)) + end do + print *, 'Simulation finished' print *, 'Everything is cool'