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 3653 for branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC – NEMO

Ignore:
Timestamp:
2012-11-26T11:58:31+01:00 (12 years ago)
Author:
cetlod
Message:

commit the changes from LOCEAN & UKMO merge, see ticket #1021

Location:
branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90

    r3294 r3653  
    629629      INTEGER                  ::   ipk    ! number of vertical levels of sdjf%fdta ( 2D: ipk=1 ; 3D: ipk=jpk ) 
    630630      INTEGER                  ::   iw     ! index into wgts array 
    631       !!--------------------------------------------------------------------- 
    632              
     631      INTEGER                  ::   ipdom  ! index of the domain 
     632      !!--------------------------------------------------------------------- 
     633      !       
    633634      ipk = SIZE( sdjf%fnow, 3 ) 
    634  
     635      ! 
    635636      IF( PRESENT(map) ) THEN 
    636637         IF( sdjf%ln_tint ) THEN   ;   CALL fld_map( sdjf%num, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1), map ) 
     
    643644         ENDIF 
    644645      ELSE 
     646         IF( SIZE(sdjf%fnow, 1) == jpi ) THEN  ;  ipdom = jpdom_data 
     647         ELSE                                  ;  ipdom = jpdom_unknown 
     648         ENDIF 
    645649         SELECT CASE( ipk ) 
    646          CASE(1)    
    647             IF( sdjf%ln_tint ) THEN   ;   CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fdta(:,:,1,2), sdjf%nrec_a(1) ) 
    648             ELSE                      ;   CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fnow(:,:,1  ), sdjf%nrec_a(1) ) 
     650         CASE(1) 
     651            IF( sdjf%ln_tint ) THEN   ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,1,2), sdjf%nrec_a(1) ) 
     652            ELSE                      ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,1  ), sdjf%nrec_a(1) ) 
    649653            ENDIF 
    650654         CASE DEFAULT 
    651             IF( sdjf%ln_tint ) THEN   ;   CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1) ) 
    652             ELSE                      ;   CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fnow(:,:,:  ), sdjf%nrec_a(1) ) 
     655            IF( sdjf%ln_tint ) THEN   ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1) ) 
     656            ELSE                      ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,:  ), sdjf%nrec_a(1) ) 
    653657            ENDIF 
    654658         END SELECT 
  • branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90

    r3294 r3653  
    2020   USE iom             ! IOM library 
    2121   USE lib_mpp         ! MPP library 
    22    USE restart         ! ocean restart 
    2322 
    2423   IMPLICIT NONE 
  • branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90

    r3294 r3653  
    2929   USE fldread         ! read input fields 
    3030   USE sbc_oce         ! Surface boundary condition: ocean fields 
     31   USE cyclone         ! Cyclone 10m wind form trac of cyclone centres 
    3132   USE sbcdcy          ! surface boundary condition: diurnal cycle 
    3233   USE iom             ! I/O manager library 
     
    186187 
    187188      !                                                        ! surface ocean fluxes computed with CLIO bulk formulea 
    188       IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m ) 
     189      IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce_core( kt, sf, sst_m, ssu_m, ssv_m ) 
    189190 
    190191#if defined key_cice 
     
    204205    
    205206    
    206    SUBROUTINE blk_oce_core( sf, pst, pu, pv ) 
     207   SUBROUTINE blk_oce_core( kt, sf, pst, pu, pv ) 
    207208      !!--------------------------------------------------------------------- 
    208209      !!                     ***  ROUTINE blk_core  *** 
     
    225226      !!  ** Nota  :   sf has to be a dummy argument for AGRIF on NEC 
    226227      !!--------------------------------------------------------------------- 
    227       TYPE(fld), INTENT(in), DIMENSION(:)   ::   sf    ! input data 
    228       REAL(wp) , INTENT(in), DIMENSION(:,:) ::   pst   ! surface temperature                      [Celcius] 
    229       REAL(wp) , INTENT(in), DIMENSION(:,:) ::   pu    ! surface current at U-point (i-component) [m/s] 
    230       REAL(wp) , INTENT(in), DIMENSION(:,:) ::   pv    ! surface current at V-point (j-component) [m/s] 
     228      INTEGER  , INTENT(in   )                 ::   kt    ! time step index 
     229      TYPE(fld), INTENT(inout), DIMENSION(:)   ::   sf    ! input data 
     230      REAL(wp) , INTENT(in)   , DIMENSION(:,:) ::   pst   ! surface temperature                      [Celcius] 
     231      REAL(wp) , INTENT(in)   , DIMENSION(:,:) ::   pu    ! surface current at U-point (i-component) [m/s] 
     232      REAL(wp) , INTENT(in)   , DIMENSION(:,:) ::   pv    ! surface current at V-point (j-component) [m/s] 
    231233      ! 
    232234      INTEGER  ::   ji, jj               ! dummy loop indices 
     
    261263      zwnd_i(:,:) = 0.e0   
    262264      zwnd_j(:,:) = 0.e0 
     265#if defined key_cyclone 
     266# if defined key_vectopt_loop 
     267!CDIR COLLAPSE 
     268# endif 
     269      CALL wnd_cyc( kt, zwnd_i, zwnd_j )    ! add Manu ! 
     270      DO jj = 2, jpjm1 
     271         DO ji = fs_2, fs_jpim1   ! vect. opt. 
     272            sf(jp_wndi)%fnow(ji,jj,1) = sf(jp_wndi)%fnow(ji,jj,1) + zwnd_i(ji,jj) 
     273            sf(jp_wndj)%fnow(ji,jj,1) = sf(jp_wndj)%fnow(ji,jj,1) + zwnd_j(ji,jj) 
     274         END DO 
     275      END DO 
     276#endif 
    263277#if defined key_vectopt_loop 
    264278!CDIR COLLAPSE 
  • branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r3413 r3653  
    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 
     
    13501358      !                                                      !    Surface temperature    !   in Kelvin 
    13511359      !                                                      ! ------------------------- ! 
    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 
     1360      IF( ssnd(jps_toce)%laction .OR. ssnd(jps_tice)%laction .OR. ssnd(jps_tmix)%laction ) THEN 
     1361         SELECT CASE( sn_snd_temp%cldes) 
     1362         CASE( 'oce only'             )   ;   ztmp1(:,:) =   tsn(:,:,1,jp_tem) + rt0 
     1363         CASE( 'weighted oce and ice' )   ;   ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:)    
     1364            SELECT CASE( sn_snd_temp%clcat ) 
     1365            CASE( 'yes' )    
     1366               ztmp3(:,:,1:jpl) = tn_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1367            CASE( 'no' ) 
     1368               ztmp3(:,:,:) = 0.0 
     1369               DO jl=1,jpl 
     1370                  ztmp3(:,:,1) = ztmp3(:,:,1) + tn_ice(:,:,jl) * a_i(:,:,jl) 
     1371               ENDDO 
     1372            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' ) 
     1373            END SELECT 
     1374         CASE( 'mixed oce-ice'        )    
     1375            ztmp1(:,:) = ( tsn(:,:,1,1) + rt0 ) * zfr_l(:,:)  
    13601376            DO jl=1,jpl 
    1361                ztmp3(:,:,1) = ztmp3(:,:,1) + tn_ice(:,:,jl) * a_i(:,:,jl) 
     1377               ztmp1(:,:) = ztmp1(:,:) + tn_ice(:,:,jl) * a_i(:,:,jl) 
    13621378            ENDDO 
    1363          CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' ) 
     1379         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%cldes' ) 
    13641380         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 ) 
     1381         IF( ssnd(jps_toce)%laction )   CALL cpl_prism_snd( jps_toce, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1382         IF( ssnd(jps_tice)%laction )   CALL cpl_prism_snd( jps_tice, isec, ztmp3, info ) 
     1383         IF( ssnd(jps_tmix)%laction )   CALL cpl_prism_snd( jps_tmix, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1384      ENDIF 
    13751385      ! 
    13761386      !                                                      ! ------------------------- ! 
     
    13921402      !                                                      ! ------------------------- ! 
    13931403      ! 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 ) 
     1404      IF( ssnd(jps_fice)%laction ) THEN 
     1405         SELECT CASE( sn_snd_thick%clcat ) 
     1406         CASE( 'yes' )   ;   ztmp3(:,:,1:jpl) =  a_i(:,:,1:jpl) 
     1407         CASE( 'no'  )   ;   ztmp3(:,:,1    ) = fr_i(:,:      ) 
     1408         CASE default    ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
     1409         END SELECT 
     1410         CALL cpl_prism_snd( jps_fice, isec, ztmp3, info ) 
     1411      ENDIF 
    14021412 
    14031413      ! 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' ) 
     1414      IF( ssnd(jps_hice)%laction .OR. ssnd(jps_hsnw)%laction ) THEN  
     1415         SELECT CASE( sn_snd_thick%cldes) 
     1416         CASE( 'none'                  )       ! nothing to do 
     1417         CASE( 'weighted ice and snow' )    
     1418            SELECT CASE( sn_snd_thick%clcat ) 
     1419            CASE( 'yes' )    
     1420               ztmp3(:,:,1:jpl) =  ht_i(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1421               ztmp4(:,:,1:jpl) =  ht_s(:,:,1:jpl) * a_i(:,:,1:jpl) 
     1422            CASE( 'no' ) 
     1423               ztmp3(:,:,:) = 0.0   ;  ztmp4(:,:,:) = 0.0 
     1424               DO jl=1,jpl 
     1425                  ztmp3(:,:,1) = ztmp3(:,:,1) + ht_i(:,:,jl) * a_i(:,:,jl) 
     1426                  ztmp4(:,:,1) = ztmp4(:,:,1) + ht_s(:,:,jl) * a_i(:,:,jl) 
     1427               ENDDO 
     1428            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' ) 
     1429            END SELECT 
     1430         CASE( 'ice and snow'         )    
     1431            ztmp3(:,:,1:jpl) = ht_i(:,:,1:jpl) 
     1432            ztmp4(:,:,1:jpl) = ht_s(:,:,1:jpl) 
     1433         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%cldes' ) 
    14171434         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 ) 
     1435         IF( ssnd(jps_hice)%laction )   CALL cpl_prism_snd( jps_hice, isec, ztmp3, info ) 
     1436         IF( ssnd(jps_hsnw)%laction )   CALL cpl_prism_snd( jps_hsnw, isec, ztmp4, info ) 
     1437      ENDIF 
    14251438      ! 
    14261439#if defined key_cpl_carbon_cycle 
  • branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90

    r3294 r3653  
    4848   USE in_out_manager   ! I/O manager 
    4949   USE prtctl           ! Print control 
     50 
     51# if defined key_agrif 
     52   USE agrif_ice 
     53   USE agrif_lim2_update 
     54# endif 
    5055 
    5156   IMPLICIT NONE 
     
    101106         ! 
    102107         CALL ice_init_2 
     108         ! 
     109# if defined key_agrif 
     110         IF( .NOT. Agrif_Root() ) CALL Agrif_InitValues_cont_lim2   ! AGRIF: set the meshes 
     111# endif 
    103112      ENDIF 
    104113 
     
    106115      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !  Ice time-step only  ! 
    107116         !                                     !----------------------! 
     117# if defined key_agrif 
     118         IF( .NOT. Agrif_Root() ) lim_nbstep = MOD(lim_nbstep,Agrif_rhot()& 
     119         &*Agrif_PArent(nn_fsbc)/REAL(nn_fsbc)) + 1 
     120# endif 
    108121         !  Bulk Formulea ! 
    109122         !----------------! 
     
    211224         IF( lrst_ice  )   CALL lim_rst_write_2( kt )      ! Ice restart file 
    212225         ! 
     226# if defined key_agrif && defined key_lim2 
     227         IF( .NOT. Agrif_Root() )   CALL agrif_update_lim2( kt ) 
     228# endif 
     229         ! 
    213230      ENDIF                                    ! End sea-ice time step only 
    214231      ! 
  • branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r3421 r3653  
    4545 
    4646   USE prtctl           ! Print control                    (prt_ctl routine) 
    47    USE restart          ! ocean restart 
    4847   USE iom              ! IOM library 
    4948   USE in_out_manager   ! I/O manager 
  • branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r3421 r3653  
    2121   USE closea          ! closed seas 
    2222   USE fldread         ! read input field at current time step 
    23    USE restart         ! restart 
    2423   USE in_out_manager  ! I/O manager 
    2524   USE iom             ! I/O module 
  • branches/2012/dev_LOCEAN_UKMO_2012/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90

    r3294 r3653  
    1818   USE sbcapr          ! surface boundary condition: atmospheric pressure 
    1919   USE prtctl          ! Print control                    (prt_ctl routine) 
    20    USE restart         ! ocean restart 
    2120   USE iom 
    2221   USE in_out_manager  ! I/O manager 
Note: See TracChangeset for help on using the changeset viewer.