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 5410 for trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90 – NEMO

Ignore:
Timestamp:
2015-06-12T18:39:20+02:00 (9 years ago)
Author:
clem
Message:

change sbccpl for EC-Earth purpose, ie more options for sn_snd_temp ('oce and ice'), sn_snd_alb ('ice') and sn_snd_thick (add 1-cat case for 'ice and snow'). Plus few cleaning in sbcice_lim

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5407 r5410  
    603603      ssnd(jps_tmix)%clname = 'O_TepMix' 
    604604      SELECT CASE( TRIM( sn_snd_temp%cldes ) ) 
    605       CASE( 'none'         )       ! nothing to do 
    606       CASE( 'oce only'             )   ;   ssnd(   jps_toce            )%laction = .TRUE. 
    607       CASE( 'weighted oce and ice' ) 
     605      CASE( 'none'                                 )       ! nothing to do 
     606      CASE( 'oce only'                             )   ;   ssnd( jps_toce )%laction = .TRUE. 
     607      CASE( 'oce and ice' , 'weighted oce and ice' ) 
    608608         ssnd( (/jps_toce, jps_tice/) )%laction = .TRUE. 
    609609         IF ( TRIM( sn_snd_temp%clcat ) == 'yes' )  ssnd(jps_tice)%nct = jpl 
    610       CASE( 'mixed oce-ice'        )   ;   ssnd(   jps_tmix            )%laction = .TRUE. 
     610      CASE( 'mixed oce-ice'                        )   ;   ssnd( jps_tmix )%laction = .TRUE. 
    611611      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_temp%cldes' ) 
    612612      END SELECT 
     
    618618      ssnd(jps_albmix)%clname = 'O_AlbMix' 
    619619      SELECT CASE( TRIM( sn_snd_alb%cldes ) ) 
    620       CASE( 'none'               ! nothing to do 
    621       CASE( 'weighted ice'  )   ;  ssnd(jps_albice)%laction = .TRUE. 
    622       CASE( 'mixed oce-ice' )   ;  ssnd(jps_albmix)%laction = .TRUE. 
     620      CASE( 'none'                 )     ! nothing to do 
     621      CASE( 'ice' , 'weighted ice' )   ; ssnd(jps_albice)%laction = .TRUE. 
     622      CASE( 'mixed oce-ice'        )   ; ssnd(jps_albmix)%laction = .TRUE. 
    623623      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_alb%cldes' ) 
    624624      END SELECT 
     
    651651         IF ( TRIM( sn_snd_thick%clcat ) == 'yes' ) THEN 
    652652            ssnd(jps_hice:jps_hsnw)%nct = jpl 
    653          ELSE 
    654             IF ( jpl > 1 ) THEN 
    655 CALL ctl_stop( 'sbc_cpl_init: use weighted ice and snow option for sn_snd_thick%cldes if not exchanging category fields' ) 
    656             ENDIF 
    657653         ENDIF 
    658654      CASE ( 'weighted ice and snow' )  
     
    17261722            SELECT CASE( sn_snd_temp%cldes) 
    17271723            CASE( 'oce only'             )   ;   ztmp1(:,:) =   ztmp1(:,:) + rt0 
     1724            CASE( 'oce and ice'          )   ;   ztmp1(:,:) =   ztmp1(:,:) + rt0 
     1725               SELECT CASE( sn_snd_temp%clcat ) 
     1726               CASE( 'yes' )    
     1727                  ztmp3(:,:,1:jpl) = tn_ice(:,:,1:jpl) 
     1728               CASE( 'no' ) 
     1729                  WHERE( SUM( a_i, dim=3 ) /= 0. ) 
     1730                     ztmp3(:,:,1) = SUM( tn_ice * a_i, dim=3 ) / SUM( a_i, dim=3 ) 
     1731                  ELSEWHERE 
     1732                     ztmp3(:,:,1) = rt0 ! TODO: Is freezing point a good default? (Maybe SST is better?) 
     1733                  END WHERE 
     1734               CASE default   ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' ) 
     1735               END SELECT 
    17281736            CASE( 'weighted oce and ice' )   ;   ztmp1(:,:) = ( ztmp1(:,:) + rt0 ) * zfr_l(:,:)    
    17291737               SELECT CASE( sn_snd_temp%clcat ) 
     
    17531761      !                                                      ! ------------------------- ! 
    17541762      IF( ssnd(jps_albice)%laction ) THEN                         ! ice  
    1755          ztmp3(:,:,1:jpl) = alb_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1763         SELECT CASE( sn_snd_alb%cldes ) 
     1764         CASE( 'ice'          )   ; ztmp3(:,:,1:jpl) = alb_ice(:,:,1:jpl) 
     1765         CASE( 'weighted ice' )   ; ztmp3(:,:,1:jpl) = alb_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1766         CASE default             ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_alb%cldes' ) 
     1767         END SELECT 
    17561768         CALL cpl_snd( jps_albice, isec, ztmp3, info ) 
    17571769      ENDIF 
     
    18001812            END SELECT 
    18011813         CASE( 'ice and snow'         )    
    1802             ztmp3(:,:,1:jpl) = ht_i(:,:,1:jpl) 
    1803             ztmp4(:,:,1:jpl) = ht_s(:,:,1:jpl) 
     1814            SELECT CASE( sn_snd_thick%clcat ) 
     1815            CASE( 'yes' ) 
     1816               ztmp3(:,:,1:jpl) = ht_i(:,:,1:jpl) 
     1817               ztmp4(:,:,1:jpl) = ht_s(:,:,1:jpl) 
     1818            CASE( 'no' ) 
     1819               WHERE( SUM( a_i, dim=3 ) /= 0. ) 
     1820                  ztmp3(:,:,1) = SUM( ht_i * a_i, dim=3 ) / SUM( a_i, dim=3 ) 
     1821                  ztmp4(:,:,1) = SUM( ht_s * a_i, dim=3 ) / SUM( a_i, dim=3 ) 
     1822               ELSEWHERE 
     1823                 ztmp3(:,:,1) = 0. 
     1824                 ztmp4(:,:,1) = 0. 
     1825               END WHERE 
     1826            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
     1827            END SELECT 
    18041828         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%cldes' ) 
    18051829         END SELECT 
Note: See TracChangeset for help on using the changeset viewer.