Ignore:
Timestamp:
Oct 5, 2023, 11:29:45 AM (14 months ago)
Author:
jbclement
Message:

PEM:
Correction of a bug: the variable 'g' was not correctly initialized in 1D. A little of code cleaning.
JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/compute_tendencies_slope.F90

    r3039 r3070  
    1 !
    2 ! $Id $
    3 !
    4 SUBROUTINE compute_tendencies_slope(ngrid,nslope,min_ice_Y1,&
    5      min_ice_Y2,tendencies_ice)
     1SUBROUTINE compute_tendencies_slope(ngrid,nslope,min_ice_Y1,min_ice_Y2,tendencies_ice)
    62
    7       IMPLICIT NONE
     3implicit none
    84
    95!=======================================================================
     
    1511!   arguments:
    1612!   ----------
    17 
    1813!   INPUT
    19 
    20      INTEGER, intent(in) :: ngrid, nslope                           ! # of grid points along longitude/latitude/ total
    21      REAL, intent(in) , dimension(ngrid,nslope):: min_ice_Y1       ! LON x LAT field : minimum of water ice at each point for the first year
    22      REAL, intent(in) , dimension(ngrid,nslope):: min_ice_Y2       ! LON x LAT field : minimum of water ice at each point for the second year
     14integer,                       intent(in) :: ngrid, nslope ! # of grid points along longitude/latitude/ total
     15real, dimension(ngrid,nslope), intent(in) :: min_ice_Y1    ! LON x LAT field : minimum of water ice at each point for the first year
     16real, dimension(ngrid,nslope), intent(in) :: min_ice_Y2    ! LON x LAT field : minimum of water ice at each point for the second year
    2317
    2418!   OUTPUT
    25      REAL, intent(out) , dimension(ngrid,nslope)   :: tendencies_ice            ! physical point field : difference between the minima = evolution of perenial ice
    26 
    27 !   local:
    28 !   ------
    29      INTEGER :: ig,islope                                                           ! loop variable
     19real, dimension(ngrid,nslope), intent(out) :: tendencies_ice ! physical point field : difference between the minima = evolution of perenial ice
    3020
    3121!=======================================================================
    3222
    3323!  We compute the difference
    34 
    35   DO ig=1,ngrid
    36     DO islope = 1, nslope
    37       tendencies_ice(ig,islope)=min_ice_Y2(ig,islope)-min_ice_Y1(ig,islope)
    38     enddo
    39   ENDDO
     24tendencies_ice = min_ice_Y2 - min_ice_Y1
    4025
    4126!  If the difference is too small; there is no evolution
    42   DO ig=1,ngrid
    43     DO islope = 1, nslope
    44       if(abs(tendencies_ice(ig,islope)).LT.1.0E-10) then
    45         tendencies_ice(ig,islope)=0.
    46       endif
    47     enddo
    48   ENDDO
     27where (abs(tendencies_ice) < 1.e-10) tendencies_ice = 0.
    4928
    5029END SUBROUTINE compute_tendencies_slope
Note: See TracChangeset for help on using the changeset viewer.