Juan 24/05/2017: add MPPDB_CHECK on SURFEX routine for reprod check with MNH_PARALLEL key
authorJuan Escobar <escj@aero.obs-mip.fr>
Mon, 29 May 2017 16:02:38 +0000 (18:02 +0200)
committerJuan Escobar <escj@aero.obs-mip.fr>
Mon, 29 May 2017 16:02:38 +0000 (18:02 +0200)
14 files changed:
src/SURFEX/init_tebn.F90
src/SURFEX/pgd_flake.F90
src/SURFEX/pgd_grid.F90
src/SURFEX/pgd_isba.F90
src/SURFEX/pgd_seaflux.F90
src/SURFEX/pgd_surf_atm.F90
src/SURFEX/pgd_teb.F90
src/SURFEX/read_pgd_isban.F90
src/SURFEX/read_pgd_tebn.F90
src/SURFEX/zoom_pgd_cover.F90
src/SURFEX/zoom_pgd_isba.F90
src/SURFEX/zoom_pgd_orography.F90
src/SURFEX/zoom_pgd_seaflux.F90
src/SURFEX/zoom_pgd_teb.F90

index b4d57f2..e1e153a 100644 (file)
@@ -40,6 +40,7 @@
 !!    -------------
 !!      Original    01/2003
 !!      G. Pigeon   09/2012: add ROUGH_WALL/ROUGH_ROOF/CH_BEM for conv. coef.
+!!      M.Moge      02/2015 MPPDB_CHECK
 !-------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -156,6 +157,11 @@ USE MODI_SET_SURFEX_FILEIN
 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
 USE PARKIND1  ,ONLY : JPRB
 !
+#ifdef MNH_PARALLEL
+USE MODD_DATA_COVER_PAR, ONLY : JPCOVER
+USE MODE_MPPDB
+!
+#endif
 IMPLICIT NONE
 !
 !*       0.1   Declarations of arguments
@@ -310,6 +316,9 @@ END SELECT
  CALL READ_COVER_GARDEN(HPROGRAM,LGARDEN)
 !
  CALL READ_PGD_TEB_n(HPROGRAM)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"INIT_TEB_n after READ_PGD_TEB_n:XCOVER",PRECISION,ILUOUT, 'TOWN  ',JPCOVER)
+#endif
 !
  CALL END_IO_SURF_n(HPROGRAM)
 ! 
@@ -319,6 +328,9 @@ ILU = SIZE(XCOVER,1)
 !
 ALLOCATE(XTEB_PATCH(ILU,NTEB_PATCH))
  CALL CONVERT_TEB(XCOVER,XTEB_PATCH)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"INIT_TEB_n after CONVERT_TEB:XCOVER",PRECISION,ILUOUT, 'TOWN  ',JPCOVER)
+#endif
 !
  CALL SET_SURFEX_FILEIN(HPROGRAM,'PREP') ! restore input file name
  CALL INIT_IO_SURF_n(HPROGRAM,'TOWN  ','TEB   ','READ ')
@@ -634,6 +646,9 @@ DO JPATCH=1,NTEB_PATCH
   CALL GOTO_TEB(JPATCH)
   CALL DIAG_MISC_TEB_INIT_n(HPROGRAM,ILU,ISWB)
 END DO ! end of loop on patches
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"INIT_TEB_n end:XCOVER",PRECISION,ILUOUT, 'TOWN  ',JPCOVER)
+#endif
 !
 !-------------------------------------------------------------------------------
 !
index 6df004c..b0e830a 100644 (file)
@@ -33,6 +33,7 @@
 !!    ------------
 !!
 !!    Original    03/2004
+!!    M. Moge     02/2015 : MPPDB_CHECK
 !!
 !----------------------------------------------------------------------------
 !
@@ -65,6 +66,9 @@ USE MODI_TREAT_GLOBAL_LAKE_DEPTH
 !
 USE MODE_POS_SURF
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+#endif
 !
 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
 USE PARKIND1  ,ONLY : JPRB
@@ -181,6 +185,12 @@ ALLOCATE(XMESH_SIZE (NDIM))
                 CGRID,  XGRID_PAR,                     &
                 LCOVER, XCOVER, XZS,                   &
                 XLAT, XLON, XMESH_SIZE                 )  
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"PGD_FLAKE after PACK_PGD:XCOVER",PRECISION,ILUOUT,'WATER',JPCOVER)
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"PGD_FLAKE after PACK_PGD:XLAT",PRECISION,ILUOUT,'WATER')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"PGD_FLAKE after PACK_PGD:XLON",PRECISION,ILUOUT,'WATER')
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"PGD_FLAKE after PACK_PGD:XMESH_SIZE",PRECISION,ILUOUT,'WATER')
+#endif
 !
 !-------------------------------------------------------------------------------
 !
