SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
ol_read_atm_netcdf.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_netcdf (&
7  hsurf_filetype, &
8  pta,pqa,pwind,pdir_sw,psca_sw,plw,psnow, &
9  prain,pps,pco2,pdir )
10 !**************************************************************************
11 !
12 !! PURPOSE
13 !! -------
14 ! Read in the netcdf file the atmospheric forcing for the actual time
15 ! step KFORC_STEP, and for the next one.
16 ! The two time step are needed for the time interpolation of the
17 ! forcing.
18 ! If the end of the file is reached, set the two step to the last
19 ! values.
20 ! Return undef value if the variable is not present
21 !!
22 !!** METHOD
23 !! ------
24 !!
25 !! EXTERNAL
26 !! --------
27 !!
28 !! IMPLICIT ARGUMENTS
29 !! ------------------
30 !!
31 !! REFERENCE
32 !! ---------
33 !!
34 !!
35 !! AUTHOR
36 !! ------
37 !! F. Habets *Meteo France*
38 !!
39 !! MODIFICATIONS
40 !! -------------
41 !! Original 06/2003
42 !! P. Le Moigne 10/2004: set INB to 2 because of revised temporal loop in offline.f90:
43 !! time evolution is done at the end of isba time step so first
44 !! isba computation is done on first forcing time step
45 !! P. Le Moigne 10/2005: consistency checking between orographies read from forcing
46 !! file and from initial file
47 
48 !
49 !
50 !
51 !
52 !
53 USE modd_io_surf_ol, ONLY : xcount
55 !
56 USE yomhook ,ONLY : lhook, dr_hook
57 USE parkind1 ,ONLY : jprb
58 !
59 IMPLICIT NONE
60 !
61 !
62 ! global variables
63 !
64 !
65 REAL, DIMENSION(:,:),INTENT(OUT) :: pta
66 REAL, DIMENSION(:,:),INTENT(OUT) :: pqa
67 REAL, DIMENSION(:,:),INTENT(OUT) :: pwind
68 REAL, DIMENSION(:,:),INTENT(OUT) :: pdir_sw
69 REAL, DIMENSION(:,:),INTENT(OUT) :: psca_sw
70 REAL, DIMENSION(:,:),INTENT(OUT) :: plw
71 REAL, DIMENSION(:,:),INTENT(OUT) :: psnow
72 REAL, DIMENSION(:,:),INTENT(OUT) :: prain
73 REAL, DIMENSION(:,:),INTENT(OUT) :: pps
74 REAL, DIMENSION(:,:),INTENT(OUT) :: pco2
75 REAL, DIMENSION(:,:),INTENT(OUT) :: pdir
76  CHARACTER(LEN=6) ,INTENT(IN) :: hsurf_filetype
77 
78 ! local variables
79 INTEGER :: iret
80 REAL(KIND=JPRB) :: zhook_handle
81 !
82 
83 IF (lhook) CALL dr_hook('OL_READ_ATM_NETCDF',0,zhook_handle)
84  CALL read_surf(&
85  'OFFLIN','Tair', pta(:,1:xcount),iret)
86  CALL read_surf(&
87  'OFFLIN','Qair', pqa(:,1:xcount),iret)
88  CALL read_surf(&
89  'OFFLIN','Wind', pwind(:,1:xcount),iret)
90  CALL read_surf(&
91  'OFFLIN','LWdown', plw(:,1:xcount),iret)
92  CALL read_surf(&
93  'OFFLIN','DIR_SWdown',pdir_sw(:,1:xcount),iret)
94  CALL read_surf(&
95  'OFFLIN','SCA_SWdown',psca_sw(:,1:xcount),iret)
96  CALL read_surf(&
97  'OFFLIN','Rainf', prain(:,1:xcount),iret)
98  CALL read_surf(&
99  'OFFLIN','Snowf', psnow(:,1:xcount),iret)
100  CALL read_surf(&
101  'OFFLIN','PSurf', pps(:,1:xcount),iret)
102  CALL read_surf(&
103  'OFFLIN','Wind_DIR', pdir(:,1:xcount),iret)
104  CALL read_surf(&
105  'OFFLIN','CO2air', pco2(:,1:xcount),iret)
106 IF (lhook) CALL dr_hook('OL_READ_ATM_NETCDF',1,zhook_handle)
107 
108 END SUBROUTINE ol_read_atm_netcdf
subroutine ol_read_atm_netcdf(HSURF_FILETYPE, PTA, PQA, PWIND, PDIR_SW, PSCA_SW, PLW, PSNOW, PRAIN, PPS, PCO2, PDIR)