Read variables from a GETM NetCDF hotstart file (Source File: read_restart_ncdf.F90)

INTERFACE:

    subroutine read_restart_ncdf(runtype,loop,julianday,secondsofday,tstep)
DESCRIPTION:

Reads from a NetCDF files (with handler ncid) opened with open_restart_ncdf(). All variable id's are initialised. The variables can be read from hotstart files with the same dimensions as given by imin:imax,jmin:jmax - or - from a hotstart file with the same dimensions as topo.nc (and on the same grid). This allows to use 'ncmerge' to combine a number of hotstart files in to one - make a new sub-domain decomposition and use the newly created hotstart file. It might be necessary to use 'ncks' to cut the file to be have the same dimensions as topo.nc. Allowing for the file naming scheme in GETM links for each sub-domain should be made - e.g. ln -s restart.in restart.000.in; ln -s restart.in restart.001.in etc.
Halo-zones are updated using calls to update_2d_halo() and update_3d_halo(). USES:

    use netcdf
    use ncdf_restart
    use domain, only: iextr,jextr,ioff,joff
    use domain, only: az,au,av
    use halo_zones, only: update_2d_halo,update_3d_halo,wait_halo
    use halo_zones, only: H_TAG,U_TAG,V_TAG
    use variables_2d
    use exceptions, only: getm_error
 #ifndef NO_3D
    use variables_3d
 #ifdef GETM_BIO
    use bio, only: bio_calc
    use bio_var, only: numc
    use getm_bio, only: bio_init_method
 #endif
 #ifdef _FABM_
    use getm_fabm, only: fabm_init_method
    use getm_fabm, only: fabm_pel,fabm_ben
 #endif
 #endif
 #ifdef SPM
    use suspended_matter
 #endif
    IMPLICIT NONE
INPUT PARAMETERS:
    integer, intent(in)      :: runtype
OUTPUT PARAMETERS:
    integer, intent(out)      :: loop,julianday,secondsofday
    REALTYPE, intent(out)     :: tstep
   !DEFINED PARAMTERS:
REVISION HISTORY:
    Original author(s): Karsten Bolding
LOCAL VARIABLES:
    integer         :: il,ih,iloc,ilen,i,istart,istop
    integer         :: jl,jh,jloc,jlen,j,jstart,jstop
    integer         :: n