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 11963 for NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcice_cice.F90 – NEMO

Ignore:
Timestamp:
2019-11-26T12:08:01+01:00 (4 years ago)
Author:
laurent
Message:

More accurate comments/info, better syntax, simplifications, etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcice_cice.F90

    r11831 r11963  
    132132         IF      ( ksbc == jp_flx ) THEN 
    133133            CALL cice_sbc_force(kt) 
    134          ELSE IF ( ksbc == jp_purecpl ) THEN 
     134         ELSE IF( ksbc == jp_purecpl ) THEN 
    135135            CALL sbc_cpl_ice_flx( fr_i ) 
    136136         ENDIF 
     
    140140         CALL cice_sbc_out ( kt, ksbc ) 
    141141 
    142          IF ( ksbc == jp_purecpl )  CALL cice_sbc_hadgam(kt+1) 
     142         IF( ksbc == jp_purecpl )  CALL cice_sbc_hadgam(kt+1) 
    143143 
    144144      ENDIF                                          ! End sea-ice time step only 
     
    168168      ! there is no restart file. 
    169169      ! Values from a CICE restart file would overwrite this 
    170       IF ( .NOT. ln_rstart ) THEN     
     170      IF( .NOT. ln_rstart ) THEN     
    171171         CALL nemo2cice( tsn(:,:,1,jp_tem) , sst , 'T' , 1.)  
    172172      ENDIF   
     
    177177 
    178178! Do some CICE consistency checks 
    179       IF ( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 
    180          IF ( calc_strair .OR. calc_Tsfc ) THEN 
     179      IF( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 
     180         IF( calc_strair .OR. calc_Tsfc ) THEN 
    181181            CALL ctl_stop( 'STOP', 'cice_sbc_init : Forcing option requires calc_strair=F and calc_Tsfc=F in ice_in' ) 
    182182         ENDIF 
    183       ELSEIF (ksbc == jp_blk) THEN 
    184          IF ( .NOT. (calc_strair .AND. calc_Tsfc) ) THEN 
     183      ELSEIF(ksbc == jp_blk) THEN 
     184         IF( .NOT. (calc_strair .AND. calc_Tsfc) ) THEN 
    185185            CALL ctl_stop( 'STOP', 'cice_sbc_init : Forcing option requires calc_strair=T and calc_Tsfc=T in ice_in' ) 
    186186         ENDIF 
     
    202202 
    203203      CALL cice2nemo(aice,fr_i, 'T', 1. ) 
    204       IF ( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 
     204      IF( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 
    205205         DO jl=1,ncat 
    206206            CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) 
     
    297297! forced and coupled case  
    298298 
    299       IF ( (ksbc == jp_flx).OR.(ksbc == jp_purecpl) ) THEN 
     299      IF( (ksbc == jp_flx).OR.(ksbc == jp_purecpl) ) THEN 
    300300 
    301301         ztmpn(:,:,:)=0.0 
     
    322322 
    323323! Surface downward latent heat flux (CI_5) 
    324          IF (ksbc == jp_flx) THEN 
     324         IF(ksbc == jp_flx) THEN 
    325325            DO jl=1,ncat 
    326326               ztmpn(:,:,jl)=qla_ice(:,:,1)*a_i(:,:,jl) 
     
    332332            DO jj=1,jpj 
    333333               DO ji=1,jpi 
    334                   IF (fr_i(ji,jj).eq.0.0) THEN 
     334                  IF(fr_i(ji,jj).eq.0.0) THEN 
    335335                     DO jl=1,ncat 
    336336                        ztmpn(ji,jj,jl)=0.0 
     
    351351! GBM conductive flux through ice (CI_6) 
    352352!  Convert to GBM 
    353             IF (ksbc == jp_flx) THEN 
     353            IF(ksbc == jp_flx) THEN 
    354354               ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl) 
    355355            ELSE 
     
    360360! GBM surface heat flux (CI_7) 
    361361!  Convert to GBM 
    362             IF (ksbc == jp_flx) THEN 
     362            IF(ksbc == jp_flx) THEN 
    363363               ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl)  
    364364            ELSE 
     
    368368         ENDDO 
    369369 
    370       ELSE IF (ksbc == jp_blk) THEN 
     370      ELSE IF(ksbc == jp_blk) THEN 
    371371 
    372372! Pass bulk forcing fields to CICE (which will calculate heat fluxes etc itself) 
     
    546546! Freshwater fluxes  
    547547 
    548       IF (ksbc == jp_flx) THEN 
     548      IF(ksbc == jp_flx) THEN 
    549549! Note that emp from the forcing files is evap*(1-aice)-(tprecip-aice*sprecip) 
    550550! What we want here is evap*(1-aice)-tprecip*(1-aice) hence manipulation below 
     
    552552! Better to use evap and tprecip? (but for now don't read in evap in this case) 
    553553         emp(:,:)  = emp(:,:)+fr_i(:,:)*(tprecip(:,:)-sprecip(:,:)) 
    554       ELSE IF (ksbc == jp_blk) THEN 
     554      ELSE IF(ksbc == jp_blk) THEN 
    555555         emp(:,:)  = (1.0-fr_i(:,:))*emp(:,:)         
    556       ELSE IF (ksbc == jp_purecpl) THEN 
     556      ELSE IF(ksbc == jp_purecpl) THEN 
    557557! emp_tot is set in sbc_cpl_ice_flx (called from cice_sbc_in above)  
    558558! This is currently as required with the coupling fields from the UM atmosphere 
     
    584584! Scale qsr and qns according to ice fraction (bulk formulae only) 
    585585 
    586       IF (ksbc == jp_blk) THEN 
     586      IF(ksbc == jp_blk) THEN 
    587587         qsr(:,:)=qsr(:,:)*(1.0-fr_i(:,:)) 
    588588         qns(:,:)=qns(:,:)*(1.0-fr_i(:,:)) 
    589589      ENDIF 
    590590! Take into account snow melting except for fully coupled when already in qns_tot 
    591       IF (ksbc == jp_purecpl) THEN 
     591      IF(ksbc == jp_purecpl) THEN 
    592592         qsr(:,:)= qsr_tot(:,:) 
    593593         qns(:,:)= qns_tot(:,:) 
     
    624624 
    625625      CALL cice2nemo(aice,fr_i,'T', 1. ) 
    626       IF ( (ksbc == jp_flx).OR.(ksbc == jp_purecpl) ) THEN 
     626      IF( (ksbc == jp_flx).OR.(ksbc == jp_purecpl) ) THEN 
    627627         DO jl=1,ncat 
    628628            CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) 
     
    879879!     B. Gather pn into global array (png) 
    880880 
    881       IF ( jpnij > 1) THEN 
     881      IF( jpnij > 1) THEN 
    882882         CALL mppsync 
    883883         CALL mppgather (pn,0,png)  
     
    892892! (may be OK but not 100% sure) 
    893893 
    894       IF (nproc==0) THEN      
     894      IF(nproc==0) THEN      
    895895!        pcg(:,:)=0.0 
    896896         DO jn=1,jpnij 
     
    10151015! the lbclnk call on pn will replace these with sensible values 
    10161016 
    1017       IF (nproc==0) THEN 
     1017      IF(nproc==0) THEN 
    10181018         png(:,:,:)=0.0 
    10191019         DO jn=1,jpnij 
     
    10281028!     C. Scatter png into NEMO field (pn) for each processor 
    10291029 
    1030       IF ( jpnij > 1) THEN 
     1030      IF( jpnij > 1) THEN 
    10311031         CALL mppsync 
    10321032         CALL mppscatter (png,0,pn)  
Note: See TracChangeset for help on using the changeset viewer.