Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcing_tools.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcing_tools.f90	(revision 7849)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcing_tools.f90	(revision 7901)
@@ -99,5 +99,6 @@
   INTEGER(i_std), SAVE                                :: nb_forcefile=0
   CHARACTER(LEN=100), SAVE, ALLOCATABLE, DIMENSION(:) :: forfilename
-  INTEGER(i_std), SAVE, ALLOCATABLE, DIMENSION(:)     :: force_id, id_unlim
+  INTEGER(i_std), SAVE, ALLOCATABLE, DIMENSION(:), public     :: force_id
+  INTEGER(i_std), SAVE, ALLOCATABLE, DIMENSION(:)     :: id_unlim
   INTEGER(i_std), SAVE, ALLOCATABLE, DIMENSION(:)     :: nb_atts, ndims, nvars
   REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:)        :: convtosec
@@ -148,4 +149,5 @@
   REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:)    :: tair_slab, qair_slab
   REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:)    :: tairmax_slab, tairmin_slab
+  REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:)    :: hurs_slab
   REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:)      :: time_tair, time_qair
   REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:)    :: timebnd_tair, timebnd_qair
@@ -732,5 +734,5 @@
        CALL forcingdaily_gensubd(time_int, dt, iim_loc, jjm_loc, lon_loc, lat_loc, glolindex_proc, &
             &                    nbpoint_proc, slab_size, time_tair, ztq_slab, zuv_slab, tair_slab, &
-            &                    tairmin_slab, tairmax_slab, qair_slab, rainf_slab, snowf_slab, &
+            &                    tairmin_slab, tairmax_slab, qair_slab, hurs_slab, rainf_slab, snowf_slab, &
             &                    swdown_slab, lwdown_slab, u_slab, v_slab, ps_slab)
        CALL forcingdaily_getvalues(time_int, dt, zlev_tq, zlev_uv, tair, qair, rainf, snowf, &
@@ -1432,4 +1434,5 @@
     REAL(r_std), ALLOCATABLE, DIMENSION(:,:)    :: tair_full, qair_full
     REAL(r_std), ALLOCATABLE, DIMENSION(:,:)    :: tairmin_full, tairmax_full
+    REAL(r_std), ALLOCATABLE, DIMENSION(:,:)    :: hurs_full
     REAL(r_std), ALLOCATABLE, DIMENSION(:,:)    :: rainf_full, snowf_full
     REAL(r_std), ALLOCATABLE, DIMENSION(:,:)    :: swdown_full, lwdown_full
@@ -1450,4 +1453,5 @@
        IF ( .NOT. ALLOCATED(tairmax_slab) ) ALLOCATE(tairmax_slab(nbpoint_proc,slab_size))
        IF ( .NOT. ALLOCATED(tairmin_slab) ) ALLOCATE(tairmin_slab(nbpoint_proc,slab_size))
+       IF ( .NOT. ALLOCATED(hurs_slab) ) ALLOCATE(hurs_slab(nbpoint_proc,slab_size))
     ENDIF
     !
@@ -1506,7 +1510,9 @@
           ALLOCATE(tairmax_full(nbpoint_loc,slab_size))
           ALLOCATE(tairmin_full(nbpoint_loc,slab_size))
+          ALLOCATE(hurs_full(nbpoint_loc,slab_size))
        ELSE
           ALLOCATE(tairmax_full(1,1))
           ALLOCATE(tairmin_full(1,1))
+          ALLOCATE(hurs_full(1,1))
        ENDIF
        ALLOCATE(qair_full(nbpoint_loc,slab_size))
@@ -1523,5 +1529,5 @@
        CALL forcing_readslab_root(time_int, first_call_readslab, &
             &                     tair_full, tairmax_full, tairmin_full, time_tair, timebnd_tair, &
-            &                     qair_full, time_qair, timebnd_qair, &
+            &                     qair_full, hurs_full, time_qair, timebnd_qair, &
             &                     rainf_full, snowf_full, time_precip, timebnd_precip, &
             &                     swdown_full, time_swdown, timebnd_swdown, &
@@ -1579,4 +1585,5 @@
           CALL scatter(tairmax_full, tairmax_slab)
           CALL scatter(tairmin_full, tairmin_slab)
+          CALL scatter(hurs_full, hurs_slab)
        ENDIF
        CALL scatter(qair_full, qair_slab)
@@ -1595,4 +1602,5 @@
           tairmax_slab(:,:) = tairmax_full(:,:)
           tairmin_slab(:,:) = tairmin_full(:,:)
+          hurs_slab(:,:) = hurs_full(:,:)
        ENDIF
        qair_slab(:,:) = qair_full(:,:)
@@ -1633,4 +1641,5 @@
     IF ( ALLOCATED(tairmax_full) ) DEALLOCATE(tairmax_full)
     IF ( ALLOCATED(tairmin_full) ) DEALLOCATE(tairmin_full)
+    IF ( ALLOCATED(hurs_full) ) DEALLOCATE(hurs_full)
     IF ( ALLOCATED(qair_full) ) DEALLOCATE(qair_full)
     IF ( ALLOCATED(rainf_full) ) DEALLOCATE(rainf_full)
@@ -1660,5 +1669,5 @@
   SUBROUTINE forcing_readslab_root(time_int, first_call_readslab, &
             &                     tair, tairmax, tairmin, t_tair, tbnd_tair, &
-            &                     qair, t_qair, tbnd_qair, &
+            &                     qair, hurs, t_qair, tbnd_qair, &
             &                     rainf, snowf, t_prec, tbnd_prec, &
             &                     swdown, t_swdown, tbnd_swdown, &
@@ -1678,5 +1687,5 @@
     REAL(r_std), INTENT(out) :: tbnd_tair(:,:)
     !
-    REAL(r_std), INTENT(out) :: qair(:,:)
+    REAL(r_std), INTENT(out) :: qair(:,:), hurs(:,:)
     REAL(r_std), INTENT(out) :: t_qair(:)
     REAL(r_std), INTENT(out) :: tbnd_qair(:,:)
@@ -1805,30 +1814,63 @@
           !
           ! 2.1 Deal with air temperature and humidity as the fist and basic case
-          !
+          ! hurs: relative humidity 
+          ! qair: specific humidity 
+          !
+          IF ( ExistVariable(if, "Tair") ) THEN 
+             CALL forcing_varforslab(if, "Tair", nctstart, nctcount, inslabpos, tair, cellmethod) 
+             CALL forcing_attributetimeaxe(cellmethod, timeid_tair) 
+          ELSE IF ( ( forcing_tstep_ave >= one_day/3.0) .AND.  ( ExistVariable(if, "Tmax"))) THEN 
+             CALL forcing_varforslab(if, "Tmax", nctstart, nctcount, inslabpos, tairmax, cellmethod) 
+             CALL forcing_varforslab(if, "Tmin", nctstart, nctcount, inslabpos, tairmin, cellmethod) 
+             CALL forcing_attributetimeaxe(cellmethod, timeid_tair) 
+             tair(:,:) = tairmax(:,:) 
+          ELSE 
+             CALL ipslerr(3, 'forcing_readslab_root','We do not have Tair or Tmax in the file but we need it',& 
+	 	                     &          'because the timestep of the forcing is sub-diurnal','') 
+          ENDIF
+                    
           ! 
-          !
-          IF ( forcing_tstep_ave >= one_day/3.0) THEN
-             CALL forcing_varforslab(if, "Tairmax", nctstart, nctcount, inslabpos, tairmax, cellmethod)
-             CALL forcing_varforslab(if, "Tairmin", nctstart, nctcount, inslabpos, tairmin, cellmethod)
+          ! 2.2 Deal with rainfall and snowfall. 
+          ! 
+          IF ( ExistVariable(if, "Rainf") ) THEN 
+             CALL forcing_varforslab(if, "Rainf", nctstart, nctcount, inslabpos, rainf, cellmethod) 
+             CALL forcing_attributetimeaxe(cellmethod, timeid_precip) 
+                
+          ELSE IF ( (forcing_tstep_ave >= one_day/3.0)) THEN 
+             CALL forcing_varforslab(if, "precip", nctstart, nctcount, inslabpos, rainf, cellmethod) 
+             CALL forcing_attributetimeaxe(cellmethod, timeid_precip) 
           ENDIF
-          
-          
-          CALL forcing_varforslab(if, "Tair", nctstart, nctcount, inslabpos, tair, cellmethod)
-          CALL forcing_attributetimeaxe(cellmethod, timeid_tair)
-          !
-          CALL forcing_varforslab(if, "Qair", nctstart, nctcount, inslabpos, qair, cellmethod)
-          CALL forcing_attributetimeaxe(cellmethod, timeid_qair)
-          !
-          ! 2.2 Deal with rainfall and snowfall.
-          !
-          CALL forcing_varforslab(if, "Rainf", nctstart, nctcount, inslabpos, rainf, cellmethod)
-          CALL forcing_attributetimeaxe(cellmethod, timeid_precip)
-          !
-          CALL forcing_varforslab(if, "Snowf", nctstart, nctcount, inslabpos, snowf, cellmethod)
-          CALL forcing_attributetimeaxe(cellmethod, timeid_tmp)
-          IF ( timeid_precip .NE. timeid_tmp) THEN
-             CALL ipslerr(3, 'forcing_readslab_root','Rainf and Snwof have different time axes.', &
-                  &         'Please check the forcing file to ensure both variable have the same cell_method.','')
+          ! 
+          IF ( ExistVariable(if, "Snowf")) THEN 
+             CALL forcing_varforslab(if, "Snowf", nctstart, nctcount, inslabpos, snowf, cellmethod) 
+             CALL forcing_attributetimeaxe(cellmethod, timeid_tmp) 
+             IF ( timeid_precip .NE. timeid_tmp) THEN 
+                CALL ipslerr(3, 'forcing_readslab_root','Rainf and Snwof have different time axes.', & 
+                     &         'Please check the forcing file to ensure both variable have the same cell_method.','') 
+             ENDIF
+                
+          ELSE IF ( (forcing_tstep_ave >= one_day/3.0) )THEN 
+             snowf(:,:) = rainf(:,:)  
+             WHERE (tair(:,:)>=273.15) 
+                snowf(:,:) = 0.0 
+             ELSEWHERE (tair(:,:)<273.15) 
+                rainf(:,:) = 0.0 
+             END WHERE
           ENDIF
+          !
+          !
+          IF ( ExistVariable(if, "Qair") ) THEN
+             CALL forcing_varforslab(if, "Qair", nctstart, nctcount, inslabpos, qair, cellmethod)
+             CALL forcing_attributetimeaxe(cellmethod, timeid_qair)
+          ELSE IF ( ExistVariable(if, "hurs") ) THEN
+             CALL forcing_varforslab(if, "hurs", nctstart, nctcount, inslabpos, hurs, cellmethod)
+             CALL forcing_attributetimeaxe(cellmethod, timeid_qair)
+             CALL ipslerr(3, 'forcing_readslab_root','hurs is read from forcing file', &
+                  &         'Please make sure that the conversion from hurs to specific humidity is correct before continue simulation.','')
+          ELSE
+             CALL ipslerr(3, 'forcing_readslab_root','We do not have Qair or hurs in the file but we need one of them',&
+                  &          'because the timestep of the forcing is sub-diurnal','')
+          ENDIF
+          !
           !
           !
@@ -2447,5 +2489,5 @@
     INTEGER(i_std) :: ik, i, j, iff, ndimsvar
     ! Read a test variabe
-    CHARACTER(len=8) :: testvarname='Tair'
+    CHARACTER(len=8) :: testvarname
     INTEGER(i_std)   :: testvar_id, contfrac_id
     REAL(r_std) :: testvar_missing, contfrac_missing
@@ -2531,5 +2573,16 @@
        ENDIF
     ENDDO
-    
+    !
+    iret = NF90_INQ_VARID(force_id(1), 'Tair', iv)
+    IF (iret == NF90_NOERR) THEN
+       testvarname = 'Tair'
+    ELSE
+       iret = NF90_INQ_VARID(force_id(1), 'Tmax', iv)
+       IF (iret == NF90_NOERR) THEN
+          testvarname = 'Tmax'
+       ELSE
+          CALL ipslerr (3,'forcing_getglogrid',"Could not find variable Tair or Tmax in file."," "," ")
+       ENDIF
+    ENDIF
     !
     ! 3.0 Read the spatial coordinate variables found in the first file.
@@ -3292,5 +3345,5 @@
     INTEGER(i_std) :: iindex_init, jindex_init, iindex_end, jindex_end, i_orig, j_orig 
     !
-    INTEGER(i_std) :: iret, force_id, iv
+    INTEGER(i_std) :: iret, force_id, iv, ierr
     INTEGER(i_std), DIMENSION(1) :: imin, jmin
     INTEGER(i_std), DIMENSION(2) :: start, count
@@ -3300,5 +3353,5 @@
     INTEGER(i_std), ALLOCATABLE, DIMENSION(:) :: index_glotoloc
     REAL(r_std), ALLOCATABLE, DIMENSION(:,:) :: lalo
-    CHARACTER(LEN=8) :: testvarname="Tair"
+    CHARACTER(LEN=8) :: testvarname
     !
     ! 0.0 Verify we are on the root processor
@@ -3328,4 +3381,9 @@
           ENDDO
        ENDDO
+    ENDIF
+    !! define dx and dy for regular grids
+    IF ( model_guess .EQ. 'regular' ) THEN
+       dx=ABS(lon_glo(2,1)-lon_glo(1,1))
+       dy=ABS(lat_glo(1,1)-lat_glo(1,2)) 
     ENDIF
     !
@@ -3577,9 +3635,4 @@
        ! 
        DO j=1,jjm_loc 
-          dx = zero 
-          DO i=1,iim_loc-1 
-             dx = dx+ABS(lon_loc(i,j)-lon_loc(i+1,j)) 
-          ENDDO
-          dx = dx/(iim_loc-1) 
           DO i=1,iim_loc 
              corners_loc(i,j,1,1) = lon_loc(i,j)-dx/2.0 
@@ -3593,9 +3646,4 @@
        ! 
        DO i=1,iim_loc
-          dy = zero 
-          DO j=1,jjm_loc-1 
-             dy = dy + ABS(lat_loc(i,j)-lat_loc(i,j+1)) 
-          ENDDO
-          dy = dy/(jjm_loc-1) 
           DO j=1,jjm_loc 
              corners_loc(i,j,1,2) = lat_loc(i,j)+dy/2.0 
@@ -3631,9 +3679,17 @@
        ALLOCATE(readvar(ncdfcount), readvar2d(iim_glo,jjm_glo), zoomedvar(nbpoint_loc))
        !
-       iret = NF90_INQ_VARID(force_id, TRIM(testvarname), iv)
-       IF (iret /= NF90_NOERR) THEN
-          CALL ipslerr (3,'forcing_zoomgrid',"Could not find variable Tair in file."," "," ")
-       ENDIF
-
+       !
+       iret = NF90_INQ_VARID(force_id, 'Tair', iv)
+       IF (iret == NF90_NOERR) THEN
+          testvarname = 'Tair'
+       ELSE
+          iret = NF90_INQ_VARID(force_id, 'Tmax', iv)
+          IF (iret == NF90_NOERR) THEN
+             testvarname = 'Tmax'
+          ELSE
+             CALL ipslerr (3,'forcing_zoomgrid',"Could not find variable Tair or Tmax in file."," "," ")
+          ENDIF
+       ENDIF
+       !
        IF ( compressed ) THEN
           !
@@ -3669,4 +3725,5 @@
             &                    lon_loc(:,1), lat_loc(1,:), lindex_loc, mask_loc, &
             &                    TRIM(testvarname), zoomedvar)
+       ierr = NF90_CLOSE(force_id)
        !
     ENDIF
@@ -4089,5 +4146,5 @@
   !
   ! Go through all files in the list in order to get the total number of time steps we have
-  ! in the nbfiles files to be read
+  ! in the nbfiles files to be read. nb_forcing_steps: three full years of forcing time steps 
   !
   nb_forcing_steps = 0
@@ -4370,4 +4427,31 @@
 END SUBROUTINE forcing_time
 
+
+!! --------------------------------------------------------------------
+!! FUNCTION  ExistVariable():
+!!    This function tests if the variable exists in the file.
+!! --------------------------------------------------------------------
+FUNCTION  ExistVariable(fileindex, varname) RESULT(exists) 
+  IMPLICIT  NONE
+  INTEGER(i_std), INTENT(in) :: fileindex
+  CHARACTER(LEN=*), INTENT(in) :: varname
+  LOGICAL :: exists
+  !
+  CHARACTER(LEN=80) :: name
+  INTEGER(i_std) :: iret, iv
+  !
+  exists=.FALSE.
+  !
+  DO iv=1,nvars(fileindex)
+     !
+     iret = NF90_INQUIRE_VARIABLE(force_id(fileindex), iv, name=name)
+     !
+     IF ( INDEX(name, varname) > 0 ) THEN
+        exists = .TRUE.
+     ENDIF
+  ENDDO
+  
+END FUNCTION ExistVariable
+
 !!  =============================================================================================================================
 !! SUBROUTINE: forcing_varforslab
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcingdaily_tools.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcingdaily_tools.f90	(revision 7849)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcingdaily_tools.f90	(revision 7901)
@@ -34,4 +34,5 @@
   USE constantes
   USE solar
+  USE qsat_moisture
   !
   USE mod_orchidee_para
@@ -41,4 +42,5 @@
   PRIVATE
   PUBLIC :: forcingdaily_gensubd, forcingdaily_getvalues
+  PUBLIC :: choice_qair_interpol, qair_interpol
   !
   ! This PARAMETER essentially manages the memory usage of the module as it
@@ -58,4 +60,5 @@
   REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:)      :: time_subd
   REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:)    :: tair_subd, qair_subd
