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