Changeset 13443
- Timestamp:
- 2020-08-28T17:01:04+02:00 (3 years ago)
- Location:
- NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2/src/OCE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2/src/OCE/SBC/cpl_oasis3.F90
r13311 r13443 76 76 TYPE, PUBLIC :: FLD_CPL !: Type for coupling field information 77 77 LOGICAL :: laction ! To be coupled or not 78 CHARACTER(len = 8) :: clname ! Name of the coupling field78 CHARACTER(len = 30) :: clname ! Name of the coupling field 79 79 CHARACTER(len = 1) :: clgrid ! Grid type 80 80 REAL(wp) :: nsgn ! Control of the sign change … … 164 164 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~' 165 165 IF(lwp) WRITE(numout,*) 166 167 WRITE(numout,*) "RSRH inside cpl_define" ; flush(numout) 166 168 167 169 ncplmodel = kcplmodel … … 212 214 WRITE(numout,*) ' multiexchg: nldj, nlej, njmpp =', nldj, nlej, njmpp 213 215 ENDIF 214 216 WRITE(numout,*) "RSRH calling def partition" ; flush(numout) 217 218 215 219 CALL oasis_def_partition ( id_part, paral, nerror, jpiglo*jpjglo ) 220 WRITE(numout,*) "RSRH called def partition" ; flush(numout) 216 221 ! 217 222 ! ... Announce send variables. … … 247 252 #endif 248 253 IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_Out 254 WRITE(numout,*) "RSRH calling def var send", zclname , ji; flush(numout) 249 255 CALL oasis_def_var (ssnd(ji)%nid(jc,jm), zclname, id_part , (/ 2, 1 /), & 250 256 & OASIS_Out , ishape , OASIS_REAL, nerror ) 257 WRITE(numout,*) "RSRH called def var", zclname , ji, nerror; flush(numout) 251 258 IF ( nerror /= OASIS_Ok ) THEN 252 259 WRITE(numout,*) 'Failed to define transient ', ji, jc, jm, " "//TRIM(zclname) … … 292 299 #endif 293 300 IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_In 301 WRITE(numout,*) "RSRH calling def var recv", zclname , ji; flush(numout) 294 302 CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part , (/ 2, 1 /), & 295 303 & OASIS_In , ishape , OASIS_REAL, nerror ) 304 WRITE(numout,*) "RSRH called def var recv", zclname , ji, nerror; flush(numout) 296 305 IF ( nerror /= OASIS_Ok ) THEN 297 306 WRITE(numout,*) 'Failed to define transient ', ji, jc, jm, " "//TRIM(zclname) … … 309 318 ! End of definition phase 310 319 !------------------------------------------------------------------ 320 WRITE(numout,*) "RSRH calling endef "; flush(numout) 311 321 312 322 CALL oasis_enddef(nerror) 323 WRITE(numout,*) "RSRH called endef "; flush(numout) 313 324 IF( nerror /= OASIS_Ok ) CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef') 314 325 ! -
NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2/src/OCE/SBC/sbc_oce.F90
r11715 r13443 40 40 #endif 41 41 LOGICAL , PUBLIC :: ln_cpl !: ocean-atmosphere coupled formulation 42 LOGICAL , PUBLIC :: ln_couple_test !: ocean-atmosphere test coupling ONLY - non-coupled forcing 42 43 LOGICAL , PUBLIC :: ln_mixcpl !: ocean-atmosphere forced-coupled mixed formulation 43 44 LOGICAL , PUBLIC :: ln_dm2dc !: Daily mean to Diurnal Cycle short wave (qsr) -
NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2/src/OCE/SBC/sbccpl.F90
r13311 r13443 116 116 INTEGER, PARAMETER :: jpr_tauwy = 56 ! y component of the ocean stress from waves 117 117 INTEGER, PARAMETER :: jpr_ts_ice = 57 ! Sea ice surface temp 118 119 INTEGER, PARAMETER :: jprcv = 57 ! total number of fields received 118 INTEGER, PARAMETER :: jpr_dummy_t = 58 ! Dummy test incoming coupling tracer grid field 119 120 INTEGER, PARAMETER :: jprcv = 58 ! total number of fields received 120 121 121 122 INTEGER, PARAMETER :: jps_fice = 1 ! ice fraction sent to the atmosphere … … 157 158 INTEGER, PARAMETER :: jps_sstfrz = 37 ! sea surface freezing temperature 158 159 INTEGER, PARAMETER :: jps_ttilyr = 38 ! sea ice top layer temp 159 160 INTEGER, PARAMETER :: jpsnd = 38 ! total number of fields sent 160 INTEGER, PARAMETER :: jps_dummy_t = 39 ! Dummy test outgoing coupling tracer grid field 161 162 INTEGER, PARAMETER :: jpsnd = 39 ! total number of fields sent 161 163 162 164 ! !!** namelist namsbc_cpl ** … … 278 280 WRITE(numout,*)'~~~~~~~~~~~~' 279 281 ENDIF 280 IF( lwp .AND. ln_cpl) THEN ! control print282 IF( lwp .AND. (ln_cpl .OR. ln_couple_test) ) THEN ! control print 281 283 WRITE(numout,*)' received fields (mutiple ice categogies)' 282 284 WRITE(numout,*)' 10m wind module = ', TRIM(sn_rcv_w10m%cldes ), ' (', TRIM(sn_rcv_w10m%clcat ), ')' … … 723 725 ENDIF 724 726 ENDIF 725 727 728 729 IF (ln_couple_test) THEN 730 ! If we're just running a test coupled job then set all 731 ! actions to false for all fields apart from our test field(s) 732 srcv(:)%laction = .FALSE. 733 734 735 srcv(jpr_dummy_t)%clname = 'R_OC_DUMMY_T' 736 srcv(jpr_dummy_t)%laction = .TRUE. 737 ENDIF 738 726 739 ! =================================================== ! 727 740 ! Allocate all parts of frcv used for received fields ! … … 742 755 IF ( .NOT. srcv(jpr_ity1)%laction ) ALLOCATE( frcv(jpr_ity1)%z3(jpi,jpj,srcv(jpr_ity1)%nct) ) 743 756 END IF 757 758 759 760 744 761 745 762 ! ================================ ! … … 1031 1048 ENDIF 1032 1049 1050 IF (ln_couple_test) THEN 1051 ! If we're just running a test coupled job then set all 1052 ! actions to false for all fields apart from our test field(s) 1053 ssnd(:)%laction = .FALSE. 1054 1055 1056 ssnd(jps_dummy_t)%clname = 'S_OC_DUMMY_T' 1057 ssnd(jps_dummy_t)%laction = .TRUE. 1058 ENDIF 1059 1060 1033 1061 ! 1034 1062 ! ================================ ! … … 1037 1065 1038 1066 ! If ln_cpl is false, clearly we don't want to call cpl_dfine! 1039 if (ln_cpl) CALL cpl_define(jprcv, jpsnd, nn_cplmodel) 1040 1067 IF (ln_cpl .OR. ln_couple_test) THEN 1068 write(numout,*) "RSRH call cpl_define", ln_cpl ,ln_couple_test ; flush(numout) 1069 CALL cpl_define(jprcv, jpsnd, nn_cplmodel) 1070 1071 ENDIF 1072 write(numout,*) "RSRH after cpl_define", ln_cpl ,ln_couple_test ; flush(numout) 1073 1074 1041 1075 IF (ln_usecplmask) THEN 1042 1076 xcplmask(:,:,:) = 0. … … 1127 1161 ! ! ======================================================= ! 1128 1162 isec = ( kt - nit000 ) * NINT( rdt ) ! date of exchanges 1163 1164 1165 WRITE(numout,*) "RSRH in sbc_cpl_rcv" ; flush(numout) 1166 1129 1167 DO jn = 1, jprcv ! received fields sent by the atmosphere 1130 IF( srcv(jn)%laction ) CALL cpl_rcv( jn, isec, frcv(jn)%z3, xcplmask(:,:,1:nn_cplmodel), nrcvinfo(jn) ) 1168 1169 WRITE(numout,*) "RSRH in sbc_cpl_rcv for field" ,jn, srcv(jn)%laction ;flush(numout) 1170 1171 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) 1175 ENDIF 1131 1176 END DO 1132 1177 1178 WRITE(numout,*) "RSRH in sbc_cpl_rcv after all gets" ; flush(numout) 1133 1179 ! ! ========================= ! 1134 1180 IF( srcv(jpr_otx1)%laction ) THEN ! ocean stress components ! … … 2595 2641 IF( ssnd(jps_sstfrz)%laction ) CALL cpl_snd( jps_sstfrz, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info) 2596 2642 #endif 2643 2644 WRITE(numout,*) "RSRH at send for ocean dummy_t"; flush(numout) 2645 2646 IF ( ssnd(jps_dummy_t)%laction ) THEN 2647 ! RSRH Just set up some arbitrary test pattern for now 2648 ztmp1(:,:) = 1.23456 2649 WRITE(numout,*) "RSRH call send for ocean dummy_t"; flush(numout) 2650 CALL cpl_snd( jps_dummy_t, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 2651 WRITE(numout,*) "RSRH done send for ocean dummy_t", info; flush(numout) 2652 ENDIF 2653 2597 2654 ! 2598 2655 END SUBROUTINE sbc_cpl_snd -
NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2/src/OCE/SBC/sbcmod.F90
r11914 r13443 98 98 & ln_rnf , nn_fwb , ln_ssr , ln_isf , ln_apr_dyn , & 99 99 & ln_wave , ln_cdgw , ln_sdw , ln_tauwoc , ln_stcor , & 100 & ln_tauw , nn_lsm, nn_sdrift 100 & ln_tauw , nn_lsm, nn_sdrift, ln_couple_test 101 101 !!---------------------------------------------------------------------- 102 102 ! … … 139 139 WRITE(numout,*) ' Type of coupling (Ocean/Ice/Atmosphere) : ' 140 140 WRITE(numout,*) ' ocean-atmosphere coupled formulation ln_cpl = ', ln_cpl 141 WRITE(numout,*) ' ocean-atmos test coupling ONLY ln_couple_test = ', ln_couple_test 141 142 WRITE(numout,*) ' mixed forced-coupled formulation ln_mixcpl = ', ln_mixcpl 142 143 !!gm lk_oasis is controlled by key_oasis3 ===>>> It shoud be removed from the namelist … … 208 209 END SELECT 209 210 ! !* coupled options 210 IF( ln_cpl ) THEN211 IF( ln_cpl .OR. ln_couple_test ) THEN 211 212 IF( .NOT. lk_oasis ) CALL ctl_stop( 'sbc_init : coupled mode with an atmosphere model (ln_cpl=T)', & 212 213 & ' required to defined key_oasis3' ) … … 275 276 IF( icpt /= 1 ) CALL ctl_stop( 'sbc_init : choose ONE and only ONE sbc option' ) 276 277 ! 277 IF(lwp) THEN !- print the choice of surface flux formulation278 !RSRH IF(lwp) THEN !- print the choice of surface flux formulation 278 279 WRITE(numout,*) 279 280 SELECT CASE( nsbc ) … … 287 288 END SELECT 288 289 IF( ll_not_nemo ) WRITE(numout,*) ' + OASIS coupled SAS' 289 ENDIF290 !RSRH ENDIF 290 291 ! 291 292 ! !* OASIS initialization … … 421 422 ! !== sbc formulation ==! 422 423 ! 424 WRITE(numout,*) "RSRH nsbc setting=", nsbc ;flush(numout) 425 426 427 423 428 SELECT CASE( nsbc ) ! Compute ocean surface boundary condition 424 429 ! ! (i.e. utau,vtau, qns, qsr, emp, sfx) … … 432 437 CASE( jp_none ) 433 438 IF( ll_opa ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! OPA-SAS coupling: OPA receiving fields from SAS 439 434 440 END SELECT 435 441 ! 436 442 IF( ln_mixcpl ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! forced-coupled mixed formulation after forcing 443 444 ! RSRH for test/dev only 445 IF( ln_couple_test ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! Purely for testing/development of 446 ! coupled models if none of the above 447 ! cases are true. In this case we are likely 448 ! be running a forced configuration and 449 ! simply exchanging dummy fields which 450 ! have no bearing on model evolution. 437 451 ! 438 452 IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( ) ! Wind stress provided by waves -
NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2/src/OCE/nemogcm.F90
r13311 r13443 203 203 ! RSRH. You can compile with OASIS but not want to do any 204 204 ! coupling. We need to cater for that properly! 205 IF (ln_cpl) CALL sbc_cpl_snd( istp ) ! Coupling to atmos 205 IF (ln_cpl .OR. ln_couple_test) CALL sbc_cpl_snd( istp ) ! Coupling to atmos 206 ! RSRH. For test purposes we call the receive here. For proper 207 ! runs we need to do this elsewhere (reference UKESM/GC3 etc) 208 !IF (ln_cpl .OR. ln_couple_test) CALL sbc_cpl_rcv( istp ) ! Coupling from atmos 206 209 207 210 CALL stp ( istp ) … … 303 306 IF( lk_oasis ) THEN 304 307 CALL mpi_init(nerror) 305 CALL oasis_init_comp ( ncomp_id, "toyoce", nerror, . FALSE. )308 CALL oasis_init_comp ( ncomp_id, "toyoce", nerror, .TRUE. ) 306 309 ! CALL cpl_init( "toyoce", ilocal_comm ) 307 310 CALL oasis_get_localcomm ( ilocal_comm , nerror )
Note: See TracChangeset
for help on using the changeset viewer.