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 5989 for branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90 – NEMO

Ignore:
Timestamp:
2015-12-03T09:10:32+01:00 (8 years ago)
Author:
deazer
Message:

Merging TMB and 25h diagnostics to head of trunk
added brief documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r5260 r5989  
    6767   PRIVATE 
    6868 
    69    !! * Routine accessibility 
    7069   PUBLIC cice_sbc_init   ! routine called by sbc_init 
    7170   PUBLIC cice_sbc_final  ! routine called by sbc_final 
     
    9594   !! * Substitutions 
    9695#  include "domzgr_substitute.h90" 
    97  
     96   !!---------------------------------------------------------------------- 
     97   !! NEMO/OPA 3.7 , NEMO-consortium (2015)  
    9898   !! $Id$ 
     99   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     100   !!---------------------------------------------------------------------- 
    99101CONTAINS 
    100102 
     
    138140         IF      ( ksbc == jp_flx ) THEN 
    139141            CALL cice_sbc_force(kt) 
    140          ELSE IF ( ksbc == jp_cpl ) THEN 
     142         ELSE IF ( ksbc == jp_purecpl ) THEN 
    141143            CALL sbc_cpl_ice_flx( 1.0-fr_i  ) 
    142144         ENDIF 
     
    146148         CALL cice_sbc_out ( kt, ksbc ) 
    147149 
    148          IF ( ksbc == jp_cpl )  CALL cice_sbc_hadgam(kt+1) 
     150         IF ( ksbc == jp_purecpl )  CALL cice_sbc_hadgam(kt+1) 
    149151 
    150152      ENDIF                                          ! End sea-ice time step only 
     
    154156   END SUBROUTINE sbc_ice_cice 
    155157 
    156    SUBROUTINE cice_sbc_init (ksbc) 
     158 
     159   SUBROUTINE cice_sbc_init( ksbc ) 
    157160      !!--------------------------------------------------------------------- 
    158161      !!                    ***  ROUTINE cice_sbc_init  *** 
    159162      !! ** Purpose: Initialise ice related fields for NEMO and coupling 
    160163      !! 
     164      !!--------------------------------------------------------------------- 
    161165      INTEGER, INTENT( in  ) ::   ksbc                ! surface forcing type 
    162166      REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 
     
    187191 
    188192! Do some CICE consistency checks 
    189       IF ( (ksbc == jp_flx) .OR. (ksbc == jp_cpl) ) THEN 
     193      IF ( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 
    190194         IF ( calc_strair .OR. calc_Tsfc ) THEN 
    191195            CALL ctl_stop( 'STOP', 'cice_sbc_init : Forcing option requires calc_strair=F and calc_Tsfc=F in ice_in' ) 
     
    212216 
    213217      CALL cice2nemo(aice,fr_i, 'T', 1. ) 
    214       IF ( (ksbc == jp_flx) .OR. (ksbc == jp_cpl) ) THEN 
     218      IF ( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 
    215219         DO jl=1,ncat 
    216220            CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) 
     
    289293 
    290294    
    291    SUBROUTINE cice_sbc_in (kt, ksbc) 
     295   SUBROUTINE cice_sbc_in( kt, ksbc ) 
    292296      !!--------------------------------------------------------------------- 
    293297      !!                    ***  ROUTINE cice_sbc_in  *** 
     
    296300      INTEGER, INTENT(in   ) ::   kt   ! ocean time step 
    297301      INTEGER, INTENT(in   ) ::   ksbc ! surface forcing type 
    298  
     302      ! 
    299303      INTEGER  ::   ji, jj, jl                   ! dummy loop indices       
    300304      REAL(wp), DIMENSION(:,:), POINTER :: ztmp, zpice 
     
    319323! forced and coupled case  
    320324 
    321       IF ( (ksbc == jp_flx).OR.(ksbc == jp_cpl) ) THEN 
     325      IF ( (ksbc == jp_flx).OR.(ksbc == jp_purecpl) ) THEN 
    322326 
    323327         ztmpn(:,:,:)=0.0 
     
    490494! x comp and y comp of sea surface slope (on F points) 
    491495! T point to F point 
    492       DO jj=1,jpjm1 
    493          DO ji=1,jpim1 
    494             ztmp(ji,jj)=0.5 * (  (zpice(ji+1,jj  )-zpice(ji,jj  ))/e1u(ji,jj  )   & 
    495                                + (zpice(ji+1,jj+1)-zpice(ji,jj+1))/e1u(ji,jj+1) ) &  
    496                             *  fmask(ji,jj,1) 
    497          ENDDO 
    498       ENDDO 
    499       CALL nemo2cice(ztmp,ss_tltx,'F', -1. ) 
     496      DO jj = 1, jpjm1 
     497         DO ji = 1, jpim1 
     498            ztmp(ji,jj)=0.5 * (  (zpice(ji+1,jj  )-zpice(ji,jj  )) * r1_e1u(ji,jj  )    & 
     499               &               + (zpice(ji+1,jj+1)-zpice(ji,jj+1)) * r1_e1u(ji,jj+1)  ) * fmask(ji,jj,1) 
     500         END DO 
     501      END DO 
     502      CALL nemo2cice( ztmp,ss_tltx,'F', -1. ) 
    500503 
    501504! T point to F point 
    502       DO jj=1,jpjm1 
    503          DO ji=1,jpim1 
    504             ztmp(ji,jj)=0.5 * (  (zpice(ji  ,jj+1)-zpice(ji  ,jj))/e2v(ji  ,jj)   & 
    505                                + (zpice(ji+1,jj+1)-zpice(ji+1,jj))/e2v(ji+1,jj) ) & 
    506                             *  fmask(ji,jj,1) 
    507          ENDDO 
    508       ENDDO 
     505      DO jj = 1, jpjm1 
     506         DO ji = 1, jpim1 
     507            ztmp(ji,jj)=0.5 * (  (zpice(ji  ,jj+1)-zpice(ji  ,jj)) * r1_e2v(ji  ,jj)    & 
     508               &               + (zpice(ji+1,jj+1)-zpice(ji+1,jj)) * r1_e2v(ji+1,jj)  ) *  fmask(ji,jj,1) 
     509         END DO 
     510      END DO 
    509511      CALL nemo2cice(ztmp,ss_tlty,'F', -1. ) 
    510512 
    511       CALL wrk_dealloc( jpi,jpj, ztmp ) 
     513      CALL wrk_dealloc( jpi,jpj, ztmp, zpice ) 
    512514      CALL wrk_dealloc( jpi,jpj,ncat, ztmpn ) 
    513515      ! 
     
    517519 
    518520 
    519    SUBROUTINE cice_sbc_out (kt,ksbc) 
     521   SUBROUTINE cice_sbc_out( kt, ksbc ) 
    520522      !!--------------------------------------------------------------------- 
    521523      !!                    ***  ROUTINE cice_sbc_out  *** 
     
    575577! Update taum with modulus of ice-ocean stress  
    576578! strocnxT and strocnyT are not weighted by ice fraction in CICE so must be done here  
    577 taum(:,:)=(1.0-fr_i(:,:))*taum(:,:)+fr_i(:,:)*SQRT(ztmp1**2. + ztmp2**2.)  
     579taum(:,:)=(1.0-fr_i(:,:))*taum(:,:)+fr_i(:,:)*SQRT(ztmp1*ztmp1 + ztmp2*ztmp2)  
    578580 
    579581! Freshwater fluxes  
     
    587589      ELSE IF (ksbc == jp_core) THEN 
    588590         emp(:,:)  = (1.0-fr_i(:,:))*emp(:,:)         
    589       ELSE IF (ksbc == jp_cpl) THEN 
     591      ELSE IF (ksbc == jp_purecpl) THEN 
    590592! emp_tot is set in sbc_cpl_ice_flx (called from cice_sbc_in above)  
    591593! This is currently as required with the coupling fields from the UM atmosphere 
     
    623625      ENDIF 
    624626! Take into account snow melting except for fully coupled when already in qns_tot 
    625       IF (ksbc == jp_cpl) THEN 
     627      IF (ksbc == jp_purecpl) THEN 
    626628         qsr(:,:)= qsr_tot(:,:) 
    627629         qns(:,:)= qns_tot(:,:) 
     
    658660 
    659661      CALL cice2nemo(aice,fr_i,'T', 1. ) 
    660       IF ( (ksbc == jp_flx).OR.(ksbc == jp_cpl) ) THEN 
     662      IF ( (ksbc == jp_flx).OR.(ksbc == jp_purecpl) ) THEN 
    661663         DO jl=1,ncat 
    662664            CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) 
     
    888890#endif 
    889891      !!--------------------------------------------------------------------- 
    890  
    891892      CHARACTER(len=1), INTENT( in ) ::   & 
    892893          cd_type       ! nature of pn grid-point 
     
    908909 
    909910      INTEGER  ::   ji, jj, jn                      ! dummy loop indices 
     911      !!--------------------------------------------------------------------- 
    910912 
    911913!     A. Ensure all haloes are filled in NEMO field (pn) 
     
    10961098   !!   Default option           Dummy module         NO CICE sea-ice model 
    10971099   !!---------------------------------------------------------------------- 
    1098    !! $Id$ 
    10991100CONTAINS 
    11001101 
Note: See TracChangeset for help on using the changeset viewer.