SURFEX v7.3
General documentation of Surfex
|
00001 ! ######### 00002 SUBROUTINE OL_READ_ATM_NETCDF (HSURF_FILETYPE, & 00003 PTA,PQA,PWIND,PDIR_SW,PSCA_SW,PLW,PSNOW, & 00004 PRAIN,PPS,PCO2,PDIR ) 00005 !************************************************************************** 00006 ! 00007 !! PURPOSE 00008 !! ------- 00009 ! Read in the netcdf file the atmospheric forcing for the actual time 00010 ! step KFORC_STEP, and for the next one. 00011 ! The two time step are needed for the time interpolation of the 00012 ! forcing. 00013 ! If the end of the file is reached, set the two step to the last 00014 ! values. 00015 ! Return undef value if the variable is not present 00016 !! 00017 !!** METHOD 00018 !! ------ 00019 !! 00020 !! EXTERNAL 00021 !! -------- 00022 !! 00023 !! IMPLICIT ARGUMENTS 00024 !! ------------------ 00025 !! 00026 !! REFERENCE 00027 !! --------- 00028 !! 00029 !! 00030 !! AUTHOR 00031 !! ------ 00032 !! F. Habets *Meteo France* 00033 !! 00034 !! MODIFICATIONS 00035 !! ------------- 00036 !! Original 06/2003 00037 !! P. Le Moigne 10/2004: set INB to 2 because of revised temporal loop in offline.f90: 00038 !! time evolution is done at the end of isba time step so first 00039 !! isba computation is done on first forcing time step 00040 !! P. Le Moigne 10/2005: consistency checking between orographies read from forcing 00041 !! file and from initial file 00042 00043 ! 00044 ! 00045 USE MODD_IO_SURF_OL, ONLY : XCOUNT 00046 USE MODI_READ_SURF 00047 ! 00048 USE YOMHOOK ,ONLY : LHOOK, DR_HOOK 00049 USE PARKIND1 ,ONLY : JPRB 00050 ! 00051 IMPLICIT NONE 00052 ! 00053 INCLUDE "netcdf.inc" 00054 00055 ! global variables 00056 REAL, DIMENSION(:,:),INTENT(OUT) :: PTA 00057 REAL, DIMENSION(:,:),INTENT(OUT) :: PQA 00058 REAL, DIMENSION(:,:),INTENT(OUT) :: PWIND 00059 REAL, DIMENSION(:,:),INTENT(OUT) :: PDIR_SW 00060 REAL, DIMENSION(:,:),INTENT(OUT) :: PSCA_SW 00061 REAL, DIMENSION(:,:),INTENT(OUT) :: PLW 00062 REAL, DIMENSION(:,:),INTENT(OUT) :: PSNOW 00063 REAL, DIMENSION(:,:),INTENT(OUT) :: PRAIN 00064 REAL, DIMENSION(:,:),INTENT(OUT) :: PPS 00065 REAL, DIMENSION(:,:),INTENT(OUT) :: PCO2 00066 REAL, DIMENSION(:,:),INTENT(OUT) :: PDIR 00067 CHARACTER(LEN=6) ,INTENT(IN) :: HSURF_FILETYPE 00068 00069 ! local variables 00070 INTEGER :: IRET 00071 REAL(KIND=JPRB) :: ZHOOK_HANDLE 00072 ! 00073 00074 IF (LHOOK) CALL DR_HOOK('OL_READ_ATM_NETCDF',0,ZHOOK_HANDLE) 00075 CALL READ_SURF('OFFLIN','Tair', PTA (:,1:XCOUNT),IRET) 00076 CALL READ_SURF('OFFLIN','Qair', PQA (:,1:XCOUNT),IRET) 00077 CALL READ_SURF('OFFLIN','Wind', PWIND (:,1:XCOUNT),IRET) 00078 CALL READ_SURF('OFFLIN','LWdown', PLW (:,1:XCOUNT),IRET) 00079 CALL READ_SURF('OFFLIN','DIR_SWdown',PDIR_SW(:,1:XCOUNT),IRET) 00080 CALL READ_SURF('OFFLIN','SCA_SWdown',PSCA_SW(:,1:XCOUNT),IRET) 00081 CALL READ_SURF('OFFLIN','Rainf', PRAIN (:,1:XCOUNT),IRET) 00082 CALL READ_SURF('OFFLIN','Snowf', PSNOW (:,1:XCOUNT),IRET) 00083 CALL READ_SURF('OFFLIN','PSurf', PPS (:,1:XCOUNT),IRET) 00084 CALL READ_SURF('OFFLIN','Wind_DIR', PDIR (:,1:XCOUNT),IRET) 00085 CALL READ_SURF('OFFLIN','CO2air', PCO2 (:,1:XCOUNT),IRET) 00086 IF (LHOOK) CALL DR_HOOK('OL_READ_ATM_NETCDF',1,ZHOOK_HANDLE) 00087 00088 END SUBROUTINE OL_READ_ATM_NETCDF