SURFEX v7.3
General documentation of Surfex
 All Classes Files Functions Variables Typedefs
/home/dasprezs/EXPORT_v7_3/src/SURFEX/get_fracn.F90
Go to the documentation of this file.
00001 !     #########
00002       SUBROUTINE GET_FRAC_n(HPROGRAM,KI,PSEA,PWATER,PNATURE,PTOWN)
00003 !     ########################################
00004 !
00005 !!****  *GET_FRAC_n* - routine to get some surface fields
00006 !!
00007 !!    PURPOSE
00008 !!    -------
00009 !!
00010 !!**  METHOD
00011 !!    ------
00012 !!
00013 !!    EXTERNAL
00014 !!    --------
00015 !!
00016 !!
00017 !!    IMPLICIT ARGUMENTS
00018 !!    ------------------
00019 !!
00020 !!    REFERENCE
00021 !!    ---------
00022 !!
00023 !!
00024 !!    AUTHOR
00025 !!    ------
00026 !!      V. Masson   *Meteo France*      
00027 !!
00028 !!    MODIFICATIONS
00029 !!    -------------
00030 !!      Original    01/2004
00031 !-------------------------------------------------------------------------------
00032 !
00033 !*       0.    DECLARATIONS
00034 !              ------------
00035 !
00036 USE MODI_GET_LUOUT
00037 !
00038 USE MODD_SURF_ATM_n,     ONLY : XSEA, XWATER, XNATURE, XTOWN
00039 !
00040 !
00041 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
00042 USE PARKIND1  ,ONLY : JPRB
00043 !
00044 USE MODI_ABOR1_SFX
00045 !
00046 IMPLICIT NONE
00047 !
00048 !*       0.1   Declarations of arguments
00049 !              -------------------------
00050 !
00051  CHARACTER(LEN=6),     INTENT(IN)            :: HPROGRAM
00052 INTEGER,              INTENT(IN)            :: KI      ! number of points
00053 REAL, DIMENSION(KI),  INTENT(OUT)           :: PSEA    ! sea    fraction
00054 REAL, DIMENSION(KI),  INTENT(OUT)           :: PWATER  ! water  fraction
00055 REAL, DIMENSION(KI),  INTENT(OUT)           :: PNATURE ! nature fraction
00056 REAL, DIMENSION(KI),  INTENT(OUT)           :: PTOWN   ! town   fraction
00057 !
00058 !
00059 !*       0.2   Declarations of local variables
00060 !              -------------------------------
00061 !
00062 INTEGER :: ILUOUT
00063 REAL(KIND=JPRB) :: ZHOOK_HANDLE
00064 !
00065 !-------------------------------------------------------------------------------
00066 IF (LHOOK) CALL DR_HOOK('GET_FRAC_N',0,ZHOOK_HANDLE)
00067  CALL GET_LUOUT(HPROGRAM,ILUOUT)
00068 !-------------------------------------------------------------------------------
00069 !
00070 IF ( SIZE(PSEA) /= SIZE(XSEA) ) THEN
00071   WRITE(ILUOUT,*) 'try to get SEA field from atmospheric model, but size is not correct'
00072   WRITE(ILUOUT,*) 'size of field expected by the atmospheric model (PSEA) :', SIZE(PSEA)
00073   WRITE(ILUOUT,*) 'size of field inthe surface                     (XSEA) :', SIZE(XSEA)
00074   CALL ABOR1_SFX('GET_FRACN: SEA SIZE NOT CORRECT')
00075 ELSE
00076   PSEA    = XSEA
00077   PNATURE = XNATURE
00078   PWATER  = XWATER
00079   PTOWN   = XTOWN
00080 END IF
00081 IF (LHOOK) CALL DR_HOOK('GET_FRAC_N',1,ZHOOK_HANDLE)
00082 !
00083 !==============================================================================
00084 !
00085 END SUBROUTINE GET_FRAC_n