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

Ignore:
Timestamp:
2012-11-27T15:42:24+01:00 (12 years ago)
Author:
rblod
Message:

First commit of the final branch for 2012 (future nemo_3_5), see ticket #1028

File:
1 edited

Legend:

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

    r3632 r3680  
    4141#endif 
    4242   USE geo2ocean       !  
    43    USE restart         ! 
    4443   USE oce   , ONLY : tsn, un, vn 
    4544   USE albedo          ! 
     
    381380         &     srcv( (/jpr_otz1, jpr_otz2, jpr_itz1, jpr_itz2/) )%laction = .FALSE.  
    382381      ! 
     382      IF( TRIM( sn_rcv_tau%clvor  ) == 'local grid' ) THEN        ! already on local grid -> no need of the second grid 
     383            srcv(jpr_otx2:jpr_otz2)%laction = .FALSE.  
     384            srcv(jpr_itx2:jpr_itz2)%laction = .FALSE.  
     385            srcv(jpr_oty1)%clgrid = srcv(jpr_oty2)%clgrid   ! not needed but cleaner... 
     386            srcv(jpr_ity1)%clgrid = srcv(jpr_ity2)%clgrid   ! not needed but cleaner... 
     387      ENDIF 
     388      ! 
    383389      IF( TRIM( sn_rcv_tau%cldes ) /= 'oce and ice' ) THEN        ! 'oce and ice' case ocean stress on ocean mesh used 
    384390         srcv(jpr_itx1:jpr_itz2)%laction = .FALSE.    ! ice components not received 
     
    520526      ssnd(jps_tmix)%clname = 'O_TepMix' 
    521527      SELECT CASE( TRIM( sn_snd_temp%cldes ) ) 
     528      CASE( 'none'         )       ! nothing to do 
    522529      CASE( 'oce only'             )   ;   ssnd(   jps_toce             )%laction = .TRUE. 
    523530      CASE( 'weighted oce and ice' ) 
     
    562569 
    563570      SELECT CASE ( TRIM( sn_snd_thick%cldes ) ) 
    564       CASE ( 'ice and snow' )  
     571      CASE( 'none'         )       ! nothing to do 
     572      CASE( 'ice and snow' )  
    565573         ssnd(jps_hice:jps_hsnw)%laction = .TRUE. 
    566574         IF ( TRIM( sn_snd_thick%clcat ) == 'yes' ) THEN 
     
    568576         ELSE 
    569577            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' ) 
     578CALL ctl_stop( 'sbc_cpl_init: use weighted ice and snow option for sn_snd_thick%cldes if not exchanging category fields' ) 
    571579            ENDIF 
    572580         ENDIF 
     
    13571365      !                                                      !    Surface temperature    !   in Kelvin 
    13581366      !                                                      ! ------------------------- ! 
    1359       SELECT CASE( sn_snd_temp%cldes) 
    1360       CASE( 'oce only'             )   ;   ztmp1(:,:) =   tsn(:,:,1,jp_tem) + rt0 
    1361       CASE( 'weighted oce and ice' )   ;   ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:)    
    1362          SELECT CASE( sn_snd_temp%clcat ) 
    1363          CASE( 'yes' )    
    1364             ztmp3(:,:,1:jpl) = tn_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 
    1365          CASE( 'no' ) 
    1366             ztmp3(:,:,:) = 0._wp 
     1367      IF( ssnd(jps_toce)%laction .OR. ssnd(jps_tice)%laction .OR. ssnd(jps_tmix)%laction ) THEN 
     1368         SELECT CASE( sn_snd_temp%cldes) 
     1369         CASE( 'oce only'             )   ;   ztmp1(:,:) =   tsn(:,:,1,jp_tem) + rt0 
     1370         CASE( 'weighted oce and ice' )   ;   ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:)    
     1371            SELECT CASE( sn_snd_temp%clcat ) 
     1372            CASE( 'yes' )    
     1373               ztmp3(:,:,1:jpl) = tn_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1374            CASE( 'no' ) 
     1375               ztmp3(:,:,:) = 0.0 
     1376               DO jl=1,jpl 
     1377                  ztmp3(:,:,1) = ztmp3(:,:,1) + tn_ice(:,:,jl) * a_i(:,:,jl) 
     1378               ENDDO 
     1379            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' ) 
     1380            END SELECT 
     1381         CASE( 'mixed oce-ice'        )    
     1382            ztmp1(:,:) = ( tsn(:,:,1,1) + rt0 ) * zfr_l(:,:)  
    13671383            DO jl=1,jpl 
    1368                ztmp3(:,:,1) = ztmp3(:,:,1) + tn_ice(:,:,jl) * a_i(:,:,jl) 
     1384               ztmp1(:,:) = ztmp1(:,:) + tn_ice(:,:,jl) * a_i(:,:,jl) 
    13691385            ENDDO 
    1370          CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' ) 
     1386         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%cldes' ) 
    13711387         END SELECT 
    1372       CASE( 'mixed oce-ice'        )    
    1373          ztmp1(:,:) = ( tsn(:,:,1,1) + rt0 ) * zfr_l(:,:)  
    1374          DO jl=1,jpl 
    1375             ztmp1(:,:) = ztmp1(:,:) + tn_ice(:,:,jl) * a_i(:,:,jl) 
    1376          ENDDO 
    1377       CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%cldes' ) 
    1378       END SELECT 
    1379       IF( ssnd(jps_toce)%laction )   CALL cpl_prism_snd( jps_toce, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
    1380       IF( ssnd(jps_tice)%laction )   CALL cpl_prism_snd( jps_tice, isec, ztmp3, info ) 
    1381       IF( ssnd(jps_tmix)%laction )   CALL cpl_prism_snd( jps_tmix, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1388         IF( ssnd(jps_toce)%laction )   CALL cpl_prism_snd( jps_toce, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1389         IF( ssnd(jps_tice)%laction )   CALL cpl_prism_snd( jps_tice, isec, ztmp3, info ) 
     1390         IF( ssnd(jps_tmix)%laction )   CALL cpl_prism_snd( jps_tmix, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1391      ENDIF 
    13821392      ! 
    13831393      !                                                      ! ------------------------- ! 
     
    13991409      !                                                      ! ------------------------- ! 
    14001410      ! Send ice fraction field  
    1401       SELECT CASE( sn_snd_thick%clcat ) 
    1402          CASE( 'yes' )    
    1403             ztmp3(:,:,1:jpl) =  a_i(:,:,1:jpl) 
    1404          CASE( 'no' ) 
    1405             ztmp3(:,:,1) = fr_i(:,:) 
    1406       CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
    1407       END SELECT 
    1408       IF( ssnd(jps_fice)%laction ) CALL cpl_prism_snd( jps_fice, isec, ztmp3, info ) 
     1411      IF( ssnd(jps_fice)%laction ) THEN 
     1412         SELECT CASE( sn_snd_thick%clcat ) 
     1413         CASE( 'yes' )   ;   ztmp3(:,:,1:jpl) =  a_i(:,:,1:jpl) 
     1414         CASE( 'no'  )   ;   ztmp3(:,:,1    ) = fr_i(:,:      ) 
     1415         CASE default    ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
     1416         END SELECT 
     1417         CALL cpl_prism_snd( jps_fice, isec, ztmp3, info ) 
     1418      ENDIF 
    14091419 
    14101420      ! Send ice and snow thickness field  
    1411       SELECT CASE( sn_snd_thick%cldes) 
    1412       CASE( 'weighted ice and snow' )    
    1413          SELECT CASE( sn_snd_thick%clcat ) 
    1414          CASE( 'yes' )    
    1415             ztmp3(:,:,1:jpl) =  ht_i(:,:,1:jpl) * a_i(:,:,1:jpl) 
    1416             ztmp4(:,:,1:jpl) =  ht_s(:,:,1:jpl) * a_i(:,:,1:jpl) 
    1417          CASE( 'no' ) 
    1418             ztmp3(:,:,:) = 0._wp   ;  ztmp4(:,:,:) = 0._wp 
    1419             DO jl=1,jpl 
    1420                ztmp3(:,:,1) = ztmp3(:,:,1) + ht_i(:,:,jl) * a_i(:,:,jl) 
    1421                ztmp4(:,:,1) = ztmp4(:,:,1) + ht_s(:,:,jl) * a_i(:,:,jl) 
    1422             ENDDO 
    1423          CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
     1421      IF( ssnd(jps_hice)%laction .OR. ssnd(jps_hsnw)%laction ) THEN  
     1422         SELECT CASE( sn_snd_thick%cldes) 
     1423         CASE( 'none'                  )       ! nothing to do 
     1424         CASE( 'weighted ice and snow' )    
     1425            SELECT CASE( sn_snd_thick%clcat ) 
     1426            CASE( 'yes' )    
     1427               ztmp3(:,:,1:jpl) =  ht_i(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1428               ztmp4(:,:,1:jpl) =  ht_s(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1429            CASE( 'no' ) 
     1430               ztmp3(:,:,:) = 0.0   ;  ztmp4(:,:,:) = 0.0 
     1431               DO jl=1,jpl 
     1432                  ztmp3(:,:,1) = ztmp3(:,:,1) + ht_i(:,:,jl) * a_i(:,:,jl) 
     1433                  ztmp4(:,:,1) = ztmp4(:,:,1) + ht_s(:,:,jl) * a_i(:,:,jl) 
     1434               ENDDO 
     1435            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
     1436            END SELECT 
     1437         CASE( 'ice and snow'         )    
     1438            ztmp3(:,:,1:jpl) = ht_i(:,:,1:jpl) 
     1439            ztmp4(:,:,1:jpl) = ht_s(:,:,1:jpl) 
     1440         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%cldes' ) 
    14241441         END SELECT 
    1425       CASE( 'ice and snow'         )    
    1426          ztmp3(:,:,1:jpl) = ht_i(:,:,1:jpl) 
    1427          ztmp4(:,:,1:jpl) = ht_s(:,:,1:jpl) 
    1428       CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%cldes' ) 
    1429       END SELECT 
    1430       IF( ssnd(jps_hice)%laction )   CALL cpl_prism_snd( jps_hice, isec, ztmp3, info ) 
    1431       IF( ssnd(jps_hsnw)%laction )   CALL cpl_prism_snd( jps_hsnw, isec, ztmp4, info ) 
     1442         IF( ssnd(jps_hice)%laction )   CALL cpl_prism_snd( jps_hice, isec, ztmp3, info ) 
     1443         IF( ssnd(jps_hsnw)%laction )   CALL cpl_prism_snd( jps_hsnw, isec, ztmp4, info ) 
     1444      ENDIF 
    14321445      ! 
    14331446#if defined key_cpl_carbon_cycle 
Note: See TracChangeset for help on using the changeset viewer.