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