index 3dc55d7..71f7417 100644 (file)
@@ -74,6 +74,9 @@ USE MODI_PGD_GRID_IO_INIT
 USE MODE_TOOLS_ll, ONLY : GET_MEAN_OF_COORD_SQRT_ll
 !
 USE MODI_GET_SIZE_FULL_n
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+#endif
 USE MODI_SPLIT_GRID
 USE MODD_CONF, ONLY : CPROGRAM
 #endif
@@ -294,6 +297,11 @@ ALLOCATE(XLON       (NSIZE_FULL))
 ALLOCATE(XMESH_SIZE (NSIZE_FULL))
 ALLOCATE(XJPDIR     (NSIZE_FULL))
  CALL LATLON_GRID(CGRID,NGRID_PAR,NSIZE_FULL,ILUOUT,XGRID_PAR,XLAT,XLON,XMESH_SIZE,XJPDIR)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"PGD_GRID after LATLON_GRID:XLAT",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"PGD_GRID after LATLON_GRID:XLON",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"PGD_GRID after LATLON_GRID:XMESH_SIZE",PRECISION,ILUOUT)
+#endif
 !
 !------------------------------------------------------------------------------
 !
index 687a72d..95f7cab 100644 (file)
@@ -40,6 +40,7 @@
 !!    E. Martin     12/2008 : files of data for runoffb and wdrain
 !!    B. Decharme   06/2009 : files of data for topographic index
 !!    A.L. Gibelin  04/2009 : dimension NBIOMASS for ISBA-A-gs
+!!    M. Moge       02/2015 : MPPDB_CHECK
 !!
 !----------------------------------------------------------------------------
 !
@@ -96,6 +97,10 @@ USE PARKIND1  ,ONLY : JPRB
 !
 USE MODI_ABOR1_SFX
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+!
+#endif
 IMPLICIT NONE
 !
 !*    0.1    Declaration of arguments
@@ -329,7 +334,12 @@ ALLOCATE(XZ0EFFJPDIR(ILU))
  CALL PACK_PGD(HPROGRAM, 'NATURE',                    &
                 CGRID,  XGRID_PAR,                     &
                 LCOVER, XCOVER, XZS,                   &
-                XLAT, XLON, XMESH_SIZE, XZ0EFFJPDIR    )  
+                XLAT, XLON, XMESH_SIZE, XZ0EFFJPDIR    ) 
+#ifdef MNH_PARALLEL 
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"PGD_ISBA after PACK_PGD:XLAT",PRECISION,ILUOUT, 'NATURE')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"PGD_ISBA after PACK_PGD:XLON",PRECISION,ILUOUT, 'NATURE')
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"PGD_ISBA after PACK_PGD:XMESH_SIZE",PRECISION,ILUOUT, 'NATURE')
+#endif
 !
 !-------------------------------------------------------------------------------
 !
index d8a6fe6..4af5b0d 100644 (file)
@@ -34,6 +34,7 @@
 !!
 !!    Original    03/2004
 !!    Lebeaupin-B C. 01/2008 : include bathymetry
+!!    M.Moge      02/2015 check with MPPDB
 !!
 !----------------------------------------------------------------------------
 !
@@ -58,6 +59,11 @@ USE MODI_PGD_SEAFLUX_PAR
 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
 USE PARKIND1  ,ONLY : JPRB
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+USE MODI_GET_LUOUT
+!
+#endif
 IMPLICIT NONE
 !
 !*    0.1    Declaration of arguments
@@ -70,6 +76,9 @@ IMPLICIT NONE
 !            ------------------------------
 !
 REAL, DIMENSION(NL)               :: ZSEABATHY ! bathymetry on all surface points
+#ifdef MNH_PARALLEL
+INTEGER :: ILUOUT
+#endif
 !
 !*    0.3    Declaration of namelists
 !            ------------------------
@@ -93,6 +102,9 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE
 !             -------------------
 !
 IF (LHOOK) CALL DR_HOOK('PGD_SEAFLUX',0,ZHOOK_HANDLE)
+#ifdef MNH_PARALLEL
+ CALL GET_LUOUT(HPROGRAM,ILUOUT)
+#endif
  CALL READ_NAM_PGD_SEABATHY(HPROGRAM,YSEABATHY,YSEABATHYFILETYPE,YNCVARNAME,&
        XUNIF_SEABATHY)  
 !
