New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13895 for NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/ISF/isfcpl.F90 – NEMO

Ignore:
Timestamp:
2020-11-27T00:30:21+01:00 (4 years ago)
Author:
techene
Message:

#2574 => led to restart reorganization and some cleaning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/ISF/isfcpl.F90

    r13734 r13895  
    1010 
    1111   !!---------------------------------------------------------------------- 
    12    !!   isfrst : read/write iceshelf variables in/from restart 
     12   !!   isfrst        : read/write iceshelf variables in/from restart 
    1313   !!---------------------------------------------------------------------- 
    14    USE isf_oce                          ! ice shelf variable 
     14   USE oce            ! ocean dynamics and tracers 
     15#if defined key_qco 
     16   USE domqco  , ONLY : dom_qco_zgr      ! vertical scale factor interpolation 
     17#else 
     18   USE domvvl  , ONLY : dom_vvl_zgr      ! vertical scale factor interpolation 
     19#endif 
     20   USE domutl  , ONLY : dom_ngb          ! find the closest grid point from a given lon/lat position 
     21   USE isf_oce        ! ice shelf variable 
    1522   USE isfutils, ONLY : debug 
    16    USE lib_mpp , ONLY: mpp_sum, mpp_max ! mpp routine 
    17 #if ! defined key_qco 
    18    USE domvvl  , ONLY: dom_vvl_zgr      ! vertical scale factor interpolation 
    19 #else 
    20    USE domqco   , ONLY: dom_qco_zgr      ! vertical scale factor interpolation 
    21 #endif 
    22    USE domutl  , ONLY: dom_ngb          ! find the closest grid point from a given lon/lat position 
    2323   ! 
    24    USE oce            ! ocean dynamics and tracers 
    2524   USE in_out_manager ! I/O manager 
    2625   USE iom            ! I/O library 
     26   USE lib_mpp , ONLY : mpp_sum, mpp_max ! mpp routine 
    2727   ! 
    2828   IMPLICIT NONE 
     
    3434 
    3535   TYPE isfcons 
    36       INTEGER :: ii     ! i global 
    37       INTEGER :: jj     ! j global 
    38       INTEGER :: kk     ! k level 
    39       REAL(wp):: dvol   ! volume increment 
    40       REAL(wp):: dsal   ! salt increment 
    41       REAL(wp):: dtem   ! heat increment 
    42       REAL(wp):: lon    ! lon 
    43       REAL(wp):: lat    ! lat 
    44       INTEGER :: ngb    ! 0/1 (valid location or not (ie on halo or no neigbourg)) 
     36      INTEGER ::   ii     ! i global 
     37      INTEGER ::   jj     ! j global 
     38      INTEGER ::   kk     ! k level 
     39      REAL(wp)::   dvol   ! volume increment 
     40      REAL(wp)::   dsal   ! salt increment 
     41      REAL(wp)::   dtem   ! heat increment 
     42      REAL(wp)::   lon    ! lon 
     43      REAL(wp)::   lat    ! lat 
     44      INTEGER ::   ngb    ! 0/1 (valid location or not (ie on halo or no neigbourg)) 
    4545   END TYPE 
    4646   ! 
     
    130130      ! 
    131131   END SUBROUTINE isfcpl_init 
    132    !  
    133    SUBROUTINE isfcpl_rst_write(kt, Kmm) 
     132 
     133    
     134   SUBROUTINE isfcpl_rst_write( kt, Kmm ) 
    134135      !!--------------------------------------------------------------------- 
    135136      !!                   ***  ROUTINE iscpl_rst_write  *** 
     
    164165   END SUBROUTINE isfcpl_rst_write 
    165166 
     167    
    166168   SUBROUTINE isfcpl_ssh(Kbb, Kmm, Kaa) 
    167169      !!----------------------------------------------------------------------  
     
    195197         zdssmask(:,:) = ssmask(:,:) - zssmask0(:,:) 
    196198         DO_2D( 0, 0, 0, 0 ) 
    197             jip1=ji+1; jim1=ji-1; 
    198             jjp1=jj+1; jjm1=jj-1; 
     199            jip1=ji+1   ;   jim1=ji-1 
     200            jjp1=jj+1   ;   jjm1=jj-1 
    199201            ! 
    200202            zsummsk = zssmask0(jip1,jj) + zssmask0(jim1,jj) + zssmask0(ji,jjp1) + zssmask0(ji,jjm1) 
     
    202204            IF (zdssmask(ji,jj) == 1._wp .AND. zsummsk /= 0._wp) THEN 
    203205               ssh(ji,jj,Kmm)=( zssh(jip1,jj)*zssmask0(jip1,jj)     & 
    204                &           + zssh(jim1,jj)*zssmask0(jim1,jj)     & 
    205                &           + zssh(ji,jjp1)*zssmask0(ji,jjp1)     & 
    206                &           + zssh(ji,jjm1)*zssmask0(ji,jjm1)) / zsummsk 
     206                  &           + zssh(jim1,jj)*zssmask0(jim1,jj)     & 
     207                  &           + zssh(ji,jjp1)*zssmask0(ji,jjp1)     & 
     208                  &           + zssh(ji,jjm1)*zssmask0(ji,jjm1)) / zsummsk 
    207209               zssmask_b(ji,jj) = 1._wp 
    208210            ENDIF 
     
    238240   END SUBROUTINE isfcpl_ssh 
    239241 
     242    
    240243   SUBROUTINE isfcpl_tra(Kmm) 
    241244      !!----------------------------------------------------------------------  
     
    386389      !  
    387390   END SUBROUTINE isfcpl_tra 
     391    
    388392 
    389393   SUBROUTINE isfcpl_vol(Kmm) 
     
    477481         risfcpl_ssh(:,:) = risfcpl_ssh(:,:) + risfcpl_vol(:,:,jk) * r1_e1e2t(:,:) 
    478482      END DO 
    479  
     483      ! 
    480484   END SUBROUTINE isfcpl_vol 
    481485 
     486    
    482487   SUBROUTINE isfcpl_cons(Kmm) 
    483488      !!----------------------------------------------------------------------  
Note: See TracChangeset for help on using the changeset viewer.