SURFEX v8.1
General documentation of Surfex
pgd_orography.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE pgd_orography (DTCO, UG, U, USS, HPROGRAM, HFILE, HFILETYPE, OZS)
7 ! ##############################################################
8 !
9 !!**** *PGD_OROGRAPHY* monitor for averaging and interpolations of cover fractions
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !! METHOD
15 !! ------
16 !!
17 !
18 !! EXTERNAL
19 !! --------
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !! AUTHOR
28 !! ------
29 !!
30 !! V. Masson Meteo-France
31 !!
32 !! MODIFICATION
33 !! ------------
34 !!
35 !! Original 10/12/97
36 !! 12/2008 E. Martin : add case 'MAX' for choice of orography
37 !! 11/2012 M. Lafaysse : read ZS from a NETCDF file at the same resolution
38 !! 07/2013 M. Lafaysse : explicit slope from resolved orography
39 !!
40 !----------------------------------------------------------------------------
41 !
42 !* 0. DECLARATION
43 ! -----------
44 !
47 USE modd_surf_atm_n, ONLY : surf_atm_t
48 USE modd_sso_n, ONLY : sso_t
49 !
50 !
51 USE modd_surfex_mpi, ONLY : nrank, npio
52 !
53 USE modd_pgd_grid, ONLY : nl, cgrid, xgrid_par
54 USE modd_pgdwork, ONLY : xall, nsize_all, xssqo, lssqo, nsso, &
56 USE modd_surf_par, ONLY : xundef, nundef
57 !
58 USE modi_get_luout
59 USE modi_open_aux_io_surf
60 USE modi_close_aux_io_surf
61 USE modi_read_nam_pgd_orography
63 USE modi_treat_field
64 USE modi_read_pgd_netcdf
65 USE modi_interpol_field
66 USE modi_sso
67 USE modi_subscale_aos
68 USE modi_get_size_full_n
70 !
71 USE modi_read_sso_n
72 USE modi_init_io_surf_n
73 USE modi_end_io_surf_n
74 #ifdef SFX_ASC
75 USE modd_io_surf_asc, ONLY : cfilein
76 #endif
77 #ifdef SFX_FA
78 USE modd_io_surf_fa, ONLY : cfilein_fa
79 #endif
80 #ifdef SFX_LFI
81 USE modd_io_surf_lfi, ONLY : cfilein_lfi
82 #endif
83 !
84 USE modi_explicit_slope
85 
86 USE yomhook ,ONLY : lhook, dr_hook
87 USE parkind1 ,ONLY : jprb
88 !
89 
90 USE modi_abor1_sfx
91 !
92 IMPLICIT NONE
93 !
94 !* 0.1 Declaration of arguments
95 ! ------------------------
96 !
97 !
98 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
99 TYPE(surf_atm_grid_t), INTENT(INOUT) :: UG
100 TYPE(surf_atm_t), INTENT(INOUT) :: U
101 TYPE(sso_t), INTENT(INOUT) :: USS
102 !
103  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling
104  CHARACTER(LEN=28), INTENT(IN) :: HFILE ! atmospheric file name
105  CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE! atmospheric file type
106 LOGICAL, INTENT(IN) :: OZS ! .true. if orography is imposed by atm. model
107 !
108 !
109 !* 0.2 Declaration of local variables
110 ! ------------------------------
111 !
112 INTEGER :: ILUOUT ! output listing logical unit
113 !
114 
115 REAL,DIMENSION(:),POINTER :: ZSLOPE ! degrees
116 INTEGER::JJ
117 REAL,PARAMETER :: PP_DEG2RAD= 3.141592654/180.
118 LOGICAL:: LPRESENT
119 
120 LOGICAL, DIMENSION(NL) :: GSSO ! mask where SSO are computed
121 LOGICAL, DIMENSION(NL) :: GSSO_ANIS ! mask where SSO anisotropy is computed
122 LOGICAL, DIMENSION(NL) :: GZ0EFFI ! mask where z0 is computed in subgrid direction x
123 LOGICAL, DIMENSION(NL) :: GZ0EFFJ ! mask where z0 is computed in subgrid direction y
124 INTEGER, DIMENSION(NL) :: IFLAG ! flag for SSO and z0 fields interpolations
125 INTEGER :: IRESP ! error code
126 REAL :: ZEPS = 1.e-4! a small number
127 INTEGER :: IDIM_FULL ! total size of orographic array in atmospheric file
128 INTEGER :: IZS ! size of orographic array in atmospheric file
129 !
130 !* 0.3 Declaration of namelists
131 ! ------------------------
132 !
133  CHARACTER(LEN=28) :: YZS ! file name for orography
134  CHARACTER(LEN=6) :: YFILETYPE ! data file type
135  CHARACTER(LEN=28) :: YSLOPE ! file name for orography
136  CHARACTER(LEN=6) :: YSLOPEFILETYPE ! data file type
137 REAL :: XUNIF_ZS ! uniform orography
138  CHARACTER(LEN=3) :: COROGTYPE ! orogpraphy type
139 ! ! 'AVG' : average orography
140 ! ! 'SIL' : silhouette orography
141 ! ! 'ENV' : enveloppe orography
142 REAL :: XENV ! parameter for enveloppe orography:
143 ! ! zs = avg_zs + XENV * SSO_STEDV
144 LOGICAL :: LIMP_ZS ! Imposed orography from another PGD file
145 LOGICAL :: LEXPLICIT_SLOPE ! Slope is computed from explicit ZS field and not subgrid orography
146 
147 REAL(KIND=JPRB) :: ZHOOK_HANDLE
148 !
149 !-------------------------------------------------------------------------------
150 !
151 !* 1. Initializations
152 ! ---------------
153 !
154 IF (lhook) CALL dr_hook('PGD_OROGRAPHY',0,zhook_handle)
155  CALL get_luout(hprogram,iluout)
156 !
157 !-------------------------------------------------------------------------------
158 !
159 !* 2. Reading of namelist
160 ! -------------------
161 !
162  CALL read_nam_pgd_orography(hprogram, yzs, yfiletype, xunif_zs, &
163  corogtype, xenv, limp_zs, &
164  yslope, yslopefiletype, lexplicit_slope)
165 !
166  CALL test_nam_var_surf(iluout,'YSLOPEFILETYPE',yslopefiletype,' ','NETCDF')
167 !
168 !-------------------------------------------------------------------------------
169 !
170 !* 3. Allocations of orographic arrays
171 ! --------------------------------
172 !
173 ALLOCATE(u%XZS (nl))
174 !
175 ALLOCATE(uss%XAVG_ZS (nl))
176 ALLOCATE(uss%XSIL_ZS (nl))
177 ALLOCATE(uss%XSSO_STDEV (nl))
178 ALLOCATE(uss%XMIN_ZS (nl))
179 ALLOCATE(uss%XMAX_ZS (nl))
180 !
181 ALLOCATE(uss%XSSO_ANIS (nl))
182 ALLOCATE(uss%XSSO_DIR (nl))
183 ALLOCATE(uss%XSSO_SLOPE (nl))
184 !
185 ALLOCATE(uss%XAOSIP (nl))
186 ALLOCATE(uss%XAOSIM (nl))
187 ALLOCATE(uss%XAOSJP (nl))
188 ALLOCATE(uss%XAOSJM (nl))
189 ALLOCATE(uss%XHO2IP (nl))
190 ALLOCATE(uss%XHO2IM (nl))
191 ALLOCATE(uss%XHO2JP (nl))
192 ALLOCATE(uss%XHO2JM (nl))
193 !
194 u%XZS (:) = xundef
195 uss%XAVG_ZS (:) = xundef
196 uss%XSIL_ZS (:) = xundef
197 uss%XSSO_STDEV(:) = xundef
198 uss%XMIN_ZS (:) = 99999.
199 uss%XMAX_ZS (:) =-99999.
200 !
201 uss%XSSO_ANIS (:) = xundef
202 uss%XSSO_DIR (:) = xundef
203 uss%XSSO_SLOPE(:) = xundef
204 !
205 uss%XAOSIP (:) = xundef
206 uss%XAOSIM (:) = xundef
207 uss%XAOSJP (:) = xundef
208 uss%XAOSJM (:) = xundef
209 uss%XHO2IP (:) = xundef
210 uss%XHO2IM (:) = xundef
211 uss%XHO2JP (:) = xundef
212 uss%XHO2JM (:) = xundef
213 !-------------------------------------------------------------------------------
214 !
215 !* 4. Allocations of work arrays
216 ! --------------------------
217 !
218 !-------------------------------------------------------------------------------
219 !
220 !* 5. Uniform field is prescribed
221 ! ---------------------------
222 !
223 IF (ozs) THEN
224 !
225 !* 5.1 Use of imposed field
226 ! --------------------
227 !
228  CALL open_aux_io_surf(hfile,hfiletype,'FULL ')
229  CALL read_surf(hfiletype,'DIM_FULL ',idim_full,iresp)
230  CALL get_size_full_n(hprogram,idim_full,u%NSIZE_FULL,izs)
231  IF (izs /= nl) THEN
232  WRITE(iluout,*) ' '
233  WRITE(iluout,*) '***********************************************************'
234  WRITE(iluout,*) '* Error in orography preparation *'
235  WRITE(iluout,*) '* Prescribed orography from atmospheric model does not *'
236  WRITE(iluout,*) '* have the correct number of points *'
237  WRITE(iluout,*) '* number of points in atmospheric orography: ', izs
238  WRITE(iluout,*) '* number of points in the surface : ', nl
239  WRITE(iluout,*) '***********************************************************'
240  WRITE(iluout,*) ' '
241  CALL abor1_sfx('PGD_OROGRAPHY: ATMOSPHERIC PRESCRIBED OROGRAPHY DOES NOT HAVE THE CORRECT NB OF POINTS')
242  END IF
243  CALL read_surf(hfiletype,'ZS',u%XZS(:),iresp)
244  CALL close_aux_io_surf(hfile,hfiletype)
245  !
246  uss%XAVG_ZS(:) = u%XZS(:)
247  uss%XSIL_ZS(:) = u%XZS(:)
248  uss%XMIN_ZS(:) = u%XZS(:)
249  uss%XMAX_ZS(:) = u%XZS(:)
250  uss%XSSO_STDEV(:) = 0.
251  uss%XHO2IP(:) = 0.
252  uss%XHO2IM(:) = 0.
253  uss%XHO2JP(:) = 0.
254  uss%XHO2JM(:) = 0.
255  uss%XAOSIP(:) = 0.
256  uss%XAOSIM(:) = 0.
257  uss%XAOSJP(:) = 0.
258  uss%XAOSJM(:) = 0.
259  uss%XSSO_ANIS(:) = 0.
260  uss%XSSO_DIR(:) = 0.
261  uss%XSSO_SLOPE(:) = 0.
262 
263  IF (lhook) CALL dr_hook('PGD_OROGRAPHY',1,zhook_handle)
264  RETURN
265 
266 !
267 ELSE IF (xunif_zs/=xundef) THEN
268 !
269 !* 5.2 Use of the presribed cover fractions
270 ! ------------------------------------
271 !
272  u%XZS(:) = xunif_zs
273  uss%XAVG_ZS(:) = u%XZS(:)
274  uss%XSIL_ZS(:) = u%XZS(:)
275  uss%XMIN_ZS(:) = u%XZS(:)
276  uss%XMAX_ZS(:) = u%XZS(:)
277  uss%XSSO_STDEV(:) = 0.
278  uss%XHO2IP(:) = 0.
279  uss%XHO2IM(:) = 0.
280  uss%XHO2JP(:) = 0.
281  uss%XHO2JM(:) = 0.
282  uss%XAOSIP(:) = 0.
283  uss%XAOSIM(:) = 0.
284  uss%XAOSJP(:) = 0.
285  uss%XAOSJM(:) = 0.
286  uss%XSSO_ANIS(:) = 0.
287  uss%XSSO_DIR(:) = 0.
288  uss%XSSO_SLOPE(:) = 0.
289 
290  IF (lhook) CALL dr_hook('PGD_OROGRAPHY',1,zhook_handle)
291  RETURN
292 !
293 !* 5.3 No data
294 ! -------
295 !
296 ELSEIF (len_trim(yzs)==0) THEN
297 
298  WRITE(iluout,*) ' '
299  WRITE(iluout,*) '***********************************************************'
300  WRITE(iluout,*) '* Error in orography preparation *'
301  WRITE(iluout,*) '* There is no prescribed orography and no input file *'
302  WRITE(iluout,*) '***********************************************************'
303  WRITE(iluout,*) ' '
304  CALL abor1_sfx('PGD_OROGRAPHY: NO PRESCRIBED OROGRAPHY NOR INPUT FILE')
305 !
306 ELSEIF (limp_zs) THEN !LIMP_ZS (impose topo from input file at the same resolution)
307 !
308  IF(yfiletype=='NETCDF')THEN
309 
310 ! CALL ABOR1_SFX('Use another format than netcdf for topo input file with LIMP_ZS')
311  CALL read_pgd_netcdf(ug, u, uss, &
312  hprogram,'SURF ',' ',yzs,'ZS ',u%XZS)
313 
314  uss%XSIL_ZS(:) = u%XZS(:)
315  uss%XAVG_ZS(:) = u%XZS(:)
316  uss%XMIN_ZS(:) = u%XZS(:)
317  uss%XMAX_ZS(:) = u%XZS(:)
318  uss%XSSO_STDEV(:) = 0.
319  uss%XHO2IP(:) = 0.
320  uss%XHO2IM(:) = 0.
321  uss%XHO2JP(:) = 0.
322  uss%XHO2JM(:) = 0.
323  uss%XAOSIP(:) = 0.
324  uss%XAOSIM(:) = 0.
325  uss%XAOSJP(:) = 0.
326  uss%XAOSJM(:) = 0.
327  uss%XSSO_ANIS(:) = 0.
328  uss%XSSO_DIR(:) = 0.
329 
330 
331  ! read slope in file
332  IF (len_trim(yslope)/=0) THEN
333  ALLOCATE(zslope(nl))
334 
335  ! Read field on the same grid as FORCING
336  CALL read_pgd_netcdf(ug, u, uss, &
337  hprogram,'SURF ',' ',yslope,'slope ',zslope)
338 
339  DO jj=1,nl
340  uss%XSSO_SLOPE(jj)=tan(zslope(jj)*pp_deg2rad)
341  END DO
342  DEALLOCATE(zslope)
343  ELSE
344  uss%XSSO_SLOPE=0.
345  ENDIF
346 
347  ELSE
348 #ifdef SFX_ASC
349  cfilein = adjustl(adjustr(yzs)//'.txt')
350 #endif
351 #ifdef SFX_FA
352  cfilein_fa = adjustl(adjustr(yzs)//'.fa')
353 #endif
354 #ifdef SFX_LFI
355  cfilein_lfi = adjustl(yzs)
356 #endif
357  CALL init_io_surf_n(dtco, u, yfiletype,'FULL ','SURF ','READ ')
358  ENDIF
359 !
360  CALL read_surf(yfiletype,'ZS',u%XZS(:),iresp)
361  CALL read_sso_n(u%NSIZE_FULL, u%XSEA, uss, yfiletype)
362 !
363  CALL end_io_surf_n(yfiletype)
364 !
365  IF (lhook) CALL dr_hook('PGD_OROGRAPHY',1,zhook_handle)
366  RETURN
367 !
368 
369 ELSE
370  !
371  ALLOCATE(nsize_all(u%NDIM_FULL,1))
372  ALLOCATE(xext_all(u%NDIM_FULL,2))
373  ALLOCATE(xall(u%NDIM_FULL,2,1))
374  nsize_all(:,1) = 0.
375  xext_all(:,1) = -99999.
376  xext_all(:,2) = 99999.
377  xall(:,:,1) = 0.
378  !
379  !-------------------------------------------------------------------------------
380 !
381 !* 6. Averages the field
382 ! ------------------
383 !
384  CALL treat_field(ug, u, uss, &
385  hprogram,'SURF ',yfiletype,'A_OROG',yzs, 'ZS ' )
386 !
387 
388  DEALLOCATE(xsumval )
389  !
390 ENDIF
391 !
392 IF (.NOT.ALLOCATED(nsize)) THEN
393  ALLOCATE(nsize(nl,1))
394  nsize(:,1) = 0
395 ENDIF
396 !
397 !-------------------------------------------------------------------------------
398 !
399 !* 7. Coherence with land sea mask
400 ! ----------------------------
401 !
402 WHERE (u%XSEA(:)==1. .AND. nsize(:,1)==0) nsize(:,1) = -1
403 !
404 !-------------------------------------------------------------------------------
405 !
406 !* 8. Interpolation if some points are not initialized (no data for these points)
407 ! ------------------------------------------------
408 !
409 ! note that if no orography data exists near points that need to be defined,
410 ! these points are probably small isolated islands, and a default value of 1m is assumed.
411 !
412  CALL interpol_field(ug, u, &
413  hprogram,iluout,nsize(:,1),uss%XAVG_ZS, 'average orography',pdef=1.)
414  CALL interpol_field(ug, u, &
415  hprogram,iluout,nsize(:,1),uss%XSIL_ZS, 'silhouette orography',pdef=1.)
416  CALL interpol_field(ug, u, &
417  hprogram,iluout,nsize(:,1),uss%XMIN_ZS, 'minimum orography',pdef=1.)
418  CALL interpol_field(ug, u, &
419  hprogram,iluout,nsize(:,1),uss%XMAX_ZS, 'maximum orography',pdef=1.)
420 !
421 iflag(:) = nsize(:,1)
422 WHERE (nsize(:,1)==1) iflag(:) = 0 ! only 1 data point was not enough for standard deviation
423  CALL interpol_field(ug, u, &
424  hprogram,iluout,iflag,uss%XSSO_STDEV,'standard deviation of orography',pdef=0.)
425 !
426 !-------------------------------------------------------------------------------
427 !
428 !* 9. Coherence with land sea mask
429 ! ----------------------------
430 !
431 uss%XAVG_ZS (:) = uss%XAVG_ZS (:) * (1. - u%XSEA(:))
432 uss%XSIL_ZS (:) = uss%XSIL_ZS (:) * (1. - u%XSEA(:))
433 !
434 WHERE (u%XSEA(:)==1.)
435  uss%XSSO_STDEV(:) = xundef
436 END WHERE
437 !
438 WHERE (u%XWATER(:)==1.)
439  uss%XSSO_STDEV(:) = 0.
440 END WHERE
441 !
442 WHERE(u%XSEA(:)>0.)
443  uss%XMIN_ZS(:) = 0.
444 END WHERE
445 !
446 WHERE(u%XSEA(:)==1.)
447  uss%XMAX_ZS(:) = 0.
448 END WHERE
449 !
450 !* slightly modifies the orography values when there are by coincidence equal to
451 ! default value.
452 !
453 WHERE (uss%XAVG_ZS==xundef) uss%XAVG_ZS = uss%XAVG_ZS + zeps
454 WHERE (uss%XSIL_ZS==xundef) uss%XSIL_ZS = uss%XSIL_ZS + zeps
455 WHERE (uss%XMIN_ZS==xundef) uss%XMIN_ZS = uss%XMIN_ZS + zeps
456 WHERE (uss%XMAX_ZS==xundef) uss%XMAX_ZS = uss%XMAX_ZS + zeps
457 !
458 !-------------------------------------------------------------------------------
459 !
460 !* 10. Choice of orography
461 ! -------------------
462 !
463 SELECT CASE (corogtype)
464  CASE ('AVG')
465  u%XZS(:) = uss%XAVG_ZS(:)
466  CASE ('ENV')
467  u%XZS(:) = uss%XAVG_ZS(:)
468  WHERE (u%XSEA(:)<1.) u%XZS(:) = uss%XAVG_ZS(:) + xenv * uss%XSSO_STDEV
469  CASE ('SIL')
470  u%XZS(:) = uss%XSIL_ZS(:)
471  CASE ('MAX')
472  u%XZS(:) = uss%XMAX_ZS(:)
473  CASE DEFAULT
474  CALL abor1_sfx('PGD_OROGRAPHY: OROGRAPHY TYPE NOT SUPPORTED '//corogtype)
475 END SELECT
476 !
477 !-------------------------------------------------------------------------------
478 !
479 !* 12. Subgrid scale orography characteristics
480 ! ---------------------------------------
481 !
482  CALL sso(u, ug, uss, gsso, gsso_anis)
483 !
484 iflag(:) = nsize(:,1)
485 WHERE(.NOT. gsso(:)) iflag(:) = 0
486 WHERE(u%XSEA(:)==1. .AND. iflag(:)==0) iflag(:) = -1
487 !
488  CALL interpol_field(ug, u, &
489  hprogram,iluout,iflag,uss%XSSO_DIR, 'subgrid orography direction',pdef=0.)
490 !
491 IF (lexplicit_slope) THEN
492  CALL explicit_slope(ug, u%NDIM_FULL, u%XZS, uss%XSSO_SLOPE)
493 ELSEIF (len_trim(yslope)==0) THEN
494  CALL interpol_field(ug, u, &
495  hprogram,iluout,iflag,uss%XSSO_SLOPE,'subgrid orography slope',pdef=0.)
496 END IF
497 !
498 iflag(:) = nsize(:,1)
499 WHERE(.NOT. gsso_anis(:)) iflag(:) = 0
500 WHERE(u%XSEA(:)==1. .AND. iflag(:)==0) iflag(:) = -1
501 !
502  CALL interpol_field(ug, u, &
503  hprogram,iluout,iflag,uss%XSSO_ANIS, 'subgrid orography anisotropy',pdef=0.)
504 !
505 WHERE (u%XSEA(:)==1.)
506  uss%XSSO_ANIS (:) = xundef
507  uss%XSSO_DIR (:) = xundef
508  uss%XSSO_SLOPE(:) = xundef
509 END WHERE
510 !
511 WHERE (u%XWATER(:)==1.)
512  uss%XSSO_ANIS (:) = 1.
513  uss%XSSO_DIR (:) = 0.
514  uss%XSSO_SLOPE(:) = 0.
515 END WHERE
516 !
517 !-------------------------------------------------------------------------------
518 !
519 !* 13. Subgrid scale orography roughness
520 ! ---------------------------------
521 !
522  CALL subscale_aos(u, ug, uss, gz0effi, gz0effj)
523 !
524 iflag(:) = nsize(:,1)
525 WHERE(.NOT. gz0effi(:)) iflag(:) = 0
526 WHERE(u%XSEA(:)==1. .AND. iflag(:)==0) iflag(:) = -1
527  CALL interpol_field(ug, u, &
528  hprogram,iluout,iflag,uss%XAOSIP, 'subgrid orography A/S, direction i+',pdef=0.)
529  CALL interpol_field(ug, u, &
530  hprogram,iluout,iflag,uss%XAOSIM, 'subgrid orography A/S, direction i-',pdef=0.)
531  CALL interpol_field(ug, u, &
532  hprogram,iluout,iflag,uss%XHO2IP, 'subgrid orography h/2, direction i+',pdef=0.)
533  CALL interpol_field(ug, u, &
534  hprogram,iluout,iflag,uss%XHO2IM, 'subgrid orography h/2, direction i-',pdef=0.)
535 !
536 iflag(:) = nsize(:,1)
537 WHERE(.NOT. gz0effj(:)) iflag(:) = 0
538 WHERE(u%XSEA(:)==1. .AND. iflag(:)==0) iflag(:) = -1
539  CALL interpol_field(ug, u, &
540  hprogram,iluout,iflag,uss%XAOSJP, 'subgrid orography A/S, direction j+',pdef=0.)
541  CALL interpol_field(ug, u, &
542  hprogram,iluout,iflag,uss%XAOSJM, 'subgrid orography A/S, direction j-',pdef=0.)
543  CALL interpol_field(ug, u, &
544  hprogram,iluout,iflag,uss%XHO2JP, 'subgrid orography h/2, direction j+',pdef=0.)
545  CALL interpol_field(ug, u, &
546  hprogram,iluout,iflag,uss%XHO2JM, 'subgrid orography h/2, direction j-',pdef=0.)
547 !
548 WHERE (u%XSEA(:)==1.)
549  uss%XHO2IP(:) = xundef
550  uss%XHO2IM(:) = xundef
551  uss%XHO2JP(:) = xundef
552  uss%XHO2JM(:) = xundef
553  uss%XAOSIP(:) = xundef
554  uss%XAOSIM(:) = xundef
555  uss%XAOSJP(:) = xundef
556  uss%XAOSJM(:) = xundef
557 END WHERE
558 !
559 WHERE (u%XWATER(:)==1.)
560  uss%XHO2IP(:) = 0.
561  uss%XHO2IM(:) = 0.
562  uss%XHO2JP(:) = 0.
563  uss%XHO2JM(:) = 0.
564  uss%XAOSIP(:) = 0.
565  uss%XAOSIM(:) = 0.
566  uss%XAOSJP(:) = 0.
567  uss%XAOSJM(:) = 0.
568 END WHERE
569 !-------------------------------------------------------------------------------
570 DEALLOCATE(nsize )
571 IF (lhook) CALL dr_hook('PGD_OROGRAPHY',1,zhook_handle)
572 !-------------------------------------------------------------------------------
573 !
574 END SUBROUTINE pgd_orography
subroutine read_pgd_netcdf(UG, U, USS, HPROGRAM, HSCHEME, HSUBROUTINE, HFILENAME, HFIELD, PFIELD)
integer, dimension(:,:), allocatable nsize_all
real, dimension(:,:,:), allocatable xall
subroutine read_sso_n(KSIZE_FULL, PSEA, USS, HPROGRAM)
Definition: read_sson.F90:7
subroutine get_size_full_n(HPROGRAM, KDIM_FULL, KSIZE_FULL_IN, KSIZE
subroutine pgd_orography(DTCO, UG, U, USS, HPROGRAM, HFILE, HFILE
subroutine close_aux_io_surf(HFILE, HFILETYPE)
logical, dimension(:,:,:), allocatable lssqo
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:7
real, parameter xundef
subroutine explicit_slope(UG, KDIM_FULL, PZS, PSSO_SLOPE)
integer, parameter jprb
Definition: parkind1.F90:32
subroutine sso(U, UG, USS, OSSO, OSSO_ANIS)
Definition: sso.F90:7
real, dimension(:), pointer xgrid_par
real, dimension(:,:), allocatable xsumval
integer, parameter nundef
subroutine subscale_aos(U, UG, USS, OZ0EFFI, OZ0EFFJ)
Definition: subscale_aos.F90:7
real, dimension(:,:,:), allocatable xssqo
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:7
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:7
logical lhook
Definition: yomhook.F90:15
integer, dimension(:,:), allocatable nsize
character(len=10) cgrid
real, dimension(:,:), allocatable xext_all
subroutine treat_field(UG, U, USS, HPROGRAM, HSCHEME, HFILETYPE, HSUBROUTINE, HFILENAME, HFIELD, PPGDARRAY)
Definition: treat_field.F90:10
character(len=28), save cfilein
character(len=28), save cfilein_fa
subroutine init_io_surf_n(DTCO, U, HPROGRAM, HMASK, HSCHEME, HACTION
subroutine interpol_field(UG, U, HPROGRAM, KLUOUT, KCODE, PFIELD, HFIELD, PDE
subroutine open_aux_io_surf(HFILE, HFILETYPE, HMASK, HDIR)
character(len=28), save cfilein_lfi
subroutine read_nam_pgd_orography(HPROGRAM, HZS, HFILETYPE, PUNIF_