+  REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:)    :: hurs_subd
   REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:)    :: ztq_subd, zuv_subd
   REAL(r_std), SAVE, ALLOCATABLE, DIMENSION(:,:)    :: rainf_subd, snowf_subd
@@ -65,4 +68,6 @@
   INTEGER(i_std), SAVE, ALLOCATABLE, DIMENSION(:,:) :: idusk, irise, inoon
   !
+  LOGICAL, SAVE :: choice_qair_interpol = .TRUE.
+  LOGICAL, SAVE :: qair_interpol = .TRUE.
 CONTAINS
 !!
@@ -94,6 +99,7 @@
     ! LOCAL
     !
-    INTEGER(i_std) :: imin(1), i
+    INTEGER(i_std) :: imin(1), i, nbpt
     REAL(r_std)    :: tloc
+    REAL(r_std), ALLOCATABLE, DIMENSION(:) :: qair_sat, hurs
     !
     tloc = (time_int(1)+time_int(2))/2.0
@@ -101,6 +107,10 @@
     !
     !
+    nbpt = SIZE(qair)
+    ALLOCATE(qair_sat(nbpt))
+    ALLOCATE(hurs(nbpt))
+    !
     tair(:) = tair_subd(:,imin(1))
-    qair(:) = qair_subd(:,imin(1))
+    hurs(:) = hurs_subd(:,imin(1))
     rainf(:) = rainf_subd(:,imin(1))
     snowf(:) = snowf_subd(:,imin(1))
