!-------------------------------------- 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 glb2glb 1,2
#if defined (DOC)
*
***s/r prep_helm - Prepare global fields at the right horizontal resolution.
* Input fields are globaland available on RPN standard files.
*
*
*Author : L. Fillion - ARMA/EC - 4 Jun 2009
*Revision:
* -------------------
** Purpose: To be used by LAM4D statistics program.
*Arguments
* -NONE-
#endif
IMPLICIT NONE
*implicits
#include "taglam4d.cdk"
#include "comct0.cdk"
#include "comlun.cdk"
#include "comdim.cdk"
#include "comcva.cdk"
#include "comcse1.cdk"
#include "comgrd_param.cdk"
*
logical llhelm,llfplane,lltb_psi
INTEGER IULSTAT, IULCORNS, IULSTDEV, iultemp, ierr
INTEGER FNOM, FSTOUV, FSTFRM, FCLOS,VFSTECR
C
WRITE(NULOUT,FMT=9000)
9000 FORMAT(//,3(" *****************"),/,6X
S ," prep_helm- Computation of PSI/CHI Forecast Error for LAM4D ",/
S ,3(" *****************"))
!
!*1. Preliminary Initializations
!
iulstat = 54 ! file unit for ensemble of forecast error samples
iulcorns = 55 ! not effective really...
iulstdev = 56 ! file unit to write PSI/CHI fields
!
call su1cse1
(iulstat,iulcorns,iulstdev) ! also reads namelist namcse1
!
IERR = FNOM(iulstdev,cflstdev,'RND',0)
IERR = FSTOUV(iulstdev,'RND')
!
!*2. Compute Global PSI/CHI and interpolate directly to target LAM4D grid if desired
! --------------------------------------------------------------------------------
!
call glb2glb_1
(iulstat,iulstdev)
!
IERR = FSTFRM(iulstdev)
!
return
end