/[lmdze]/trunk/phylmd/Interface_surf/interfsurf_hq.f
ViewVC logotype

Diff of /trunk/phylmd/Interface_surf/interfsurf_hq.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 154 by guez, Tue Jul 7 17:49:23 2015 UTC revision 171 by guez, Tue Sep 29 19:48:59 2015 UTC
# Line 9  contains Line 9  contains
9         spechum, tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, &         spechum, tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, &
10         precip_rain, precip_snow, fder, rugos, rugoro, snow, qsurf, tsurf, &         precip_rain, precip_snow, fder, rugos, rugoro, snow, qsurf, tsurf, &
11         p1lay, ps, radsol, evap, fluxsens, fluxlat, dflux_l, dflux_s, &         p1lay, ps, radsol, evap, fluxsens, fluxlat, dflux_l, dflux_s, &
12         tsurf_new, alblw, z0_new, pctsrf_new, agesno, fqcalving, ffonte, &         tsurf_new, albedo, z0_new, pctsrf_new, agesno, fqcalving, ffonte, &
13         run_off_lic_0, flux_o, flux_g)         run_off_lic_0, flux_o, flux_g)
14    
15      ! Cette routine sert d'aiguillage entre l'atmosph\`ere et la surface      ! Cette routine sert d'aiguillage entre l'atmosph\`ere et la surface
# Line 96  contains Line 96  contains
96      ! fluxlat flux de chaleur latente      ! fluxlat flux de chaleur latente
97      real, dimension(klon), intent(OUT):: dflux_l, dflux_s      real, dimension(klon), intent(OUT):: dflux_l, dflux_s
98      real, intent(OUT):: tsurf_new(knon) ! temp\'erature au sol      real, intent(OUT):: tsurf_new(knon) ! temp\'erature au sol
99      real, intent(OUT):: alblw(:) ! (knon) albedo      real, intent(OUT):: albedo(:) ! (knon) albedo
100      real, intent(OUT):: z0_new(klon) ! surface roughness      real, intent(OUT):: z0_new(klon) ! surface roughness
101      real, dimension(klon, nbsrf), intent(OUT):: pctsrf_new      real, dimension(klon, nbsrf), intent(OUT):: pctsrf_new
102      ! pctsrf_new nouvelle repartition des surfaces      ! pctsrf_new nouvelle repartition des surfaces
# Line 149  contains Line 149  contains
149            print *, ' nisurf = ', nisurf, ' /= is_ter = ', is_ter            print *, ' nisurf = ', nisurf, ' /= is_ter = ', is_ter
150            print *, 'or on doit commencer par les surfaces continentales'            print *, 'or on doit commencer par les surfaces continentales'
151            abort_message='voir ci-dessus'            abort_message='voir ci-dessus'
152            call abort_gcm(modname, abort_message, 1)            call abort_gcm(modname, abort_message)
153         endif         endif
154         if (is_oce > is_sic) then         if (is_oce > is_sic) then
155            print *, 'Warning:'            print *, 'Warning:'
# Line 157  contains Line 157  contains
157            print *, ' l''ocean doit etre traite avant la banquise'            print *, ' l''ocean doit etre traite avant la banquise'
158            print *, ' or is_oce = ', is_oce, '> is_sic = ', is_sic            print *, ' or is_oce = ', is_oce, '> is_sic = ', is_sic
159            abort_message='voir ci-dessus'            abort_message='voir ci-dessus'
160            call abort_gcm(modname, abort_message, 1)            call abort_gcm(modname, abort_message)
161         endif         endif
162      endif      endif
163      first_call = .false.      first_call = .false.
# Line 182  contains Line 182  contains
182    
183      select case (nisurf)      select case (nisurf)
184      case (is_ter)      case (is_ter)
185         ! Surface "terre" appel a l'interface avec les sols continentaux         ! Surface "terre", appel \`a l'interface avec les sols continentaux
186    
187         ! allocation du run-off         ! allocation du run-off
188         if (.not. allocated(run_off)) then         if (.not. allocated(run_off)) then
189            allocate(run_off(knon))            allocate(run_off(knon))
190            run_off = 0.            run_off = 0.
191         else if (size(run_off) /= knon) then         else if (size(run_off) /= knon) then
192            print *, 'Bizarre, le nombre de points continentaux'            call abort_gcm(modname, 'Something is wrong: the number of ' &
193            print *, 'a change entre deux appels. J''arrete '                 // 'continental points has changed since last call.')
           abort_message='voir ci-dessus'  
           call abort_gcm(modname, abort_message, 1)  
194         endif         endif
195    
196         ! Calcul age de la neige         ! Calcul age de la neige
197    
198         ! calcul albedo: lecture albedo fichier boundary conditions         ! calcul albedo: lecture albedo fichier boundary conditions
199         ! puis ajout albedo neige         ! puis ajout albedo neige
200         call interfsur_lim(itime, dtime, jour, knindex, debut, alblw, z0_new)         call interfsur_lim(itime, dtime, jour, knindex, debut, albedo, z0_new)
201    
202         ! calcul snow et qsurf, hydrol adapt\'e         ! calcul snow et qsurf, hydrol adapt\'e
203         CALL calbeta(nisurf, snow(:knon), qsol(:knon), beta(:knon), &         CALL calbeta(nisurf, snow(:knon), qsol(:knon), beta(:knon), &
# Line 212  contains Line 210  contains
210         ELSE         ELSE
211            cal = RCPD * capsol            cal = RCPD * capsol
212         ENDIF         ENDIF
213         CALL calcul_fluxs(nisurf, dtime, tsurf, p1lay(:knon), cal(:knon), &  
214           CALL calcul_fluxs(dtime, tsurf, p1lay(:knon), cal(:knon), &
215              beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), &              beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), &
216              radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), &              radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), &
217              u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), &              u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), &
# Line 229  contains Line 228  contains
228         call albsno(klon, knon, dtime, agesno, alb_neig, precip_snow)         call albsno(klon, knon, dtime, agesno, alb_neig, precip_snow)
229         where (snow(1 : knon) < 0.0001) agesno(1 : knon) = 0.         where (snow(1 : knon) < 0.0001) agesno(1 : knon) = 0.
230         zfra(:knon) = max(0.0, min(1.0, snow(1:knon)/(snow(1:knon) + 10.0)))         zfra(:knon) = max(0.0, min(1.0, snow(1:knon)/(snow(1:knon) + 10.0)))
231         alblw = alb_neig(:knon) * zfra(:knon) &         albedo = alb_neig(:knon) * zfra(:knon) &
232              + alblw * (1. - zfra(:knon))              + albedo * (1. - zfra(:knon))
233         z0_new = sqrt(z0_new**2 + rugoro**2)         z0_new = sqrt(z0_new**2 + rugoro**2)
234    
235         ! Remplissage des pourcentages de surface         ! Remplissage des pourcentages de surface
# Line 246  contains Line 245  contains
245         dif_grnd = 0.         dif_grnd = 0.
246         alb_neig = 0.         alb_neig = 0.
247         agesno = 0.         agesno = 0.
248         call calcul_fluxs(nisurf, dtime, tsurf_temp, p1lay(:knon), &         call calcul_fluxs(dtime, tsurf_temp, p1lay(:knon), &
249              cal(:knon), beta(:knon), tq_cdrag(:knon), ps(:knon), &              cal(:knon), beta(:knon), tq_cdrag(:knon), ps(:knon), &
250              qsurf(:knon), radsol(:knon), dif_grnd(:knon), temp_air(:knon), &              qsurf(:knon), radsol(:knon), dif_grnd(:knon), temp_air(:knon), &
251              spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), &              spechum(:knon), u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), &
# Line 261  contains Line 260  contains
260    
261         ! calcul albedo         ! calcul albedo
262         if (cycle_diurne) then         if (cycle_diurne) then
263            CALL alboc_cd(rmu0(knindex), alblw)            CALL alboc_cd(rmu0(knindex), albedo)
264         else         else
265            CALL alboc(jour, rlat(knindex), alblw)            CALL alboc(jour, rlat(knindex), albedo)
266         endif         endif
267    
268         z0_new = sqrt(rugos**2 + rugoro**2)         z0_new = sqrt(rugos**2 + rugoro**2)
# Line 300  contains Line 299  contains
299         tsurf_temp = tsurf_new         tsurf_temp = tsurf_new
300         beta = 1.0         beta = 1.0
301    
302         CALL calcul_fluxs(nisurf, dtime, tsurf_temp, p1lay(:knon), cal(:knon), &         CALL calcul_fluxs(dtime, tsurf_temp, p1lay(:knon), cal(:knon), &
303              beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), &              beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), &
304              radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), &              radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), &
305              u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), &              u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), &
# Line 326  contains Line 325  contains
325         CALL albsno(klon, knon, dtime, agesno, alb_neig, precip_snow)         CALL albsno(klon, knon, dtime, agesno, alb_neig, precip_snow)
326         WHERE (snow(1 : knon) < 0.0001) agesno(1 : knon) = 0.         WHERE (snow(1 : knon) < 0.0001) agesno(1 : knon) = 0.
327         zfra(:knon) = MAX(0.0, MIN(1.0, snow(1:knon)/(snow(1:knon) + 10.0)))         zfra(:knon) = MAX(0.0, MIN(1.0, snow(1:knon)/(snow(1:knon) + 10.0)))
328         alblw = alb_neig(:knon) * zfra(:knon) + 0.6 * (1.0 - zfra(:knon))         albedo = alb_neig(:knon) * zfra(:knon) + 0.6 * (1.0 - zfra(:knon))
329    
330         fder = fder + dflux_s + dflux_l         fder = fder + dflux_s + dflux_l
331    
# Line 353  contains Line 352  contains
352         beta = 1.0         beta = 1.0
353         dif_grnd = 0.0         dif_grnd = 0.0
354    
355         call calcul_fluxs(nisurf, dtime, tsurf, p1lay(:knon), cal(:knon), &         call calcul_fluxs(dtime, tsurf, p1lay(:knon), cal(:knon), &
356              beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), &              beta(:knon), tq_cdrag(:knon), ps(:knon), qsurf(:knon), &
357              radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), &              radsol(:knon), dif_grnd(:knon), temp_air(:knon), spechum(:knon), &
358              u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), &              u1_lay(:knon), v1_lay(:knon), petAcoef(:knon), peqAcoef(:knon), &
# Line 371  contains Line 370  contains
370         CALL albsno(klon, knon, dtime, agesno, alb_neig, precip_snow)         CALL albsno(klon, knon, dtime, agesno, alb_neig, precip_snow)
371         WHERE (snow(1 : knon) < 0.0001) agesno(1 : knon) = 0.         WHERE (snow(1 : knon) < 0.0001) agesno(1 : knon) = 0.
372         zfra(:knon) = MAX(0.0, MIN(1.0, snow(1:knon)/(snow(1:knon) + 10.0)))         zfra(:knon) = MAX(0.0, MIN(1.0, snow(1:knon)/(snow(1:knon) + 10.0)))
373         alblw = 0.77         albedo = 0.77
374    
375         ! Rugosite         ! Rugosite
376         z0_new = rugoro         z0_new = rugoro
# Line 382  contains Line 381  contains
381      case default      case default
382         print *, 'Index surface = ', nisurf         print *, 'Index surface = ', nisurf
383         abort_message = 'Index surface non valable'         abort_message = 'Index surface non valable'
384         call abort_gcm(modname, abort_message, 1)         call abort_gcm(modname, abort_message)
385      end select      end select
386    
387    END SUBROUTINE interfsurf_hq    END SUBROUTINE interfsurf_hq

Legend:
Removed from v.154  
changed lines
  Added in v.171

  ViewVC Help
Powered by ViewVC 1.1.21