Changeset 3494


Ignore:
Timestamp:
May 9, 2019, 11:46:36 AM (6 years ago)
Author:
jghattas
Message:

Bug correction: ENDIF was bad placed. Changed some indentation and add comments.
Thanks to Christian Ethe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/cpl_mod.F90

    r3473 r3494  
    148148
    149149!***************************************
    150 ! Use old calving or not (default no)
     150! Use old calving or not (default new calving method)
     151! New calving method should be used with DYNAMICO and when using new coupling
     152! weights.
    151153    cpl_old_calving=.FALSE.
    152154    CALL getin_p("cpl_old_calving",cpl_old_calving)
     
    12661268
    12671269      ELSE
    1268 
    1269         DO k=1,nb_zone_calving
    1270           calving(k)=0
    1271           DO j = 1, jj_nb
    1272             calving(k)= calving(k)+DOT_PRODUCT(cpl_rlic2D(:,j)*area_calving(:,j,k),pctsrf2D(:,j,is_lic))
    1273           ENDDO
    1274         ENDDO
     1270         ! cpl_old_calving=FALSE
     1271         ! To be used with new method for calculation of coupling weights
     1272         DO k=1,nb_zone_calving
     1273            calving(k)=0
     1274            DO j = 1, jj_nb
     1275               calving(k)= calving(k)+DOT_PRODUCT(cpl_rlic2D(:,j)*area_calving(:,j,k),pctsrf2D(:,j,is_lic))
     1276            ENDDO
     1277         ENDDO
     1278         
     1279#ifdef CPP_MPI
     1280         CALL MPI_ALLREDUCE(calving, calving_glo, nb_zone_calving, MPI_REAL_LMDZ, MPI_SUM, COMM_LMDZ_PHY, error)
     1281#endif
     1282         
     1283         tab_flds(:,:,ids_calvin) = 0
     1284         DO k=1,nb_zone_calving
     1285            IF (ind_calving(k)>0 ) THEN
     1286               j=(ind_calving(k)-1)/nbp_lon + 1
     1287               i=MOD(ind_calving(k)-1,nbp_lon)+1
     1288               tab_flds(i,j,ids_calvin) = calving_glo(k)
     1289            ENDIF
     1290         ENDDO
     1291         
    12751292      ENDIF
    12761293     
    1277 #ifdef CPP_MPI
    1278       CALL MPI_ALLREDUCE(calving, calving_glo, nb_zone_calving, MPI_REAL_LMDZ, MPI_SUM, COMM_LMDZ_PHY, error)
    1279 #endif
    1280      
    1281       tab_flds(:,:,ids_calvin) = 0
    1282       DO k=1,nb_zone_calving
    1283         IF (ind_calving(k)>0 ) THEN
    1284           j=(ind_calving(k)-1)/nbp_lon + 1
    1285           i=MOD(ind_calving(k)-1,nbp_lon)+1
    1286           tab_flds(i,j,ids_calvin) = calving_glo(k)
    1287         ENDIF
    1288       ENDDO
    1289 
    12901294!*************************************************************************************
    12911295! Calculate total flux for snow, rain and wind with weighted addition using the
Note: See TracChangeset for help on using the changeset viewer.