@@ -114,4 +124,20 @@
     ps(:) = ps_subd(:,imin(1))
     !
+    ! Different options exist in order to get air humidity :
+    ! - A linear interpolation of the specific humidity (not ideal !!).
+    ! - A linear interpolation of the relative humidity which is then applied to the saturated
+    !   value at air temperature (This should be preferred).	    !
+    IF ( qair_interpol ) THEN
+       qair(:) = qair_subd(:,imin(1))
+    ELSE
+       CALL qsatcalc (nbpt, tair, ps/100.0, qair_sat)
+       IF ( MAXVAL(hurs) > un ) THEN
+          ! hurs is certainly in %
+          qair(:) = qair_sat(:)*hurs(:)/100.0
+       ELSE
+          ! Here hurs is a ratio.
+          qair(:) = qair_sat(:)*hurs(:)
+       ENDIF
+    ENDIF
   END SUBROUTINE forcingdaily_getvalues
 !!
@@ -133,5 +159,5 @@
   SUBROUTINE forcingdaily_gensubd(time_int, dt, iim, jjm, lon, lat, gindex_proc, &
        &                          szdom, szslab, time_slab, ztq, zuv, tair, tairmin, tairmax, &
-       &                          qair, rainf, snowf, swdown, lwdown, u, v, ps)
+       &                          qair, hurs, rainf, snowf, swdown, lwdown, u, v, ps)
 
     !
