7 kluout,ocpl_seaice,owater,psea_sst,psea_ucu, &
8 psea_vcu,pseaice_sit,pseaice_cvr,pseaice_alb )
54 USE yomhook
,ONLY : lhook, dr_hook
55 USE parkind1
,ONLY : jprb
67 INTEGER,
INTENT(IN) :: kluout
68 LOGICAL,
INTENT(IN) :: ocpl_seaice
69 LOGICAL,
INTENT(IN) :: owater
71 REAL,
DIMENSION(:),
INTENT(IN) :: psea_sst
72 REAL,
DIMENSION(:),
INTENT(IN) :: psea_ucu
73 REAL,
DIMENSION(:),
INTENT(IN) :: psea_vcu
74 REAL,
DIMENSION(:),
INTENT(IN) :: pseaice_sit
75 REAL,
DIMENSION(:),
INTENT(IN) :: pseaice_cvr
76 REAL,
DIMENSION(:),
INTENT(IN) :: pseaice_alb
82 CHARACTER(LEN=50) :: ycomment
84 REAL(KIND=JPRB) :: zhook_handle
88 IF (lhook) CALL dr_hook(
'PUT_SFX_SEA',0,zhook_handle)
106 IF(owater.AND.u%NSIZE_WATER>0)
THEN
112 IF (lhook) CALL dr_hook(
'PUT_SFX_SEA',1,zhook_handle)
124 INTEGER,
INTENT(IN) :: klu
126 REAL,
DIMENSION(KLU) :: zsst
127 REAL,
DIMENSION(KLU) :: zice_frac
130 CHARACTER(LEN=50) :: ycomment
132 REAL(KIND=JPRB) :: zhook_handle
134 IF (lhook) CALL dr_hook(
'PUT_SFX_SEA:TREAT_SEA',0,zhook_handle)
136 ycomment=
'Sea surface temperature'
138 WHERE (zsst(:)/=0.0) s%XSST(:)=zsst(:)
141 ztmin=minval(s%XSST(:))
142 ztmax=maxval(s%XSST(:))
144 IF(ztmin<=0.0.OR.ztmax>500.)
THEN
145 WRITE(kluout,*)
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
146 WRITE(kluout,*)
'SST from ocean model not define or not physic'
147 WRITE(kluout,*)
'SST MIN =',ztmin,
'SST MAX =',ztmax
148 WRITE(kluout,*)
'There is certainly a problem between '
149 WRITE(kluout,*)
'SURFEX and OASIS sea/land mask '
150 WRITE(kluout,*)
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
151 CALL
abor1_sfx(
'PUT_SFX_SEA: SST from ocean model not define or not physic')
154 ycomment=
'Sea u-current stress'
158 ycomment=
'Sea v-current stress'
164 ycomment=
'Sea-ice Temperature'
168 ycomment=
'Sea-ice cover'
172 WHERE(zice_frac(:)>=xicec)
173 s%XSST(:) = min(s%XSST(:),xtts-0.01)
175 s%XSST(:) = max(s%XSST(:),xtts)
178 ycomment=
'Sea-ice albedo'
184 WHERE(s%XSST(:) < xtts)
185 s%XDIR_ALB(:)=s%XICE_ALB(:)
186 s%XSCA_ALB(:)=s%XICE_ALB(:)
191 IF (lhook) CALL dr_hook(
'PUT_SFX_SEA:TREAT_SEA',1,zhook_handle)
202 INTEGER,
INTENT(IN) :: klu
204 REAL,
DIMENSION(KLU) :: zice_frac
207 CHARACTER(LEN=50) :: ycomment
209 REAL(KIND=JPRB) :: zhook_handle
211 IF (lhook) CALL dr_hook(
'PUT_SFX_SEA:TREAT_WATER',0,zhook_handle)
213 ycomment=
'Water surface temperature'
217 ztmin=minval(w%XTS(:))
218 ztmax=maxval(w%XTS(:))
220 IF(ztmin<=0.0.OR.ztmax>500.)
THEN
221 WRITE(kluout,*)
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
222 WRITE(kluout,*)
'TS_WATER from ocean model not define or not physic'
223 WRITE(kluout,*)
'TS_WATER MIN =',ztmin,
'TS_WATER MAX =',ztmax
224 WRITE(kluout,*)
'There is certainly a problem between '
225 WRITE(kluout,*)
'SURFEX and OASIS sea/land mask '
226 WRITE(kluout,*)
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
227 CALL
abor1_sfx(
'PUT_SFX_SEA: SST from ocean model not define or not physic')
230 ycomment=
'Water-ice Temperature'
234 ycomment=
'Water-ice cover'
238 WHERE(zice_frac(:)>=xicec)
239 w%XTS(:) = min(w%XTS(:),xtt-0.01)
241 w%XTS(:) = max(w%XTS(:),xtt)
244 ycomment=
'Water-ice albedo'
250 WHERE(w%XTS(:) < xtt)
251 w%XDIR_ALB(:)=w%XICE_ALB(:)
252 w%XSCA_ALB(:)=w%XICE_ALB(:)
255 IF (lhook) CALL dr_hook(
'PUT_SFX_SEA:TREAT_WATER',1,zhook_handle)
265 CHARACTER(LEN=*),
INTENT(IN) :: hcomment
266 REAL,
DIMENSION(:),
INTENT(IN) :: pfield
268 REAL(KIND=JPRB) :: zhook_handle
270 IF (lhook) CALL dr_hook(
'PUT_SFX_SEA:CHECK_SEA',0,zhook_handle)
272 IF(any(pfield(:)>=xundef))
THEN
273 WRITE(kluout,*)
'PUT_SFX_SEA: problem after get '//trim(hcomment)//
' from OASIS'
274 WRITE(kluout,*)
'PUT_SFX_SEA: some points not defined = ',count(pfield(:)>=xundef)
275 CALL
abor1_sfx(
'PUT_SFX_SEA: problem after get '//trim(hcomment)//
' from OASIS')
278 IF (lhook) CALL dr_hook(
'PUT_SFX_SEA:CHECK_SEA',1,zhook_handle)
subroutine treat_water(KLU)
subroutine treat_sea(KLU)
subroutine put_sfx_sea(S, U, W, KLUOUT, OCPL_SEAICE, OWATER, PSEA_SST, PSEA_UCU, PSEA_VCU, PSEAICE_SIT, PSEAICE_CVR, PSEAICE_ALB)
subroutine abor1_sfx(YTEXT)
subroutine check_sea(HCOMMENT, PFIELD)