1 | SUBROUTINE surfini(ngrid,piceco2,qsurf,psolaralb) |
---|
2 | IMPLICIT NONE |
---|
3 | c======================================================================= |
---|
4 | c |
---|
5 | c creation des calottes pour l'etat initial |
---|
6 | c |
---|
7 | c======================================================================= |
---|
8 | c----------------------------------------------------------------------- |
---|
9 | c Declarations: |
---|
10 | c ------------- |
---|
11 | #include "dimensions.h" |
---|
12 | #include "dimphys.h" |
---|
13 | #include "surfdat.h" |
---|
14 | #include "callkeys.h" |
---|
15 | #include "tracer.h" |
---|
16 | #include "comgeomfi.h" |
---|
17 | #include "comcstfi.h" |
---|
18 | #include "watercap.h" |
---|
19 | |
---|
20 | c |
---|
21 | INTEGER ngrid,ig,icap,iq |
---|
22 | REAL piceco2(ngrid),psolaralb(ngrid,2) |
---|
23 | REAL qsurf(ngrid,nqmx) !tracer on surface (kg/m2) |
---|
24 | |
---|
25 | EXTERNAL ISMIN,ISMAX |
---|
26 | INTEGER ISMIN,ISMAX |
---|
27 | c |
---|
28 | c======================================================================= |
---|
29 | |
---|
30 | do ig=1,ngridmx |
---|
31 | |
---|
32 | !write(*,*) "all qsurf to zero. dirty." |
---|
33 | do iq=1,nqmx |
---|
34 | qsurf(ig,iq)=0. !! on jette les inputs GCM |
---|
35 | !! on regle juste watercaptag |
---|
36 | !! il faudrait garder les inputs GCM |
---|
37 | !! si elles sont consequentes |
---|
38 | enddo |
---|
39 | |
---|
40 | !! AS: my previous stuff |
---|
41 | ! if ( ( lati(ig)*180./pi .gt. 70. ) .and. |
---|
42 | ! . ( albedodat(ig) .ge. 0.26 ) ) then |
---|
43 | ! write(*,*)"outlier ",ig,albedodat(ig),inertiedat(ig) |
---|
44 | ! watercaptag(ig) = .true. |
---|
45 | ! dryness(ig) = 1. |
---|
46 | ! albedodat(ig) = 0.45 !albedo_h2o_ice !! pour output |
---|
47 | ! inertiedat(ig) = 800. |
---|
48 | ! write(*,*)"new values ",ig,albedodat(ig),inertiedat(ig) |
---|
49 | ! else |
---|
50 | ! watercaptag(ig) = .false. |
---|
51 | ! dryness(ig) = 1. |
---|
52 | ! endif |
---|
53 | ! if ( inertiedat(ig) .ge. 800. ) then |
---|
54 | ! write(*,*)"change inertie from ",inertiedat(ig)," to 800." |
---|
55 | ! inertiedat(ig) = 800. |
---|
56 | ! endif |
---|
57 | |
---|
58 | !! using Tyler and Barnes maps. |
---|
59 | dryness(ig) = 1. |
---|
60 | if ( inertiedat(ig) .ge. 600. ) then |
---|
61 | write(*,*)"ice ",ig,albedodat(ig),inertiedat(ig) |
---|
62 | watercaptag(ig) = .true. |
---|
63 | else |
---|
64 | watercaptag(ig) = .false. |
---|
65 | endif |
---|
66 | |
---|
67 | enddo |
---|
68 | |
---|
69 | |
---|
70 | c |
---|
71 | c calcul de piceco2 (kg/m2) a l'etat initial |
---|
72 | c ------------------------------------------ |
---|
73 | |
---|
74 | DO 100 ig=1,ngrid |
---|
75 | psolaralb(ig,1)=albedodat(ig) |
---|
76 | psolaralb(ig,2)=albedodat(ig) |
---|
77 | 100 CONTINUE |
---|
78 | |
---|
79 | PRINT*,'minimum des donnees albedo', |
---|
80 | s albedodat(ISMIN(ngrid,albedodat,1)) |
---|
81 | PRINT*,'maximum des donnees albedo', |
---|
82 | s albedodat(ISMAX(ngrid,albedodat,1)) |
---|
83 | c calcul de psolaralb |
---|
84 | c ------------------- |
---|
85 | DO 115 ig=1,ngrid |
---|
86 | |
---|
87 | c IF (water) THEN |
---|
88 | c if (qsurf(ig,nqmx).gt.0.005) then |
---|
89 | c psolaralb(ig,1) = 0.4 |
---|
90 | c psolaralb(ig,2) = 0.4 |
---|
91 | c endif |
---|
92 | c ENDIF |
---|
93 | c IF there is more than 5 pr. um of h2o ice but no C02 ice, surface albedo is set to 0.4. |
---|
94 | IF (piceco2(ig) .GT. 0.) THEN |
---|
95 | IF(ig.GT.ngrid/2+1) THEN |
---|
96 | icap=2 |
---|
97 | ELSE |
---|
98 | icap=1 |
---|
99 | ENDIF |
---|
100 | psolaralb(ig,1) = albedice(icap) |
---|
101 | psolaralb(ig,2) = albedice(icap) |
---|
102 | END IF |
---|
103 | 115 CONTINUE |
---|
104 | |
---|
105 | PRINT*,'minimum des donnees albedo', |
---|
106 | s psolaralb(ISMIN(ngrid,psolaralb,1),1) |
---|
107 | PRINT*,'maximum des donnees albedo', |
---|
108 | s psolaralb(ISMAX(ngrid,psolaralb,1),1) |
---|
109 | |
---|
110 | RETURN |
---|
111 | END |
---|