@@ -126,6 +138,11 @@ ALLOCATE(XMESH_SIZE (NDIM))
                 CGRID,  XGRID_PAR,                     &
                 LCOVER, XCOVER, XZS,                   &
                 XLAT, XLON, XMESH_SIZE                 )  
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"PGD_SEAFLUX after PACK_PGD:XLAT",PRECISION,ILUOUT,'SEA')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"PGD_SEAFLUX after PACK_PGD:XLON",PRECISION,ILUOUT,'SEA')
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"PGD_SEAFLUX after PACK_PGD:XMESH_SIZE",PRECISION,ILUOUT,'SEA')
+#endif
 !
  CALL PACK_PGD_SEAFLUX(HPROGRAM, ZSEABATHY)
 !
index 68f0c41..8e9e86a 100644 (file)
@@ -35,6 +35,7 @@
 !!    Original     13/10/03
 !!      A. Lemonsu      05/2009         Ajout de la clef LGARDEN pour TEB
 !!      J. Escobar      11/2013         Add USE MODI_READ_NAM_PGD_CHEMISTRY
+!!      M.Moge          02/2015         check with MPPDB
 !----------------------------------------------------------------------------
 !
 !*    0.     DECLARATION
@@ -83,6 +84,10 @@ USE PARKIND1  ,ONLY : JPRB
 !
 USE MODI_READ_NAM_PGD_CHEMISTRY
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+!
+#endif
 IMPLICIT NONE
 !
 !*    0.1    Declaration of dummy arguments
@@ -133,6 +138,11 @@ ALLOCATE(XLON(NSIZE_FULL))
 ALLOCATE(XMESH_SIZE(NSIZE_FULL))
 ALLOCATE(XJPDIR(NSIZE_FULL))
  CALL LATLON_GRID(CGRID,NGRID_PAR,NSIZE_FULL,ILUOUT,XGRID_PAR,XLAT,XLON,XMESH_SIZE,XJPDIR)
+#ifdef MNH_PARALLEL
+! CALL MPPDB_CHECK_SURFEX2D(XLAT,"PGD_SURF_ATM_n after LATLON_GRID:XLAT",PRECISION,ILUOUT)
+! CALL MPPDB_CHECK_SURFEX2D(XLON,"PGD_SURF_ATM_n after LATLON_GRID:XLON",PRECISION,ILUOUT)
+! CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"PGD_SURF_ATM_n after LATLON_GRID:XMESH_SIZE",PRECISION,ILUOUT)
+#endif
 !
 !
 !*    2.3     Stores the grid in the module MODD_PGD_GRID
index d9bc791..bd4a916 100644 (file)
@@ -35,6 +35,7 @@
 !!    Original    10/12/97
 !!    A. Lemonsu      05/2009         Key for garden option
 !!    G. Pigeon     /09/12: WALL, ROOF, FLOOR, MASS LAYER default to 5
+!!    M. Moge       02/2015 : MPPDB_CHECK
 !!
 !----------------------------------------------------------------------------
 !
@@ -63,6 +64,10 @@ USE MODI_ABOR1_SFX
 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
 USE PARKIND1  ,ONLY : JPRB
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+!
+#endif
 USE MODI_WRITE_COVER_TEX_TEB
 !
 IMPLICIT NONE
@@ -136,6 +141,12 @@ ALLOCATE(XMESH_SIZE (NDIM))
                 CGRID,  XGRID_PAR,                   &
                 LCOVER, XCOVER, XZS,                 &
                 XLAT, XLON, XMESH_SIZE               )  
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"PGD_TEB after PACK_PGD:XCOVER",PRECISION,ILUOUT, 'TOWN  ',JPCOVER)
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"PGD_TEB after PACK_PGD:XLAT",PRECISION,ILUOUT, 'TOWN  ')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"PGD_TEB after PACK_PGD:XLON",PRECISION,ILUOUT, 'TOWN  ')
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"PGD_TEB after PACK_PGD:XMESH_SIZE",PRECISION,ILUOUT, 'TOWN  ')
+#endif
 !
 !-------------------------------------------------------------------------------
 !
index 7a71215..8445f50 100644 (file)
@@ -37,7 +37,7 @@
 !!      B. Decharme   06/2009 : add topographic index statistics
 !!      A.L. Gibelin 04/2009 : dimension NBIOMASS for ISBA-A-gs
 !!      B. Decharme  07/2012  : files of data for permafrost area and for SOC top and sub soil
