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 3647 for branches/2012/dev_LOCEAN_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90 – NEMO

Ignore:
Timestamp:
2012-11-25T22:21:45+01:00 (11 years ago)
Author:
smasson
Message:

coupling interface without sea-ice, see ticket:1018

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_LOCEAN_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r3413 r3647  
    381381         &     srcv( (/jpr_otz1, jpr_otz2, jpr_itz1, jpr_itz2/) )%laction = .FALSE.  
    382382      ! 
     383      IF( TRIM( sn_rcv_tau%clvor  ) == 'local grid' ) THEN        ! already on local grid -> no need of the second grid 
     384            srcv(jpr_otx2:jpr_otz2)%laction = .FALSE.  
     385            srcv(jpr_itx2:jpr_itz2)%laction = .FALSE.  
     386            srcv(jpr_oty1)%clgrid = srcv(jpr_oty2)%clgrid   ! not needed but cleaner... 
     387            srcv(jpr_ity1)%clgrid = srcv(jpr_ity2)%clgrid   ! not needed but cleaner... 
     388      ENDIF 
     389      ! 
    383390      IF( TRIM( sn_rcv_tau%cldes ) /= 'oce and ice' ) THEN        ! 'oce and ice' case ocean stress on ocean mesh used 
    384391         srcv(jpr_itx1:jpr_itz2)%laction = .FALSE.    ! ice components not received 
     
    520527      ssnd(jps_tmix)%clname = 'O_TepMix' 
    521528      SELECT CASE( TRIM( sn_snd_temp%cldes ) ) 
     529      CASE( 'none'         )       ! nothing to do 
    522530      CASE( 'oce only'             )   ;   ssnd(   jps_toce             )%laction = .TRUE. 
    523531      CASE( 'weighted oce and ice' ) 
     
    562570 
    563571      SELECT CASE ( TRIM( sn_snd_thick%cldes ) ) 
    564       CASE ( 'ice and snow' )  
     572      CASE( 'none'         )       ! nothing to do 
     573      CASE( 'ice and snow' )  
    565574         ssnd(jps_hice:jps_hsnw)%laction = .TRUE. 
    566575         IF ( TRIM( sn_snd_thick%clcat ) == 'yes' ) THEN 
     
    568577         ELSE 
    569578            IF ( jpl > 1 ) THEN 
    570                CALL ctl_stop( 'sbc_cpl_init: use weighted ice and snow option for sn_snd_thick%cldes if not exchanging category fields' ) 
     579CALL ctl_stop( 'sbc_cpl_init: use weighted ice and snow option for sn_snd_thick%cldes if not exchanging category fields' ) 
    571580            ENDIF 
    572581         ENDIF 
     
    13501359      !                                                      !    Surface temperature    !   in Kelvin 
    13511360      !                                                      ! ------------------------- ! 
    1352       SELECT CASE( sn_snd_temp%cldes) 
    1353       CASE( 'oce only'             )   ;   ztmp1(:,:) =   tsn(:,:,1,jp_tem) + rt0 
    1354       CASE( 'weighted oce and ice' )   ;   ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:)    
    1355          SELECT CASE( sn_snd_temp%clcat ) 
    1356          CASE( 'yes' )    
    1357             ztmp3(:,:,1:jpl) = tn_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 
    1358          CASE( 'no' ) 
    1359             ztmp3(:,:,:) = 0.0 
     1361      IF( ssnd(jps_toce)%laction .OR. ssnd(jps_tice)%laction .OR. ssnd(jps_tmix)%laction ) THEN 
     1362         SELECT CASE( sn_snd_temp%cldes) 
     1363         CASE( 'oce only'             )   ;   ztmp1(:,:) =   tsn(:,:,1,jp_tem) + rt0 
     1364         CASE( 'weighted oce and ice' )   ;   ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:)    
     1365            SELECT CASE( sn_snd_temp%clcat ) 
     1366            CASE( 'yes' )    
     1367               ztmp3(:,:,1:jpl) = tn_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1368            CASE( 'no' ) 
     1369               ztmp3(:,:,:) = 0.0 
     1370               DO jl=1,jpl 
     1371                  ztmp3(:,:,1) = ztmp3(:,:,1) + tn_ice(:,:,jl) * a_i(:,:,jl) 
     1372               ENDDO 
     1373            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' ) 
     1374            END SELECT 
     1375         CASE( 'mixed oce-ice'        )    
     1376            ztmp1(:,:) = ( tsn(:,:,1,1) + rt0 ) * zfr_l(:,:)  
    13601377            DO jl=1,jpl 
    1361                ztmp3(:,:,1) = ztmp3(:,:,1) + tn_ice(:,:,jl) * a_i(:,:,jl) 
     1378               ztmp1(:,:) = ztmp1(:,:) + tn_ice(:,:,jl) * a_i(:,:,jl) 
    13621379            ENDDO 
    1363          CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' ) 
     1380         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%cldes' ) 
    13641381         END SELECT 
    1365       CASE( 'mixed oce-ice'        )    
    1366          ztmp1(:,:) = ( tsn(:,:,1,1) + rt0 ) * zfr_l(:,:)  
    1367          DO jl=1,jpl 
    1368             ztmp1(:,:) = ztmp1(:,:) + tn_ice(:,:,jl) * a_i(:,:,jl) 
    1369          ENDDO 
    1370       CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%cldes' ) 
    1371       END SELECT 
    1372       IF( ssnd(jps_toce)%laction )   CALL cpl_prism_snd( jps_toce, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
    1373       IF( ssnd(jps_tice)%laction )   CALL cpl_prism_snd( jps_tice, isec, ztmp3, info ) 
    1374       IF( ssnd(jps_tmix)%laction )   CALL cpl_prism_snd( jps_tmix, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1382         IF( ssnd(jps_toce)%laction )   CALL cpl_prism_snd( jps_toce, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1383         IF( ssnd(jps_tice)%laction )   CALL cpl_prism_snd( jps_tice, isec, ztmp3, info ) 
     1384         IF( ssnd(jps_tmix)%laction )   CALL cpl_prism_snd( jps_tmix, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1385      ENDIF 
    13751386      ! 
    13761387      !                                                      ! ------------------------- ! 
     
    13921403      !                                                      ! ------------------------- ! 
    13931404      ! Send ice fraction field  
    1394       SELECT CASE( sn_snd_thick%clcat ) 
    1395          CASE( 'yes' )    
    1396             ztmp3(:,:,1:jpl) =  a_i(:,:,1:jpl) 
    1397          CASE( 'no' ) 
    1398             ztmp3(:,:,1) = fr_i(:,:) 
    1399       CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
    1400       END SELECT 
    1401       IF( ssnd(jps_fice)%laction ) CALL cpl_prism_snd( jps_fice, isec, ztmp3, info ) 
     1405      IF( ssnd(jps_fice)%laction ) THEN 
     1406         SELECT CASE( sn_snd_thick%clcat ) 
     1407         CASE( 'yes' )   ;   ztmp3(:,:,1:jpl) =  a_i(:,:,1:jpl) 
     1408         CASE( 'no'  )   ;   ztmp3(:,:,1    ) = fr_i(:,:      ) 
     1409         CASE default    ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
     1410         END SELECT 
     1411         CALL cpl_prism_snd( jps_fice, isec, ztmp3, info ) 
     1412      ENDIF 
    14021413 
    14031414      ! Send ice and snow thickness field  
    1404       SELECT CASE( sn_snd_thick%cldes) 
    1405       CASE( 'weighted ice and snow' )    
    1406          SELECT CASE( sn_snd_thick%clcat ) 
    1407          CASE( 'yes' )    
    1408             ztmp3(:,:,1:jpl) =  ht_i(:,:,1:jpl) * a_i(:,:,1:jpl) 
    1409             ztmp4(:,:,1:jpl) =  ht_s(:,:,1:jpl) * a_i(:,:,1:jpl) 
    1410          CASE( 'no' ) 
    1411             ztmp3(:,:,:) = 0.0   ;  ztmp4(:,:,:) = 0.0 
    1412             DO jl=1,jpl 
    1413                ztmp3(:,:,1) = ztmp3(:,:,1) + ht_i(:,:,jl) * a_i(:,:,jl) 
    1414                ztmp4(:,:,1) = ztmp4(:,:,1) + ht_s(:,:,jl) * a_i(:,:,jl) 
    1415             ENDDO 
    1416          CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
     1415      IF( ssnd(jps_hice)%laction .OR. ssnd(jps_hsnw)%laction ) THEN  
     1416         SELECT CASE( sn_snd_thick%cldes) 
     1417         CASE( 'none'                  )       ! nothing to do 
     1418         CASE( 'weighted ice and snow' )    
     1419            SELECT CASE( sn_snd_thick%clcat ) 
     1420            CASE( 'yes' )    
     1421               ztmp3(:,:,1:jpl) =  ht_i(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1422               ztmp4(:,:,1:jpl) =  ht_s(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1423            CASE( 'no' ) 
     1424               ztmp3(:,:,:) = 0.0   ;  ztmp4(:,:,:) = 0.0 
     1425               DO jl=1,jpl 
     1426                  ztmp3(:,:,1) = ztmp3(:,:,1) + ht_i(:,:,jl) * a_i(:,:,jl) 
     1427                  ztmp4(:,:,1) = ztmp4(:,:,1) + ht_s(:,:,jl) * a_i(:,:,jl) 
     1428               ENDDO 
     1429            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
     1430            END SELECT 
     1431         CASE( 'ice and snow'         )    
     1432            ztmp3(:,:,1:jpl) = ht_i(:,:,1:jpl) 
     1433            ztmp4(:,:,1:jpl) = ht_s(:,:,1:jpl) 
     1434         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%cldes' ) 
    14171435         END SELECT 
    1418       CASE( 'ice and snow'         )    
    1419          ztmp3(:,:,1:jpl) = ht_i(:,:,1:jpl) 
    1420          ztmp4(:,:,1:jpl) = ht_s(:,:,1:jpl) 
    1421       CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%cldes' ) 
    1422       END SELECT 
    1423       IF( ssnd(jps_hice)%laction )   CALL cpl_prism_snd( jps_hice, isec, ztmp3, info ) 
    1424       IF( ssnd(jps_hsnw)%laction )   CALL cpl_prism_snd( jps_hsnw, isec, ztmp4, info ) 
     1436         IF( ssnd(jps_hice)%laction )   CALL cpl_prism_snd( jps_hice, isec, ztmp3, info ) 
     1437         IF( ssnd(jps_hsnw)%laction )   CALL cpl_prism_snd( jps_hsnw, isec, ztmp4, info ) 
     1438      ENDIF 
    14251439      ! 
    14261440#if defined key_cpl_carbon_cycle 
Note: See TracChangeset for help on using the changeset viewer.