[3335] | 1 | MODULE surfini_mod |
---|
| 2 | |
---|
| 3 | IMPLICIT NONE |
---|
| 4 | |
---|
| 5 | CONTAINS |
---|
| 6 | |
---|
[1482] | 7 | SUBROUTINE surfini(ngrid,nq,qsurf,albedo,albedo_bareground, |
---|
| 8 | & albedo_snow_SPECTV,albedo_co2_ice_SPECTV) |
---|
[787] | 9 | |
---|
[3335] | 10 | USE surfdat_h, only: albedodat ! bare ground albedo |
---|
[1216] | 11 | use planetwide_mod, only: planetwide_maxval, planetwide_minval |
---|
[3335] | 12 | use radinc_h, only : L_NSPECTV ! number of spectral bands in the visible |
---|
[1482] | 13 | use callkeys_mod, only : albedosnow, albedoco2ice |
---|
[787] | 14 | |
---|
[135] | 15 | IMPLICIT NONE |
---|
[1482] | 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-------------------- |
---|
[135] | 26 | c Declarations: |
---|
[1482] | 27 | c-------------------- |
---|
| 28 | |
---|
[1216] | 29 | INTEGER,INTENT(IN) :: ngrid |
---|
| 30 | INTEGER,INTENT(IN) :: nq |
---|
[3335] | 31 | REAL,INTENT(IN) :: albedo(ngrid,L_NSPECTV) |
---|
[1482] | 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) |
---|
[135] | 36 | |
---|
[1482] | 37 | INTEGER :: ig,nw |
---|
[1216] | 38 | REAL :: min_albedo,max_albedo |
---|
[1482] | 39 | |
---|
[135] | 40 | c======================================================================= |
---|
| 41 | |
---|
[1482] | 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 |
---|
[135] | 47 | |
---|
[1482] | 48 | |
---|
| 49 | ! Step 2 : We get the bare ground albedo from the start files. |
---|
[135] | 50 | DO ig=1,ngrid |
---|
[1482] | 51 | albedo_bareground(ig)=albedodat(ig) |
---|
[135] | 52 | ENDDO |
---|
[1482] | 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 |
---|
[135] | 57 | |
---|
| 58 | |
---|
[3335] | 59 | ! Step 3 : Surface albedo already loaded from startfi.nc |
---|
| 60 | ! merely report vmin/max values here |
---|
| 61 | |
---|
[1482] | 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 |
---|
[135] | 66 | |
---|
| 67 | |
---|
[3335] | 68 | END SUBROUTINE surfini |
---|
| 69 | |
---|
| 70 | END MODULE surfini_mod |
---|