C************************************************************                INIRES.2     
C                  SUBROUTINE INIRES                                         INIRES.3     
C************************************************************                INIRES.4     
      SUBROUTINE INIRES                                                      INIRES.5     
C                                                                            INIRES.6     
C     Sets up restoration variables and arrays. Sets NAMELIST                INIRES.7     
C     variables to their default settings, then reads NAMELIST               INIRES.8     
C                                                                            INIRES.9     
C                                                                            PARAM1.2     
C     Determines model resolution                                            PARAM1.3     
C                                                                            PARAM1.4     
      PARAMETER(NN=21,MM=21,NHEM=2,NL=5,MOCT=1,MG=64,JG=16,NWJ2=121          NETCDF.35    
     P         ,NCRAY=64,JGL=JG,NTRAC=1,NLEVRF=1)                            NETCDF.36    
                                                                             PARAM1.7     
C                                                                            PARAM1.8     
C                                                                            PARAM2.2     
C     Sets basic constants, especially those needed for array dimensions     PARAM2.3     
C                                                                            PARAM2.4     
      PARAMETER(MH=2,PI=3.14159265359,PI2=2.0*PI                             PARAM2.5     
     +,NNP=NN+1,MGPP=MG+2,JGP=JG+1,JGG=JG*NHEM,JGGP=JGG+1,MJP=NWJ2+NWJ2      PARAM2.6     
     +,NLM=NL-1,NLP=NL+1,NLPP=NL+2,NLA=NL+3,NLB=NL+4,NL2=NL*NL               PARAM2.7     
     +,IDA=(MG+MG+MG)/2+1,IDB=NWJ2*NL,IDC=IDB+IDB,IDD=MGPP*NL                PARAM2.8     
     +,IDE=NL2*NN,IDF=NCRAY*(MG+1),IDG=JG*NL,IDH=JG*MG                       PARAM2.9     
     +,IDI=NNP/2,IDJ=IDI*IDI,IDK=NL*IDI,IDL=MGPP/2,IDM=NNP/2,IDN=IDM*NL      PARAM2.10    
     +,NWW=1+(MM-1)/MOCT)                                                    PARAM2.11    
      PARAMETER(IGA=NWJ2*NHEM,IGB=IDB*NHEM,IGC=MGPP*NHEM,IGD=IDD*NHEM        PARAM2.12    
     +,IGG=IDG*NHEM,IGL=IDL*NHEM,IGM=IDM*NHEM,IGN=IDN*NHEM                   PARAM2.13    
     +,IGO=IGA+IGA,IGP=IGB+IGB,NFTWG=(5+NTRAC)*NL+3                          PARAM2.14    
     +,NFTGW=(6+3*NTRAC)*NL+2,NFTGD=(3+NTRAC)*NL,NLTR=NL*NTRAC)              PARAM2.15    
C     Number of 2D (surface) output fields. This value is                    PARAM2.16    
C     Doubled due to averaged and instantaneous fields.                      PARAM2.17    
      PARAMETER (N2DFLD=21,NGRPAD=N2DFLD*2*IGC)                              PARAM2.18    
C                                                                            PARAM2.19    
C                                                                            RESTOR.2     
C     Restoration fields and timescale                                       RESTOR.3     
C                                                                            RESTOR.4     
      COMMON/RESTOR/ZRES(IGN),DRES(IGN),TRES(IGN),SPRES(IGM),DAMP            RESTOR.5     
C                                                                            RESTOR.6     
C                                                                            INIRES.13    
      NAMELIST/INPRS/ RESTIM                                                 INIRES.14    
C                                                                            INIRES.15    
      RESTIM=0.0                                                             INIRES.16    
C                                                                            INIRES.17    
      READ(7,INPRS)                                                          INIRES.18    
      WRITE(2,INPRS)                                                         INIRES.19    
C                                                                            INIRES.20    
C     Dimensionless coefficient for Newtonian cooling friction               INIRES.21    
C     and timestep. A day is 2*pi in non dimensional                         INIRES.22    
C     units using omega as the unit of frequency.                            INIRES.23    
C                                                                            INIRES.24    
      IF (RESTIM.GT.0.0) THEN                                                INIRES.25    
         DAMP=1.0/(PI2*RESTIM)                                               INIRES.26    
      ELSE                                                                   INIRES.27    
         DAMP=0.0                                                            INIRES.28    
      ENDIF                                                                  INIRES.29    
C                                                                            INIRES.30    
      END                                                                    INIRES.31    
