SURFEX v8.1
General documentation of Surfex
eggx_n.F90
Go to the documentation of this file.
1 SUBROUTINE eggx_n(PI,PRA,KROTEQ,PLONR,PLATR,PBETA,PLON1,PLAT1,PLON2,PLAT2,&
2  & PLON0,PLAT0,PRPK,KULOUT,KSOTRP,KGIVO,&
3  & PGELAM,PGELAT,PGM,PGNORX,PGNORY,KDLSA,&
4  & KDLSUR,KDGSA,KDGEN,KDLUN,KDLUX,KDGUN,KDGUX,&
5  & PDELX,PDELY,PLONC,PLATC)
6 
7 ! Version 2006.1016 by JD GRIL
8 
9 !** *EGGX_N* - the interface to both old and new geographic package of ALADIN
10 
11 ! Purpose.
12 ! --------
13 ! To provide an interface to both new and old geographic setup
14 ! routines MAKDO and EGGX.
15 ! Convert between the old EGGX domain definition and the new
16 ! domain definition
17 ! The old definition uses corners, number of grid points and EGGX
18 ! projection definition parameters
19 ! The new definition uses the centre of domain, number of grid points
20 ! and the resolution in x and y.
21 
22 !** Interface.
23 ! ----------
24 ! *CALL* *EGGX_N
25 
26 ! Explicit arguments :
27 ! --------------------
28 
29 ! INPUT:
30 ! PI : pi (3.14ETC)
31 ! PRA : radius of spherical planet
32 ! KROTEQ : previous rotation parameter
33 ! here it is a control of the direction of the conversion
34 ! since the options KROTEQ>0 are already no more supported
35 ! PLONR : geographic longitude of reference point of rotation
36 ! PLATR : geographic latitude of reference point of rotation
37 ! PLON0 : longitude of reference for the projection
38 ! PLAT0 : latitude of reference for the projection
39 ! PBETA : angle (in rd) between x-axis and rotated latitude circles
40 ! at the reference longitude
41 ! (usually, pbeta = 0. : gives pure projections)
42 ! KSOTRP : isotropy parameter under projection
43 ! KGIVO : choice of reference point for projection
44 ! KDLSA:KDLSUR : lower and upper first dimensions of arrays (X)
45 ! KDGSA:KDGEN : lower and upper second dimensions of arrays (Y)
46 ! KDLUN:KDLUX : lower and upper first dimensions of
47 ! the domain of interest, where arrays are initialized.
48 ! KDGUN:KDGUX : lower and upper second dimensions of
49 ! the domain of interest, where arrays are initialized.
50 ! KULOUT : unit of control prints file
51 
52 ! INPUT/OUTPUT (depending on KROTEQ):
53 ! PLON1, PLAT1 : latitude of the south-west corner of useful domain
54 ! PLON2, PLAT2 : latitude of the north-east corner of useful domain
55 ! PLONC, PLATC : longitude and latitude of the centre of domain
56 ! PDELX, PDELY : horizontal resolution in x and y direction
57 ! PRPK : projection parameter and definition in the old EGGX
58 ! PRPK = 10. projection type self determined
59 ! by minimizing the variation of the map factor
60 ! PRPK = 1. polar stereographic projection
61 ! 0. < PRPK < 1. lambert conformal projection with
62 ! cone parameter prpk
63 ! PRPK = 0. mercator conformal projection
64 ! PRPK < 0. no projection
65 ! on output, PRPK contains the effective projection
66 ! parameter that has been used
67 
68 ! OUTPUT:
69 ! PGELAM, PGELAT : longitude and latitude of the grid points
70 ! PGM : map factor at the grid points
71 ! PGNORX, PGNORY : components of the vector pointing to the north pole
72 ! at the grid points locations
73 
74 ! Implicit arguments :
75 ! --------------------
76 
77 ! Method.
78 ! -------
79 ! The parameter KROTEQ controls the direction in which the conversion
80 ! is performed:
81 ! KROTEQ<0: the new parameter set defining the domain and projection
82 ! (PLON0,PLAT0,PLONC,PLATC,PDELX,PDELY) is converted
83 ! to the old one by the call of MAKDO
84 ! KROTEQ = -1 Normal mode
85 ! KROTEQ = -2 Mercator Rotated-Tilted mode
86 ! KROTEQ=0: the old parameter set defining the domain and projection
87 ! (PLONR,PLATR,PBETA,PLON1,PLAT1,PLON2,PLAT2,PLON0,PLAT0,
88 ! PRPK,KSOTRP,KGIVO) is converted to the new one by the
89 ! call of EGGX
90 ! All geographic coordinates must be in radians.
91 ! All latitudes in <-PI/2;PI/2>, all longitudes <-PI;+PI>.
92 !********* future : All latitudes in <-PI/2;PI/2>, all longitudes <0;2*PI>
93 
94 ! Externals.
95 ! ----------
96 ! EGGX : old geographic setup routine
97 ! MAKDO: new geographic setup routine
98 
99 ! Reference.
100 ! ----------
101 
102 ! Author.
103 ! -------
104 ! Jean-Daniel GRIL, 2000-2001
105 
106 ! Modifications.
107 ! --------------
108 ! Modified in April 2001 by M.Janousek:
109 ! all input/output angles are in radians
110 ! add check of unsupported old EGGX domains
111 ! C. Fischer & J.D. Gril 02-04-16 : Improve new EGGX calls
112 ! M.Hamrud 01-Oct-2003 CY28 Cleaning
113 ! O.Spaniel Oct-2004 cleaning AL29
114 ! JD Gril 17-Nov-2004 Mercator Rotated-Tilted case
115 ! JD Gril 18-Nov-2005 add KGIVO=0 and KGIVO=0
116 ! JD Gril 03-Jui-2006 comment lines 328/329
117 ! JD Gril 15-Sep-2006 correct both previous case
118 ! JD Gril 16-Oct-2006 cleaning
119 ! F. Vana 05-Mar-2015 Support for single precision
120 ! P. Marguinaud 04-10-2016 Port to single precision
121 ! ------------------------------------------------------------------
122 
123 USE parkind1 ,ONLY : jpim ,jprb
124 USE yomhook ,ONLY : lhook, dr_hook
125 USE eggpack ,ONLY : lola,xy,nbpts,pgn,delta,error,domi,param_proj,makdo,&
127 USE eggangles ,ONLY : angle_domain
128 
129 ! ------------------------------------------------------------------
130 
131 IMPLICIT NONE
132 INTEGER(KIND=JPIM),INTENT(INOUT) :: KROTEQ
133 INTEGER(KIND=JPIM),INTENT(IN) :: KULOUT
134 INTEGER(KIND=JPIM),INTENT(INOUT) :: KSOTRP
135 INTEGER(KIND=JPIM),INTENT(INOUT) :: KGIVO
136 INTEGER(KIND=JPIM),INTENT(INOUT) :: KDLSA
137 INTEGER(KIND=JPIM),INTENT(INOUT) :: KDLSUR
138 INTEGER(KIND=JPIM),INTENT(INOUT) :: KDGSA
139 INTEGER(KIND=JPIM),INTENT(INOUT) :: KDGEN
140 INTEGER(KIND=JPIM),INTENT(IN) :: KDLUN
141 INTEGER(KIND=JPIM),INTENT(IN) :: KDLUX
142 INTEGER(KIND=JPIM),INTENT(IN) :: KDGUN
143 INTEGER(KIND=JPIM),INTENT(IN) :: KDGUX
144 REAL(KIND=JPRB) ,INTENT(IN) :: PI
145 REAL(KIND=JPRB) ,INTENT(IN) :: PRA
146 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLONR
147 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLATR
148 REAL(KIND=JPRB) ,INTENT(INOUT) :: PBETA
149 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLON1
150 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLAT1
151 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLON2
152 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLAT2
153 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLON0
154 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLAT0
155 REAL(KIND=JPRB) ,INTENT(INOUT) :: PRPK
156 REAL(KIND=JPRB) ,INTENT(OUT) :: PGELAM(kdlsa:kdlsur,kdgsa:kdgen)
157 REAL(KIND=JPRB) ,INTENT(OUT) :: PGELAT(kdlsa:kdlsur,kdgsa:kdgen)
158 REAL(KIND=JPRB) ,INTENT(OUT) :: PGM(kdlsa:kdlsur,kdgsa:kdgen)
159 REAL(KIND=JPRB) ,INTENT(OUT) :: PGNORX(kdlsa:kdlsur,kdgsa:kdgen)
160 REAL(KIND=JPRB) ,INTENT(OUT) :: PGNORY(kdlsa:kdlsur,kdgsa:kdgen)
161 REAL(KIND=JPRB) ,INTENT(INOUT) :: PDELX
162 REAL(KIND=JPRB) ,INTENT(INOUT) :: PDELY
163 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLONC
164 REAL(KIND=JPRB) ,INTENT(INOUT) :: PLATC
165 
166 ! ------------------------------------------------------------------
167 
168 type(lola) :: yl_tlkres, yl_tlcent, yl_tlsw_lola, yl_tlne_lola
169 type(lola), ALLOCATABLE :: yl_tlgrid_lola(:,:)
170 type(xy) :: yl_tlsw_xy , yl_tlne_xy, yl_tlcent_xy
171 type(nbpts) :: yl_tlnb_pts
172 type(pgn), ALLOCATABLE :: yl_tlgrid_pgn(:,:)
173 type(delta) :: yl_tldel
174 type(error) :: yl_tlerr
175 type(domi) :: yl_tlgrid_info
176 type(param_proj) :: yl_tlmoddom
177 REAL(KIND=JPRB) :: ZGRID_MF(kdlux-kdlun+1,kdgux-kdgun+1)
178 REAL(KIND=JPRB) :: ZRTD
179 REAL(KIND=JPRB) :: ZPI, ZRA
180 REAL(KIND=JPRB) :: ZHOOK_HANDLE
181 REAL(KIND=JPRB) :: ZEPS
182 LOGICAL :: LLMRT
183 
184 ! ------------------------------------------------------------------
185 
186 #include "eggx.h"
187 
188 #include "abor1.intfb.h"
189 
190 ! ------------------------------------------------------------------
191 IF (lhook) CALL dr_hook('EGGX_N',0,zhook_handle)
192 ! ------------------------------------------------------------------
193 
194 ! The routine can be sometimes called before constants are initialized
195 ! Check if it is the case and then set defaults
196 IF (int(pi*100._jprb) == 314) THEN
197  zpi=REAL(pi,jprb)
198  zra=REAL(pra,jprb)
199 ELSE
200  zpi=asin(1.0_jprb)*2.0_jprb
201  zra=6371229._jprb
202 ENDIF
203 zeps=epsilon(1.0_jprb)*100.0_jprb
204 zrtd = 180.0_jprb/zpi
205 pgelam = 0.0_jprb
206 pgelat = 0.0_jprb
207 pgm = 0.0_jprb
208 pgnorx = 0.0_jprb
209 pgnory = 0.0_jprb
210 
211 WRITE(kulout,*) '********* INFO of Input data in EGGX_N **************'
212 WRITE(kulout,*) 'PLON0 (rd) = ',plon0,'PLON0 (dg) = ',plon0*zrtd
213 WRITE(kulout,*) 'PLAT0 (rd) = ',plat0,'PLAT0 (dg) = ',plat0*zrtd
214 WRITE(kulout,*) 'PLONC (rd) = ',plonc,'PLONC (dg) = ',plonc*zrtd
215 WRITE(kulout,*) 'PLATC (rd) = ',platc,'PLATC (dg) = ',platc*zrtd
216 WRITE(kulout,*) 'PLON1 (rd) = ',plon1,'PLON1 (dg) = ',plon1*zrtd
217 WRITE(kulout,*) 'PLAT1 (rd) = ',plat1,'PLAT1 (dg) = ',plat1*zrtd
218 WRITE(kulout,*) 'PLON2 (rd) = ',plon2,'PLON2 (dg) = ',plon2*zrtd
219 WRITE(kulout,*) 'PLAT2 (rd) = ',plat2,'PLAT2 (dg) = ',plat2*zrtd
220 WRITE(kulout,*) 'PDELX = ',pdelx
221 WRITE(kulout,*) 'PDELY = ',pdely
222 WRITE(kulout,*) 'KROTEQ = ',kroteq
223 WRITE(kulout,*) '****************************************************'
224 
225 IF (kroteq < 0) THEN
226  WRITE(kulout,*) 'KROTEQ < 0 : New Eggx domain'
227  ! the input parameters are in the new style of the domain definition
228  llmrt = (kroteq == -2)
229  IF (.NOT.llmrt) kroteq = -1
230  WRITE(kulout,*) 'KROTEQ = ',kroteq,'LLMRT = ',llmrt
231  IF (llmrt .AND. (abs(plat0) >= zeps)) THEN
232  WRITE(kulout,*) 'EGGX_N: PLAT0=',plat0,&
233  & ' MUST BE EQUAL ZERO IF LLMRT IS TRUE!'
234  CALL abor1('EGGX_N: LLMRT & PLAT0 INCONSISTENT')
235  ENDIF
236  ksotrp = 0_jpim
237  kgivo = 0_jpim
238  plonr = 0.0_jprb
239  platr = 0.0_jprb
240  pbeta = 0.0_jprb
241  yl_tlkres%LON = plon0*zrtd
242  yl_tlkres%LAT = plat0*zrtd
243  yl_tlcent%LON = plonc*zrtd
244  yl_tlcent%LAT = platc*zrtd
245  yl_tlkres = angle_domain(yl_tlkres,zpi,'-+','D')
246  yl_tlcent = angle_domain(yl_tlcent,zpi,'-+','D')
247  yl_tldel%ONX = pdelx
248  yl_tldel%ONY = pdely
249  yl_tlnb_pts%ONX = kdlux-kdlun+1
250  yl_tlnb_pts%ONY = kdgux-kdgun+1
251  ALLOCATE(yl_tlgrid_lola(kdlux-kdlun+1,kdgux-kdgun+1))
252  ALLOCATE(yl_tlgrid_pgn(kdlux-kdlun+1,kdgux-kdgun+1))
253  CALL makdo(yl_tlkres,yl_tlcent,yl_tldel,yl_tlnb_pts,yl_tlgrid_lola,&
254  & zgrid_mf,yl_tlgrid_pgn,yl_tlgrid_info,yl_tlerr,.true.,.true.,&
255  & zpi,zra,kulout,llmrt)
256  plon1 = yl_tlgrid_lola(1,1)%LON
257  plat1 = yl_tlgrid_lola(1,1)%LAT
258  plon2 = yl_tlgrid_lola(yl_tlnb_pts%ONX,yl_tlnb_pts%ONY)%LON
259  plat2 = yl_tlgrid_lola(yl_tlnb_pts%ONX,yl_tlnb_pts%ONY)%LAT
260  plon0 = yl_tlkres%LON
261  plat0 = yl_tlkres%LAT
262  plonc = yl_tlcent%LON
263  platc = yl_tlcent%LAT
264  prpk = yl_tlgrid_info%INFO_PROJ%KL
265  pgelam(kdlun:kdlux,kdgun:kdgux) = yl_tlgrid_lola(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)%LON
266  pgelat(kdlun:kdlux,kdgun:kdgux) = yl_tlgrid_lola(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)%LAT
267  pgm(kdlun:kdlux,kdgun:kdgux) = zgrid_mf(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)
268  pgnorx(kdlun:kdlux,kdgun:kdgux) = yl_tlgrid_pgn(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)%ONX
269  pgnory(kdlun:kdlux,kdgun:kdgux) = yl_tlgrid_pgn(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)%ONY
270  DEALLOCATE(yl_tlgrid_lola)
271  DEALLOCATE(yl_tlgrid_pgn)
272 ELSE
273  ! KROTEQ>0 => the input is in the old style
274  ! Some old EGGX domains are no more supported in ALADIN
275  ! Check if that is not the case of this domain
276  IF (kroteq > 0) THEN
277  WRITE(kulout,*) 'EGGX_N: NROTEQ=',kroteq,&
278  & ' IS NOT VALID VALUE, IT MUST BE ZERO!'
279  CALL abor1('EGGX_N: UNSUPPORTED NROTEQ')
280  ELSEIF (pbeta /= 0.0_jprb .AND. prpk == 0.0_jprb) THEN
281  WRITE(kulout,*) 'EGGX_N: ROTATED DOMAIN IN MERCATOR PROJECTION NOT&
282  & SUPPORTED (EBETA HAS TO BE 0)'
283  CALL abor1('EGGX_N: UNSUPPORTED EBETA')
284  ELSEIF ( abs(prpk-abs(sin(plat0))) > 1.e-7 ) THEN
285  WRITE(kulout,*) 'EGGX_N: YOU SEEM TO HAVE A SECANT CASE OF PROJECTION'
286  WRITE(kulout,*) ' ERPK=',prpk,' SIN(ELAT0)=',sin(plat0)
287  CALL abor1('EGGX_N: UNSUPPORTED SECANT PROJECTION')
288  ENDIF
289  WRITE(kulout,*) 'KROTEQ = 0 : Old Eggx domain'
290  ! Call EGGX to handle cases when corners may change
291  ! Fill in every case the arrays. Not needed in model
292  ! (call echien) but outside. So, either with old eggx,
293  ! either with makdo (see below)
294  IF(ksotrp/=0 .OR. kgivo/=0 .OR. prpk==10._jprb) THEN
295  WRITE(kulout,*) 'Call old EGGX to handle cases when corners may change'
296  WRITE(kulout,*) 'KSOTRP = ',ksotrp,' KGIVO = ',kgivo,' PRPK = ',prpk
297  CALL eggx(REAL(ZPI,JPRB),REAL(ZRA,JPRB),KROTEQ,PLONR,PLATR,PBETA,PLON1,PLAT1,PLON2,PLAT2,&
298  & PLON0,PLAT0,PRPK,KULOUT,KSOTRP,KGIVO,&
299  & PGELAM,PGELAT,PGM,PGNORX,PGNORY,KDLSA,KDLSUR,KDGSA,KDGEN,&
300  & KDLUN,KDLUX,KDGUN,KDGUX,PDELX,PDELY)
301  ENDIF
302  ! Now calculate x,y coordinates of the corners, compute the centre
303  ! point and convert it to lat-lon by the EGGPACK functions
304  WRITE(kulout,*) 'COMPUTATION OF CENTER'
305  yl_tlkres%LON = plon0*zrtd
306  yl_tlkres%LAT = plat0*zrtd
307  yl_tlkres = angle_domain(yl_tlkres,zpi,'-+','D')
308  yl_tlmoddom = ref_datas(yl_tlkres,zra)
309  yl_tlsw_lola%LON = plon1
310  yl_tlsw_lola%LAT = plat1
311  yl_tlne_lola%LON = plon2
312  yl_tlne_lola%LAT = plat2
313  yl_tlsw_lola = angle_domain(yl_tlsw_lola,zpi,'-+','R')
314  yl_tlne_lola = angle_domain(yl_tlne_lola,zpi,'-+','R')
315  yl_tlsw_xy = latlon_to_xy(yl_tlsw_lola,yl_tlmoddom,zpi)
316  yl_tlne_xy = latlon_to_xy(yl_tlne_lola,yl_tlmoddom,zpi)
317  yl_tlcent_xy%X = (yl_tlsw_xy%X+yl_tlne_xy%X)*0.5_jprb
318  yl_tlcent_xy%Y = (yl_tlsw_xy%Y+yl_tlne_xy%Y)*0.5_jprb
319  yl_tlcent = angle_domain(xy_to_latlon(yl_tlcent_xy,yl_tlmoddom,zpi),zpi,'0+','R')
320  plonc = yl_tlcent%LON
321  platc = yl_tlcent%LAT
322  ! If KSOTRP=0 and KGIVO=0 then the values of SW,NE,REF are fixed. They come from
323  ! - old eggx (rare) but can be computed by new eggx
324  ! - new eggx but with NCADFORM=0 (old "cadre")
325  ! In both cases we can use new eggx to recompute missing values, this way protects
326  ! us from old eggx possible bugs in case number 2 (new eggx + NCADFORM=0)
327  ! We use Makdo to compute all arrays
328  IF(ksotrp==0 .AND. kgivo==0 .AND. prpk/=10._jprb) THEN
329  ! Computation of resolution to use Makdo
330  ! We test the case "point" or "linear" wide
331  ! Protect from divided by zero
332  WRITE(kulout,*) .AND..AND.'KSOTRP==0 KGIVO==0 PRPK/=10'
333  WRITE(kulout,*) 'COMPUTATION OF RESOLUTION AND USE OF MAKDO'
334  WRITE(kulout,*) 'because cadre is in old style but domain may be created'
335  WRITE(kulout,*) 'by new eggx (may be not supported by old eggx)'
336  IF ((kdlux-kdlun) == 0) THEN
337  pdelx = 0.0_jprb
338  ELSE
339  pdelx = abs(yl_tlne_xy%X-yl_tlsw_xy%X)/REAL(kdlux-kdlun,jprb)
340  ENDIF
341  IF ((kdgux-kdgun) == 0) THEN
342  pdely = 0.0_jprb
343  ELSE
344  pdely = abs(yl_tlne_xy%Y-yl_tlsw_xy%Y)/REAL(kdgux-kdgun,jprb)
345  ENDIF
346  yl_tlcent%LON = plonc*zrtd
347  yl_tlcent%LAT = platc*zrtd
348  yl_tlkres = angle_domain(yl_tlkres,zpi,'-+','D')
349  yl_tlcent = angle_domain(yl_tlcent,zpi,'-+','D')
350  yl_tldel%ONX = pdelx
351  yl_tldel%ONY = pdely
352  yl_tlnb_pts%ONX = kdlux-kdlun+1
353  yl_tlnb_pts%ONY = kdgux-kdgun+1
354  ALLOCATE(yl_tlgrid_lola(kdlux-kdlun+1,kdgux-kdgun+1))
355  ALLOCATE(yl_tlgrid_pgn(kdlux-kdlun+1,kdgux-kdgun+1))
356  CALL makdo(yl_tlkres,yl_tlcent,yl_tldel,yl_tlnb_pts,yl_tlgrid_lola,&
357  & zgrid_mf,yl_tlgrid_pgn,yl_tlgrid_info,yl_tlerr,.true.,.true.,&
358  & zpi,zra,kulout,.false.)
359  plon1 = yl_tlgrid_lola(1,1)%LON
360  plat1 = yl_tlgrid_lola(1,1)%LAT
361  plon2 = yl_tlgrid_lola(yl_tlnb_pts%ONX,yl_tlnb_pts%ONY)%LON
362  plat2 = yl_tlgrid_lola(yl_tlnb_pts%ONX,yl_tlnb_pts%ONY)%LAT
363  plon0 = yl_tlkres%LON
364  plat0 = yl_tlkres%LAT
365  plonc = yl_tlcent%LON
366  platc = yl_tlcent%LAT
367  prpk = yl_tlgrid_info%INFO_PROJ%KL
368  pgelam(kdlun:kdlux,kdgun:kdgux) = yl_tlgrid_lola(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)%LON
369  pgelat(kdlun:kdlux,kdgun:kdgux) = yl_tlgrid_lola(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)%LAT
370  pgm(kdlun:kdlux,kdgun:kdgux) = zgrid_mf(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)
371  pgnorx(kdlun:kdlux,kdgun:kdgux) = yl_tlgrid_pgn(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)%ONX
372  pgnory(kdlun:kdlux,kdgun:kdgux) = yl_tlgrid_pgn(1:yl_tlnb_pts%ONX,1:yl_tlnb_pts%ONY)%ONY
373  DEALLOCATE(yl_tlgrid_lola)
374  DEALLOCATE(yl_tlgrid_pgn)
375  ENDIF
376  WRITE(kulout,*) 'SWX = ',yl_tlsw_xy%X,'NEX = ',yl_tlne_xy%X,'CEX = ',yl_tlcent_xy%X
377  WRITE(kulout,*) 'SWY = ',yl_tlsw_xy%Y,'NEY = ',yl_tlne_xy%Y,'CEY = ',yl_tlcent_xy%Y
378 ENDIF
379 
380 WRITE(kulout,*) '********* INFO before Return out of EGGX_N *********'
381 WRITE(kulout,*) 'PLON0 (rd) = ',plon0,'PLON0 (dg) = ',plon0*zrtd
382 WRITE(kulout,*) 'PLAT0 (rd) = ',plat0,'PLAT0 (dg) = ',plat0*zrtd
383 WRITE(kulout,*) 'PLONC (rd) = ',plonc,'PLONC (dg) = ',plonc*zrtd
384 WRITE(kulout,*) 'PLATC (rd) = ',platc,'PLATC (dg) = ',platc*zrtd
385 WRITE(kulout,*) 'PLON1 (rd) = ',plon1,'PLON1 (dg) = ',plon1*zrtd
386 WRITE(kulout,*) 'PLAT1 (rd) = ',plat1,'PLAT1 (dg) = ',plat1*zrtd
387 WRITE(kulout,*) 'PGELAM(KDLUN,KDGUN):SW (rd) = ',pgelam(kdlun,kdgun)
388 WRITE(kulout,*) 'PGELAM(KDLUN,KDGUN):SW (dg) = ',pgelam(kdlun,kdgun)*zrtd
389 WRITE(kulout,*) 'PGELAT(KDLUN,KDGUN):SW (rd) = ',pgelat(kdlun,kdgun)
390 WRITE(kulout,*) 'PGELAT(KDLUN,KDGUN):SW (dg) = ',pgelat(kdlun,kdgun)*zrtd
391 WRITE(kulout,*) 'PLON2 (rd) = ',plon2,'PLON2 (dg) = ',plon2*zrtd
392 WRITE(kulout,*) 'PLAT2 (rd) = ',plat2,'PLAT2 (dg) = ',plat2*zrtd
393 WRITE(kulout,*) 'PGELAM(KDLUX,KDGUX):NE (rd) = ',pgelam(kdlux,kdgux)
394 WRITE(kulout,*) 'PGELAM(KDLUX,KDGUX):NE (dg) = ',pgelam(kdlux,kdgux)*zrtd
395 WRITE(kulout,*) 'PGELAT(KDLUX,KDGUX):NE (rd) = ',pgelat(kdlux,kdgux)
396 WRITE(kulout,*) 'PGELAT(KDLUX,KDGUX):NE (dg) = ',pgelat(kdlux,kdgux)*zrtd
397 WRITE(kulout,*) 'PRPK = ',prpk
398 WRITE(kulout,*) 'PGM(KDLUN,KDGUN) (SW) = ',pgm(kdlun,kdgun)
399 WRITE(kulout,*) 'PGNORX(KDLUN,KDGUN) (SW) = ',pgnorx(kdlun,kdgun)
400 WRITE(kulout,*) 'PGNORY(KDLUN,KDGUN) (SW) = ',pgnory(kdlun,kdgun)
401 WRITE(kulout,*) 'PDELX = ',pdelx
402 WRITE(kulout,*) 'PDELY = ',pdely
403 WRITE(kulout,*) '****************************************************'
404 
405 ! ------------------------------------------------------------------
406 IF (lhook) CALL dr_hook('EGGX_N',1,zhook_handle)
407 END SUBROUTINE eggx_n
integer, parameter jpim
Definition: parkind1.F90:13
subroutine abor1(CDTEXT)
Definition: abor1.F90:2
integer, parameter jprb
Definition: parkind1.F90:32
type(param_proj) function ref_datas(REF_COORD, RA, TOZERO_COORD, LRT)
Definition: eggpack.F90:729
subroutine makdo(YD_REF_COORD, YD_CENTER_COORD, YD_PDEL, YD_NB_PTS, YD_GRID_COORD, P_GRID_MF, YD_GRID_PGN, YD_GRID_INFO, YD_ERR_CODE, LD_LIP, LD_AUTO_STOP, PI, P_RA, KOUT, LD_LMRT)
Definition: eggpack.F90:1128
logical lhook
Definition: yomhook.F90:15
subroutine eggx_n(PI, PRA, KROTEQ, PLONR, PLATR, PBETA, PLON1, PLAT1, PLON2, PLAT2, PLON0, PLAT0, PRPK, KULOUT, KSOTRP, KGIVO, PGELAM, PGELAT, PGM, PGNORX, PGNORY, KDLSA, KDLSUR, KDGSA, KDGEN, KDLUN, KDLUX, KDGUN, KDGUX, PDELX, PDELY, PLONC, PLATC)
Definition: eggx_n.F90:6
subroutine eggx(PRPI, PRA, KROTEQ, PLONR, PLATR, PBETA, PLON1, PLAT1, PLON2, PLAT2, PLON0, PLAT0, PRPK, KULOUT, KSOTRP, KGIV0, PGELAM, PGELAT, PGM, PGNORX, PGNORY, KDLSA, KDLSUR, KDGSA, KDGEN, KDLUN, KDLUX, KDGUN, KDGUX, PDELX, PDELY)
Definition: eggx.F90:7