Skip to content
Snippets Groups Projects
Commit 39808167 authored by RIETTE Sébastien's avatar RIETTE Sébastien
Browse files

Merge branch 'main' into GPU

Compilation with FCM
Bugfix for MesoNH bit-repro
parents df62d729 3a66131b
No related branches found
No related tags found
No related merge requests found
Showing
with 454 additions and 15 deletions
# Ignore the object directories generated by the fcm compilation
/build/with_fcm/arch_*
# Ignore the content of the fcm directory but not the directory itself
/build/with_fcm/fcm/**
!/build/with_fcm/fcm/.gitkeep
# Ignore the content of the fiat directory but not the directory itself
/build/with_fcm/fiat/**
!/build/with_fcm/fiat/.gitkeep
# PHYEX # PHYEX
PHYsique EXternalisée PHYsique EXternalisée
## Build
The build systems can be found in the `build` directory.
The PHYEX compilation depends on the fiat (https://github.com/ecmwf-ifs/fiat) package.
### Build with FCM
In the `with_fcm` subdirectory, a build system based on the FCM (https://github.com/metomi/fcm) tool is available.
The command `make_fcm.sh` (call it with the '-h' option to get help):
- clone the fcm tool
- clone the fiat package
- compile the PHYEX and (part of) the fiat package
- create a shared library (.so)
The resulting shared library (libphyex.so) is under the architecture specific directory created by the script.
Directory organisation:
- the fcm subdirectory contains the fcm tool. In the PHYEX git repository, this directory is empty.
It will be populated on first call to the make\_fcm.sh script and content is not tracked by git.
- the fiat subdirectory contains the fiat package from the ECMWF. In the PHYEX git repository, this directory is empty.
It will be populated on first call to the make\_fcm.sh script and content is not tracked by git.
- the arch subdirectory contains architecture specific files. An alternative arch directory can be
provided on the command line when calling the make\_fcm.sh script
- arch\_\* subdirectories are automatically created by the make\_fcm.sh script and are tracked by git.
- the make\_fcm.sh script will:
- populate the fcm and fiat directories on first call
- create the arch\_$ARCH directory, poulate it with arch specific files and a compilation script
- execute the newly created compilation script
Note: full cleaning is achieved by removing the arch\_\* subdirectories.
Note: documentation of the make\_fcm.sh script can be obtained with the -h option
module purge
module load gcc/9.1.0
module load intel-all
module load gcc/9.1.0
module load hdf5/1.10.5-mpi
module load netcdf/4.7.2-mpi
module load netcdf-fortran/4.5.2-mpi
source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt
# Compilation
$FCOMPILER = mpiifort
$BASE_FFLAGS = -fPIC -i4 -r8 -auto -align all -fp-model strict
$PROD_FFLAGS = -g -traceback -O3 -xHost -qopt-zmm-usage=high
$DEV_FFLAGS = -g -O1 -traceback
$DEBUG_FFLAGS = -g -traceback -check bounds
$CCOMPILER =
$BASE_CFLAGS =
$PROD_CFLAGS =
$DEV_CFLAGS =
$DEBUG_CFLAGS =
$OMP_FFLAGS = -qopenmp -qopenmp-threadprivate=compat
# Preprocessor
$FPP_FLAGS =
$CPP_FLAGS =
# Linker
$LINK = mpiifort
$BASE_LD = -fPIC -i4 -r8 -auto
$OMP_LD =
$LD_EXE_TO_SHARED =
# Other
$AR = ar
#Kept for latter use
#$FPP = mpiifort -E
#$MAKE = gmake
#$FPP_FLAGS = -P
#$FPP_DEF = KEY_NONE CPP_NETCDF4
#$MPI_LD
#$MPI_FFLAGS
# Compilation
$FCOMPILER = gfortran
$BASE_FFLAGS = -c -fPIC -fdefault-real-8 -fdefault-double-8 -ffree-line-length-none
$PROD_FFLAGS = -O3
$DEV_FFLAGS = -O1
$DEBUG_FFLAGS = -check bounds
$CCOMPILER = gcc
$BASE_CFLAGS = -c -fPIC
$PROD_CFLAGS = -O3
$DEV_CFLAGS = -O1
$DEBUG_CFLAGS = -check bounds
$OMP_FFLAGS =
# Preprocessor
$FPP_FLAGS = LINUX
$CPP_FLAGS = LINUX
# Linker
$LINK = gfortran
$BASE_LD = -fPIC -fdefault-real-8 -fdefault-double-8
$OMP_LD =
$LD_EXE_TO_SHARED = -shared
# Other
$AR = ar
#Kept for latter use
#$FPP = gfortran -E
#$MAKE = gmake
#$FPP_FLAGS = -P
#$FPP_DEF =
#$MPI_LD
#$MPI_FFLAGS
steps = build
################################################################################################
# 1 - INCLUDE FILES
include = arch.fcm
include = config.fcm
################################################################################################
# 2 - CONFIGURATION FOR COMPILERS
# Set Fortran compiler/linker
build.prop{fc} = $FCOMPILER
# Set Fortran compiler options
build.prop{fc.flags} = $BASE_FFLAGS $COMPIL_FFLAGS
#build.prop{fc.include-paths} = /usr/include
build.prop{fc.defs} = $FPP_FLAGS WITHOUT_CXXDEMANGLE
# Set C compiler/linker
build.prop{cc} = $CCOMPILER
# Set C compiler options
build.prop{cc.flags} = $BASE_CFLAGS $COMPIL_CFLAGS
#build.prop{cc.include-paths} = /usr/include
build.prop{cc.defs} = $CPP_FLAGS WITHOUT_CXXDEMANGLE
# Set linker
build.prop{ld} = $LINK
# Set archive command
build.prop{ar} = $AR
################################################################################################
# 3 - TARGET
#############################
# 3.1 Target definition to build a static lib
#build.target = libphyex.a
#build.target-rename = libo.a:libphyex.a
#############################
# 3.2 Target definition to build a static lib
#We need a shared library (.so) but this cannot be build directly with fcm
#The FCM support team says: "FCM doesn’t support building shared libraries."
#We use a dummy program to force fcm to use the linker and we add the needed flags
#to build a shared library instead of a program
# 3.2.a target is the dummy program but linking is hacked and result is renamed
build.target = libphyex.so
build.target-rename = dummyprog.exe:libphyex.so
build.prop{fc.flags-ld} = $LD_FLAGS $LD_EXE_TO_SHARED
# 3.2.b dependencies (internal and external)
$util = util1 util2 util3 util4 util5 util6 util7 util8 util9 util10 util11 util12 util13 util14 util15 util16
$mpi = mpi2 mpi3 mpi4 mpi5 mpi6 mpi7 mpi8 mpi9 mpi10 mpi11 mpi12 mpi13 mpi14 mpi15 mpi16 mpi17 mpi18 mpi19
$system = system1 system2 system3 system4 system5 system6 system7 system8 system10 system11 system12 system13
build.prop{ns-dep.o} = common parkind drhook $util $mpi oml mpl gstats1 $system
build.prop{fc.libs} = $LIBS
# 3.2.c shared lib entry points
build.prop{dep.o.special} = $ENTRYPOINTS
################################################################################################
# 4 - SOURCES
#############################
# 4.1 Dummy programm to force linking
build.source[dummyprog] = src/dummyprog.F90
#############################
# 4.2 Main directory
build.source[common] = src/common/
#############################
# 4.3 Fiat directory
$FIAT = src/fiat
#It would be easier to put the entire fiat directory but there are issues
#with entry points declared twice: in C and in fortran; FCM does not like this
#The issue has been reported to the FCM support team but they have no solution.
#build.source[fiat] = $FIAT
# parkind and drhook must be compiled in order to be able to use them in PHYEX.
# In a first attempt, the mpl needed files were included one-by-one, then
# the one-by-one definition was replaced by a directory inclusion (beacause there was too much to include).
# In case it would be needed to go back to the one-by-one definition, the first needed files are the folowing ones:
# $FIAT/fiat/mpl/internal/mpl_mpif.F90 $FIAT/fiat/mpl/internal/mpl_data_module.F90
# $FIAT/fiat/mpl/internal/mpl_myrank_mod.F90 $FIAT/fiat/mpl/internal/mpi4to8.F90
# $FIAT/fiat/mpl/internal/mpi4to8_m.F90 $FIAT/fiat/mpl/internal/mpi4to8_s.F90
# $FIAT/fiat/mpl/internal/mpl_message_mod.F90 $FIAT/fiat/mpl/internal/mpl_abort_mod.F90
# $FIAT/fiat/mpl/mpl_module.F90 $FIAT/fiat/mpl/internal/mpl_waitany_mod.F90
# $FIAT/fiat/mpl/internal/mpl_write_mod.F90
# 4.3.a Modules and include files needed to compile source codes
build.source[parkind] = $FIAT/parkind
build.source[drhook] = $FIAT/fiat/drhook
build.source[include1] = $FIAT/fiat/include/fiat
build.source[util1] = $FIAT/fiat/util/ec_parkind.F90
build.source[util2] = $FIAT/fiat/util/ec_args_mod.F90
build.source[util3] = $FIAT/fiat/util/ec_lun.F90
build.source[mpi1] = $FIAT/mpi_serial/mpif.h
build.source[oml] = $FIAT/fiat/oml/oml_mod.F90
build.source[gstats1] = $FIAT/fiat/gstats/yomgstats.F90
# 4.3.b Second order dependencies (sources needed for execution, and new module and include files)
build.source[util4] = $FIAT/fiat/util/abor1.F90
# After preprocessing, abor1 does not depend anymore on fckit_module
# I did not succeed to enable the preprocessing step and, at the same time,
# setting util4 to be used in the ns-dep.o property
build.prop{no-dep.f.module}[util4] = fckit_module
build.source[util5] = $FIAT/fiat/util/abor1_c.c
build.source[system1] = $FIAT/fiat/system/internal/tabort.c
build.source[mpi2] = $FIAT/mpi_serial/mpi_comm_rank.F
build.source[mpi3] = $FIAT/mpi_serial/mpi_comm_size.F
build.source[mpi4] = $FIAT/mpi_serial/mpi_send.F
build.source[mpi5] = $FIAT/mpi_serial/mpi_recv.F
build.source[mpi6] = $FIAT/mpi_serial/mpi_initialized.F
build.source[mpi7] = $FIAT/mpi_serial/mpi_error_string.F
build.source[mpi8] = $FIAT/mpi_serial/mpi_barrier.F
build.source[mpi9] = $FIAT/mpi_serial/mpi_abort.F
build.source[util6] = $FIAT/fiat/util/loc_addr.c
build.source[system2] = $FIAT/fiat/system/getstk.c
build.source[system3] = $FIAT/fiat/system/getrss.c
build.source[system4] = $FIAT/fiat/system/getpag.c
build.source[system5] = $FIAT/fiat/system/gethwm.c
build.source[system6] = $FIAT/fiat/system/getcurheap.c
build.source[system7] = $FIAT/fiat/system/getstackusage.c
build.source[system8] = $FIAT/fiat/system/getmaxrss.c
build.source[util7] = $FIAT/fiat/util/internal/ecomp_version.c
build.source[util8] = $FIAT/fiat/util/internal/ecmpi_version.c
build.source[util9] = $FIAT/fiat/util/internal/get_openmp.F90
build.source[util10] = $FIAT/fiat/util/ec_set_umask.c
build.source[util11] = $FIAT/fiat/util/ec_pmon.F90
build.source[util12] = $FIAT/fiat/util/ec_args.c
build.source[util13] = $FIAT/fiat/util/ec_flush.F90
build.source[system9] = $FIAT/fiat/system/getstatm.h
build.source[mpl] = $FIAT/fiat/mpl
build.source[util14] = $FIAT/fiat/util/ec_env_mod.F90
build.source[mpi10] = $FIAT/mpi_serial/mpi_comm_create.F
build.source[mpi11] = $FIAT/mpi_serial/mpi_init_thread.F
build.source[mpi12] = $FIAT/mpi_serial/mpi_buffer_detach.F
build.source[mpi13] = $FIAT/mpi_serial/mpi_comm_group.F
build.source[mpi14] = $FIAT/mpi_serial/mpi_finalized.F
build.source[mpi15] = $FIAT/mpi_serial/mpi_init.F
build.source[mpi16] = $FIAT/mpi_serial/mpi_group_incl.F
build.source[mpi17] = $FIAT/mpi_serial/mpi_finalize.F
build.source[mpi18] = $FIAT/mpi_serial/mpi_buffer_attach.F
build.source[mpi19] = $FIAT/mpi_serial/mpi_bcast.F
build.source[system10] = $FIAT/fiat/system/ec_get_cycles.c
build.source[util15] = $FIAT/fiat/util/ec_meminfo.F90
build.source[util16] = $FIAT/fiat/util/ec_env.c
build.source[system11] = $FIAT/fiat/system/internal/linuxtrbk.c
build.source[util17] = $FIAT/fiat/util/internal/raise.h
build.source[system12] = $FIAT/fiat/system/getstatm.c
build.source[system13] = $FIAT/fiat/system/internal/linux_bind.c
#!/bin/bash
fcm_version=tags/2021.05.0
fiat_version=1295120464c3905e5edcbb887e4921686653eab8
function parse_args()
{
# default values
ARCH_PATH=$PWD/arch
ARCH=gnu
# pass unrecognized arguments to fcm
FCM_ARGS=""
while (($# > 0))
do
OPTION="$1" ; shift
case "$OPTION" in
"-h") cat <<EOF
Usage :
$0 [options]
--help -h help
--arch-path ARCH_PATH directory for architecture specific files (see below) [./arch]
--arch ARCH build using arch files $ARCH_PATH/arch-ARCH.* [gnu]
Unrecognized options are passed to the fcm build command. Useful options include :
--new clean build tree before building
--jobs=N parallel build, similar to make -j N
--ignore-lock ignore lock indicating another build is ongoing, useful after an interrupted build
For details on FCM, see
http://metomi.github.io/fcm/doc/user_guide/build.html
http://metomi.github.io/fcm/doc/user_guide/command_ref.html#fcm-build
EOF
exit;;
"--arch")
ARCH=$1 ; shift ;;
"--arch-path")
ARCH_PATH=$1 ; shift ;;
*)
FCM_ARGS="$FCM_ARGS $OPTION"
;;
esac
done
}
function check_install_fcm()
{
if [ ! -f fcm/bin/fcm ]; then
echo "Performing FCM installation..."
cd fcm
rm -f .gitkeep
git clone https://github.com/metomi/fcm.git .
git checkout tags/$fcm_version
touch .gitkeep
cd ..
echo "...FCM installation done"
fi
}
function check_install_fiat()
{
if [ ! -d fiat/src ]; then
echo "Performing fiat cloning..."
cd fiat
rm -f .gitkeep
git clone https://github.com/ecmwf-ifs/fiat.git .
git checkout $fiat_version
touch .gitkeep
cd ..
echo "...fiat cloning done"
fi
echo
}
function build_compilation_script()
{
cat <<EOF > compilation.sh
#!/bin/bash
. arch.env
level=PROD #PROD DEV or DEBUG
#fcm variables begin with a dollar sign
COMPIL_FFLAGS="\\\$\${level}_FFLAGS"
COMPIL_FFLAGS="\$COMPIL_FFLAGS \\\$OMP_FFLAGS"
COMPIL_CFLAGS="\\\$\${level}_CFLAGS"
LD_FLAGS="\\\$BASE_LD"
LD_FLAGS="\$LD_FLAGS \$OMP_LD"
LIBS="rt dl"
ENTRYPOINTS="rain_ice.o shallow_mf.o turb.o ice_adjust.o ini_neb.o"
FCM_ARGS="$FCM_ARGS"
echo "\\\$COMPIL_FFLAGS = \$COMPIL_FFLAGS" > config.fcm
echo "\\\$COMPIL_CFLAGS = \$COMPIL_CFLAGS" >> config.fcm
echo "\\\$LD_FLAGS = \$LD_FLAGS" >> config.fcm
echo "\\\$ENTRYPOINTS = \$ENTRYPOINTS" >> config.fcm
echo "\\\$LIBS = \$LIBS" >> config.fcm
export PATH=$PWD/../fcm/bin/:\$PATH
echo "This script has generated config.fcm which is included by fcm-make.cfg, the FCM configuration file."
echo "Running : fcm make \$FCM_ARGS"
fcm make \$FCM_ARGS
EOF
chmod +x compilation.sh
}
####################################
# Parse command line arguments
parse_args $*
# Change current working dir
cd -P $(dirname $0)
# Check the fcm installation
check_install_fcm
# Check the fiat installation
check_install_fiat
# Create the build directory and populate it
builddir=arch_$ARCH
if [ -d $builddir ]; then
echo "$builddir already exists. To rerun compilation, please enter this directory and use the compilation.sh script."
echo "Otherwise, you can remove the $builddir directory and execute again this script."
exit 1
fi
mkdir $builddir
cp ${ARCH_PATH}/arch-${ARCH}.env $builddir/arch.env
cp ${ARCH_PATH}/arch-${ARCH}.fcm $builddir/arch.fcm
cp fcm-make.cfg $builddir
cd $builddir
mkdir src
cd src
ln -s ../../../../src/common .
ln -s ../../fiat/src fiat
cat <<EOF > dummyprog.F90
PROGRAM DUMMYPROG
PRINT*, "CREATED TO FORCE FCM TO LINK SOMETHING"
END PROGRAM DUMMYPROG
EOF
cd ..
build_compilation_script
# Run the compilation
./compilation.sh
ln -s build/bin/libphyex.so .
# Check if python can open the resulting shared lib
python3 -c "from ctypes import cdll; cdll.LoadLibrary('./libphyex.so')"
...@@ -32,8 +32,6 @@ Merge pb: ...@@ -32,8 +32,6 @@ Merge pb:
- rain_ice_old a rebrancher dans Meso-NH - rain_ice_old a rebrancher dans Meso-NH
- appels à condensation temporairement supprimés de src/mesonh/micro/radtr_satel.f90, - appels à condensation temporairement supprimés de src/mesonh/micro/radtr_satel.f90,
src/mesonh/micro/ice_adjust_elec.f90 et src/mesonh/micro/lima_adjust_split.f90 src/mesonh/micro/ice_adjust_elec.f90 et src/mesonh/micro/lima_adjust_split.f90
- rain_ice_red: le cas test MesoNH n'est pas bit repro (diffs > 1% sur rapports de melange)
sur la modif src/mesonh/rain_ice_red au commit bdd10dd (First rain_ice new/red merge)
- shallow_mf (appels dans aro_shallow et arp_shallow): - shallow_mf (appels dans aro_shallow et arp_shallow):
Dans Méso-NH: shallow_mf doit être appelé avec PDX=XDXHAT(1) et PDY=XDYHAT(1) Dans Méso-NH: shallow_mf doit être appelé avec PDX=XDXHAT(1) et PDY=XDYHAT(1)
Dans AROME/ARP: où trouver la taille de maille? Dans AROME/ARP: où trouver la taille de maille?
...@@ -80,3 +78,13 @@ Regarder s'il ne serait pas possible/souhaitable de supprimer modd_lunit de PHYE ...@@ -80,3 +78,13 @@ Regarder s'il ne serait pas possible/souhaitable de supprimer modd_lunit de PHYE
Nettoyage des répertoires aux nécessaire Nettoyage des répertoires aux nécessaire
Initialiser dans AROME la variable ldiag_in_run de MODD_DIAG_IN_RUN pour pouvoir phaser le modd Initialiser dans AROME la variable ldiag_in_run de MODD_DIAG_IN_RUN pour pouvoir phaser le modd
Faire une branche GPU qui contient les codes utilisés pour générer les fichiers pour Philippe.
Ajouter un répertoire pour héberger un pseudo-modèle qui contiendrait les cas tests de Philippe.
La taille du buffer utilisé pour th_r_from_thl_rt doit être mise en module et utilisée pour déclarer le module dans les routines appelantes et dans th_r_from_thl_rt
rain_ice:
- séparer l'avance temporelle du découpage en sous-blocs en créant une couche driver supplémentaire. Cette couche pourrait avoir différentes implémentations (filtre LLMICRO seul, filtre LLMICRO + découpage en sous-blocs, filtre LLMICRO + découpage en sous-blocs en respectant les colonnes, en passant tous les points)
- mettre le code des interpolations linéaires et bi-linéaires dans des routines avec deux implémentations: avec et sans packing
MODULE MODI_TRIDIAG_W
! Empty module for PHYEX, used in TURB 3D
END MODULE MODI_TRIDIAG_W
...@@ -195,3 +195,6 @@ phyex/micro/mode_fmwritbidon.F90 ...@@ -195,3 +195,6 @@ phyex/micro/mode_fmwritbidon.F90
phyex/turb/modd_dynn.F90 phyex/turb/modd_dynn.F90
phyex/turb/mode_thermo_mono.F90 phyex/turb/mode_thermo_mono.F90
phyex/turb/modn_turb.F90 phyex/turb/modn_turb.F90
mse/dummy/second_mnh.F90
mse/dummy/les_mean_subgrid_surf.F90
mse/dummy/les_mean_subgrid_3d.F90
File moved
!MNH_LIC Copyright 1994-2020 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
! ######spl ! ######spl
FUNCTION GX_M_M(PA,PDXX,PDZZ,PDZX, KKA, KKU, KL) RESULT(PGX_M_M) FUNCTION GX_M_M(PA,PDXX,PDZZ,PDZX,KKA,KKU,KL) RESULT(PGX_M_M)
USE PARKIND1, ONLY : JPRB USE PARKIND1, ONLY : JPRB
USE YOMHOOK , ONLY : LHOOK, DR_HOOK USE YOMHOOK , ONLY : LHOOK, DR_HOOK
! ####################################################### ! #######################################################
...@@ -53,13 +57,14 @@ ...@@ -53,13 +57,14 @@
!! ------------- !! -------------
!! Original 18/07/94 !! Original 18/07/94
!! 19/07/00 add the LFLAT switch (J. Stein) !! 19/07/00 add the LFLAT switch (J. Stein)
!! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1
!------------------------------------------------------------------------- !-------------------------------------------------------------------------
! !
!* 0. DECLARATIONS !* 0. DECLARATIONS
! !
! !
USE MODI_SHUMAN, ONLY: DXF, MZF, DZM, MXF, MXM USE MODI_SHUMAN, ONLY: DXF, MZF, DZM, MXF, MXM
USE MODD_CONF USE MODD_CONF, ONLY:LFLAT
! !
IMPLICIT NONE IMPLICIT NONE
! !
...@@ -70,10 +75,9 @@ REAL, DIMENSION(:,:,:), INTENT(IN) :: PA ! variable at the mass point ...@@ -70,10 +75,9 @@ REAL, DIMENSION(:,:,:), INTENT(IN) :: PA ! variable at the mass point
REAL, DIMENSION(:,:,:), INTENT(IN) :: PDXX ! metric coefficient dxx REAL, DIMENSION(:,:,:), INTENT(IN) :: PDXX ! metric coefficient dxx
REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZZ ! metric coefficient dzz REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZZ ! metric coefficient dzz
REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZX ! metric coefficient dzx REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZX ! metric coefficient dzx
INTEGER, INTENT(IN),OPTIONAL :: KKA, KKU ! near ground and uppest atmosphere array indexes
INTEGER, INTENT(IN),OPTIONAL :: KL ! +1 if grid goes from ground to atmosphere top, -1 otherwise
! !
INTEGER, INTENT(IN),OPTIONAL :: KKA, KKU ! near ground and uppest atmosphere array indexes (AROME)
INTEGER, INTENT(IN),OPTIONAL :: KL ! +1 if grid goes from ground to atmosphere top, -1 otherwise (AROME)
REAL, DIMENSION(SIZE(PA,1),SIZE(PA,2),SIZE(PA,3)) :: PGX_M_M ! result mass point REAL, DIMENSION(SIZE(PA,1),SIZE(PA,2),SIZE(PA,3)) :: PGX_M_M ! result mass point
! !
! !
...@@ -100,7 +104,9 @@ END IF ...@@ -100,7 +104,9 @@ END IF
! !
IF (LHOOK) CALL DR_HOOK('GX_M_M',1,ZHOOK_HANDLE) IF (LHOOK) CALL DR_HOOK('GX_M_M',1,ZHOOK_HANDLE)
END FUNCTION GX_M_M END FUNCTION GX_M_M
! ######spl !
!
! #######################################################
FUNCTION GX_M_U(KKA, KKU, KL,PY,PDXX,PDZZ,PDZX) RESULT(PGX_M_U) FUNCTION GX_M_U(KKA, KKU, KL,PY,PDXX,PDZZ,PDZX) RESULT(PGX_M_U)
USE PARKIND1, ONLY : JPRB USE PARKIND1, ONLY : JPRB
USE YOMHOOK , ONLY : LHOOK, DR_HOOK USE YOMHOOK , ONLY : LHOOK, DR_HOOK
...@@ -165,7 +171,7 @@ END FUNCTION GX_M_M ...@@ -165,7 +171,7 @@ END FUNCTION GX_M_M
! ------------ ! ------------
! !
USE MODI_SHUMAN USE MODI_SHUMAN
USE MODD_CONF USE MODD_CONF, ONLY:LFLAT
USE MODD_PARAMETERS USE MODD_PARAMETERS
! !
IMPLICIT NONE IMPLICIT NONE
...@@ -173,15 +179,14 @@ IMPLICIT NONE ...@@ -173,15 +179,14 @@ IMPLICIT NONE
!* 0.1 Declarations of arguments and result !* 0.1 Declarations of arguments and result
! ------------------------------------ ! ------------------------------------
! !
INTEGER, INTENT(IN) :: KKA, KKU ! near ground and uppest atmosphere array indexes
INTEGER, INTENT(IN) :: KL ! +1 if grid goes from ground to atmosphere top, -1 otherwise
REAL, DIMENSION(:,:,:), INTENT(IN) :: PDXX ! d*xx REAL, DIMENSION(:,:,:), INTENT(IN) :: PDXX ! d*xx
REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZX ! d*zx REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZX ! d*zx
REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZZ ! d*zz REAL, DIMENSION(:,:,:), INTENT(IN) :: PDZZ ! d*zz
! !
REAL, DIMENSION(:,:,:), INTENT(IN) :: PY ! variable at mass REAL, DIMENSION(:,:,:), INTENT(IN) :: PY ! variable at mass
! localization ! localization
INTEGER, INTENT(IN) :: KKA, KKU ! near ground and uppest atmosphere array indexes
INTEGER, INTENT(IN) :: KL ! +1 if grid goes from ground to atmosphere top, -1 otherwise
REAL, DIMENSION(SIZE(PY,1),SIZE(PY,2),SIZE(PY,3)) :: PGX_M_U ! result at flux REAL, DIMENSION(SIZE(PY,1),SIZE(PY,2),SIZE(PY,3)) :: PGX_M_U ! result at flux
! side ! side
INTEGER IIU,IKU,JI,JK INTEGER IIU,IKU,JI,JK
......
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment