source: LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/calbeta_clim.f90 @ 5914

Last change on this file since 5914 was 5914, checked in by yann meurdesoif, 2 months ago

gpu port of surf_land
YM

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 2.0 KB
Line 
1!
2! $Header: /home/cvsroot/LMDZ4/libf/phylmd/calbeta.F90,v 1.2 2007/06/22 12:49:51
3! fairhead Exp $
4!
5MODULE calbeta_clim_mod
6
7
8CONTAINS
9
10SUBROUTINE calbeta_clim(klon,time,lat_radian,beta)
11!$gpum horizontal klon
12
13  !======================================================================
14  ! Auteur(s): A.K. TRAORE
15  !======================================================================
16
17  !USE phys_local_var_mod, ONLY : ideal_beta !pour faire la variable dans le
18  ! physiq.f pour des sorties directes de beta
19
20  USE phys_cal_mod, only: year_len
21  USE print_control_mod, ONLY: prt_level
22
23  implicit none
24  integer klon,nt,j,it
25  real logbeta(klon),pi
26  real lat(klon),lat_radian(klon)
27  integer time
28  real time_radian
29  real lat_sahel,beta(klon)
30  real lat_nord,lat_sud
31
32  !==============================================
33
34  pi=2.*asin(1.)
35  beta=0.
36
37  !calcul des cordonnees
38
39  ! print*,'LATITUDES BETA ',lat_radian
40  time_radian=(time+15.)*2.*pi / year_len
41
42  if (prt_level >= 1) print *, 'time_radian time', time_radian, time
43
44  lat(:)=180.*lat_radian(:)/pi !lat(:)=lat_radian(:)
45
46  lat_sahel=-5*sin(time_radian)+13
47  lat_nord=lat_sahel+25.
48  lat_sud=lat_sahel-25.
49  do j=1,klon
50     !===========
51     if (lat(j) < 5. ) then
52
53        logbeta(j)=0.2*(lat(j)-lat_sud)-1.6
54        beta(j)=10**(logbeta(j))
55        beta(j)=max(beta(j),0.03)
56        beta(j)=min(beta(j),0.22)
57        ! print*,'j,lat,lat_radian,beta',j,lat(j),lat_radian(j),beta(j)
58        !===========
59     elseif (lat(j) < 22.) then !lat(j)<22.
60
61        logbeta(j)=-0.25*(lat(j)-lat_sahel)-1.6
62        beta(j)=10**(logbeta(j))
63        beta(j)=max(beta(j),1.e-2)
64        beta(j)=min(beta(j),0.22)
65        ! print*,'j,lat,lat_radian,beta',j,lat(j),lat_radian(j),beta(j)
66        !===========
67     else
68        logbeta(j)=0.25*(lat(j)-lat_nord)-1.
69        beta(j)=10**(logbeta(j))
70        beta(j)=max(beta(j),1.e-2)
71        beta(j)=min(beta(j),0.25)
72        ! print*,'j,lat,lat_radian,beta',j,lat(j),lat_radian(j),beta(j)
73     endif
74     !===========
75  enddo
76
77end SUBROUTINE calbeta_clim
78
79END MODULE calbeta_clim_mod
Note: See TracBrowser for help on using the repository browser.