source: trunk/LMDZ.PLUTO/libf/phypluto/surfini.F90 @ 3504

Last change on this file since 3504 was 3504, checked in by afalco, 2 weeks ago

Pluto: print only on master process.
AF

File size: 2.9 KB
Line 
1      SUBROUTINE surfini(ngrid,nq,qsurf,albedo,albedo_bareground,&
2                        albedo_snow_SPECTV,albedo_n2_ice_SPECTV)
3
4      USE surfdat_h, only: albedodat
5      USE tracer_h, only: igcm_haze
6      use planetwide_mod, only: planetwide_maxval, planetwide_minval
7      use radinc_h, only : L_NSPECTV
8      use callkeys_mod, only : albedosnow, albedon2ice
9      use mod_phys_lmdz_para, only : is_master
10
11      IMPLICIT NONE
12
13
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!!!!!                                                                 !!!!!!!
16!!!!!!!   Spectral Albedo Initialisation - Routine modified by MT2015.  !!!!!!!
17!!!!!!!                                                                 !!!!!!!
18!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19
20
21!--------------------
22!   Declarations:
23!--------------------
24
25      INTEGER,INTENT(IN) :: ngrid
26      INTEGER,INTENT(IN) :: nq
27      REAL,INTENT(OUT) :: albedo(ngrid,L_NSPECTV)
28      REAL,INTENT(OUT) :: albedo_bareground(ngrid)
29      REAL,INTENT(OUT) :: albedo_snow_SPECTV(L_NSPECTV)
30      REAL,INTENT(OUT) :: albedo_n2_ice_SPECTV(L_NSPECTV)
31      REAL,INTENT(IN) :: qsurf(ngrid,nq) ! tracer on surface (kg/m2)
32
33      INTEGER :: ig,nw
34      REAL :: min_albedo,max_albedo
35
36!=======================================================================
37
38      ! Step 1 : Initialisation of the Spectral Albedos.
39      DO nw=1,L_NSPECTV
40         albedo_snow_SPECTV(nw)=albedosnow
41         albedo_n2_ice_SPECTV(nw)=albedon2ice
42      ENDDO
43
44
45      ! Step 2 : We get the bare ground albedo from the start files.
46      DO ig=1,ngrid
47         albedo_bareground(ig)=0.7 ! albedodat(ig)
48         DO nw=1,L_NSPECTV
49            albedo(ig,nw)=0.7 !albedo_bareground(ig)
50         ENDDO
51      ENDDO
52      call planetwide_minval(albedo_bareground,min_albedo)
53      call planetwide_maxval(albedo_bareground,max_albedo)
54if (is_master)       write(*,*) 'surfini: minimum bare ground albedo',min_albedo
55      if (is_master) write(*,*) 'surfini: maximum bare ground albedo',max_albedo
56
57
58      ! Step 3 : We modify the albedo considering some N2 at the surface. We dont take into account water ice (this is made in hydrol after the first timestep) ...
59      if (igcm_haze.ne.0) then
60         DO ig=1,ngrid
61            IF (qsurf(ig,igcm_haze) .GT. 1.) THEN ! This was changed by MT2015. Condition for ~1mm of N2 ice deposit.
62               DO nw=1,L_NSPECTV
63                  albedo(ig,nw)=albedo_n2_ice_SPECTV(nw)
64               ENDDO
65            END IF
66         ENDDO
67      else
68         if (is_master) write(*,*) "surfini: No N2 ice tracer on surface  ..."
69         if (is_master) write(*,*) "         and therefore no albedo change."
70      endif
71      call planetwide_minval(albedo,min_albedo)
72      call planetwide_maxval(albedo,max_albedo)
73      if (is_master) write(*,*) 'surfini: minimum corrected initial albedo',min_albedo
74      if (is_master) write(*,*) 'surfini: maximum corrected initial albedo',max_albedo
75
76
77      END
Note: See TracBrowser for help on using the repository browser.