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 12583 for NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/SBC/sbcice_cice.F90 – NEMO

Ignore:
Timestamp:
2020-03-21T15:40:52+01:00 (4 years ago)
Author:
techene
Message:

OCE/DOM/domqe.F90: add gdep at time level Kbb in dom_qe_sf_update, OCE/DOM/domzgr_substitute.h90: create the substitute module, OCE/DYN/dynatfLF.F90, OCE/TRA/traatfLF.F90: move boundary condition management and agrif management from atf modules to OCE/steplf.F90, OCE/SBC/sbcice_cice.F90, ICE/iceistate.F90 : remove dom_vvl_interpol and replace by dom_vvl_zgr ?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/SBC/sbcice_cice.F90

    r12377 r12583  
    3636# if defined key_cice4 
    3737   USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  & 
    38                 strocnxT,strocnyT,                               &  
     38                strocnxT,strocnyT,                               & 
    3939                sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm,     & 
    4040                fresh_gbm,fhocn_gbm,fswthru_gbm,frzmlt,          & 
     
    4545#else 
    4646   USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  & 
    47                 strocnxT,strocnyT,                               &  
     47                strocnxT,strocnyT,                               & 
    4848                sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_ai,     & 
    4949                fresh_ai,fhocn_ai,fswthru_ai,frzmlt,          & 
     
    7070   INTEGER             ::   jj_off 
    7171 
    72    INTEGER , PARAMETER ::   jpfld   = 13   ! maximum number of files to read  
     72   INTEGER , PARAMETER ::   jpfld   = 13   ! maximum number of files to read 
    7373   INTEGER , PARAMETER ::   jp_snow = 1    ! index of snow file 
    7474   INTEGER , PARAMETER ::   jp_rain = 2    ! index of rain file 
     
    109109      !!--------------------------------------------------------------------- 
    110110      !!                  ***  ROUTINE sbc_ice_cice  *** 
    111       !!                    
    112       !! ** Purpose :   update the ocean surface boundary condition via the  
    113       !!                CICE Sea Ice Model time stepping  
    114       !! 
    115       !! ** Method  : - Get any extra forcing fields for CICE   
     111      !! 
     112      !! ** Purpose :   update the ocean surface boundary condition via the 
     113      !!                CICE Sea Ice Model time stepping 
     114      !! 
     115      !! ** Method  : - Get any extra forcing fields for CICE 
    116116      !!              - Prepare forcing fields 
    117117      !!              - CICE model time stepping 
    118       !!              - call the routine that computes mass and  
     118      !!              - call the routine that computes mass and 
    119119      !!                heat fluxes at the ice/ocean interface 
    120120      !! 
     
    171171      ! there is no restart file. 
    172172      ! Values from a CICE restart file would overwrite this 
    173       IF( .NOT. ln_rstart ) THEN     
    174          CALL nemo2cice( ts(:,:,1,jp_tem,Kmm) , sst , 'T' , 1.)  
    175       ENDIF   
     173      IF( .NOT. ln_rstart ) THEN 
     174         CALL nemo2cice( ts(:,:,1,jp_tem,Kmm) , sst , 'T' , 1.) 
     175      ENDIF 
    176176#endif 
    177177 
     
    233233!!gm This should be put elsewhere....   (same remark for limsbc) 
    234234!!gm especially here it is assumed zstar coordinate, but it can be ztilde.... 
    235             IF( .NOT.ln_linssh ) THEN 
    236                ! 
    237                DO jk = 1,jpkm1                     ! adjust initial vertical scale factors 
    238                   e3t(:,:,jk,Kmm) = e3t_0(:,:,jk)*( 1._wp + ssh(:,:,Kmm)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    239                   e3t(:,:,jk,Kbb) = e3t_0(:,:,jk)*( 1._wp + ssh(:,:,Kbb)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    240                ENDDO 
    241                e3t(:,:,:,Krhs) = e3t(:,:,:,Kbb) 
    242                ! Reconstruction of all vertical scale factors at now and before time-steps 
    243                ! ============================================================================= 
    244                ! Horizontal scale factor interpolations 
    245                ! -------------------------------------- 
    246                CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3u(:,:,:,Kbb), 'U' ) 
    247                CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3v(:,:,:,Kbb), 'V' ) 
    248                CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3u(:,:,:,Kmm), 'U' ) 
    249                CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3v(:,:,:,Kmm), 'V' ) 
    250                CALL dom_vvl_interpol( e3u(:,:,:,Kmm), e3f(:,:,:), 'F' ) 
    251                ! Vertical scale factor interpolations 
    252                ! ------------------------------------ 
    253                CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3w (:,:,:,Kmm), 'W'  ) 
    254                CALL dom_vvl_interpol( e3u(:,:,:,Kmm), e3uw(:,:,:,Kmm), 'UW' ) 
    255                CALL dom_vvl_interpol( e3v(:,:,:,Kmm), e3vw(:,:,:,Kmm), 'VW' ) 
    256                CALL dom_vvl_interpol( e3u(:,:,:,Kbb), e3uw(:,:,:,Kbb), 'UW' ) 
    257                CALL dom_vvl_interpol( e3v(:,:,:,Kbb), e3vw(:,:,:,Kbb), 'VW' ) 
    258                ! t- and w- points depth 
    259                ! ---------------------- 
    260                gdept(:,:,1,Kmm) = 0.5_wp * e3w(:,:,1,Kmm) 
    261                gdepw(:,:,1,Kmm) = 0.0_wp 
    262                gde3w(:,:,1)     = gdept(:,:,1,Kmm) - ssh(:,:,Kmm) 
    263                DO jk = 2, jpk 
    264                   gdept(:,:,jk,Kmm) = gdept(:,:,jk-1,Kmm) + e3w(:,:,jk,Kmm) 
    265                   gdepw(:,:,jk,Kmm) = gdepw(:,:,jk-1,Kmm) + e3t(:,:,jk-1,Kmm) 
    266                   gde3w(:,:,jk)     = gdept(:,:,jk  ,Kmm) - sshn   (:,:) 
    267                END DO 
    268             ENDIF 
     235            IF( .NOT.ln_linssh )   CALL dom_vvl_zgr( Kbb, Kmm, Kaa )   ! interpolation scale factor, depth and water column 
     236            ! IF( .NOT.ln_linssh ) THEN 
     237            !    ! 
     238            !    DO jk = 1,jpkm1                     ! adjust initial vertical scale factors 
     239            !       e3t(:,:,jk,Kmm) = e3t_0(:,:,jk)*( 1._wp + ssh(:,:,Kmm)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     240            !       e3t(:,:,jk,Kbb) = e3t_0(:,:,jk)*( 1._wp + ssh(:,:,Kbb)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     241            !    ENDDO 
     242            !    e3t(:,:,:,Krhs) = e3t(:,:,:,Kbb) 
     243            !    ! Reconstruction of all vertical scale factors at now and before time-steps 
     244            !    ! ============================================================================= 
     245            !    ! Horizontal scale factor interpolations 
     246            !    ! -------------------------------------- 
     247            !    CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3u(:,:,:,Kbb), 'U' ) 
     248            !    CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3v(:,:,:,Kbb), 'V' ) 
     249            !    CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3u(:,:,:,Kmm), 'U' ) 
     250            !    CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3v(:,:,:,Kmm), 'V' ) 
     251            !    CALL dom_vvl_interpol( e3u(:,:,:,Kmm), e3f(:,:,:), 'F' ) 
     252            !    ! Vertical scale factor interpolations 
     253            !    ! ------------------------------------ 
     254            !    CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3w (:,:,:,Kmm), 'W'  ) 
     255            !    CALL dom_vvl_interpol( e3u(:,:,:,Kmm), e3uw(:,:,:,Kmm), 'UW' ) 
     256            !    CALL dom_vvl_interpol( e3v(:,:,:,Kmm), e3vw(:,:,:,Kmm), 'VW' ) 
     257            !    CALL dom_vvl_interpol( e3u(:,:,:,Kbb), e3uw(:,:,:,Kbb), 'UW' ) 
     258            !    CALL dom_vvl_interpol( e3v(:,:,:,Kbb), e3vw(:,:,:,Kbb), 'VW' ) 
     259            !    ! t- and w- points depth 
     260            !    ! ---------------------- 
     261            !    gdept(:,:,1,Kmm) = 0.5_wp * e3w(:,:,1,Kmm) 
     262            !    gdepw(:,:,1,Kmm) = 0.0_wp 
     263            !    gde3w(:,:,1)     = gdept(:,:,1,Kmm) - ssh(:,:,Kmm) 
     264            !    DO jk = 2, jpk 
     265            !       gdept(:,:,jk,Kmm) = gdept(:,:,jk-1,Kmm) + e3w(:,:,jk,Kmm) 
     266            !       gdepw(:,:,jk,Kmm) = gdepw(:,:,jk-1,Kmm) + e3t(:,:,jk-1,Kmm) 
     267            !       gde3w(:,:,jk)     = gdept(:,:,jk  ,Kmm) - sshn   (:,:) 
     268            !    END DO 
     269            ! ENDIF 
    269270         ENDIF 
    270271      ENDIF 
     
    272273   END SUBROUTINE cice_sbc_init 
    273274 
    274     
     275 
    275276   SUBROUTINE cice_sbc_in( kt, ksbc ) 
    276277      !!--------------------------------------------------------------------- 
     
    281282      INTEGER, INTENT(in   ) ::   ksbc ! surface forcing type 
    282283      ! 
    283       INTEGER  ::   ji, jj, jl                   ! dummy loop indices       
     284      INTEGER  ::   ji, jj, jl                   ! dummy loop indices 
    284285      REAL(wp), DIMENSION(jpi,jpj) :: ztmp, zpice 
    285286      REAL(wp), DIMENSION(jpi,jpj,ncat) :: ztmpn 
     
    293294      ztmp(:,:)=0.0 
    294295 
    295 ! Aggregate ice concentration already set in cice_sbc_out (or cice_sbc_init on  
     296! Aggregate ice concentration already set in cice_sbc_out (or cice_sbc_init on 
    296297! the first time-step) 
    297298 
    298 ! forced and coupled case  
     299! forced and coupled case 
    299300 
    300301      IF( (ksbc == jp_flx).OR.(ksbc == jp_purecpl) ) THEN 
     
    356357!  Convert to GBM 
    357358            IF(ksbc == jp_flx) THEN 
    358                ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl)  
     359               ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl) 
    359360            ELSE 
    360361               ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl)) 
     
    380381         CALL nemo2cice(ztmp,Tair,'T', 1. )    ! Air temperature (K) 
    381382         CALL nemo2cice(ztmp,potT,'T', 1. )    ! Potential temp (K) 
    382 ! Following line uses MAX(....) to avoid problems if tatm_ice has unset halo rows   
    383          ztmp(:,:) = 101000. / ( 287.04 * MAX(1.0,tatm_ice(:,:)) )     
     383! Following line uses MAX(....) to avoid problems if tatm_ice has unset halo rows 
     384         ztmp(:,:) = 101000. / ( 287.04 * MAX(1.0,tatm_ice(:,:)) ) 
    384385                                               ! Constant (101000.) atm pressure assumed 
    385386         CALL nemo2cice(ztmp,rhoa,'T', 1. )    ! Air density (kg/m^3) 
     
    389390         CALL nemo2cice(ztmp,zlvl,'T', 1. )    ! Atmos level height (m) 
    390391 
    391 ! May want to check all values are physically realistic (as in CICE routine  
     392! May want to check all values are physically realistic (as in CICE routine 
    392393! prepare_forcing)? 
    393394 
    394395! Divide shortwave into spectral bands (as in prepare_forcing) 
    395396         ztmp(:,:)=qsr_ice(:,:,1)*frcvdr       ! visible direct 
    396          CALL nemo2cice(ztmp,swvdr,'T', 1. )              
     397         CALL nemo2cice(ztmp,swvdr,'T', 1. ) 
    397398         ztmp(:,:)=qsr_ice(:,:,1)*frcvdf       ! visible diffuse 
    398          CALL nemo2cice(ztmp,swvdf,'T', 1. )               
     399         CALL nemo2cice(ztmp,swvdf,'T', 1. ) 
    399400         ztmp(:,:)=qsr_ice(:,:,1)*frcidr       ! near IR direct 
    400401         CALL nemo2cice(ztmp,swidr,'T', 1. ) 
     
    406407! Snowfall 
    407408! Ensure fsnow is positive (as in CICE routine prepare_forcing) 
    408       IF( iom_use('snowpre') )   CALL iom_put('snowpre',MAX( (1.0-fr_i(:,:))*sprecip(:,:) ,0.0)) !!Joakim edit   
    409       ztmp(:,:)=MAX(fr_i(:,:)*sprecip(:,:),0.0)   
    410       CALL nemo2cice(ztmp,fsnow,'T', 1. )  
     409      IF( iom_use('snowpre') )   CALL iom_put('snowpre',MAX( (1.0-fr_i(:,:))*sprecip(:,:) ,0.0)) !!Joakim edit 
     410      ztmp(:,:)=MAX(fr_i(:,:)*sprecip(:,:),0.0) 
     411      CALL nemo2cice(ztmp,fsnow,'T', 1. ) 
    411412 
    412413! Rainfall 
    413414      IF( iom_use('precip') )   CALL iom_put('precip', (1.0-fr_i(:,:))*(tprecip(:,:)-sprecip(:,:)) ) !!Joakim edit 
    414415      ztmp(:,:)=fr_i(:,:)*(tprecip(:,:)-sprecip(:,:)) 
    415       CALL nemo2cice(ztmp,frain,'T', 1. )  
     416      CALL nemo2cice(ztmp,frain,'T', 1. ) 
    416417 
    417418! Freezing/melting potential 
     
    482483      INTEGER, INTENT( in  ) ::   kt   ! ocean time step 
    483484      INTEGER, INTENT( in  ) ::   ksbc ! surface forcing type 
    484        
     485 
    485486      INTEGER  ::   ji, jj, jl                 ! dummy loop indices 
    486487      REAL(wp), DIMENSION(jpi,jpj) :: ztmp1, ztmp2 
     
    490491         IF(lwp) WRITE(numout,*)'cice_sbc_out' 
    491492      ENDIF 
    492        
    493 ! x comp of ocean-ice stress  
     493 
     494! x comp of ocean-ice stress 
    494495      CALL cice2nemo(strocnx,ztmp1,'F', -1. ) 
    495496      ss_iou(:,:)=0.0 
     
    500501      CALL lbc_lnk( 'sbcice_cice', ss_iou , 'U', -1. ) 
    501502 
    502 ! y comp of ocean-ice stress  
     503! y comp of ocean-ice stress 
    503504      CALL cice2nemo(strocny,ztmp1,'F', -1. ) 
    504505      ss_iov(:,:)=0.0 
     
    513514! Combine wind stress and ocean-ice stress 
    514515! [Note that fr_iu hasn't yet been updated, so still from start of CICE timestep] 
    515 ! strocnx and strocny already weighted by ice fraction in CICE so not done here  
     516! strocnx and strocny already weighted by ice fraction in CICE so not done here 
    516517 
    517518      utau(:,:)=(1.0-fr_iu(:,:))*utau(:,:)-ss_iou(:,:) 
    518       vtau(:,:)=(1.0-fr_iv(:,:))*vtau(:,:)-ss_iov(:,:)      
    519   
    520 ! Also need ice/ocean stress on T points so that taum can be updated  
    521 ! This interpolation is already done in CICE so best to use those values  
    522       CALL cice2nemo(strocnxT,ztmp1,'T',-1.)  
    523       CALL cice2nemo(strocnyT,ztmp2,'T',-1.)  
    524   
    525 ! Update taum with modulus of ice-ocean stress  
    526 ! strocnxT and strocnyT are not weighted by ice fraction in CICE so must be done here  
    527 taum(:,:)=(1.0-fr_i(:,:))*taum(:,:)+fr_i(:,:)*SQRT(ztmp1*ztmp1 + ztmp2*ztmp2)  
    528  
    529 ! Freshwater fluxes  
     519      vtau(:,:)=(1.0-fr_iv(:,:))*vtau(:,:)-ss_iov(:,:) 
     520 
     521! Also need ice/ocean stress on T points so that taum can be updated 
     522! This interpolation is already done in CICE so best to use those values 
     523      CALL cice2nemo(strocnxT,ztmp1,'T',-1.) 
     524      CALL cice2nemo(strocnyT,ztmp2,'T',-1.) 
     525 
     526! Update taum with modulus of ice-ocean stress 
     527! strocnxT and strocnyT are not weighted by ice fraction in CICE so must be done here 
     528taum(:,:)=(1.0-fr_i(:,:))*taum(:,:)+fr_i(:,:)*SQRT(ztmp1*ztmp1 + ztmp2*ztmp2) 
     529 
     530! Freshwater fluxes 
    530531 
    531532      IF(ksbc == jp_flx) THEN 
    532533! Note that emp from the forcing files is evap*(1-aice)-(tprecip-aice*sprecip) 
    533534! What we want here is evap*(1-aice)-tprecip*(1-aice) hence manipulation below 
    534 ! Not ideal since aice won't be the same as in the atmosphere.   
     535! Not ideal since aice won't be the same as in the atmosphere. 
    535536! Better to use evap and tprecip? (but for now don't read in evap in this case) 
    536537         emp(:,:)  = emp(:,:)+fr_i(:,:)*(tprecip(:,:)-sprecip(:,:)) 
    537538      ELSE IF(ksbc == jp_blk) THEN 
    538          emp(:,:)  = (1.0-fr_i(:,:))*emp(:,:)         
     539         emp(:,:)  = (1.0-fr_i(:,:))*emp(:,:) 
    539540      ELSE IF(ksbc == jp_purecpl) THEN 
    540 ! emp_tot is set in sbc_cpl_ice_flx (called from cice_sbc_in above)  
     541! emp_tot is set in sbc_cpl_ice_flx (called from cice_sbc_in above) 
    541542! This is currently as required with the coupling fields from the UM atmosphere 
    542          emp(:,:) = emp_tot(:,:)+tprecip(:,:)*fr_i(:,:)  
     543         emp(:,:) = emp_tot(:,:)+tprecip(:,:)*fr_i(:,:) 
    543544      ENDIF 
    544545 
     
    560561      emp(:,:)=emp(:,:)-ztmp1(:,:) 
    561562      fmmflx(:,:) = ztmp1(:,:) !!Joakim edit 
    562        
     563 
    563564      CALL lbc_lnk_multi( 'sbcice_cice', emp , 'T', 1., sfx , 'T', 1. ) 
    564565 
     
    634635      !!                    ***  ROUTINE cice_sbc_hadgam  *** 
    635636      !! ** Purpose: Prepare fields needed to pass to HadGAM3 atmosphere 
    636       !!  
     637      !! 
    637638      !! 
    638639      !!--------------------------------------------------------------------- 
     
    657658      CALL cice2nemo(vvel,v_ice,'F', -1. ) 
    658659      ! 
    659       ! Ice concentration (CO_1) = a_i calculated at end of cice_sbc_out   
     660      ! Ice concentration (CO_1) = a_i calculated at end of cice_sbc_out 
    660661      ! 
    661662      ! Snow and ice thicknesses (CO_2 and CO_3) 
     
    689690      !!--------------------------------------------------------------------- 
    690691      !! ** Method  :   READ monthly flux file in NetCDF files 
    691       !!       
    692       !!  snowfall     
    693       !!  rainfall     
    694       !!  sublimation rate     
     692      !! 
     693      !!  snowfall 
     694      !!  rainfall 
     695      !!  sublimation rate 
    695696      !!  topmelt (category) 
    696697      !!  botmelt (category) 
     
    709710      TYPE(FLD_N) ::   sn_snow, sn_rain, sn_sblm               ! informations about the fields to be read 
    710711      TYPE(FLD_N) ::   sn_top1, sn_top2, sn_top3, sn_top4, sn_top5 
    711       TYPE(FLD_N) ::   sn_bot1, sn_bot2, sn_bot3, sn_bot4, sn_bot5  
     712      TYPE(FLD_N) ::   sn_bot1, sn_bot2, sn_bot3, sn_bot4, sn_bot5 
    712713      !! 
    713714      NAMELIST/namsbc_cice/ cn_dir, sn_snow, sn_rain, sn_sblm,   & 
     
    727728         !            !    file          ! frequency !  variable    ! time intep !  clim   ! 'yearly' or ! weights  ! rotation   ! landmask 
    728729         !            !    name          !  (hours)  !   name       !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs      ! file 
    729          sn_snow = FLD_N( 'snowfall_1m'  ,    -1.    ,  'snowfall'  ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    )  
    730          sn_rain = FLD_N( 'rainfall_1m'  ,    -1.    ,  'rainfall'  ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    )  
     730         sn_snow = FLD_N( 'snowfall_1m'  ,    -1.    ,  'snowfall'  ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     731         sn_rain = FLD_N( 'rainfall_1m'  ,    -1.    ,  'rainfall'  ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
    731732         sn_sblm = FLD_N( 'sublim_1m'    ,    -1.    ,  'sublim'    ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
    732733         sn_top1 = FLD_N( 'topmeltn1_1m' ,    -1.    ,  'topmeltn1' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     
    754755         slf_i(jp_bot2) = sn_bot2   ;   slf_i(jp_bot3) = sn_bot3   ;   slf_i(jp_bot4) = sn_bot4 
    755756         slf_i(jp_bot5) = sn_bot5 
    756           
     757 
    757758         ! set sf structure 
    758759         ALLOCATE( sf(jpfld), STAT=ierror ) 
     
    792793      ! control print (if less than 100 time-step asked) 
    793794      IF( nitend-nit000 <= 100 .AND. lwp ) THEN 
    794          WRITE(numout,*)  
     795         WRITE(numout,*) 
    795796         WRITE(numout,*) '        read forcing fluxes for CICE OK' 
    796797         CALL FLUSH(numout) 
     
    802803      !!--------------------------------------------------------------------- 
    803804      !!                    ***  ROUTINE nemo2cice  *** 
    804       !! ** Purpose :   Transfer field in NEMO array to field in CICE array.   
     805      !! ** Purpose :   Transfer field in NEMO array to field in CICE array. 
    805806#if defined key_nemocice_decomp 
    806       !!              
     807      !! 
    807808      !!                NEMO and CICE PE sub domains are identical, hence 
    808       !!                there is no need to gather or scatter data from  
     809      !!                there is no need to gather or scatter data from 
    809810      !!                one PE configuration to another. 
    810811#else 
    811       !!                Automatically gather/scatter between  
     812      !!                Automatically gather/scatter between 
    812813      !!                different processors and blocks 
    813814      !! ** Method :    A. Ensure all haloes are filled in NEMO field (pn) 
    814815      !!                B. Gather pn into global array (png) 
    815816      !!                C. Map png into CICE global array (pcg) 
    816       !!                D. Scatter pcg to CICE blocks (pc) + update haloes   
     817      !!                D. Scatter pcg to CICE blocks (pc) + update haloes 
    817818#endif 
    818819      !!--------------------------------------------------------------------- 
     
    858859      IF( jpnij > 1) THEN 
    859860         CALL mppsync 
    860          CALL mppgather (pn,0,png)  
     861         CALL mppgather (pn,0,png) 
    861862         CALL mppsync 
    862863      ELSE 
     
    869870! (may be OK but not 100% sure) 
    870871 
    871       IF(nproc==0) THEN      
     872      IF(nproc==0) THEN 
    872873!        pcg(:,:)=0.0 
    873874         DO jn=1,jpnij 
     
    890891         CASE ( 'T' ) 
    891892            grid_loc=field_loc_center 
    892          CASE ( 'F' )                               
     893         CASE ( 'F' ) 
    893894            grid_loc=field_loc_NEcorner 
    894895      END SELECT 
     
    897898         CASE ( -1 ) 
    898899            field_type=field_type_vector 
    899          CASE ( 1 )                               
     900         CASE ( 1 ) 
    900901            field_type=field_type_scalar 
    901902      END SELECT 
     
    916917      !! ** Purpose :   Transfer field in CICE array to field in NEMO array. 
    917918#if defined key_nemocice_decomp 
    918       !!              
     919      !! 
    919920      !!                NEMO and CICE PE sub domains are identical, hence 
    920       !!                there is no need to gather or scatter data from  
     921      !!                there is no need to gather or scatter data from 
    921922      !!                one PE configuration to another. 
    922 #else  
     923#else 
    923924      !!                Automatically deal with scatter/gather between 
    924925      !!                different processors and blocks 
     
    926927      !!                B. Map pcg into NEMO global array (png) 
    927928      !!                C. Scatter png into NEMO field (pn) for each processor 
    928       !!                D. Ensure all haloes are filled in pn  
     929      !!                D. Ensure all haloes are filled in pn 
    929930#endif 
    930931      !!--------------------------------------------------------------------- 
     
    958959         CASE ( 'T' ) 
    959960            grid_loc=field_loc_center 
    960          CASE ( 'F' )                               
     961         CASE ( 'F' ) 
    961962            grid_loc=field_loc_NEcorner 
    962963      END SELECT 
     
    965966         CASE ( -1 ) 
    966967            field_type=field_type_vector 
    967          CASE ( 1 )                               
     968         CASE ( 1 ) 
    968969            field_type=field_type_scalar 
    969970      END SELECT 
     
    979980#else 
    980981 
    981 !      A. Gather CICE blocks (pc) into global array (pcg)  
     982!      A. Gather CICE blocks (pc) into global array (pcg) 
    982983 
    983984      CALL gather_global(pcg, pc, 0, distrb_info) 
     
    10051006      IF( jpnij > 1) THEN 
    10061007         CALL mppsync 
    1007          CALL mppscatter (png,0,pn)  
     1008         CALL mppscatter (png,0,pn) 
    10081009         CALL mppsync 
    10091010      ELSE 
Note: See TracChangeset for help on using the changeset viewer.