From d434188900bb6eefbdc9ab1c49296ba5b56ae7ce Mon Sep 17 00:00:00 2001 From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr> Date: Fri, 14 Jan 2022 13:43:25 +0100 Subject: [PATCH] Naima / Philippe 14/01/2022: OpenACC: PRINT_MSG not allowed in kernels region --- src/MNH/compute_frac_ice.f90 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/MNH/compute_frac_ice.f90 b/src/MNH/compute_frac_ice.f90 index 33d4c9360..037bafb2e 100644 --- a/src/MNH/compute_frac_ice.f90 +++ b/src/MNH/compute_frac_ice.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2006-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2006-2022 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. @@ -358,20 +358,26 @@ REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PFRAC_ICE ! Ice fraction (1 for ice on !------------------------------------------------------------------------ ! 1. Compute FRAC_ICE ! -!$acc kernels SELECT CASE(HFRAC_ICE) CASE ('T') !using Temperature +!$acc kernels PFRAC_ICE(:,:,:) = ( XTMAXMIX - PT(:,:,:) ) / ( XTMAXMIX - XTMINMIX ) ! freezing interval +!$acc end kernels CASE ('O') !using Temperature with old formulae +!$acc kernels PFRAC_ICE(:,:,:) = ( XTT - PT(:,:,:) ) / 40. ! freezing interval +!$acc end kernels CASE ('N') !No ice +!$acc kernels PFRAC_ICE(:,:,:) = 0. +!$acc end kernels CASE ('S') !Same as previous !nothing to do CASE DEFAULT CALL PRINT_MSG(NVERB_FATAL,'GEN','COMPUTE_FRAC_ICE3D_DEVICE','invalid option') END SELECT ! +!$acc kernels PFRAC_ICE(:,:,:) = MAX( 0., MIN(1., PFRAC_ICE(:,:,:) ) ) !$acc end kernels -- GitLab