Ignore:
Timestamp:
Oct 21, 2024, 2:58:45 PM (23 hours ago)
Author:
abarral
Message:

Convert fixed-form to free-form sources .F -> .{f,F}90
(WIP: some .F remain, will be handled in subsequent commits)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3dmem/bernoui_loc.f90

    r5245 r5246  
    1       SUBROUTINE bernoui_loc (ngrid,nlay,pphi,pecin,pbern)
    2       USE parallel_lmdz
    3       USE mod_filtreg_p
    4       IMPLICIT NONE
     1SUBROUTINE bernoui_loc (ngrid,nlay,pphi,pecin,pbern)
     2  USE parallel_lmdz
     3  USE mod_filtreg_p
     4  IMPLICIT NONE
    55
    6 c=======================================================================
    7 c
    8 c   Auteur:   P. Le Van
    9 c   -------
    10 c
    11 c   Objet:
    12 c   ------
    13 c    calcul de la fonction de Bernouilli aux niveaux s  .....
    14 c    phi  et  ecin  sont des arguments d'entree pour le s-pg .......
    15 c          bern       est un  argument de sortie pour le s-pg  ......
    16 c
    17 c    fonction de Bernouilli = bern = filtre de( geopotentiel +
    18 c                              energ.cinet.)
    19 c
    20 c=======================================================================
    21 c
    22 c-----------------------------------------------------------------------
    23 c   Decalrations:
    24 c   -------------
    25 c
    26       include "dimensions.h"
    27       include "paramet.h"
    28 c
    29 c   Arguments:
    30 c   ----------
    31 c
    32       INTEGER nlay,ngrid
    33       REAL pphi(ijb_u:ije_u,nlay),pecin(ijb_u:ije_u,nlay)
    34       REAL pbern(ijb_u:ije_u,nlay)
    35 c
    36 c   Local:
    37 c   ------
    38 c
    39       INTEGER  ij,l,ijb,ije,jjb,jje
    40 c
    41 c-----------------------------------------------------------------------
    42 c   calcul de Bernouilli:
    43 c   ---------------------
    44 c
    45       ijb=ij_begin
    46       ije=ij_end+iip1
    47       if (pole_sud) ije=ij_end
     6  !=======================================================================
     7  !
     8  !   Auteur:   P. Le Van
     9  !   -------
     10  !
     11  !   Objet:
     12  !   ------
     13  ! calcul de la fonction de Bernouilli aux niveaux s  .....
     14  ! phi  et  ecin  sont des arguments d'entree pour le s-pg .......
     15  !      bern       est un  argument de sortie pour le s-pg  ......
     16  !
     17  !    fonction de Bernouilli = bern = filtre de( geopotentiel +
     18  !                          energ.cinet.)
     19  !
     20  !=======================================================================
     21  !
     22  !-----------------------------------------------------------------------
     23  !   Decalrations:
     24  !   -------------
     25  !
     26  include "dimensions.h"
     27  include "paramet.h"
     28  !
     29  !   Arguments:
     30  !   ----------
     31  !
     32  INTEGER :: nlay,ngrid
     33  REAL :: pphi(ijb_u:ije_u,nlay),pecin(ijb_u:ije_u,nlay)
     34  REAL :: pbern(ijb_u:ije_u,nlay)
     35  !
     36  !   Local:
     37  !   ------
     38  !
     39  INTEGER :: ij,l,ijb,ije,jjb,jje
     40  !
     41  !-----------------------------------------------------------------------
     42  !   calcul de Bernouilli:
     43  !   ---------------------
     44  !
     45  ijb=ij_begin
     46  ije=ij_end+iip1
     47  if (pole_sud) ije=ij_end
    4848
    49       jjb=jj_begin
    50       jje=jj_end+1
    51       if (pole_sud) jje=jj_end
     49  jjb=jj_begin
     50  jje=jj_end+1
     51  if (pole_sud) jje=jj_end
    5252
    53 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)               
    54       DO l=1,llm
    55    
    56         DO 4 ij = ijb,ije
    57           pbern( ij,l ) =  pphi( ij,l ) + pecin( ij,l )
    58    4    CONTINUE
    59        
    60        ENDDO
    61 c$OMP END DO NOWAIT
    62 c
    63 c-----------------------------------------------------------------------
    64 c   filtre:
    65 c   -------
    66 c
     53!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
     54  DO l=1,llm
    6755
    68        
    69         CALL filtreg_p( pbern,jjb_u,jje_u,jjb,jje, jjp1, llm,
    70      &                  2,1, .true., 1 )
    71 c
    72 c-----------------------------------------------------------------------
    73      
    74      
    75       RETURN
    76       END
     56    DO ij = ijb,ije
     57      pbern( ij,l ) =  pphi( ij,l ) + pecin( ij,l )
     58    END DO
     59
     60   ENDDO
     61!$OMP END DO NOWAIT
     62  !
     63  !-----------------------------------------------------------------------
     64  !   filtre:
     65  !   -------
     66  !
     67
     68
     69    CALL filtreg_p( pbern,jjb_u,jje_u,jjb,jje, jjp1, llm, &
     70          2,1, .true., 1 )
     71  !
     72  !-----------------------------------------------------------------------
     73
     74
     75  RETURN
     76END SUBROUTINE bernoui_loc
Note: See TracChangeset for help on using the changeset viewer.