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 |
---|
9 | c======================================================================= |
---|
10 | c |
---|
11 | c creation des calottes pour l'etat initial |
---|
12 | c |
---|
13 | c======================================================================= |
---|
14 | c----------------------------------------------------------------------- |
---|
15 | c Declarations: |
---|
16 | c ------------- |
---|
17 | #include "dimensions.h" |
---|
18 | #include "dimphys.h" |
---|
19 | #include "callkeys.h" |
---|
20 | c |
---|
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 |
---|
28 | c |
---|
29 | c======================================================================= |
---|
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 |
---|