!-------------------------------------- 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 invlap_euclid(psol,prhs,knk) 4,1
!
!s/r invlap_euclid: Inverse Laplacian assuming small enough grid extension to neglect sphericity.
!
! AUTHOR: Luc Fillion - ARMA/EC - 15 Jun 2009.
!
! Revision:
!
! IN/OUT:
! IN:
!
IMPLICIT NONE
!
#include "taglam4d.cdk"
#include "comdim.cdk"
#include "comcst.cdk"
#include "comfftla.cdk"
#include "comlun.cdk"
#include "comgrd_param.cdk"
#include "comsp.cdk"
#include "comgemla.cdk"
#include "comlap.cdk"
!
integer knk
real*8 psol(ni,knk,nj)
real*8 prhs(nla,2,knk)
!
INTEGER myid,numthd,omp_get_thread_num,omp_get_num_threads
integer jla,jk
!
!!
!$OMP PARALLEL PRIVATE(jk,jla,myid,numthd)
myid=omp_get_thread_num()+1
numthd=omp_get_num_threads()
do jla = myid,nla,numthd
do jk = 1, knk
prhs(jla,1,jk)=rilapxy(jla)*prhs(jla,1,jk)
prhs(jla,2,jk)=rilapxy(jla)*prhs(jla,2,jk)
enddo
enddo
!$OMP END PARALLEL
!
call sp2rela
(psol,prhs,knk)
!
return
end