Changeset 4486 for branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC
- Timestamp:
- 2014-02-05T12:23:56+01:00 (10 years ago)
- Location:
- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
r4386 r4486 965 965 ENDIF 966 966 967 #if defined key_agrif 968 IF (.NOT.Agrif_Root()) CALL ctl_stop( 'AGRIF not implemented with non-linear free surface (key_vvl)' ) 969 #endif 970 967 971 END SUBROUTINE dom_vvl_ctl 968 972 -
branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_oce.F90
r4370 r4486 39 39 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hur_e , hvr_e ! inverse of hu_e and hv_e 40 40 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: un_adv, vn_adv ! Advection vel. at "now" barocl. step 41 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ub2_b, vb2_b ! Advection vel. at "now-0.5" barocl. step 41 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ub2_b, vb2_b ! Half step fluxes (ln_bt_fw=T) 42 #if defined key_agrif 43 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ub2_i_b, vb2_i_b! Half step time integrated fluxes 44 #endif 42 45 43 46 !!---------------------------------------------------------------------- … … 55 58 & ssha_e(jpi,jpj) , va_e(jpi,jpj) , hv_e(jpi,jpj) , hvr_e(jpi,jpj) , & 56 59 & ub2_b(jpi,jpj) , vb2_b(jpi,jpj) , & 60 #if defined key_agrif 61 & ub2_i_b(jpi,jpj), vb2_i_b(jpi,jpj) , & 62 #endif 57 63 & un_adv(jpi,jpj) , vn_adv(jpi,jpj) , STAT = dynspg_oce_alloc ) 58 64 ! -
branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r4374 r4486 143 143 REAL(wp) :: zx1, zy1, zx2, zy2 ! - - 144 144 REAL(wp) :: z1_12, z1_8, z1_4, z1_2 ! - - 145 REAL(wp) :: zu_spg, zv_spg 145 REAL(wp) :: zu_spg, zv_spg ! - - 146 146 REAL(wp) :: zhura, zhvra ! - - 147 147 REAL(wp) :: za0, za1, za2, za3 ! - - … … 204 204 CALL ts_wgt(ln_bt_av, ll_fw_start, icycle, wgtbtp1, wgtbtp2) 205 205 ! 206 IF ((neuler/=0).AND.(ln_bt_fw)) CALL ts_rst( nit000, 'READ' )207 206 ! 208 207 ENDIF … … 449 448 zssh_frc(:,:) = zssh_frc(:,:) + ssh_iau(:,:) 450 449 ENDIF 450 #endif 451 ! !* Fill boundary data arrays with AGRIF 452 ! ! ------------------------------------- 453 #if defined key_agrif 454 IF( .NOT.Agrif_Root() ) CALL agrif_dta_ts( kt ) 451 455 #endif 452 456 ! … … 543 547 zwx(:,:) = e2u(:,:) * ua_e(:,:) * zhup2_e(:,:) ! fluxes at jn+0.5 544 548 zwy(:,:) = e1v(:,:) * va_e(:,:) * zhvp2_e(:,:) 549 ! 550 #if defined key_agrif 551 ! Set fluxes during predictor step to ensure 552 ! volume conservation 553 IF( (.NOT.Agrif_Root()).AND.ln_bt_fw ) THEN 554 IF((nbondi == -1).OR.(nbondi == 2)) THEN 555 DO jj=1,jpj 556 zwx(2,jj) = ubdy_w(jj) * e2u(2,jj) 557 END DO 558 ENDIF 559 IF((nbondi == 1).OR.(nbondi == 2)) THEN 560 DO jj=1,jpj 561 zwx(nlci-2,jj) = ubdy_e(jj) * e2u(nlci-2,jj) 562 END DO 563 ENDIF 564 IF((nbondj == -1).OR.(nbondj == 2)) THEN 565 DO ji=1,jpi 566 zwy(ji,2) = vbdy_s(ji) * e1v(ji,2) 567 END DO 568 ENDIF 569 IF((nbondj == 1).OR.(nbondj == 2)) THEN 570 DO ji=1,jpi 571 zwy(ji,nlcj-2) = vbdy_n(ji) * e1v(ji,nlcj-2) 572 END DO 573 ENDIF 574 ENDIF 575 #endif 576 ! 577 ! Sum over sub-time-steps to compute advective velocities 578 za2 = wgtbtp2(jn) 579 zu_sum (:,:) = zu_sum (:,:) + za2 * zwx (:,:) / e2u (:,:) 580 zv_sum (:,:) = zv_sum (:,:) + za2 * zwy (:,:) / e1v (:,:) 581 ! 582 ! Set next sea level: 545 583 DO jj = 2, jpjm1 546 584 DO ji = fs_2, fs_jpim1 ! vector opt. … … 549 587 END DO 550 588 END DO 551 !552 ! Sum over sub-time-steps to compute advective velocities553 za2 = wgtbtp2(jn)554 zu_sum (:,:) = zu_sum (:,:) + za2 * ua_e (:,:) * zhup2_e (:,:)555 zv_sum (:,:) = zv_sum (:,:) + za2 * va_e (:,:) * zhvp2_e (:,:)556 !557 ! Set next sea level:558 589 ssha_e(:,:) = ( sshn_e(:,:) - rdtbt * ( zssh_frc(:,:) + zhdiv(:,:) ) ) * tmask(:,:,1) 559 590 CALL lbc_lnk( ssha_e, 'T', 1._wp ) … … 754 785 IF( lk_bdy ) CALL bdy_dyn2d( jn, ua_e, va_e, zun_e, zvn_e, hur_e, hvr_e, ssha_e ) 755 786 #endif 756 #if defined key_agrif 757 IF( .NOT.Agrif_Root() ) CALL agrif_dyn_ts( kt, jn )! Agrif787 #if defined key_agrif 788 IF( .NOT.Agrif_Root() ) CALL agrif_dyn_ts( jn ) ! Agrif 758 789 #endif 759 790 ! !* Swap … … 842 873 ! 843 874 END DO 875 ! 876 #if defined key_agrif 877 ! Save time integrated fluxes during child grid integration 878 ! (used to update coarse grid transports) 879 ! Useless with 2nd order momentum schemes 880 ! 881 IF ( (.NOT.Agrif_Root()).AND.(ln_bt_fw) ) THEN 882 IF ( Agrif_NbStepint().EQ.0 ) THEN 883 ub2_i_b(:,:) = 0.e0 884 vb2_i_b(:,:) = 0.e0 885 END IF 886 ! 887 za1 = 1._wp / REAL(Agrif_rhot(), wp) 888 ub2_i_b(:,:) = ub2_i_b(:,:) + za1 * ub2_b(:,:) 889 vb2_i_b(:,:) = vb2_i_b(:,:) + za1 * vb2_b(:,:) 890 ENDIF 891 ! 892 ! 893 #endif 844 894 ! 845 895 ! !* write time-spliting arrays in the restart … … 956 1006 CALL iom_get( numror, jpdom_autoglo, 'vb_e' , vb_e(:,:) ) 957 1007 ENDIF 1008 #if defined key_agrif 1009 ! Read time integrated fluxes 1010 IF ( .NOT.Agrif_Root() ) THEN 1011 CALL iom_get( numror, jpdom_autoglo, 'ub2_i_b' , ub2_i_b(:,:) ) 1012 CALL iom_get( numror, jpdom_autoglo, 'vb2_i_b' , vb2_i_b(:,:) ) 1013 ENDIF 1014 #endif 958 1015 ! 959 1016 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN … … 969 1026 CALL iom_rstput( kt, nitrst, numrow, 'vb_e' , vb_e(:,:) ) 970 1027 ENDIF 1028 #if defined key_agrif 1029 ! Save time integrated fluxes 1030 IF ( .NOT.Agrif_Root() ) THEN 1031 CALL iom_rstput( kt, nitrst, numrow, 'ub2_i_b' , ub2_i_b(:,:) ) 1032 CALL iom_rstput( kt, nitrst, numrow, 'vb2_i_b' , vb2_i_b(:,:) ) 1033 ENDIF 1034 #endif 971 1035 ENDIF 972 1036 ! … … 1053 1117 ENDIF 1054 1118 ! 1119 #if defined key_agrif 1120 ! Restrict the use of Agrif to the forward case only 1121 IF ((.NOT.ln_bt_fw ).AND.(.NOT.Agrif_Root())) CALL ctl_stop( 'AGRIF not implemented if ln_bt_fw=.FALSE.' ) 1122 #endif 1123 ! 1055 1124 IF(lwp) WRITE(numout,*) ' Time filter choice, nn_bt_flt: ', nn_bt_flt 1056 1125 SELECT CASE ( nn_bt_flt ) … … 1072 1141 CALL ctl_stop( 'dynspg_ts ERROR: Maximum Courant number is greater than 0.9: Inc. nn_baro !' ) 1073 1142 ENDIF 1143 ! 1144 IF ((neuler/=0).AND.(ln_bt_fw)) CALL ts_rst( nit000, 'READ' ) 1074 1145 ! 1075 1146 CALL wrk_dealloc( jpi, jpj, zcu ) … … 1104 1175 1105 1176 1177 -
branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
r4370 r4486 113 113 ssha(:,:) = ( sshb(:,:) - z2dt * ( z1_rau0 * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) ) ) * tmask(:,:,1) 114 114 115 #if ! defined key_dynspg_ts 116 ! These lines are not necessary with time splitting since 117 ! boundary condition on sea level is set during ts loop 115 118 #if defined key_agrif 116 119 CALL agrif_ssh( kt ) 117 120 #endif 118 121 #if defined key_bdy 119 ! bg jchanut tschanges120 ! These lines are not necessary with time splitting since121 ! boundary condition on sea level is set during ts loop122 122 IF (lk_bdy) THEN 123 123 CALL lbc_lnk( ssha, 'T', 1. ) ! Not sure that's necessary … … 125 125 ENDIF 126 126 #endif 127 ! end jchanut tschanges 127 #endif 128 128 129 #if defined key_asminc 129 130 ! ! Include the IAU weighted SSH increment
Note: See TracChangeset
for help on using the changeset viewer.