/[lmdze]/trunk/Sources/phylmd/Interface_surf/alboc.f
ViewVC logotype

Annotation of /trunk/Sources/phylmd/Interface_surf/alboc.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 154 - (hide annotations)
Tue Jul 7 17:49:23 2015 UTC (8 years, 11 months ago) by guez
File size: 2152 byte(s)
Removed argument dtphys of physiq. Use it directly from comconst in
physiq instead.

Donwgraded variables eignfnu, eignfnv of module inifgn_m to dummy
arguments of SUBROUTINE inifgn. They were not used elsewhere than in
the calling procedure inifilr. Renamed argument dv of inifgn to eignval_v.

Made alboc and alboc_cd independent of the size of arguments. Now we
can call them only at indices knindex in interfsurf_hq, where we need
them. Fixed a bug in alboc_cd: rmu0 was modified, and the
corresponding actual argument in interfsurf_hq is an intent(in)
argument of interfsurf_hq.

Variables of size knon instead of klon in interfsur_lim and interfsurf_hq.

Removed argument alb_new of interfsurf_hq because it was the same than
alblw. Simplified test on cycle_diurne, following LMDZ.

Moved tests on nbapp_rad from physiq to read_clesphys2. No need for
separate counter itaprad, we can use itap. Define lmt_pas and radpas
from integer input parameters instead of real-type computed values.

1 guez 125 module alboc_m
2    
3 guez 81 IMPLICIT NONE
4    
5 guez 125 contains
6 guez 81
7 guez 130 SUBROUTINE alboc(jour, rlat, albedo)
8 guez 81
9 guez 125 ! From LMDZ4/libf/phylmd/albedo.F, version 1.2 2005/02/07 15:00:52
10 guez 81
11 guez 154 ! Author: Z. X. Li (LMD/CNRS) (adaptation du GCM du LMD)
12     ! Date : 16 mars 1995
13     ! Objet : Calculer l'alb\'edo sur l'oc\'ean
14     ! M\'ethode: int\'egrer num\'eriquement l'alb\'edo pendant une journ\'ee
15 guez 81
16 guez 154 use nr_util, only: pi
17     USE orbite_m, ONLY: orbite
18 guez 125 USE yomcst, only: r_incl
19 guez 81
20 guez 154 integer, intent(in):: jour ! jour dans l'annee (a compter du 1 janvier)
21     REAL, intent(in):: rlat(:) ! latitude en degre
22     real, intent(out):: albedo(:) ! albedo obtenu (de 0 a 1)
23 guez 81
24 guez 154 ! Local:
25 guez 81
26 guez 154 REAL, PARAMETER:: fmagic=1. ! un facteur magique pour regler l'albedo
27 guez 81
28 guez 154 INTEGER, PARAMETER:: npts =120
29     ! Contr\^ole la pr\'ecision de l'int\'egration. 120 correspond \`a
30     ! l'intervalle 6 minutes.
31 guez 81
32 guez 154 REAL zdist, zlonsun, zdeclin
33     REAL rmu, alb, srmu, salb, aa, bb
34     INTEGER i, k
35 guez 81
36 guez 154 !----------------------------------------------------------------------
37 guez 81
38 guez 154 ! Calculer la longitude vraie de l'orbite terrestre:
39     CALL orbite(real(jour), zlonsun, zdist)
40 guez 81
41 guez 154 ! Calculer la declinaison du soleil (qui varie entre + et - R_incl):
42     zdeclin = asin(sin(zlonsun*pi/180.0)*sin(r_incl*pi/180.0))
43 guez 81
44 guez 154 DO i = 1, size(rlat)
45     aa = sin(rlat(i)*pi/180.0)*sin(zdeclin)
46     bb = cos(rlat(i)*pi/180.0)*cos(zdeclin)
47 guez 81
48 guez 154 ! Midi local (angle du temps = 0.0):
49     rmu = aa + bb*cos(0.0)
50     rmu = max(0.0, rmu)
51     alb = 0.058/(rmu+0.30)*1.2
52     srmu = rmu
53     salb = alb*rmu
54 guez 81
55 guez 154 ! Faire l'integration numerique de midi a minuit (le facteur 2
56     ! prend en compte l'autre moitie de la journee):
57     DO k = 1, npts
58     rmu = aa + bb*cos(float(k)/float(npts)*pi)
59 guez 125 rmu = max(0.0, rmu)
60     alb = 0.058/(rmu+0.30)*1.2
61 guez 154 srmu = srmu + rmu*2.0
62     salb = salb + alb*rmu*2.0
63 guez 125 END DO
64 guez 154 IF (srmu/=0.0) THEN
65     albedo(i) = salb/srmu*fmagic
66     ELSE ! nuit polaire (on peut prendre une valeur quelconque)
67     albedo(i) = fmagic
68     END IF
69     END DO
70 guez 125
71     END SUBROUTINE alboc
72    
73     end module alboc_m

  ViewVC Help
Powered by ViewVC 1.1.21