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 14308 – NEMO

Changeset 14308


Ignore:
Timestamp:
2021-01-18T14:39:48+01:00 (3 years ago)
Author:
frrh
Message:

Save working version

Location:
NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage3/src/OCE/SBC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage3/src/OCE/SBC/sbc_oce.F90

    r13443 r14308  
    4141   LOGICAL , PUBLIC ::   ln_cpl         !: ocean-atmosphere coupled formulation 
    4242   LOGICAL , PUBLIC ::   ln_couple_test !: ocean-atmosphere test coupling ONLY - non-coupled forcing 
     43   LOGICAL , PUBLIC ::   ln_couple_ow_gen   !: ocean-atmosphere coupling overwrite non tau fields 
     44   LOGICAL , PUBLIC ::   ln_couple_ow_tau   !: ocean-atmosphere coupling overwrite tau 
    4345   LOGICAL , PUBLIC ::   ln_mixcpl      !: ocean-atmosphere forced-coupled mixed formulation 
    4446   LOGICAL , PUBLIC ::   ln_dm2dc       !: Daily mean to Diurnal Cycle short wave (qsr) 
  • NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage3/src/OCE/SBC/sbccpl.F90

    r14279 r14308  
    281281      ENDIF 
    282282      IF( lwp .AND. (ln_cpl .OR. ln_couple_test) ) THEN                        ! control print 
     283 
    283284         WRITE(numout,*)'  received fields (mutiple ice categogies)' 
    284285         WRITE(numout,*)'      10m wind module                 = ', TRIM(sn_rcv_w10m%cldes  ), ' (', TRIM(sn_rcv_w10m%clcat  ), ')' 
     
    372373       
    373374      !                                                           ! Set grid and action 
     375 
    374376      SELECT CASE( TRIM( sn_rcv_tau%clvgrd ) )      !  'T', 'U,V', 'U,V,I', 'U,V,F', 'T,I', 'T,F', or 'T,U,V' 
    375377      CASE( 'T' )  
     
    732734         srcv(:)%laction = .FALSE. 
    733735 
    734  
     736         ! Define a dummy incoming T field which we may or may not wish to use.   
    735737         srcv(jpr_dummy_t)%clname = 'R_OC_DUMMY_T'    
    736          srcv(jpr_dummy_t)%laction = .TRUE. 
     738         srcv(jpr_dummy_t)%laction = .FALSE. ! for test of reciept of taux/y only 
     739 
     740         ! Set taux and tauy to be active or not 
     741         srcv(jpr_otx1)%laction = .TRUE. 
     742         srcv(jpr_oty1)%laction = .TRUE. 
     743         srcv(jpr_otx1:jpr_otz1)%clgrid  = 'U'        ! oce components given at U-point 
     744         srcv(jpr_otx2:jpr_otz2)%clgrid  = 'V'        !           and           V-point 
     745         srcv(jpr_itx1:jpr_itz1)%clgrid  = 'F'        ! ice components given at F-point 
     746 
     747         ! Various settings necessary when we call coupling from what is essentially a 
     748         ! stand alone ocean model, i.e. when ln_cpl is still false. 
     749         sn_rcv_tau%clvgrd = 'U,V,F' 
     750         sn_rcv_tau%clvor = 'eastward-northward' 
     751         sn_rcv_tau%clvref = 'spherical' 
    737752      ENDIF 
    738753 
     
    10661081      ! If ln_cpl is false, clearly we don't want to call cpl_dfine! 
    10671082      IF (ln_cpl .OR. ln_couple_test) THEN 
    1068            write(numout,*) "RSRH call cpl_define", ln_cpl ,ln_couple_test ; flush(numout) 
     1083         write(numout,*) "RSRH call cpl_define", ln_cpl ,ln_couple_test ; flush(numout) 
    10691084         CALL cpl_define(jprcv, jpsnd, nn_cplmodel) 
    10701085 
    10711086      ENDIF       
    1072            write(numout,*) "RSRH after cpl_define", ln_cpl ,ln_couple_test ; flush(numout) 
     1087      write(numout,*) "RSRH after cpl_define", ln_cpl ,ln_couple_test ; flush(numout) 
    10731088 
    10741089 
     
    11631178 
    11641179 
    1165       WRITE(numout,*) "RSRH in sbc_cpl_rcv" ; flush(numout) 
    1166  
    11671180      DO jn = 1, jprcv                                          ! received fields sent by the atmosphere 
    11681181 
    1169         WRITE(numout,*) "RSRH in sbc_cpl_rcv for field" ,jn, srcv(jn)%laction ;flush(numout) 
    1170  
    11711182         IF( srcv(jn)%laction ) THEN 
    1172         WRITE(numout,*) "RSRH call cpl_rcv for field", jn, srcv(jn)%laction ;flush(numout) 
    1173                CALL cpl_rcv( jn, isec, frcv(jn)%z3, xcplmask(:,:,1:nn_cplmodel), nrcvinfo(jn) ) 
    1174         WRITE(numout,*) "RSRH  done cpl_rcv for field", jn, srcv(jn)%laction, nrcvinfo(jn) ;flush(numout) 
     1183            CALL cpl_rcv( jn, isec, frcv(jn)%z3, xcplmask(:,:,1:nn_cplmodel), nrcvinfo(jn) ) 
     1184            WRITE(numout,*) "RSRH  done cpl_rcv for field", jn, srcv(jn)%laction, nrcvinfo(jn) ;flush(numout) 
    11751185         ENDIF 
    11761186      END DO 
    11771187 
    1178       WRITE(numout,*) "RSRH in sbc_cpl_rcv after all gets" ; flush(numout) 
     1188      ! Do we want to overwrite our incoming tau         
     1189      IF (ln_couple_ow_tau) THEN  
     1190 
    11791191      !                                                      ! ========================= ! 
    11801192      IF( srcv(jpr_otx1)%laction ) THEN                      !  ocean stress components  ! 
     
    12031215            IF( TRIM( sn_rcv_tau%clvor ) == 'eastward-northward' ) THEN   ! 2 components oriented along the local grid 
    12041216               !                                                       ! (geographical to local grid -> rotate the components) 
     1217 
    12051218               IF( srcv(jpr_otx1)%clgrid == 'U' .AND. (.NOT. srcv(jpr_otx2)%laction) ) THEN 
    1206                   ! Temporary code for HadGEM3 - will be removed eventually. 
     1219                 ! Temporary code for HadGEM3 - will be removed eventually. 
    12071220        ! Only applies when we have only taux on U grid and tauy on V grid 
    12081221             DO jj=2,jpjm1 
     
    12311244                CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->j', zty )  
    12321245             ENDIF 
    1233           frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid   
     1246                  frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid   
    12341247               ENDIF 
    12351248            ENDIF 
     
    12561269         ! 
    12571270      ENDIF 
     1271 
    12581272      !                                                      ! ========================= ! 
    12591273      !                                                      !    wind stress module     !   (taum) 
     
    12811295         ENDIF 
    12821296      ENDIF 
     1297 
    12831298      ! 
    12841299      !                                                      ! ========================= ! 
     
    13151330         !   
    13161331      ENDIF 
     1332 
     1333      ENDIF ! use tau fields 
     1334 
     1335 
     1336 
     1337      ! If we want to actually use other (non tau) incoming fields in the model then  
     1338      ! we set  ln_couple_ow = TRUE, otherwise, we're just running a test  
     1339      ! of the coupling field exchange for these fields 
     1340      IF (ln_couple_ow_gen) THEN  
    13171341 
    13181342      !                                                      ! ================== ! 
     
    15241548         ! 
    15251549      ENDIF 
     1550              
     1551      ENDIF ! Overwrite coupling fields? (ln_couple_ow_gen) 
    15261552      ! 
    15271553   END SUBROUTINE sbc_cpl_rcv 
     
    26422668#endif 
    26432669 
    2644       WRITE(numout,*) "RSRH at send for ocean dummy_t"; flush(numout) 
    26452670 
    26462671      IF ( ssnd(jps_dummy_t)%laction ) THEN 
     
    26512676            ENDDO 
    26522677         ENDDO 
    2653       WRITE(numout,*) "RSRH call send for ocean dummy_t"; flush(numout) 
    26542678         CALL cpl_snd( jps_dummy_t, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
    2655       WRITE(numout,*) "RSRH done send for ocean dummy_t", info; flush(numout) 
    26562679      ENDIF 
    26572680 
  • NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage3/src/OCE/SBC/sbcmod.F90

    r13443 r14308  
    9797         &             ln_traqsr, ln_dm2dc ,                                         & 
    9898         &             ln_rnf   , nn_fwb   , ln_ssr   , ln_isf    , ln_apr_dyn ,     & 
    99          &             ln_wave  , ln_cdgw  , ln_sdw   , ln_tauwoc  , ln_stcor   ,     & 
    100          &             ln_tauw  , nn_lsm, nn_sdrift, ln_couple_test 
     99         &             ln_wave  , ln_cdgw  , ln_sdw   , ln_tauwoc  , ln_stcor   ,    & 
     100         &             ln_tauw  , nn_lsm, nn_sdrift, ln_couple_test,                 & 
     101         &             ln_couple_ow_gen, ln_couple_ow_tau 
    101102      !!---------------------------------------------------------------------- 
    102103      ! 
     
    140141         WRITE(numout,*) '         ocean-atmosphere coupled formulation       ln_cpl        = ', ln_cpl 
    141142         WRITE(numout,*) '         ocean-atmos test coupling ONLY             ln_couple_test   = ', ln_couple_test 
     143         WRITE(numout,*) '         ocean-atmos test coupling overwrite general ln_couple_ow_gen   = ', ln_couple_ow_gen 
     144         WRITE(numout,*) '         ocean-atmos test coupling overwrite tau     ln_couple_ow_tau   = ', ln_couple_ow_tau 
    142145         WRITE(numout,*) '         mixed forced-coupled     formulation       ln_mixcpl     = ', ln_mixcpl 
    143146!!gm  lk_oasis is controlled by key_oasis3  ===>>>  It shoud be removed from the namelist  
     
    209212      END SELECT 
    210213      !                             !* coupled options 
    211       IF( ln_cpl .OR. ln_couple_test ) THEN 
     214      IF( ln_cpl .OR. ln_couple_test .OR. ln_couple_ow_tau .OR. ln_couple_ow_gen) THEN 
    212215         IF( .NOT. lk_oasis )   CALL ctl_stop( 'sbc_init : coupled mode with an atmosphere model (ln_cpl=T)',   & 
    213216            &                                  '           required to defined key_oasis3' ) 
     217      ENDIF 
     218      IF( ln_couple_ow_tau .OR. ln_couple_ow_gen) THEN 
     219    
     220         IF( (.NOT.ln_cpl) .AND. (.NOT.ln_couple_test) ) THEN 
     221           CALL ctl_stop( 'sbc_init : Cannot overwrite coupling fields when coupling',   & 
     222            &                                  '           is swithed off!' ) 
     223         ENDIF 
     224 
    214225      ENDIF 
    215226      IF( ln_mixcpl ) THEN 
Note: See TracChangeset for help on using the changeset viewer.