SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
ol_read_atm_binary.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 ol_read_atm_binary(KFORC_STEP, &
7  pta,pqa,pwind,pdir_sw,psca_sw,plw,psnow, &
8  prain,pps,pco2,pdir )
9 !**************************************************************************
10 !
11 !! PURPOSE
12 !! -------
13 ! Read in the ascii file the atmospheric forcing for the actual time
14 ! step KFORC_STEP, and for the next one.
15 ! The two time step are needed for the time interpolation of the
16 ! forcing.
17 ! If the end of the file is reached, set the two step to the last
18 ! values.
19 ! Return undef value if the variable is not present
20 !!
21 !!** METHOD
22 !! ------
23 !!
24 !! EXTERNAL
25 !! --------
26 !!
27 !! IMPLICIT ARGUMENTS
28 !! ------------------
29 !!
30 !! REFERENCE
31 !! ---------
32 !!
33 !!
34 !! AUTHOR
35 !! ------
36 !! A. Lemonsu *Meteo France*
37 !!
38 !! MODIFICATIONS
39 !! -------------
40 !! Original 03/2008
41 !
42 USE modd_io_surf_ol, ONLY : xcount
43 USE modi_read_surf_atm
44 !
45 USE yomhook ,ONLY : lhook, dr_hook
46 USE parkind1 ,ONLY : jprb
47 !
48 IMPLICIT NONE
49 !
50 ! global variables
51 REAL, DIMENSION(:,:),INTENT(INOUT) :: pta
52 REAL, DIMENSION(:,:),INTENT(INOUT) :: pqa
53 REAL, DIMENSION(:,:),INTENT(INOUT) :: pwind
54 REAL, DIMENSION(:,:),INTENT(INOUT) :: pdir_sw
55 REAL, DIMENSION(:,:),INTENT(INOUT) :: psca_sw
56 REAL, DIMENSION(:,:),INTENT(INOUT) :: plw
57 REAL, DIMENSION(:,:),INTENT(INOUT) :: psnow
58 REAL, DIMENSION(:,:),INTENT(INOUT) :: prain
59 REAL, DIMENSION(:,:),INTENT(INOUT) :: pps
60 REAL, DIMENSION(:,:),INTENT(INOUT) :: pco2
61 REAL, DIMENSION(:,:),INTENT(INOUT) :: pdir
62 INTEGER,INTENT(IN) :: kforc_step
63 ! local variables
64 REAL(KIND=JPRB) :: zhook_handle
65 !
66 ! read data
67 IF (lhook) CALL dr_hook('OL_READ_ATM_BINARY',0,zhook_handle)
68  CALL read_surf_atm('BINARY',pta(:,1:xcount),kforc_step,xcount,22)
69  CALL read_surf_atm('BINARY',pqa(:,1:xcount),kforc_step,xcount,23)
70  CALL read_surf_atm('BINARY',pwind(:,1:xcount),kforc_step,xcount,24)
71  CALL read_surf_atm('BINARY',plw(:,1:xcount),kforc_step,xcount,25)
72  CALL read_surf_atm('BINARY',pdir_sw(:,1:xcount),kforc_step,xcount,26)
73  CALL read_surf_atm('BINARY',psca_sw(:,1:xcount),kforc_step,xcount,27)
74  CALL read_surf_atm('BINARY',prain(:,1:xcount),kforc_step,xcount,28)
75  CALL read_surf_atm('BINARY',psnow(:,1:xcount),kforc_step,xcount,29)
76  CALL read_surf_atm('BINARY',pps(:,1:xcount),kforc_step,xcount,30)
77  CALL read_surf_atm('BINARY',pdir(:,1:xcount),kforc_step,xcount,31)
78  CALL read_surf_atm('BINARY',pco2(:,1:xcount),kforc_step,xcount,32)
79 !
80 IF (lhook) CALL dr_hook('OL_READ_ATM_BINARY',1,zhook_handle)
81 !
82 END SUBROUTINE ol_read_atm_binary
subroutine ol_read_atm_binary(KFORC_STEP, PTA, PQA, PWIND, PDIR_SW, PSCA_SW, PLW, PSNOW, PRAIN, PPS, PCO2, PDIR)
subroutine read_surf_atm(HPROGRAM, PFIELD, KFORC_STEP, KNB, KINIT)