source: trunk/LMDZ.GENERIC/libf/phystd/surfini.F @ 1351

Last change on this file since 1351 was 1308, checked in by emillour, 10 years ago

Generic GCM:
Some cleanup to simplify dynamics/physics interactions by getting rid
of dimphys.h (i.e. the nlayermx parameter) and minimizing use of
dimension.h in the physics.
EM

File size: 2.0 KB
Line 
1      SUBROUTINE surfini(ngrid,nq,qsurf,psolaralb)
2
3      USE surfdat_h, only: albedodat, albedice
4      USE tracer_h, only: igcm_co2_ice
5      use comgeomfi_h, only: lati
6      use planetwide_mod, only: planetwide_maxval, planetwide_minval
7
8      IMPLICIT NONE
9c=======================================================================
10c
11c   creation des calottes pour l'etat initial
12c
13c=======================================================================
14c-----------------------------------------------------------------------
15c   Declarations:
16c   -------------
17!#include "dimensions.h"
18!#include "dimphys.h"
19#include "callkeys.h"
20c
21      INTEGER,INTENT(IN) :: ngrid
22      INTEGER,INTENT(IN) :: nq
23      REAL,INTENT(OUT) :: psolaralb(ngrid)
24      REAL,INTENT(IN) :: qsurf(ngrid,nq) !tracer on surface (kg/m2)
25
26      INTEGER :: ig,icap
27      REAL :: min_albedo,max_albedo
28c
29c=======================================================================
30
31
32      DO ig=1,ngrid
33         psolaralb(ig)=albedodat(ig)
34      ENDDO
35
36      call planetwide_minval(albedodat,min_albedo)
37      call planetwide_maxval(albedodat,max_albedo)
38      write(*,*) 'surfini: minimum corrected albedo',min_albedo
39      write(*,*) 'surfini: maximum corrected albedo',max_albedo
40
41      if (igcm_co2_ice.ne.0) then
42! Change Albedo if there is CO2 ice on the surface
43        DO ig=1,ngrid
44          IF (qsurf(ig,igcm_co2_ice) .GT. 0.) THEN
45             IF(lati(ig).LT.0.) THEN
46                icap=2 ! Southern hemisphere
47             ELSE
48                icap=1 ! Northern hemisphere
49             ENDIF
50             psolaralb(ig) = albedice(icap)
51          END IF
52        ENDDO ! of DO ig=1,ngrid     
53      else
54        write(*,*) "surfini: No CO2 ice tracer on surface  ..."
55        write(*,*) "         and therefore no albedo change."
56      endif
57
58      call planetwide_minval(psolaralb,min_albedo)
59      call planetwide_maxval(psolaralb,max_albedo)
60      write(*,*) 'surfini: minimum corrected albedo',min_albedo
61      write(*,*) 'surfini: maximum corrected albedo',max_albedo
62
63      END
Note: See TracBrowser for help on using the repository browser.