source: LMDZ6/trunk/libf/phylmd/ocean_forced_mod.F90 @ 5134

Last change on this file since 5134 was 5022, checked in by Sebastien Nguyen, 5 months ago

include ISO keys in pbl_surface and associated routines in phylmd

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 19.0 KB
RevLine 
[781]1!
[2538]2! $Id: ocean_forced_mod.F90 5022 2024-07-05 14:38:48Z abarral $
3!
[781]4MODULE ocean_forced_mod
5!
6! This module is used for both the sub-surfaces ocean and sea-ice for the case of a
7! forced ocean,  "ocean=force".
8!
9  IMPLICIT NONE
10
11CONTAINS
12!
13!****************************************************************************************
14!
[1067]15  SUBROUTINE ocean_forced_noice( &
16       itime, dtime, jour, knon, knindex, &
[2254]17       p1lay, cdragh, cdragq, cdragm, precip_rain, precip_snow, &
[781]18       temp_air, spechum, &
[1067]19       AcoefH, AcoefQ, BcoefH, BcoefQ, &
20       AcoefU, AcoefV, BcoefU, BcoefV, &
[3815]21       ps, u1, v1, gustiness, tsurf_in, &
[888]22       radsol, snow, agesno, &
[1067]23       qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
[5022]24       tsurf_new, dflux_s, dflux_l, sens_prec_liq, rhoa &
25#ifdef ISO
26       ,xtprecip_rain, xtprecip_snow, xtspechum,Roce,rlat, &
27       xtsnow,xtevap,h1 & 
28#endif           
29       )
[781]30!
31! This subroutine treats the "open ocean", all grid points that are not entierly covered
32! by ice.
[996]33! The routine receives data from climatologie file limit.nc and does some calculations at the
[781]34! surface.
35!
[1067]36    USE dimphy
37    USE calcul_fluxs_mod
[996]38    USE limit_read_mod
[1961]39    USE mod_grid_phy_lmdz
[1785]40    USE indice_sol_mod
[2538]41    USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
[3815]42    use config_ocean_skin_m, only: activate_ocean_skin
[5022]43#ifdef ISO
44    USE infotrac_phy, ONLY: ntiso,niso
45    USE isotopes_routines_mod, ONLY: calcul_iso_surf_oce_vectall, calcul_iso_surf_sic_vectall   
46#ifdef ISOVERIF
47    USE isotopes_mod, ONLY: iso_eau,ridicule
48    !USE isotopes_verif_mod, ONLY: errmax,errmaxrel,iso_verif_egalite_choix
49    USE isotopes_verif_mod
50#endif
51#endif
[2538]52
[793]53    INCLUDE "YOMCST.h"
[2254]54    INCLUDE "clesphys.h"
[3780]55    INCLUDE "flux_arp.h"
[781]56
57! Input arguments
58!****************************************************************************************
59    INTEGER, INTENT(IN)                      :: itime, jour, knon
60    INTEGER, DIMENSION(klon), INTENT(IN)     :: knindex
61    REAL, INTENT(IN)                         :: dtime
62    REAL, DIMENSION(klon), INTENT(IN)        :: p1lay
[2254]63    REAL, DIMENSION(klon), INTENT(IN)        :: cdragh, cdragq, cdragm
[781]64    REAL, DIMENSION(klon), INTENT(IN)        :: precip_rain, precip_snow
65    REAL, DIMENSION(klon), INTENT(IN)        :: temp_air, spechum
[1067]66    REAL, DIMENSION(klon), INTENT(IN)        :: AcoefH, AcoefQ, BcoefH, BcoefQ
67    REAL, DIMENSION(klon), INTENT(IN)        :: AcoefU, AcoefV, BcoefU, BcoefV
[781]68    REAL, DIMENSION(klon), INTENT(IN)        :: ps
[2240]69    REAL, DIMENSION(klon), INTENT(IN)        :: u1, v1, gustiness
[3815]70    REAL, DIMENSION(klon), INTENT(IN)        :: tsurf_in
71    real, intent(in):: rhoa(:) ! (knon) density of moist air  (kg / m3)
[781]72
[5022]73#ifdef ISO
74    REAL, DIMENSION(ntiso,klon), INTENT(IN)  :: xtprecip_rain, xtprecip_snow
75    REAL, DIMENSION(ntiso,klon), INTENT(IN)  :: xtspechum
76    REAL, DIMENSION(klon),       INTENT(IN)  :: rlat
77#endif
78
[781]79! In/Output arguments
80!****************************************************************************************
81    REAL, DIMENSION(klon), INTENT(INOUT)     :: radsol
82    REAL, DIMENSION(klon), INTENT(INOUT)     :: snow
83    REAL, DIMENSION(klon), INTENT(INOUT)     :: agesno !? put to 0 in ocean
[5022]84#ifdef ISO     
85    REAL, DIMENSION(niso,klon), INTENT(IN)   :: xtsnow
86    REAL, DIMENSION(niso,klon), INTENT(INOUT):: Roce
87#endif
88
[781]89! Output arguments
90!****************************************************************************************
91    REAL, DIMENSION(klon), INTENT(OUT)       :: qsurf
92    REAL, DIMENSION(klon), INTENT(OUT)       :: evap, fluxsens, fluxlat
[1067]93    REAL, DIMENSION(klon), INTENT(OUT)       :: flux_u1, flux_v1
[781]94    REAL, DIMENSION(klon), INTENT(OUT)       :: tsurf_new
95    REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l
[3815]96    REAL, intent(out):: sens_prec_liq(:) ! (knon)
[781]97
[5022]98#ifdef ISO     
99    REAL, DIMENSION(ntiso,klon), INTENT(OUT) :: xtevap ! isotopes in evaporation flux
100    REAL, DIMENSION(klon),       INTENT(OUT) :: h1 ! just a diagnostic, not useful for the simulation
101#endif
102
[781]103! Local variables
104!****************************************************************************************
[2538]105    INTEGER                     :: i, j
[781]106    REAL, DIMENSION(klon)       :: cal, beta, dif_grnd
107    REAL, DIMENSION(klon)       :: alb_neig, tsurf_lim, zx_sl
[1067]108    REAL, DIMENSION(klon)       :: u0, v0
109    REAL, DIMENSION(klon)       :: u1_lay, v1_lay
[781]110    LOGICAL                     :: check=.FALSE.
[5022]111    REAL, DIMENSION(knon)       :: sens_prec_sol
112    REAL, DIMENSION(klon)       :: lat_prec_liq, lat_prec_sol   
113#ifdef ISO   
114    REAL, PARAMETER :: t_coup = 273.15     
115#endif
[781]116
[5022]117
[781]118!****************************************************************************************
119! Start calculation
120!****************************************************************************************
121    IF (check) WRITE(*,*)' Entering ocean_forced_noice'
[5022]122
123#ifdef ISO
124#ifdef ISOVERIF
125    DO i = 1, knon
126      IF (iso_eau > 0) THEN         
127        CALL iso_verif_egalite_choix(xtspechum(iso_eau,i), &
128     &                  spechum(i),'ocean_forced_mod 111', &
129     &                  errmax,errmaxrel)     
130        CALL iso_verif_egalite_choix(snow(i), &
131     &                  xtsnow(iso_eau,i),'ocean_forced_mod 117', &
132     &                  errmax,errmaxrel)
133      ENDIF !IF (iso_eau > 0) THEN
134    ENDDO !DO i=1,knon
135#endif     
136#endif
137
[781]138!****************************************************************************************
139! 1)   
[996]140! Read sea-surface temperature from file limit.nc
[781]141!
142!****************************************************************************************
[1961]143!--sb:
144!!jyg    if (knon.eq.1) then ! single-column model
145    if (klon_glo.eq.1) then ! single-column model
[3780]146      ! EV: now surface Tin flux_arp.h
147      !CALL read_tsurf1d(knon,tsurf_lim) ! new
148       DO i = 1, knon
149        tsurf_lim(i) = tg
150       ENDDO
151
[1961]152    else ! GCM
[5022]153      CALL limit_read_sst(knon,knindex,tsurf_lim &
154#ifdef ISO
155     &     ,Roce,rlat &
156#endif     
157     &     )
[1961]158    endif ! knon
159!sb--
[996]160
[781]161!****************************************************************************************
162! 2)
163! Flux calculation
164!
165!****************************************************************************************
166! Set some variables for calcul_fluxs
[3780]167    !cal = 0.
168    !beta = 1.
169    !dif_grnd = 0.
[3784]170   
171   
[3780]172    ! EV: use calbeta to calculate beta
[3784]173    ! Need to initialize qsurf for calbeta but it is not modified by this routine
174    qsurf(:)=0.
175    CALL calbeta(dtime, is_oce, knon, snow, qsurf, beta, cal, dif_grnd)
[3780]176
177
[781]178    alb_neig(:) = 0.
179    agesno(:) = 0.
[3815]180    lat_prec_liq = 0.; lat_prec_sol = 0.
[2538]181
[1067]182! Suppose zero surface speed
183    u0(:)=0.0
184    v0(:)=0.0
185    u1_lay(:) = u1(:) - u0(:)
186    v1_lay(:) = v1(:) - v0(:)
187
[781]188! Calcul de tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l and qsurf
189    CALL calcul_fluxs(knon, is_oce, dtime, &
[3815]190         merge(tsurf_in, tsurf_lim, activate_ocean_skin == 2), p1lay, cal, &
191         beta, cdragh, cdragq, ps, &
[781]192         precip_rain, precip_snow, snow, qsurf,  &
[2240]193         radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, &
[2254]194         f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, &
[2538]195         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, &
[3815]196         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa)
197    if (activate_ocean_skin == 2) tsurf_new = tsurf_lim
[781]198
[2538]199    do j = 1, knon
200      i = knindex(j)
201      sens_prec_liq_o(i,1) = sens_prec_liq(j)
202      sens_prec_sol_o(i,1) = sens_prec_sol(j)
203      lat_prec_liq_o(i,1) = lat_prec_liq(j)
204      lat_prec_sol_o(i,1) = lat_prec_sol(j)
205    enddo
206
207
[1067]208! - Flux calculation at first modele level for U and V
209    CALL calcul_flux_wind(knon, dtime, &
[2240]210         u0, v0, u1, v1, gustiness, cdragm, &
[1067]211         AcoefU, AcoefV, BcoefU, BcoefV, &
212         p1lay, temp_air, &
213         flux_u1, flux_v1) 
[781]214
[5022]215#ifdef ISO     
216    CALL calcul_iso_surf_oce_vectall(klon, knon,t_coup, &
217     &    ps,tsurf_new,spechum,u1_lay, v1_lay, xtspechum, &
218     &    evap, Roce,xtevap,h1 &
219#ifdef ISOTRAC
220     &    ,knindex &
221#endif
222     &    )
223#endif         
224
225#ifdef ISO
226#ifdef ISOVERIF
227!          write(*,*) 'ocean_forced_mod 176: sortie de ocean_forced_noice'
228    IF (iso_eau > 0) THEN
229      DO i = 1, knon               
230        CALL iso_verif_egalite_choix(snow(i), &
231     &          xtsnow(iso_eau,i),'ocean_forced_mod 180', &
232     &          errmax,errmaxrel)
233      ENDDO ! DO j=1,knon
234    ENDIF !IF (iso_eau > 0) THEN
235#endif
236#endif   
237
[781]238  END SUBROUTINE ocean_forced_noice
239!
[1067]240!***************************************************************************************
[781]241!
[1067]242  SUBROUTINE ocean_forced_ice( &
243       itime, dtime, jour, knon, knindex, &
[4523]244       tsurf_in, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air,spechum, &
[1067]245       AcoefH, AcoefQ, BcoefH, BcoefQ, &
246       AcoefU, AcoefV, BcoefU, BcoefV, &
[2240]247       ps, u1, v1, gustiness, &
[888]248       radsol, snow, qsol, agesno, tsoil, &
[1067]249       qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, &
[5022]250       tsurf_new, dflux_s, dflux_l, rhoa &
251#ifdef ISO
252       ,xtprecip_rain, xtprecip_snow, xtspechum,Roce, &
253       xtsnow, xtsol,xtevap,Rland_ice & 
254#endif           
255       )
[781]256!
257! This subroutine treats the ocean where there is ice.
258! The routine reads data from climatologie file and does flux calculations at the
259! surface.
[996]260!
[1067]261    USE dimphy
[3974]262    USE geometry_mod, ONLY: longitude,latitude
[1067]263    USE calcul_fluxs_mod
[3327]264    USE surface_data,     ONLY : calice, calsno
[996]265    USE limit_read_mod
[1067]266    USE fonte_neige_mod,  ONLY : fonte_neige
[1785]267    USE indice_sol_mod
[2538]268    USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
[5022]269#ifdef ISO
270    USE infotrac_phy, ONLY: niso, ntiso
271    USE isotopes_routines_mod, ONLY: calcul_iso_surf_oce_vectall, calcul_iso_surf_sic_vectall
272#ifdef ISOVERIF
273    USE isotopes_mod, ONLY: iso_eau,ridicule
274    !USE isotopes_verif_mod, ONLY: errmax,errmaxrel,iso_verif_egalite_choix
275    USE isotopes_verif_mod
276#endif
277#endif
[996]278
[3784]279!   INCLUDE "indicesol.h"
[781]280    INCLUDE "dimsoil.h"
[793]281    INCLUDE "YOMCST.h"
282    INCLUDE "clesphys.h"
[3780]283    INCLUDE "flux_arp.h"
[781]284
285! Input arguments
286!****************************************************************************************
287    INTEGER, INTENT(IN)                  :: itime, jour, knon
288    INTEGER, DIMENSION(klon), INTENT(IN) :: knindex
289    REAL, INTENT(IN)                     :: dtime
290    REAL, DIMENSION(klon), INTENT(IN)    :: tsurf_in
291    REAL, DIMENSION(klon), INTENT(IN)    :: p1lay
[1067]292    REAL, DIMENSION(klon), INTENT(IN)    :: cdragh, cdragm
[781]293    REAL, DIMENSION(klon), INTENT(IN)    :: precip_rain, precip_snow
294    REAL, DIMENSION(klon), INTENT(IN)    :: temp_air, spechum
[1067]295    REAL, DIMENSION(klon), INTENT(IN)    :: AcoefH, AcoefQ, BcoefH, BcoefQ
296    REAL, DIMENSION(klon), INTENT(IN)    :: AcoefU, AcoefV, BcoefU, BcoefV
[781]297    REAL, DIMENSION(klon), INTENT(IN)    :: ps
[2240]298    REAL, DIMENSION(klon), INTENT(IN)    :: u1, v1, gustiness
[3815]299    real, intent(in):: rhoa(:) ! (knon) density of moist air  (kg / m3)
[5022]300#ifdef ISO
301    REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow
302    REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtspechum
303    REAL, DIMENSION(niso,klon),  INTENT(IN) :: Roce
304    REAL, DIMENSION(niso,klon),  INTENT(IN) :: Rland_ice
305#endif
[781]306
307! In/Output arguments
308!****************************************************************************************
309    REAL, DIMENSION(klon), INTENT(INOUT)          :: radsol
310    REAL, DIMENSION(klon), INTENT(INOUT)          :: snow, qsol
311    REAL, DIMENSION(klon), INTENT(INOUT)          :: agesno
312    REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil
[5022]313#ifdef ISO     
314    REAL, DIMENSION(niso,klon), INTENT(INOUT)     :: xtsnow
315    REAL, DIMENSION(niso,klon), INTENT(IN)        :: xtsol
316#endif
[781]317
318! Output arguments
319!****************************************************************************************
320    REAL, DIMENSION(klon), INTENT(OUT)            :: qsurf
[888]321    REAL, DIMENSION(klon), INTENT(OUT)            :: alb1_new  ! new albedo in visible SW interval
322    REAL, DIMENSION(klon), INTENT(OUT)            :: alb2_new  ! new albedo in near IR interval
[781]323    REAL, DIMENSION(klon), INTENT(OUT)            :: evap, fluxsens, fluxlat
[1067]324    REAL, DIMENSION(klon), INTENT(OUT)            :: flux_u1, flux_v1
[888]325    REAL, DIMENSION(klon), INTENT(OUT)            :: tsurf_new
[781]326    REAL, DIMENSION(klon), INTENT(OUT)            :: dflux_s, dflux_l     
[5022]327#ifdef ISO     
328    REAL, DIMENSION(ntiso,klon), INTENT(OUT)      :: xtevap
329#endif     
[781]330
331! Local variables
332!****************************************************************************************
333    LOGICAL                     :: check=.FALSE.
[2538]334    INTEGER                     :: i, j
[781]335    REAL                        :: zfra
336    REAL, PARAMETER             :: t_grnd=271.35
337    REAL, DIMENSION(klon)       :: cal, beta, dif_grnd, capsol
338    REAL, DIMENSION(klon)       :: alb_neig, tsurf_tmp
339    REAL, DIMENSION(klon)       :: soilcap, soilflux
[1067]340    REAL, DIMENSION(klon)       :: u0, v0
341    REAL, DIMENSION(klon)       :: u1_lay, v1_lay
[5022]342    REAL, DIMENSION(knon)       :: sens_prec_liq, sens_prec_sol
[2538]343    REAL, DIMENSION(klon)       :: lat_prec_liq, lat_prec_sol   
[781]344
[5022]345#ifdef ISO
346    REAL, PARAMETER :: t_coup = 273.15
347    REAL, DIMENSION(klon) :: fq_fonte_diag
348    REAL, DIMENSION(klon) :: fqfonte_diag
349    REAL, DIMENSION(klon) :: snow_evap_diag
350    REAL, DIMENSION(klon) :: fqcalving_diag
351    REAL, DIMENSION(klon) :: run_off_lic_diag
352    REAL :: coeff_rel_diag
353    REAL :: max_eau_sol_diag 
354    REAL, DIMENSION(klon) :: runoff_diag   
355    INTEGER IXT
356    REAL, DIMENSION(niso,klon) :: xtsnow_prec, xtsol_prec
357    REAL, DIMENSION(klon) :: snow_prec, qsol_prec 
358#endif
[2538]359
[781]360!****************************************************************************************
361! Start calculation
362!****************************************************************************************
363    IF (check) WRITE(*,*)'Entering surface_seaice, knon=',knon
364
365!****************************************************************************************
[996]366! 1)
[1067]367! Flux calculation : tsurf_new, evap, fluxlat, fluxsens, flux_u1, flux_v1
[781]368!                    dflux_s, dflux_l and qsurf
369!****************************************************************************************
[2538]370
[996]371    tsurf_tmp(:) = tsurf_in(:)
[781]372
[3780]373! calculate the parameters cal, beta, capsol and dif_grnd and then recalculate cal
[3784]374    CALL calbeta(dtime, is_sic, knon, snow, qsol, beta, capsol, dif_grnd)
[781]375
376   
377    IF (soil_model) THEN
378! update tsoil and calculate soilcap and soilflux
[3974]379       CALL soil(dtime, is_sic, knon, snow, tsurf_tmp, qsol, &
380        & longitude(knindex(1:knon)), latitude(knindex(1:knon)), tsoil,soilcap, soilflux)
[781]381       cal(1:knon) = RCPD / soilcap(1:knon)
382       radsol(1:knon) = radsol(1:knon)  + soilflux(1:knon)
383       dif_grnd = 1.0 / tau_gl
384    ELSE
385       dif_grnd = 1.0 / tau_gl
386       cal = RCPD * calice
387       WHERE (snow > 0.0) cal = RCPD * calsno
388    ENDIF
389
[3784]390!    beta = 1.0
[3815]391    lat_prec_liq = 0.; lat_prec_sol = 0.
[2538]392
[1067]393! Suppose zero surface speed
394    u0(:)=0.0
395    v0(:)=0.0
396    u1_lay(:) = u1(:) - u0(:)
397    v1_lay(:) = v1(:) - v0(:)
[781]398    CALL calcul_fluxs(knon, is_sic, dtime, &
[2254]399         tsurf_tmp, p1lay, cal, beta, cdragh, cdragh, ps, &
[781]400         precip_rain, precip_snow, snow, qsurf,  &
[2240]401         radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, &
[2254]402         f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, &
[2538]403         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, &
[3815]404         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa)
[2538]405    do j = 1, knon
406      i = knindex(j)
407      sens_prec_liq_o(i,2) = sens_prec_liq(j)
408      sens_prec_sol_o(i,2) = sens_prec_sol(j)
409      lat_prec_liq_o(i,2) = lat_prec_liq(j)
410      lat_prec_sol_o(i,2) = lat_prec_sol(j)
411    enddo
[781]412
[1067]413! - Flux calculation at first modele level for U and V
414    CALL calcul_flux_wind(knon, dtime, &
[2240]415         u0, v0, u1, v1, gustiness, cdragm, &
[1067]416         AcoefU, AcoefV, BcoefU, BcoefV, &
417         p1lay, temp_air, &
418         flux_u1, flux_v1) 
419
[781]420!****************************************************************************************
[996]421! 2)
[781]422! Calculations due to snow and runoff
423!
424!****************************************************************************************
[5022]425#ifdef ISO
426   ! verif
427#ifdef ISOVERIF
428    DO i = 1, knon
429      IF (iso_eau > 0) THEN
430        IF (snow(i) > ridicule) THEN
431          CALL iso_verif_egalite_choix(xtsnow(iso_eau,i),snow(i), &
432   &              'interfsurf 964',errmax,errmaxrel)
433        ENDIF !IF ((snow(i) > ridicule)) THEN
434      ENDIF !IF (iso_eau > 0) THEN     
435    ENDDO !DO i=1,knon 
436#endif
437   ! end verif
438
439    DO i = 1, knon
440      snow_prec(i) = snow(i)
441      DO ixt = 1, niso
442      xtsnow_prec(ixt,i) = xtsnow(ixt,i)
443      ENDDO !DO ixt=1,niso
444      ! initialisation:
445      fq_fonte_diag(i) = 0.0
446      fqfonte_diag(i)  = 0.0
447      snow_evap_diag(i)= 0.0
448    ENDDO !DO i=1,knon
449#endif
450
451
[781]452    CALL fonte_neige( knon, is_sic, knindex, dtime, &
453         tsurf_tmp, precip_rain, precip_snow, &
[5022]454         snow, qsol, tsurf_new, evap &
455#ifdef ISO   
456     &  ,fq_fonte_diag,fqfonte_diag,snow_evap_diag,fqcalving_diag   &
457     &  ,max_eau_sol_diag,runoff_diag,run_off_lic_diag,coeff_rel_diag   &
458#endif
459     &   )
460
461
462#ifdef ISO
463! isotopes: tout est externalisé
464!#ifdef ISOVERIF
465!        write(*,*) 'ocean_forced_mod 377: call calcul_iso_surf_sic_vectall'
466!        write(*,*) 'klon,knon=',klon,knon
467!#endif
468    CALL calcul_iso_surf_sic_vectall(klon,knon, &
469     &          evap,snow_evap_diag,Tsurf_new,Roce,snow, &
470     &          fq_fonte_diag,fqfonte_diag,dtime,t_coup, &
471     &          precip_snow,xtprecip_snow,xtprecip_rain, snow_prec,xtsnow_prec, &
472     &          xtspechum,spechum,ps, &
473     &          xtevap,xtsnow,fqcalving_diag, &
474     &          knindex,is_sic,run_off_lic_diag,coeff_rel_diag,Rland_ice &
475     &   )
476#ifdef ISOVERIF
477        !write(*,*) 'ocean_forced_mod 391: sortie calcul_iso_surf_sic_vectall'
478    IF (iso_eau > 0) THEN
479      DO i = 1, knon 
480        CALL iso_verif_egalite_choix(snow(i), &
481     &           xtsnow(iso_eau,i),'ocean_forced_mod 396', &
482     &           errmax,errmaxrel)
483      ENDDO ! DO j=1,knon
484    ENDIF !IF (iso_eau > 0) then
485#endif
486!#ifdef ISOVERIF
487#endif   
488!#ifdef ISO
[781]489   
490! Calculation of albedo at snow (alb_neig) and update the age of snow (agesno)
491!
492    CALL albsno(klon, knon, dtime, agesno(:), alb_neig(:), precip_snow(:)) 
493
494    WHERE (snow(1:knon) .LT. 0.0001) agesno(1:knon) = 0.
495
[888]496    alb1_new(:) = 0.0
[781]497    DO i=1, knon
498       zfra = MAX(0.0,MIN(1.0,snow(i)/(snow(i)+10.0)))
[888]499       alb1_new(i) = alb_neig(i) * zfra +  0.6 * (1.0-zfra)
[781]500    ENDDO
501
[888]502    alb2_new(:) = alb1_new(:)
503
[781]504  END SUBROUTINE ocean_forced_ice
[1961]505
[3784]506!************************************************************************
507! 1D case
508!************************************************************************
509!  SUBROUTINE read_tsurf1d(knon,sst_out)
[781]510!
[3784]511! This subroutine specifies the surface temperature to be used in 1D simulations
512!
513!      USE dimphy, ONLY : klon
514!
515!      INTEGER, INTENT(IN)                  :: knon     ! nomber of points on compressed grid
516!      REAL, DIMENSION(klon), INTENT(OUT)   :: sst_out  ! tsurf used to force the single-column model
517!
518!       INTEGER :: i
519! COMMON defined in lmdz1d.F:
520!       real ts_cur
521!       common /sst_forcing/ts_cur
522!
523!       DO i = 1, knon
524!        sst_out(i) = ts_cur
525!       ENDDO
526!
527!      END SUBROUTINE read_tsurf1d
528!
529!
[1961]530!************************************************************************
[781]531END MODULE ocean_forced_mod
532
533
534
535
536
537
Note: See TracBrowser for help on using the repository browser.