SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
get_lonlatn.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 get_lonlat_n (YSC, &
7  hprogram)
8 ! ####################################
9 !
10 !!**** *GET_LONLAT_n* - routine to get some surface fields
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !!
29 !! AUTHOR
30 !! ------
31 !! P. Le Moigne *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 08/2008
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
42 USE modd_surfex_n, ONLY : surfex_t
43 !
44 USE modi_get_luout
45 USE modi_get_coord_n
46 USE modi_get_surf_size_n
48 USE modi_init_io_surf_n
49 USE modi_end_io_surf_n
50 !
51 !
52 USE yomhook ,ONLY : lhook, dr_hook
53 USE parkind1 ,ONLY : jprb
54 !
55 USE modi_io_buff_clean
56 !
57 IMPLICIT NONE
58 !
59 !* 0.1 Declarations of arguments
60 ! -------------------------
61 !
62 !
63 TYPE(surfex_t), INTENT(INOUT) :: ysc
64 !
65  CHARACTER(LEN=6), INTENT(IN) :: hprogram
66 !
67 !
68 !* 0.2 Declarations of local variables
69 ! -------------------------------
70 !
71 INTEGER :: iluout
72 !
73 INTEGER :: iret
74  CHARACTER(LEN=100) :: ycomment
75 !
76 INTEGER :: ini
77 REAL, DIMENSION(:), ALLOCATABLE :: zlon, zlat
78 REAL(KIND=JPRB) :: zhook_handle
79 !
80 !-------------------------------------------------------------------------------
81 IF (lhook) CALL dr_hook('GET_LONLAT_N',0,zhook_handle)
82  CALL get_luout(hprogram,iluout)
83 !-------------------------------------------------------------------------------
84 !
85  CALL get_surf_size_n(ysc%DTCO, ysc%U, &
86  'FULL', ini)
87 !
88 ALLOCATE(zlon(ini))
89 ALLOCATE(zlat(ini))
90 !
91  CALL get_coord_n(ysc%UG, &
92  hprogram,ini,zlon,zlat)
93 !
94  CALL io_buff_clean
95  CALL init_io_surf_n(ysc%DTCO, ysc%DGU, ysc%U, &
96  hprogram,'FULL ','SURF ','WRITE')
97 !
98 ycomment='XLON'
99  CALL write_surf(ysc%DGU, ysc%U, &
100  hprogram,'XLON',zlon(:),iret,hcomment=ycomment,hdir='A')
101 !
102 ycomment='XLAT'
103  CALL write_surf(ysc%DGU, ysc%U, &
104  hprogram,'XLAT',zlat(:),iret,hcomment=ycomment,hdir='A')
105 !
106  CALL end_io_surf_n(hprogram)
107 IF (lhook) CALL dr_hook('GET_LONLAT_N',1,zhook_handle)
108 !
109 !==============================================================================
110 !
111 END SUBROUTINE get_lonlat_n
subroutine get_surf_size_n(DTCO, U, HTYPE, KL)
subroutine init_io_surf_n(DTCO, DGU, U, HPROGRAM, HMASK, HSCHEME, HACTION)
subroutine get_lonlat_n(YSC, HPROGRAM)
Definition: get_lonlatn.F90:6
subroutine io_buff_clean
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:6
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine get_coord_n(UG, HPROGRAM, KI, PLON, PLAT)
Definition: get_coordn.F90:6