-!!      M. Moge      02/2015 READ_SURF
+!!      M. Moge      02/2015 READ_SURF // + MPPDB_CHECK
 !-------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -86,6 +86,10 @@ USE MODI_GET_LUOUT
 USE MODI_PACK_SAME_RANK
 USE MODI_GET_SURF_MASK_n
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+!
+#endif
 IMPLICIT NONE
 !
 !*       0.1   Declarations of arguments
@@ -225,6 +229,9 @@ ALLOCATE(LCOVER(JPCOVER))
 !
 ALLOCATE(XCOVER(NDIM,JPCOVER))
  CALL READ_SURF(HPROGRAM,'COVER',XCOVER(:,:),LCOVER,IRESP,HDIR='H')
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"READ_PGD_ISBA_n after READ_SURF:XCOVER",PRECISION,ILUOUT,'NATURE',JPCOVER)
+#endif
 !
 !*       3.2    Orography :
 !               ---------
@@ -242,6 +249,11 @@ ALLOCATE(XLON       (NDIM))
 ALLOCATE(XMESH_SIZE (NDIM))
 ALLOCATE(XZ0EFFJPDIR(NDIM))
  CALL READ_GRID(HPROGRAM,CGRID,XGRID_PAR,XLAT,XLON,XMESH_SIZE,IRESP,XZ0EFFJPDIR)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"READ_PGD_ISBA_n after READ_GRID:XLAT",PRECISION,ILUOUT,'NATURE')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"READ_PGD_ISBA_n after READ_GRID:XLON",PRECISION,ILUOUT,'NATURE')
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"READ_PGD_ISBA_n after READ_GRID:XMESH_SIZE",PRECISION,ILUOUT,'NATURE')
+#endif
 !
 !* clay fraction : attention, seul un niveau est present dans le fichier
 !* on rempli tout les niveaux de  XCLAY avec les valeurs du fichiers
index b4d7222..f3f7c40 100644 (file)
@@ -33,7 +33,7 @@
 !!    MODIFICATIONS
 !!    -------------
 !!      Original    01/2003 
-!!      M. Moge     02/2015 READ_SURF
+!!      M. Moge     02/2015 READ_SURF // + MPPDB_CHECK
 !-------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -65,6 +65,11 @@ USE MODI_GET_TYPE_DIM_n
 !
 USE MODI_READ_LECOCLIMAP
 !
+#ifdef MNH_PARALLEL
+USE MODI_GET_LUOUT
+USE MODE_MPPDB
+!
+#endif
 IMPLICIT NONE
 !
 !*       0.1   Declarations of arguments
@@ -76,6 +81,9 @@ IMPLICIT NONE
 !              -------------------------------
 !
 INTEGER           :: IRESP          ! Error code after redding
+#ifdef MNH_PARALLEL
+INTEGER :: ILUOUT  ! output listing logical unit
+#endif
 !
  CHARACTER(LEN=LEN_HREC) :: YRECFM         ! Name of the article to be read
 INTEGER           :: IVERSION
@@ -87,6 +95,9 @@ REAL(KIND=JPRB) :: ZHOOK_HANDLE
 !* 1D physical dimension
 !
 IF (LHOOK) CALL DR_HOOK('READ_PGD_TEB_N',0,ZHOOK_HANDLE)
+#ifdef MNH_PARALLEL
+ CALL GET_LUOUT(HPROGRAM,ILUOUT)
+#endif
 YRECFM='SIZE_TOWN'
  CALL GET_TYPE_DIM_n('TOWN  ',NDIM)
 !
@@ -163,6 +174,9 @@ ALLOCATE(LCOVER(JPCOVER))
 !
 ALLOCATE(XCOVER(NDIM,JPCOVER))
  CALL READ_SURF(HPROGRAM,'COVER',XCOVER(:,:),LCOVER,IRESP,HDIR='H')
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"READ_PGD_TEB_n after READ_SURF:XCOVER",PRECISION,ILUOUT, 'TOWN  ',JPCOVER)
+#endif
 !
 !* orography
 !
@@ -177,6 +191,11 @@ ALLOCATE(XLAT      (NDIM))
 ALLOCATE(XLON      (NDIM))
 ALLOCATE(XMESH_SIZE(NDIM))
  CALL READ_GRID(HPROGRAM,CGRID,XGRID_PAR,XLAT,XLON,XMESH_SIZE,IRESP)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"READ_PGD_TEB_n after READ_GRID:XLAT",PRECISION,ILUOUT,'TOWN  ')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"READ_PGD_TEB_n after READ_GRID:XLON",PRECISION,ILUOUT,'TOWN  ')
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"READ_PGD_TEB_n after READ_GRID:XMESH_SIZE",PRECISION,ILUOUT,'TOWN  ')
+#endif
 !
 !
 !-------------------------------------------------------------------------------