@@ -148,5 +174,5 @@
     REAL(r_std), INTENT(in)    :: tair(szdom,szslab), tairmin(szdom,szslab), tairmax(szdom,szslab)
     REAL(r_std), INTENT(in)    :: qair(szdom,szslab), rainf(szdom,szslab), snowf(szdom,szslab)
-    REAL(r_std), INTENT(in)    :: swdown(szdom,szslab), lwdown(szdom,szslab)
+    REAL(r_std), INTENT(in)    :: swdown(szdom,szslab), lwdown(szdom,szslab), hurs(szdom,szslab)
     REAL(r_std), INTENT(in)    :: u(szdom,szslab), v(szdom,szslab), ps(szdom,szslab)
     !
@@ -158,4 +184,26 @@
     REAL(r_std)       :: julian
     !
+    ! Get the options chosen by the user
+    !
+    !Config Key   = DAILY_QAIR_INTERPOL
+    !Config Desc  = Decide if qair from the daily forcing should be interpolated
+    !Config Def   = false
+    !Config If    =
+    !Config Help  = The daily forcing can generate sub-diurnal qair either from the
+    !Config         daily mean qair through an interpolation, or generate it from the
+    !Config         relative humidity and the reconstructed tair. The second option is
+    !Config         preferred so the default value for DAILY_QIAR_INTERPOL=false.
+    !Config Units = [-]
+    !
+    !
+    IF ( choice_qair_interpol ) THEN
+       qair_interpol = .TRUE.
+       CALL getin_p('DAILY_QAIR_INTERPOL', qair_interpol)
+    ELSE
+       WRITE(*,*) "qair_interpol = ", qair_interpol
+       CALL ipslerr(2, 'forcingdaily_gensubd', 'The forcing file has constrained our choices and the user', &
+            &          'choice is not being used.', '')
+    ENDIF
+    !
     ! Set date to middle of requested interval.
     !
