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 5376 for branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90 – NEMO

Ignore:
Timestamp:
2015-06-08T15:13:26+02:00 (9 years ago)
Author:
smasson
Message:

dev_r5218_CNRS17_coupling: bugfix for SAS-OPA coupling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5357 r5376  
    3333   USE cpl_oasis3      ! OASIS3 coupling 
    3434   USE geo2ocean       !  
    35    USE oce   , ONLY : tsn, un, vn, sshn, ub, vb, tsb, sshb 
     35   USE oce   , ONLY : tsn, un, vn, sshn, ub, vb, sshb 
    3636   USE albedo          ! 
    3737   USE in_out_manager  ! I/O manager 
     
    4242   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    4343   USE eosbn2 
     44   USE traqsr   , ONLY : fraqsr_1lev 
    4445#if defined key_cpl_carbon_cycle 
    4546   USE p4zflx, ONLY : oce_co2 
     
    486487      IF( nn_components == jp_iam_opa ) THEN    ! OPA coupled to SAS via OASIS: force received field by OPA (sent by SAS) 
    487488         srcv(:)%laction = .FALSE.   ! force default definition in case of opa <-> sas coupling 
     489         srcv(:)%clgrid  = 'T'       ! force default definition in case of opa <-> sas coupling 
     490         srcv(:)%nsgn    = 1.        ! force default definition in case of opa <-> sas coupling 
    488491         srcv( (/jpr_qsroce, jpr_qnsoce, jpr_oemp, jpr_sflx, jpr_fice, jpr_otx1, jpr_oty1, jpr_taum/) )%laction = .TRUE. 
    489492         srcv(jpr_otx1)%clgrid = 'U'        ! oce components given at U-point 
     
    525528      IF( nn_components == jp_iam_sas ) THEN 
    526529         IF( .NOT. ln_cpl ) srcv(:)%laction = .FALSE.   ! force default definition in case of opa <-> sas coupling 
    527          srcv( (/jpr_toce, jpr_soce, jpr_ssh, jpr_e3t1st, jpr_fraqsr, jpr_ocx1, jpr_ocy1/) )%laction = .TRUE. 
     530         IF( .NOT. ln_cpl ) srcv(:)%clgrid  = 'T'       ! force default definition in case of opa <-> sas coupling 
     531         IF( .NOT. ln_cpl ) srcv(:)%nsgn    = 1.        ! force default definition in case of opa <-> sas coupling 
     532         srcv( (/jpr_toce, jpr_soce, jpr_ssh, jpr_fraqsr, jpr_ocx1, jpr_ocy1/) )%laction = .TRUE. 
     533         srcv( jpr_e3t1st )%laction = lk_vvl 
     534         srcv(jpr_ocx1)%clgrid = 'U'        ! oce components given at U-point 
     535         srcv(jpr_ocy1)%clgrid = 'V'        !           and           V-point 
    528536         ! Vectors: change of sign at north fold ONLY if on the local grid 
    529537         srcv(jpr_ocx1:jpr_ocy1)%nsgn = -1. 
     
    690698      IF( nn_components == jp_iam_opa ) THEN 
    691699         ssnd(:)%laction = .FALSE.   ! force default definition in case of opa <-> sas coupling 
    692          ssnd( (/jps_toce, jps_soce, jps_ssh, jps_e3t1st, jps_fraqsr, jps_ocx1, jps_ocy1/) )%laction = .TRUE. 
     700         ssnd( (/jps_toce, jps_soce, jps_ssh, jps_fraqsr, jps_ocx1, jps_ocy1/) )%laction = .TRUE. 
     701         ssnd( jps_e3t1st )%laction = lk_vvl 
    693702         ! vector definition: not used but cleaner... 
    694703         ssnd(jps_ocx1)%clgrid  = 'U'        ! oce components given at U-point 
     
    984993#endif 
    985994 
    986       !  Fields received by ice model when OASIS coupling 
     995      !  Fields received by SAS when OASIS coupling 
    987996      !  (arrays no more filled at sbcssm stage) 
    988997      !                                                      ! ================== ! 
     
    9911000      IF( srcv(jpr_soce)%laction ) THEN                      ! received by sas in case of opa <-> sas coupling 
    9921001         sss_m(:,:) = frcv(jpr_soce)%z3(:,:,1) 
    993          tsn(:,:,1,jp_sal) = sss_m(:,:) 
     1002         CALL iom_put( 'sss_m', sss_m ) 
    9941003      ENDIF 
    9951004      !                                                
     
    9991008      IF( srcv(jpr_toce)%laction ) THEN                      ! received by sas in case of opa <-> sas coupling 
    10001009         sst_m(:,:) = frcv(jpr_toce)%z3(:,:,1) 
    1001          tsn(:,:,1,jp_tem) = sst_m(:,:)                      ! keep the received (potential or conservative) temperature in tsn  
    10021010         IF( srcv(jpr_soce)%laction .AND. ln_useCT ) THEN    ! make sure that sst_m is the potential temperature 
    10031011            sst_m(:,:) = eos_pt_from_ct( sst_m(:,:), sss_m(:,:) ) 
     
    10091017      IF( srcv(jpr_ssh )%laction ) THEN                      ! received by sas in case of opa <-> sas coupling 
    10101018         ssh_m(:,:) = frcv(jpr_ssh )%z3(:,:,1) 
    1011          sshn( :,:) = ssh_m(:,:) 
     1019         CALL iom_put( 'ssh_m', ssh_m ) 
    10121020      ENDIF 
    10131021      !                                                      ! ================== ! 
     
    10161024      IF( srcv(jpr_ocx1)%laction ) THEN                      ! received by sas in case of opa <-> sas coupling 
    10171025         ssu_m(:,:) = frcv(jpr_ocx1)%z3(:,:,1) 
    1018          ub (:,:,1) = ssu_m(:,:) 
     1026         ub (:,:,1) = ssu_m(:,:)                             ! will be used in sbcice_lim in the call of lim_sbc_tau 
     1027         CALL iom_put( 'ssu_m', ssu_m ) 
    10191028      ENDIF 
    10201029      IF( srcv(jpr_ocy1)%laction ) THEN 
    10211030         ssv_m(:,:) = frcv(jpr_ocy1)%z3(:,:,1) 
    1022          vb (:,:,1) = ssv_m(:,:) 
     1031         vb (:,:,1) = ssv_m(:,:)                             ! will be used in sbcice_lim in the call of lim_sbc_tau 
     1032         CALL iom_put( 'ssv_m', ssv_m ) 
    10231033      ENDIF 
    10241034      !                                                      ! ======================== ! 
     
    10261036      !                                                      ! ======================== ! 
    10271037      IF( srcv(jpr_e3t1st )%laction ) THEN                   ! received by sas in case of opa <-> sas coupling 
    1028          fse3t_m(:,:) = frcv(jpr_e3t1st )%z3(:,:,1) 
     1038         e3t_m(:,:) = frcv(jpr_e3t1st )%z3(:,:,1) 
     1039         CALL iom_put( 'e3t_m', e3t_m(:,:) ) 
    10291040      ENDIF 
    10301041      !                                                      ! ================================ ! 
     
    10331044      IF( srcv(jpr_fraqsr)%laction ) THEN                    ! received by sas in case of opa <-> sas coupling 
    10341045         frq_m(:,:) = frcv(jpr_fraqsr)%z3(:,:,1) 
     1046         CALL iom_put( 'frq_m', frq_m ) 
    10351047      ENDIF 
    10361048       
     
    19371949      ! 
    19381950      ! 
    1939       !  Fields sent to SAS by OPA when doing OPA<->SAS coupling 
     1951      !  Fields sent by OPA to SAS when doing OPA<->SAS coupling 
    19401952      !                                                        ! SSH 
    19411953      IF( ssnd(jps_ssh )%laction )  THEN 
     
    19581970      !                                                        ! Qsr fraction 
    19591971      IF( ssnd(jps_fraqsr)%laction )  THEN 
    1960          CALL cpl_snd( jps_fraqsr, isec, RESHAPE ( frq_m            , (/jpi,jpj,1/) ), info ) 
    1961       ENDIF 
    1962       ! 
    1963       !  Fields sent to ocean by ice model when OASIS coupling 
     1972         CALL cpl_snd( jps_fraqsr, isec, RESHAPE ( fraqsr_1lev(:,:) , (/jpi,jpj,1/) ), info ) 
     1973      ENDIF 
     1974      ! 
     1975      !  Fields sent by SAS to OPA when OASIS coupling 
    19641976      !                                                        ! Solar heat flux 
    19651977      IF( ssnd(jps_qsroce)%laction )  CALL cpl_snd( jps_qsroce, isec, RESHAPE ( qsr , (/jpi,jpj,1/) ), info ) 
Note: See TracChangeset for help on using the changeset viewer.