index b2a8fbf..01bd7da 100644 (file)
@@ -37,7 +37,7 @@
 !     Modification 17/04/12 M.Tomasini All COVER physiographic fields are now 
 !!                                     interpolated for spawning => 
 !!                                     ABOR1_SFX if (.NOT.OECOCLIMAP) in comment
-!     Modification 05/02/15 M.Moge : use NSIZE_FULL instead of SIZE(XLAT) (for clarity)
+!     Modification 05/02/15 M.Moge : MPPDB_CHECK + use NSIZE_FULL instead of SIZE(XLAT) (for clarity)
 !!      J.Escobar 18/12/2015 : missing interface
 !----------------------------------------------------------------------------
 !
@@ -72,6 +72,10 @@ USE MODI_READ_SURFX2COV_1COV_MNH
 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
 USE PARKIND1  ,ONLY : JPRB
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+!
+#endif
 IMPLICIT NONE
 !
 !*    0.1    Declaration of dummy arguments
@@ -126,6 +130,10 @@ IF (LHOOK) CALL DR_HOOK('ZOOM_PGD_COVER',0,ZHOOK_HANDLE)
  CALL PREP_GRID_EXTERN(HINIFILETYPE,ILUOUT,CINGRID_TYPE,CINTERP_TYPE,INI)
 !
  CALL PREP_OUTPUT_GRID(ILUOUT,CGRID,XGRID_PAR,XLAT,XLON)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"ZOOM_PGD_COVER:XLAT",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"ZOOM_PGD_COVER:XLON",PRECISION,ILUOUT)
+#endif
 !
 !------------------------------------------------------------------------------
 !
@@ -194,6 +202,9 @@ IF ( HPROGRAM == 'MESONH' ) THEN
     ENDIF
     !
     CALL HOR_INTERPOL_1COV(ILUOUT,ZCOVER,XCOVER(:,JCOVER))
+#ifdef MNH_PARALLEL
+    CALL MPPDB_CHECK_SURFEX3D(XCOVER,"ZOOM_PGD_COVER:XCOVER",PRECISION,ILUOUT,'FULL',JPCOVER)
+#endif
     !
     ZSUM(:) = ZSUM(:) + XCOVER(:,JCOVER)
     !
@@ -207,6 +218,9 @@ ENDIF
 !
 !  Coherence check
 !
+#ifdef MNH_PARALLEL
+CALL MPPDB_CHECK_SURFEX2D(ZSUM,"ZOOM_PGD_COVER:ZSUM",PRECISION,ILUOUT)
+#endif
 DO JCOVER=1,JPCOVER
   XCOVER(:,JCOVER) = XCOVER(:,JCOVER)/ZSUM(:)
   IF (ALL(XCOVER(:,JCOVER)==0.)) LCOVER(JCOVER) = .FALSE.
@@ -281,6 +295,12 @@ IF (NSIZE_SEA   >0)CALL GET_1D_MASK( NSIZE_SEA,    NSIZE_FULL, XSEA   , NR_SEA
 IF (NSIZE_WATER >0)CALL GET_1D_MASK( NSIZE_WATER,  NSIZE_FULL, XWATER , NR_WATER )
 IF (NSIZE_TOWN  >0)CALL GET_1D_MASK( NSIZE_TOWN,   NSIZE_FULL, XTOWN  , NR_TOWN  )
 IF (NSIZE_NATURE>0)CALL GET_1D_MASK( NSIZE_NATURE, NSIZE_FULL, XNATURE, NR_NATURE)
+#ifdef MNH_PARALLEL
+CALL MPPDB_CHECK_SURFEX2D(XSEA,"ZOOM_PGD_COVER:XSEA",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XWATER,"ZOOM_PGD_COVER:XWATER",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XTOWN,"ZOOM_PGD_COVER:XTOWN",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XNATURE,"ZOOM_PGD_COVER:XNATURE",PRECISION,ILUOUT)
+#endif
 IF (LHOOK) CALL DR_HOOK('ZOOM_PGD_COVER',1,ZHOOK_HANDLE)
 
 !_______________________________________________________________________________
index 930dc17..f881656 100644 (file)
@@ -36,6 +36,7 @@
 !!    Original     13/10/03
 !!    B. Decharme      2008  XWDRAIN
 !!    M.Tomasini    17/04/12  Add interpolation for ISBA variables (MODD_DATA_ISBA_n)
+!     M.Moge        05/02/15  MPPDB_CHECK
 !----------------------------------------------------------------------------
 !
 !*    0.     DECLARATION
@@ -66,6 +67,10 @@ USE MODI_PACK_PGD_ISBA
 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
 USE PARKIND1  ,ONLY : JPRB
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+!
+#endif
 IMPLICIT NONE
 !
 !*    0.1    Declaration of dummy arguments
@@ -182,6 +187,13 @@ ALLOCATE(XZ0EFFJPDIR(ILU))
                 CGRID,  XGRID_PAR,                     &
                 LCOVER, XCOVER, XZS,                   &
                 XLAT, XLON, XMESH_SIZE, XZ0EFFJPDIR    )  
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"ZOOM_PGD_ISBA:XCOVER",PRECISION,ILUOUT,'NATURE',JPCOVER)
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"ZOOM_PGD_ISBA:XLAT",PRECISION,ILUOUT,'NATURE')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"ZOOM_PGD_ISBA:XLON",PRECISION,ILUOUT,'NATURE')
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"ZOOM_PGD_ISBA:XMESH_SIZE",PRECISION,ILUOUT,'NATURE')
+ CALL MPPDB_CHECK_SURFEX2D(XZ0EFFJPDIR,"ZOOM_PGD_ISBA:XZ0EFFJPDIR",PRECISION,ILUOUT,'NATURE')
+#endif
 !
 !------------------------------------------------------------------------------
 !
