1 | MODULE surfini_mod |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | |
---|
5 | CONTAINS |
---|
6 | |
---|
7 | SUBROUTINE surfini(ngrid,nq,qsurf,albedo,albedo_bareground, |
---|
8 | & albedo_snow_SPECTV,albedo_co2_ice_SPECTV) |
---|
9 | |
---|
10 | USE surfdat_h, only: albedodat ! bare ground albedo |
---|
11 | use planetwide_mod, only: planetwide_maxval, planetwide_minval |
---|
12 | use radinc_h, only : L_NSPECTV ! number of spectral bands in the visible |
---|
13 | use callkeys_mod, only : albedosnow, albedoco2ice |
---|
14 | |
---|
15 | IMPLICIT NONE |
---|
16 | |
---|
17 | |
---|
18 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
19 | cccccccccccccc cccccccccccccc |
---|
20 | cccccccccccccc Spectral Albedo Initialisation - Routine modified by MT2015. cccccccccccccc |
---|
21 | cccccccccccccc cccccccccccccc |
---|
22 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
23 | |
---|
24 | |
---|
25 | c-------------------- |
---|
26 | c Declarations: |
---|
27 | c-------------------- |
---|
28 | |
---|
29 | INTEGER,INTENT(IN) :: ngrid |
---|
30 | INTEGER,INTENT(IN) :: nq |
---|
31 | REAL,INTENT(IN) :: albedo(ngrid,L_NSPECTV) |
---|
32 | REAL,INTENT(OUT) :: albedo_bareground(ngrid) |
---|
33 | REAL,INTENT(OUT) :: albedo_snow_SPECTV(L_NSPECTV) |
---|
34 | REAL,INTENT(OUT) :: albedo_co2_ice_SPECTV(L_NSPECTV) |
---|
35 | REAL,INTENT(IN) :: qsurf(ngrid,nq) ! tracer on surface (kg/m2) |
---|
36 | |
---|
37 | INTEGER :: ig,nw |
---|
38 | REAL :: min_albedo,max_albedo |
---|
39 | |
---|
40 | c======================================================================= |
---|
41 | |
---|
42 | ! Step 1 : Initialisation of the Spectral Albedos. |
---|
43 | DO nw=1,L_NSPECTV |
---|
44 | albedo_snow_SPECTV(nw)=albedosnow |
---|
45 | albedo_co2_ice_SPECTV(nw)=albedoco2ice |
---|
46 | ENDDO |
---|
47 | |
---|
48 | |
---|
49 | ! Step 2 : We get the bare ground albedo from the start files. |
---|
50 | DO ig=1,ngrid |
---|
51 | albedo_bareground(ig)=albedodat(ig) |
---|
52 | ENDDO |
---|
53 | call planetwide_minval(albedo_bareground,min_albedo) |
---|
54 | call planetwide_maxval(albedo_bareground,max_albedo) |
---|
55 | write(*,*) 'surfini: minimum bare ground albedo',min_albedo |
---|
56 | write(*,*) 'surfini: maximum bare ground albedo',max_albedo |
---|
57 | |
---|
58 | |
---|
59 | ! Step 3 : Surface albedo already loaded from startfi.nc |
---|
60 | ! merely report vmin/max values here |
---|
61 | |
---|
62 | call planetwide_minval(albedo,min_albedo) |
---|
63 | call planetwide_maxval(albedo,max_albedo) |
---|
64 | write(*,*) 'surfini: minimum corrected initial albedo',min_albedo |
---|
65 | write(*,*) 'surfini: maximum corrected initial albedo',max_albedo |
---|
66 | |
---|
67 | |
---|
68 | END SUBROUTINE surfini |
---|
69 | |
---|
70 | END MODULE surfini_mod |
---|