@@ -179,4 +227,5 @@
           ALLOCATE(tair_subd(szdom,szsubd))
           ALLOCATE(qair_subd(szdom,szsubd))
+          ALLOCATE(hurs_subd(szdom,szsubd))
           ALLOCATE(rainf_subd(szdom,szsubd))
           ALLOCATE(snowf_subd(szdom,szsubd))
@@ -230,4 +279,5 @@
        !
        qair_subd(:,:) = undef_sechiba
+       hurs_subd(:,:) = undef_sechiba
        ztq_subd(:,:) = undef_sechiba
        zuv_subd(:,:) = undef_sechiba
@@ -241,4 +291,5 @@
              imin = MINLOC(ABS((julian - time_slab(1:szslab))))
              qair_subd(i,ist) = qair(i,imin(1))
+             hurs_subd(i,ist) = hurs(i,imin(1))
              ztq_subd(i,ist) = ztq(i,imin(1))
              zuv_subd(i,ist) = zuv(i,imin(1))
@@ -249,4 +300,5 @@
        ENDDO
        CALL forcingdaily_linint(szdom, szsubd, nbdays, qair_subd)
+       CALL forcingdaily_linint(szdom, szsubd, nbdays, hurs_subd)
        CALL forcingdaily_linint(szdom, szsubd, nbdays, ztq_subd)
        CALL forcingdaily_linint(szdom, szsubd, nbdays, zuv_subd)
