!-------------------------------------- LICENCE BEGIN ------------------------------------
!Environment Canada - Atmospheric Science and Technology License/Disclaimer,
! version 3; Last Modified: May 7, 2008.
!This is free but copyrighted software; you can use/redistribute/modify it under the terms
!of the Environment Canada - Atmospheric Science and Technology License/Disclaimer
!version 3 or (at your option) any later version that should be found at:
!http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html
!
!This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
!without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!See the above mentioned License/Disclaimer for more details.
!You should have received a copy of the License/Disclaimer along with this software;
!if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec),
!CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca
!-------------------------------------- LICENCE END --------------------------------------
!
subroutine openinc(KULSTAT,KFILE) 10,2
#if defined (DOC)
*
***s/r openinc - Opne a file containing a set of normalized increments.
*
*Author : L. Fillion ARMA/MSC - 11 Apr 2005 - Limited-Area Option & Update documentation.
*Revision:
*
* -------------------
** Purpose: to access a file of normalized increments contained
* . in a RPN standard file
* .
*Arguments
* KULSTAT: logical unit on which the file is located
* KFILE : number of the file
*
* Remark: the parameters that define the files and their content
* ------ are within COMCSE1 and controlled by the corresponding
* . namelist NAMCSE1. The way the file is accessed is controlled
* . as usual through COMGDPAR
#endif
IMPLICIT NONE
*implicits
#include "taglam4d.cdk"
#include "comlun.cdk"
#include "comgdpar.cdk"
#include "comcse1.cdk"
*
INTEGER KULSTAT, KFILE
C
INTEGER IFLAG
INTEGER IERR
C
INTEGER FNOM, FSTOUV
CHARACTER*1 CLTYP
C
C* 1. Open the file
C
100 CONTINUE
C
WRITE(NULOUT,9100) KFILE
WRITE(NULOUT,*) CFLNAMES(KFILE)
cping 9100 FORMAT(//,10X,"OPENINC: Opening File No. ",I3,/,15X
9100 FORMAT(//,10X,"OPENINC: Opening File No. ",I3,/,15X,
& "and then read NAMGDPAR : ")
C
write(nulout,*) 'OPENINC: CFLNAMES(KFILE)=',CFLNAMES(KFILE)
IERR = FNOM(KULSTAT,CFLNAMES(KFILE),'RND',0)
IF(IERR.GE.0)THEN
IERR = FSTOUV(KULSTAT,'RND')
ELSE
CALL ABORT3D
(NULOUT,'OPENINC: Probleme avec le fichier ')
END IF
C
C* 2. Read the NAMELIST NAMGDPAR
C
200 CONTINUE
NSTAMPA = 0
NSTAMPT =0
NSTAMPI =0
NSTAMPN =0
C
CETIKETA = ' '
CETIKETT = ' '
CETIKETI = ' '
CETIKETN = ' '
C
NITER = 0
CMCRUN = ' '
NFSTVAR = 0
CFSTVAR(1) = ' '
CFSTVAR(2) = ' '
CFSTVAR(3) = ' '
CFSTVAR(4) = ' '
CFSTVAR(5) = ' '
CFSTVAR(6) = ' '
CFSTVAR(7) = ' '
C
CALL READNML
('NAMGDPAR',IFLAG)
C
C* 3. Check the file containing the normalized increments
C
300 CONTINUE
C
! IKEY =FSTINF(KULSTAT,INI,INJ,INK
! S ,NSTAMPN,CETIKETN,-1,-1,-1,' ',' ')
! IERR = FSTPRM(IKEY,IDATET,IDT,IPAS,INI,INJ,INK,IBITS,IDTYP,
! + IP1,IP2,IP3,CLTYP,CLNOM,CLETIKET,CLGR,IG1,IG2,IG3,IG4,
! + ISWA,ILNG,IDLTF,IUBC,IX1,IX2,IX3)
! IF(IERR.LT.0) THEN
! WRITE(NULOUT,9300)IKEY, IERR, CFLNAMES(KFILE)
! CALL ABORT3D(NULOUT,"ERROR IN OPENINC")
! END IF
! 9300 FORMAT(///,20("*"),/,5X,"IKEY = ",I10,4X,"IERR = ",I6
! S ,/,5X,"VERIFY THE CONSISTENCY OF COMGDPAR"
! S ," WITH THOSE OF THE FILE ",A8)
!C
! CTYPVARN = ' '
C
RETURN
END