6 SUBROUTINE sfx_oasis_send(KLUOUT,KI,KDATE,OSEND_LAND,OSEND_LAKE,OSEND_SEA, &
7 pland_runoff,pland_drain,pland_calving,pland_recharge,&
9 plake_evap,plake_rain,plake_snow,plake_watf, &
10 psea_fwsu,psea_fwsv,psea_heat,psea_snet,psea_wind, &
11 psea_fwsm,psea_evap,psea_rain,psea_snow,psea_watf, &
12 pseaice_heat,pseaice_snet,pseaice_evap )
59 USE yomhook
,ONLY : lhook, dr_hook
60 USE parkind1
,ONLY : jprb
71 INTEGER,
INTENT(IN) :: kluout
72 INTEGER,
INTENT(IN) :: ki
73 INTEGER,
INTENT(IN) :: kdate
74 LOGICAL,
INTENT(IN) :: osend_land
75 LOGICAL,
INTENT(IN) :: osend_lake
76 LOGICAL,
INTENT(IN) :: osend_sea
78 REAL,
DIMENSION(KI),
INTENT(IN) :: pland_runoff
79 REAL,
DIMENSION(KI),
INTENT(IN) :: pland_drain
80 REAL,
DIMENSION(KI),
INTENT(IN) :: pland_calving
81 REAL,
DIMENSION(KI),
INTENT(IN) :: pland_recharge
82 REAL,
DIMENSION(KI),
INTENT(IN) :: pland_srcflood
84 REAL,
DIMENSION(KI),
INTENT(IN) :: plake_evap
85 REAL,
DIMENSION(KI),
INTENT(IN) :: plake_rain
86 REAL,
DIMENSION(KI),
INTENT(IN) :: plake_snow
87 REAL,
DIMENSION(KI),
INTENT(IN) :: plake_watf
89 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_fwsu
90 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_fwsv
91 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_heat
92 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_snet
93 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_wind
94 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_fwsm
95 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_evap
96 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_rain
97 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_snow
98 REAL,
DIMENSION(KI),
INTENT(IN) :: psea_watf
100 REAL,
DIMENSION(KI),
INTENT(IN) :: pseaice_heat
101 REAL,
DIMENSION(KI),
INTENT(IN) :: pseaice_snet
102 REAL,
DIMENSION(KI),
INTENT(IN) :: pseaice_evap
107 REAL,
DIMENSION(KI,1) :: zwrite
109 CHARACTER(LEN=50) :: ycomment
112 REAL(KIND=JPRB) :: zhook_handle
118 IF (lhook) CALL dr_hook(
'SFX_OASIS_SEND',0,zhook_handle)
134 ycomment=
'Surface runoff over land'
135 CALL
outvar(pland_runoff,xtstep_cpl_land,zwrite(:,1))
136 CALL oasis_put(nrunoff_id,kdate,zwrite(:,:),ierr)
139 ycomment=
'Deep drainage over land'
140 CALL
outvar(pland_drain,xtstep_cpl_land,zwrite(:,1))
141 CALL oasis_put(ndrain_id,kdate,zwrite(:,:),ierr)
145 ycomment=
'calving flux over land'
146 CALL
outvar(pland_calving,xtstep_cpl_land,zwrite(:,1))
147 CALL oasis_put(ncalving_id,kdate,zwrite(:,:),ierr)
152 ycomment=
'groundwater recharge over land'
153 CALL
outvar(pland_recharge,xtstep_cpl_land,zwrite(:,1))
154 CALL oasis_put(nrecharge_id,kdate,zwrite(:,:),ierr)
159 ycomment=
'flood freshwater flux over land (P-E-I)'
160 CALL
outvar(pland_srcflood,xtstep_cpl_land,zwrite(:,1))
161 CALL oasis_put(nsrcflood_id,kdate,zwrite(:,:),ierr)
175 IF(nlake_evap_id/=nundef)
THEN
176 ycomment=
'Evaporation over lake'
177 CALL
outvar(plake_evap,xtstep_cpl_lake,zwrite(:,1))
178 CALL oasis_put(nlake_evap_id,kdate,zwrite(:,:),ierr)
182 IF(nlake_rain_id/=nundef)
THEN
183 ycomment=
'Rainfall rate over lake'
184 CALL
outvar(plake_rain,xtstep_cpl_lake,zwrite(:,1))
185 CALL oasis_put(nlake_rain_id,kdate,zwrite(:,:),ierr)
189 IF(nlake_snow_id/=nundef)
THEN
190 ycomment=
'Snowfall rate over lake'
191 CALL
outvar(plake_snow,xtstep_cpl_lake,zwrite(:,1))
192 CALL oasis_put(nlake_snow_id,kdate,zwrite(:,:),ierr)
196 IF(nlake_watf_id/=nundef)
THEN
197 ycomment=
'Freshwater flux over lake (P-E)'
198 CALL
outvar(plake_watf,xtstep_cpl_lake,zwrite(:,1))
199 CALL oasis_put(nlake_watf_id,kdate,zwrite(:,:),ierr)
215 IF(nsea_fwsu_id/=nundef)
THEN
216 ycomment=
'zonal wind stress over sea'
217 CALL
outvar(psea_fwsu,xtstep_cpl_sea,zwrite(:,1))
218 CALL oasis_put(nsea_fwsu_id,kdate,zwrite(:,:),ierr)
222 IF(nsea_fwsv_id/=nundef)
THEN
223 ycomment=
'meridian wind stress over sea'
224 CALL
outvar(psea_fwsv,xtstep_cpl_sea,zwrite(:,1))
225 CALL oasis_put(nsea_fwsv_id,kdate,zwrite(:,:),ierr)
229 IF(nsea_heat_id/=nundef)
THEN
230 ycomment=
'Non solar net heat flux over sea'
231 CALL
outvar(psea_heat,xtstep_cpl_sea,zwrite(:,1))
232 CALL oasis_put(nsea_heat_id,kdate,zwrite(:,:),ierr)
236 IF(nsea_snet_id/=nundef)
THEN
237 ycomment=
'Solar net heat flux over sea'
238 CALL
outvar(psea_snet,xtstep_cpl_sea,zwrite(:,1))
239 CALL oasis_put(nsea_snet_id,kdate,zwrite(:,:),ierr)
243 IF(nsea_wind_id/=nundef)
THEN
244 ycomment=
'10m wind speed over sea'
245 CALL
outvar(psea_wind,xtstep_cpl_sea,zwrite(:,1))
246 CALL oasis_put(nsea_wind_id,kdate,zwrite(:,:),ierr)
250 IF(nsea_fwsm_id/=nundef)
THEN
251 ycomment=
'wind stress over sea'
252 CALL
outvar(psea_fwsm,xtstep_cpl_sea,zwrite(:,1))
253 CALL oasis_put(nsea_fwsm_id,kdate,zwrite(:,:),ierr)
257 IF(nsea_evap_id/=nundef)
THEN
258 ycomment=
'Evaporation over sea'
259 CALL
outvar(psea_evap,xtstep_cpl_sea,zwrite(:,1))
260 CALL oasis_put(nsea_evap_id,kdate,zwrite(:,:),ierr)
264 IF(nsea_rain_id/=nundef)
THEN
265 ycomment=
'Rainfall rate over sea'
266 CALL
outvar(psea_rain,xtstep_cpl_sea,zwrite(:,1))
267 CALL oasis_put(nsea_rain_id,kdate,zwrite(:,:),ierr)
271 IF(nsea_snow_id/=nundef)
THEN
272 ycomment=
'Snowfall rate over sea'
273 CALL
outvar(psea_snow,xtstep_cpl_sea,zwrite(:,1))
274 CALL oasis_put(nsea_snow_id,kdate,zwrite(:,:),ierr)
278 IF(nsea_watf_id/=nundef)
THEN
279 ycomment=
'Freshwater flux over sea (P-E)'
280 CALL
outvar(psea_watf,xtstep_cpl_sea,zwrite(:,1))
281 CALL oasis_put(nsea_watf_id,kdate,zwrite(:,:),ierr)
289 IF(nseaice_heat_id/=nundef)
THEN
290 ycomment=
'Sea-ice non solar net heat flux over sea-ice'
291 CALL
outvar(pseaice_heat,xtstep_cpl_sea,zwrite(:,1))
292 CALL oasis_put(nseaice_heat_id,kdate,zwrite(:,:),ierr)
296 IF(nseaice_snet_id/=nundef)
THEN
297 ycomment=
'Sea-ice solar net heat flux over sea-ice'
298 CALL
outvar(pseaice_snet,xtstep_cpl_sea,zwrite(:,1))
299 CALL oasis_put(nseaice_snet_id,kdate,zwrite(:,:),ierr)
303 IF(nseaice_evap_id/=nundef)
THEN
304 ycomment=
'Sea-ice sublimation over sea-ice'
305 CALL
outvar(pseaice_evap,xtstep_cpl_sea,zwrite(:,1))
306 CALL oasis_put(nseaice_evap_id,kdate,zwrite(:,:),ierr)
314 IF (lhook) CALL dr_hook(
'SFX_OASIS_SEND',1,zhook_handle)
326 INTEGER,
INTENT(IN) :: kluout
327 INTEGER,
INTENT(IN) :: kerr
328 CHARACTER(LEN=*),
INTENT(IN) :: hcomment
330 REAL,
DIMENSION(:),
INTENT(OUT):: pwrite
332 REAL(KIND=JPRB) :: zhook_handle
334 IF (lhook) CALL dr_hook(
'SFX_OASIS_SEND:CHECK_SFX_SEND',0,zhook_handle)
338 IF (kerr/=oasis_ok.AND.kerr<oasis_sent)
THEN
339 WRITE(kluout,
'(A,I4)')
'Return OASIS code from sending '//trim(hcomment)//
' : ',kerr
340 CALL
abor1_sfx(
'SFX_OASIS_SEND: problem sending '//trim(hcomment))
343 IF (lhook) CALL dr_hook(
'SFX_OASIS_SEND:CHECK_SFX_SEND',1,zhook_handle)
353 REAL,
DIMENSION(:),
INTENT(IN) :: pin
354 REAL,
INTENT(IN) :: pdiv
356 REAL,
DIMENSION(:),
INTENT(OUT):: pwrite
358 REAL(KIND=JPRB) :: zhook_handle
360 IF (lhook) CALL dr_hook(
'SFX_OASIS_SEND:OUTVAR',0,zhook_handle)
362 WHERE(pin(:)/=xundef)
363 pwrite(:)=pin(:)/pdiv
368 IF (lhook) CALL dr_hook(
'SFX_OASIS_SEND:OUTVAR',1,zhook_handle)
subroutine abor1_sfx(YTEXT)
subroutine check_sfx_send(KLUOUT, KERR, HCOMMENT, PWRITE)
subroutine outvar(PIN, PDIV, PWRITE)
subroutine sfx_oasis_send(KLUOUT, KI, KDATE, OSEND_LAND, OSEND_LAKE, OSEND_SEA, PLAND_RUNOFF, PLAND_DRAIN, PLAND_CALVING, PLAND_RECHARGE, PLAND_SRCFLOOD, PLAKE_EVAP, PLAKE_RAIN, PLAKE_SNOW, PLAKE_WATF, PSEA_FWSU, PSEA_FWSV, PSEA_HEAT, PSEA_SNET, PSEA_WIND, PSEA_FWSM, PSEA_EVAP, PSEA_RAIN, PSEA_SNOW, PSEA_WATF, PSEAICE_HEAT, PSEAICE_SNET, PSEAICE_EVAP)