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 | c |
---|
20 | INTEGER,INTENT(IN) :: ngrid |
---|
21 | INTEGER,INTENT(IN) :: nq |
---|
22 | REAL,INTENT(OUT) :: psolaralb(ngrid) |
---|
23 | REAL,INTENT(IN) :: qsurf(ngrid,nq) !tracer on surface (kg/m2) |
---|
24 | |
---|
25 | INTEGER :: ig,icap |
---|
26 | REAL :: min_albedo,max_albedo |
---|
27 | c |
---|
28 | c======================================================================= |
---|
29 | |
---|
30 | |
---|
31 | DO ig=1,ngrid |
---|
32 | psolaralb(ig)=albedodat(ig) |
---|
33 | ENDDO |
---|
34 | |
---|
35 | call planetwide_minval(albedodat,min_albedo) |
---|
36 | call planetwide_maxval(albedodat,max_albedo) |
---|
37 | write(*,*) 'surfini: minimum corrected albedo',min_albedo |
---|
38 | write(*,*) 'surfini: maximum corrected albedo',max_albedo |
---|
39 | |
---|
40 | if (igcm_co2_ice.ne.0) then |
---|
41 | ! Change Albedo if there is CO2 ice on the surface |
---|
42 | DO ig=1,ngrid |
---|
43 | IF (qsurf(ig,igcm_co2_ice) .GT. 0.) THEN |
---|
44 | IF(lati(ig).LT.0.) THEN |
---|
45 | icap=2 ! Southern hemisphere |
---|
46 | ELSE |
---|
47 | icap=1 ! Northern hemisphere |
---|
48 | ENDIF |
---|
49 | psolaralb(ig) = albedice(icap) |
---|
50 | END IF |
---|
51 | ENDDO ! of DO ig=1,ngrid |
---|
52 | else |
---|
53 | write(*,*) "surfini: No CO2 ice tracer on surface ..." |
---|
54 | write(*,*) " and therefore no albedo change." |
---|
55 | endif |
---|
56 | |
---|
57 | call planetwide_minval(psolaralb,min_albedo) |
---|
58 | call planetwide_maxval(psolaralb,max_albedo) |
---|
59 | write(*,*) 'surfini: minimum corrected albedo',min_albedo |
---|
60 | write(*,*) 'surfini: maximum corrected albedo',max_albedo |
---|
61 | |
---|
62 | END |
---|