Commit 1ca781e4 authored by dumoda01's avatar dumoda01

Il est maintenant possible de specifier des valeurs de concentration de glace...

Il est maintenant possible de specifier des valeurs de concentration de glace pour attenuer la lumiere incidente a la surface de l'ocean a l'aide d'un fichier ice.dat. Les options sont documentees dans le fichier nml/airsea.nml qui a 3 parametres supplementaires. Il se peut donc que vous deviez absolument tenir compte de ces changements dans votre airsea.nml afin d'eviter des problemes. Les modifications sont toutes contenues dans airsea.F90 et airsea.nml.
parent a6b0c648
......@@ -21,6 +21,19 @@
! or dew point temperature in C (depending on wet_mode)
! - cloud cover in 1/10
!
! ice_method -> method for taking sea ice account in light attenuation
! 0: No sea ice (ice=0)
! 1: Constant ice concentration
! 2: ice are read from ice_file
!
! ice_file -> file with sea ice data (for calc_fluxes=.true.)
! used to attenuation the shortwave radiation at sea surface
! - ice concentration in %
!
! iceatt -> Attenuation coefficient through ice
! (0.96 means that 4% of light will pass
through a complete ice cover)
!
! wet_mode -> decides what is given in 7. column in meteo_file
! 1: relative humidity
! 2: wet bulb temperature
......@@ -79,6 +92,9 @@
&airsea
calc_fluxes= .false.
meteo_file= 'meteo.dat'
ice_method= 0
ice_file= 'ice.dat'
iceatt= 0.90
wet_mode= 1
heat_method= 2
const_swr= 100.0
......
......@@ -55,7 +55,8 @@
! sea surface temperature (degC) and
! sea surface salinity (psu)
REALTYPE, public :: sst,sss
!DD sea ice concentration
REALTYPE, public :: sst,sss,ice !DD
! integrated short-wave radiation,
! surface heat flux (J/m^2)
......@@ -72,6 +73,7 @@
integer, parameter :: p_e_unit=23
integer, parameter :: sst_unit=24
integer, parameter :: sss_unit=25
integer, parameter :: ice_unit=26
REALTYPE, parameter :: cpa=1008.
REALTYPE, parameter :: cp=3985.
......@@ -148,6 +150,7 @@
integer :: p_e_method
integer :: sst_method
integer :: sss_method
integer :: ice_method !DD
integer :: wet_mode
character(len=PATH_MAX) :: meteo_file
......@@ -156,6 +159,7 @@
character(len=PATH_MAX) :: p_e_flux_file
character(len=PATH_MAX) :: sss_file
character(len=PATH_MAX) :: sst_file
character(len=PATH_MAX) :: ice_file !DD
REALTYPE :: wx,wy
REALTYPE :: airp
......@@ -166,6 +170,7 @@
REALTYPE :: const_tx,const_ty
REALTYPE :: const_swr,const_heat
REALTYPE :: const_p_e
REALTYPE :: iceatt=0.90 !DD
REALTYPE :: es,ea,qs,qa,L,S
REALTYPE :: cdd,chd,ced
......@@ -262,7 +267,8 @@
momentumflux_file, &
p_e_method,const_p_e,p_e_flux_file, &
sst_method, sst_file, &
sss_method, sss_file
sss_method, sss_file, &
ice_method, ice_file, iceatt !DD
!
!-----------------------------------------------------------------------
!BOC
......@@ -278,6 +284,16 @@
LEVEL2 'Reading meteo data from:'
LEVEL3 trim(meteo_file)
! Sea ice !DD
select case (ice_method)
case (FROMFILE)
open(ice_unit,file=ice_file,action='read', &
status='old',err=98)
LEVEL2 'Reading ice concentration from:'
LEVEL3 trim(ice_file)
case default
end select
else
! The heat fluxes
......@@ -336,6 +352,7 @@
cloud=0.
sss=0.
airt=0.
ice=0. !DD
alon = deg2rad*lon
alat = deg2rad*lat
......@@ -358,6 +375,8 @@
stop 'init_airsea'
97 FATAL 'I could not open ',trim(sss_file)
stop 'init_airsea'
98 FATAL 'I could not open ',trim(ice_file)
stop 'init_airsea'
end subroutine init_air_sea
!EOC
......@@ -395,8 +414,18 @@
!-----------------------------------------------------------------------
!BOC
if (calc_fluxes) then
! Sea ice
select case (ice_method)
case (CONSTVAL)
ice=0.50
case (FROMFILE)
call read_ice(jul,secs,ice)
case default
end select
call flux_from_meteo(jul,secs)
call short_wave_radiation(jul,secs,alon,alat)
call short_wave_radiation(jul,secs,alon,alat,ice)
else
! The heat fluxes
select case (heat_method)
......@@ -469,6 +498,7 @@
!BOC
if (calc_fluxes) then
close(meteo_unit)
if (ice_method .eq. FROMFILE) close(ice_unit) !DD
else
if (heat_method .eq. FROMFILE) close(heat_unit)
if (momentum_method .eq. FROMFILE) close(momentum_unit)
......@@ -737,7 +767,7 @@
! !IROUTINE: Calculate the short--wave radiation \label{sec:swr}
!
! !INTERFACE:
subroutine short_wave_radiation(jul,secs,lon,lat,swr)
subroutine short_wave_radiation(jul,secs,lon,lat,ice,swr)
!
! !DESCRIPTION:
! This subroutine calculates the short--wave net radiation based on
......@@ -767,6 +797,7 @@
! !INPUT PARAMETERS:
integer, intent(in) :: jul,secs
REALTYPE, intent(in) :: lon,lat
REALTYPE, intent(in) :: ice
!
! !OUTPUT PARAMETERS:
REALTYPE, optional, intent(out) :: swr
......@@ -871,6 +902,11 @@
qshort = qtot*(1.0-0.62*cloud + 0.0019*sunbet)*(1.-albedo)
!DD Calculates the attenuation due to the presence of ice
! iceatt is a constant attenuation coefficient (default = 0.90)
qshort = qshort*(1.-iceatt*ice/100.)
if (present(swr)) then
swr = qshort
else
......@@ -956,7 +992,7 @@
call exchange_coefficients()
if (first) then
call do_calc_fluxes(heatf=h1,taux=tx1,tauy=ty1)
call short_wave_radiation(jul,secs,alon,alat,swr=I1)
call short_wave_radiation(jul,secs,alon,alat,ice,swr=I1)
I2 = I1
h2 = h1
tx2 = tx1
......@@ -968,7 +1004,7 @@
tx1 = tx2
ty1 = ty2
call do_calc_fluxes(heatf=h2,taux=tx2,tauy=ty2)
call short_wave_radiation(jul,secs,alon,alat,swr=I2)
call short_wave_radiation(jul,secs,alon,alat,ice,swr=I2)
end if
dt = time_diff(meteo_jul2,meteo_secs2,meteo_jul1,meteo_secs1)
alpha(1) = (I2-I1)/dt
......@@ -1330,6 +1366,77 @@
end subroutine read_sss
!EOC
!-----------------------------------------------------------------------
!BOP
!
! !IROUTINE: Read sea ice, interpolate in time
!
! !INTERFACE:
subroutine read_ice(jul,secs,ice)
!
! !DESCRIPTION:
! For {\tt calc\_fluxes=.false.}, this routine reads sea ice
! concentration from {\tt ice\_file}
! and interpolates in time.
!
! !USES:
IMPLICIT NONE
!
! !INPUT PARAMETERS:
integer, intent(in) :: jul,secs
!
! !OUTPUT PARAMETERS:
REALTYPE,intent(out) :: ice
!
! !REVISION HISTORY:
! Original author(s): Karsten Bolding
!
! See log for airsea module
!
!EOP
!
! !LOCAL VARIABLES:
integer :: yy,mm,dd,hh,min,ss
REALTYPE :: t,alpha
REALTYPE, save :: dt
integer, save :: ice_jul1,ice_secs1
integer, save :: ice_jul2=0,ice_secs2=0
REALTYPE, save :: obs1(1),obs2(1)=0.
integer :: rc
!
!-----------------------------------------------------------------------
!BOC
if (init_saved_vars) then
ice_jul2=0
ice_secs2=0
obs2(1)=0.
end if
! This part initialise and read in new values if necessary.
if(time_diff(ice_jul2,ice_secs2,jul,secs) .lt. 0) then
do
ice_jul1 = ice_jul2
ice_secs1 = ice_secs2
obs1 = obs2
call read_obs(ice_unit,yy,mm,dd,hh,min,ss,1,obs2,rc)
call julian_day(yy,mm,dd,ice_jul2)
ice_secs2 = hh*3600 + min*60 + ss
if(time_diff(ice_jul2,ice_secs2,jul,secs) .gt. 0) EXIT
end do
dt = time_diff(ice_jul2,ice_secs2,ice_jul1,ice_secs1)
end if
! Do the time interpolation
t = time_diff(jul,secs,ice_jul1,ice_secs1)
alpha = (obs2(1)-obs1(1))/dt
ice = obs1(1) + t*alpha
return
end subroutine read_ice
!EOC
!-----------------------------------------------------------------------
!BOP
!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment