source: codes/icosagcm/trunk/src/etat0_dcmip3.f90 @ 353

Last change on this file since 353 was 353, checked in by dubos, 9 years ago

OpenMP fixes for DCMIP

File size: 1.4 KB
Line 
1MODULE etat0_dcmip3_mod
2  ! test cases DCMIP 2012, category 3 : Non-hydrostatic gravity waves
3  IMPLICIT NONE
4  PRIVATE
5  PUBLIC :: compute_etat0
6 
7CONTAINS
8 
9  SUBROUTINE compute_etat0(ngrid,lon,lat, phis,ps,temp,ulon,ulat,q)
10    USE genmod
11    USE dcmip_initial_conditions_test_1_2_3
12    USE disvert_mod
13    USE omp_para
14    INTEGER, INTENT(IN) :: ngrid
15    REAL(rstd), INTENT(IN) :: lon(ngrid)
16    REAL(rstd), INTENT(IN) :: lat(ngrid)
17    REAL(rstd), INTENT(OUT) :: phis(ngrid)
18    REAL(rstd), INTENT(OUT) :: ps(ngrid)
19    REAL(rstd), INTENT(OUT) :: ulon(ngrid,llm)
20    REAL(rstd), INTENT(OUT) :: ulat(ngrid,llm)
21    REAL(rstd), INTENT(OUT) :: temp(ngrid,llm)
22    REAL(rstd), INTENT(OUT) :: q(ngrid,llm,nqtot)
23    REAL(rstd),PARAMETER :: Peq=1e5        ! Reference surface pressure at the equator (hPa)
24    REAL(rstd) :: dummy, pp
25    INTEGER :: l,ij
26    pp=peq
27    DO ij=1,ngrid
28       CALL test3_gravity_wave(lon(ij),lat(ij),pp,dummy,0, &
29            dummy,dummy,dummy,dummy,phis(ij),ps(ij),dummy,dummy)
30    END DO
31    DO l=ll_begin,ll_end
32       DO ij=1,ngrid
33          pp = .5*(ap(l)+ap(l+1)) + .5*(bp(l)+bp(l+1))*ps(ij) ! full-layer pressure
34          CALL test3_gravity_wave(lon(ij),lat(ij),pp,dummy,0, &
35               ulon(ij,l),ulat(ij,l),dummy,Temp(ij,l),dummy,dummy,dummy,dummy)
36       END DO
37    END DO
38    q(:,:,:)=0.
39  END SUBROUTINE compute_etat0
40
41END MODULE etat0_DCMIP3_mod
Note: See TracBrowser for help on using the repository browser.