@@ -193,6 +205,12 @@ ALLOCATE(XCLAY(ILU,NGROUND_LAYER))
 ALLOCATE(XRUNOFFB(ILU))
 ALLOCATE(XWDRAIN (ILU))
  CALL ZOOM_PGD_ISBA_FULL(HPROGRAM,HINIFILE,HINIFILETYPE)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XSAND,"ZOOM_PGD_ISBA:XSAND",PRECISION,ILUOUT,'NATURE',NGROUND_LAYER)
+ CALL MPPDB_CHECK_SURFEX3D(XCLAY,"ZOOM_PGD_ISBA:XCLAY",PRECISION,ILUOUT,'NATURE',NGROUND_LAYER)
+ CALL MPPDB_CHECK_SURFEX2D(XRUNOFFB,"ZOOM_PGD_ISBA:XRUNOFFB",PRECISION,ILUOUT,'NATURE')
+ CALL MPPDB_CHECK_SURFEX2D(XWDRAIN,"ZOOM_PGD_ISBA:XWDRAIN",PRECISION,ILUOUT,'NATURE')
+#endif
 !
 !-------------------------------------------------------------------------------
 !
@@ -218,6 +236,17 @@ ALLOCATE(ZSSO_SLOPE(IL))
                      ZAOSIP, ZAOSIM, ZAOSJP, ZAOSJM,              &
                      ZHO2IP, ZHO2IM, ZHO2JP, ZHO2JM,              &
                      ZSSO_SLOPE                                   )  
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(ZAOSIP,"ZOOM_PGD_ISBA:ZAOSIP",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(ZAOSIM,"ZOOM_PGD_ISBA:ZAOSIM",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(ZAOSJP,"ZOOM_PGD_ISBA:ZAOSJP",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(ZAOSJM,"ZOOM_PGD_ISBA:ZAOSJM",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(ZHO2IP,"ZOOM_PGD_ISBA:ZHO2IP",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(ZHO2IM,"ZOOM_PGD_ISBA:ZHO2IM",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(ZHO2JP,"ZOOM_PGD_ISBA:ZHO2JP",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(ZHO2JM,"ZOOM_PGD_ISBA:ZHO2JM",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(ZSSO_SLOPE,"ZOOM_PGD_ISBA:ZSSO_SLOPE",PRECISION,ILUOUT)
+#endif
 !
 DEALLOCATE(ZAOSIP)
 DEALLOCATE(ZAOSIM)
index d74a886..b5b502d 100644 (file)
@@ -64,6 +64,11 @@ USE PARKIND1  ,ONLY : JPRB
 USE MODI_CLEAN_PREP_OUTPUT_GRID
 !
 USE MODI_GET_LUOUT
+#ifdef MNH_PARALLEL
+!
+USE MODE_MPPDB
+!
+#endif
 IMPLICIT NONE
 !
 !*    0.1    Declaration of dummy arguments
@@ -127,6 +132,10 @@ CALL GOTO_MODEL_MNH(HPROGRAM, 1, IINFO_ll)
  CALL PREP_GRID_EXTERN(HINIFILETYPE,ILUOUT,CINGRID_TYPE,CINTERP_TYPE,INI)
 !
  CALL PREP_OUTPUT_GRID(ILUOUT,CGRID,XGRID_PAR,XLAT,XLON)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"ZOOM_PGD_OROGRAPHY:XLAT",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"ZOOM_PGD_OROGRAPHY:XLON",PRECISION,ILUOUT)
+#endif
 !
 !------------------------------------------------------------------------------
 !
@@ -282,6 +291,25 @@ WHERE (PWATER(:)==1.)
   XAOSJP(:) = 0.
   XAOSJM(:) = 0.
 END WHERE
+#ifdef MNH_PARALLEL
+CALL MPPDB_CHECK_SURFEX2D(XZS,"ZOOM_PGD_OROGRAPHY:XZS",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XAVG_ZS,"ZOOM_PGD_OROGRAPHY:XAVG_ZS",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XSIL_ZS,"ZOOM_PGD_OROGRAPHY:XSIL_ZS",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XSSO_STDEV,"ZOOM_PGD_OROGRAPHY:XSSO_STDEV",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XMIN_ZS,"ZOOM_PGD_OROGRAPHY:XMIN_ZS",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XMAX_ZS,"ZOOM_PGD_OROGRAPHY:XMAX_ZS",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XSSO_ANIS,"ZOOM_PGD_OROGRAPHY:XSSO_ANIS",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XSSO_DIR,"ZOOM_PGD_OROGRAPHY:XSSO_DIR",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XSSO_SLOPE,"ZOOM_PGD_OROGRAPHY:XSSO_SLOPE",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XAOSIP,"ZOOM_PGD_OROGRAPHY:XAOSIP",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XAOSIM,"ZOOM_PGD_OROGRAPHY:XAOSIM",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XAOSJP,"ZOOM_PGD_OROGRAPHY:XAOSJP",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XAOSJM,"ZOOM_PGD_OROGRAPHY:XAOSJM",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XHO2IP,"ZOOM_PGD_OROGRAPHY:XHO2IP",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XHO2IM,"ZOOM_PGD_OROGRAPHY:XHO2IM",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XHO2JP,"ZOOM_PGD_OROGRAPHY:XHO2JP",PRECISION,ILUOUT)
+CALL MPPDB_CHECK_SURFEX2D(XHO2JM,"ZOOM_PGD_OROGRAPHY:XHO2JM",PRECISION,ILUOUT)
+#endif
 !
 ! go back to child model
 !CALL GOTO_MODEL_SURFEX(2, .TRUE.)   ! cette routine plante
index 67b8b5d..458986a 100644 (file)
@@ -35,6 +35,7 @@
 !!    Original    09/2008
 !!    G. TANGUY   03/2009 : add reading and interpolation of XDATA_SST and 
 !!                          TDATA_SST in the case LDATA_SST=T
+!     Modification 05/02/15 M.Moge : MPPDB_CHECK
 !!
 !----------------------------------------------------------------------------
 !
@@ -63,6 +64,10 @@ USE MODI_CLEAN_PREP_OUTPUT_GRID
 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
 USE PARKIND1  ,ONLY : JPRB
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+!
+#endif
 IMPLICIT NONE
 !
 !*    0.1    Declaration of arguments
@@ -122,6 +127,11 @@ ALLOCATE(XMESH_SIZE (NDIM))
                 CGRID,  XGRID_PAR, LCOVER,             &
                 XCOVER, XZS,                           &
                 XLAT, XLON, XMESH_SIZE                 )  
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"ZOOM_PGD_SEAFLUX:XCOVER",PRECISION,ILUOUT, 'SEA',JPCOVER)
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"ZOOM_PGD_SEAFLUX:XMESH_SIZE",PRECISION,ILUOUT, 'SEA')
+ CALL MPPDB_CHECK_SURFEX2D(XZS,"ZOOM_PGD_SEAFLUX:XZS",PRECISION,ILUOUT, 'SEA')
+#endif
 !
 !------------------------------------------------------------------------------
 !
@@ -131,6 +141,10 @@ ALLOCATE(XMESH_SIZE (NDIM))
  CALL PREP_GRID_EXTERN(HINIFILETYPE,ILUOUT,CINGRID_TYPE,CINTERP_TYPE,INI)
 !
  CALL PREP_OUTPUT_GRID(ILUOUT,CGRID,XGRID_PAR,XLAT,XLON)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"ZOOM_PGD_SEAFLUX:XLAT",PRECISION,ILUOUT, 'SEA')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"ZOOM_PGD_SEAFLUX:XLON",PRECISION,ILUOUT, 'SEA')
+#endif
 !
 !* mask where interpolations must be done
 !
index 8183819..d634756 100644 (file)
@@ -34,6 +34,7 @@
 !!    ------------
 !!
 !!    Original     13/10/03
+!     Modification 05/02/15 M.Moge : MPPDB_CHECK
 !----------------------------------------------------------------------------
 !
 !*    0.     DECLARATION
@@ -68,6 +69,10 @@ USE MODI_GOTO_TEB
 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
 USE PARKIND1  ,ONLY : JPRB
 !
+#ifdef MNH_PARALLEL
+USE MODE_MPPDB
+!
+#endif
 !
 IMPLICIT NONE
 !
@@ -138,6 +143,13 @@ ALLOCATE(XMESH_SIZE (ILU))
                 CGRID,  XGRID_PAR,                     &
                 LCOVER, XCOVER, XZS,                   &
                 XLAT, XLON, XMESH_SIZE                 )  
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCOVER,"ZOOM_PGD_TEB:XCOVER",PRECISION,ILUOUT, 'TOWN  ',JPCOVER)
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"ZOOM_PGD_TEB:XLAT",PRECISION,ILUOUT, 'TOWN  ')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"ZOOM_PGD_TEB:XLON",PRECISION,ILUOUT, 'TOWN  ')
+ CALL MPPDB_CHECK_SURFEX2D(XMESH_SIZE,"ZOOM_PGD_TEB:XMESH_SIZE",PRECISION,ILUOUT, 'TOWN  ')
+ CALL MPPDB_CHECK_SURFEX2D(XZS,"ZOOM_PGD_TEB:XZS",PRECISION,ILUOUT, 'TOWN  ')
+#endif
 !
 NDIM = ILU
 !
