MODULE nb_time_step_PCM_mod 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 character(256) :: msg, var, modname !======================================================================= contains !======================================================================= SUBROUTINE nb_time_step_PCM(fichnom,timelen) implicit none !======================================================================= ! ! Purpose: Read in the data_PCM_Y*.nc the number of time steps ! ! Author: RV !======================================================================= include "dimensions.h" !======================================================================= ! Arguments: character(len = *), intent(in) :: fichnom !--- FILE NAME !======================================================================= ! Local Variables integer :: iq, fID, vID, idecal, ierr integer :: timelen ! number of times stored in the file !----------------------------------------------------------------------- modname = "nb_time_step_PCM" ! Open initial state NetCDF file var = fichnom call error_msg(NF90_OPEN(var,NF90_NOWRITE,fID),"open",var) ierr = nf90_inq_varid (fID, "temps", vID) if (ierr /= nf90_noerr) then write(*,*)"read_data_PCM: Le champ est absent" write(*,*)"read_data_PCM: J essaie " ierr = nf90_inq_varid (fID, "time_counter", vID) if (ierr /= nf90_noerr) then write(*,*)"read_data_PCM: Le champ est absent" write(*,*)"read_data_PCM: J essaie