! ! $Id $ ! SUBROUTINE nb_time_step_GCM(fichnom,timelen) use netcdf, only: nf90_open,NF90_NOWRITE,nf90_noerr,nf90_strerror, & nf90_get_var, nf90_inq_varid, nf90_inq_dimid, & nf90_inquire_dimension,nf90_close IMPLICIT NONE !======================================================================= ! ! Purpose: Read in the data_GCM_Yr*.nc the number of time step ! ! Author: RV !======================================================================= include "dimensions.h" !=============================================================================== ! Arguments: CHARACTER(LEN=*), INTENT(IN) :: fichnom !--- FILE NAME !=============================================================================== ! Local Variables CHARACTER(LEN=256) :: msg, var, modname INTEGER :: iq, fID, vID, idecal INTEGER :: ierr INTEGER :: timelen ! number of times stored in the file !----------------------------------------------------------------------- modname="nb_time_step_GCM" ! Open initial state NetCDF file var=fichnom CALL err(NF90_OPEN(var,NF90_NOWRITE,fID),"open",var) ierr = nf90_inq_varid (fID, "temps", vID) IF (ierr .NE. nf90_noerr) THEN write(*,*)"read_data_GCM: Le champ est absent" write(*,*)"read_data_GCM: J essaie " ierr = nf90_inq_varid (fID, "time_counter", vID) IF (ierr .NE. nf90_noerr) THEN write(*,*)"read_data_GCM: Le champ est absent" write(*,*)"read_data_GCM: J essaie