@@ -152,6 +164,10 @@ NDIM = ILU
  CALL PREP_GRID_EXTERN(HINIFILETYPE,ILUOUT,CINGRID_TYPE,CINTERP_TYPE,INI)
 !
  CALL PREP_OUTPUT_GRID(ILUOUT,CGRID,XGRID_PAR,XLAT,XLON)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(XLAT,"ZOOM_PGD_TEB:XLAT",PRECISION,ILUOUT, 'TOWN  ')
+ CALL MPPDB_CHECK_SURFEX2D(XLON,"ZOOM_PGD_TEB:XLON",PRECISION,ILUOUT, 'TOWN  ')
+#endif
 !
 !
 !------------------------------------------------------------------------------
@@ -256,6 +272,9 @@ DO JLAYER=1,NGROUND_LAYER
 END DO
 ALLOCATE(XSAND(ILU,NGROUND_LAYER))
  CALL HOR_INTERPOL(ILUOUT,ZIN,XSAND)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XSAND,"ZOOM_PGD_TEB_GARDEB:XSAND",PRECISION,ILUOUT, 'TOWN  ',NGROUND_LAYER)
+#endif
 DEALLOCATE(ZIN)
 !
 !* clay
@@ -269,6 +288,9 @@ DO JLAYER=1,NGROUND_LAYER
 END DO
 ALLOCATE(XCLAY(ILU,NGROUND_LAYER))
  CALL HOR_INTERPOL(ILUOUT,ZIN,XCLAY)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(XCLAY,"ZOOM_PGD_TEB_GARDEB:XCLAY",PRECISION,ILUOUT, 'TOWN  ',NGROUND_LAYER)
+#endif
 DEALLOCATE(ZIN)
 !
 !* runoff & drainage
@@ -280,6 +302,9 @@ CALL READ_SURF(HPROGRAM,YRECFM,ZFIELD,IRESP,HDIR='A')
 ZIN(:,1) = ZFIELD(:)
 ALLOCATE(XRUNOFFB(ILU))
  CALL HOR_INTERPOL(ILUOUT,ZIN,ZOUT)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(ZOUT,"ZOOM_PGD_TEB_GARDEB:ZOUT",PRECISION,ILUOUT, 'TOWN  ',1)
+#endif
 XRUNOFFB(:) = ZOUT(:,1)
 !
 IF (IVERSION<=3) THEN
@@ -291,6 +316,9 @@ ELSE
  ZIN(:,1) = ZFIELD(:)
  ALLOCATE(XWDRAIN(ILU))
  CALL HOR_INTERPOL(ILUOUT,ZIN,ZOUT)
+#ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX3D(ZOUT,"ZOOM_PGD_TEB_GARDEB:ZOUT",PRECISION,ILUOUT, 'TOWN  ',1)
+#endif
  XWDRAIN(:) = ZOUT(:,1)
 ENDIF
 !