- Timestamp:
- 2010-10-25T16:13:35+02:00 (14 years ago)
- Location:
- branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90
r2287 r2305 21 21 !! Namelist variables 22 22 !!---------------------------------------------------------------------- 23 CHARACTER(len=80) :: filbdy_mask !: Name of unstruct. bdy mask file24 CHARACTER(len=80) :: filbdy_data_T !: Name of unstruct. bdy data file at T points25 CHARACTER(len=80) :: filbdy_data_U !: Name of unstruct. bdy data file at U points26 CHARACTER(len=80) :: filbdy_data_V !: Name of unstruct. bdy data file at V points27 CHARACTER(len=80) :: filbdy_data_bt_T !: Name of unstruct. bdy data file at T points for barotropic variables28 CHARACTER(len=80) :: filbdy_data_bt_U !: Name of unstruct. bdy data file at U points for barotropic variables29 CHARACTER(len=80) :: filbdy_data_bt_V !: Name of unstruct. bdy data file at V points for barotropic variables23 CHARACTER(len=80) :: cn_mask !: Name of unstruct. bdy mask file 24 CHARACTER(len=80) :: cn_dta_frs_T !: Name of unstruct. bdy data file at T points for FRS conditions 25 CHARACTER(len=80) :: cn_dta_frs_U !: Name of unstruct. bdy data file at U points for FRS conditions 26 CHARACTER(len=80) :: cn_dta_frs_V !: Name of unstruct. bdy data file at V points for FRS conditions 27 CHARACTER(len=80) :: cn_dta_fla_T !: Name of unstruct. bdy data file at T points for Flather scheme 28 CHARACTER(len=80) :: cn_dta_fla_U !: Name of unstruct. bdy data file at U points for Flather scheme 29 CHARACTER(len=80) :: cn_dta_fla_V !: Name of unstruct. bdy data file at V points for Flather scheme 30 30 ! 31 LOGICAL :: ln_ bdy_tides = .false.!: =T apply tidal harmonic forcing along open boundaries32 LOGICAL :: ln_ bdy_vol = .false.!: =T volume correction33 LOGICAL :: ln_ bdy_mask = .false.!: =T read bdymask from file34 LOGICAL :: ln_ bdy_clim = .false.!: if true, we assume that bdy data files contain31 LOGICAL :: ln_tides = .false. !: =T apply tidal harmonic forcing along open boundaries 32 LOGICAL :: ln_vol = .false. !: =T volume correction 33 LOGICAL :: ln_mask = .false. !: =T read bdymask from file 34 LOGICAL :: ln_clim = .false. !: if true, we assume that bdy data files contain 35 35 ! ! 1 time dump (-->bdy forcing will be constant) 36 36 ! ! or 12 months (-->bdy forcing will be cyclic) 37 LOGICAL :: ln_ bdy_dyn_fla = .false. !: =T Flather boundary conditions on barotropic velocities38 LOGICAL :: ln_ bdy_dyn_frs = .false. !: =T FRS boundary conditions on velocities39 LOGICAL :: ln_ bdy_tra_frs = .false. !: =T FRS boundary conditions on tracers (T and S)40 LOGICAL :: ln_ bdy_ice_frs = .false. !: =T FRS boundary conditions on seaice (leads fraction, ice depth, snow depth)37 LOGICAL :: ln_dyn_fla = .false. !: =T Flather boundary conditions on barotropic velocities 38 LOGICAL :: ln_dyn_frs = .false. !: =T FRS boundary conditions on velocities 39 LOGICAL :: ln_tra_frs = .false. !: =T FRS boundary conditions on tracers (T and S) 40 LOGICAL :: ln_ice_frs = .false. !: =T FRS boundary conditions on seaice (leads fraction, ice depth, snow depth) 41 41 ! 42 INTEGER :: n b_rimwidth = 7 !: boundary rim width43 INTEGER :: n bdy_dta= 1 !: = 0 use the initial state as bdy dta or = 1 read it in a NetCDF file44 INTEGER :: volbdy= 1 !: = 0 the total volume will have the variability of the surface Flux E-P42 INTEGER :: nn_rimwidth = 7 !: boundary rim width 43 INTEGER :: nn_dtactl = 1 !: = 0 use the initial state as bdy dta or = 1 read it in a NetCDF file 44 INTEGER :: nn_volctl = 1 !: = 0 the total volume will have the variability of the surface Flux E-P 45 45 ! ! = 1 the volume will be constant during all the integration. 46 46 … … 84 84 !! Dummy module NO Unstructured Open Boundary Condition 85 85 !!---------------------------------------------------------------------- 86 LOGICAL :: ln_ bdy_tides = .false. !: =T apply tidal harmonic forcing along open boundaries86 LOGICAL :: ln_tides = .false. !: =T apply tidal harmonic forcing along open boundaries 87 87 #endif 88 88 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
r2287 r2305 6 6 !! History : 1.0 ! 2005-01 (J. Chanut, A. Sellar) Original code 7 7 !! - ! 2007-01 (D. Storkey) Update to use IOM module 8 !! - ! 2007-07 (D. Storkey) add bdy_dta_ bt8 !! - ! 2007-07 (D. Storkey) add bdy_dta_fla 9 9 !! 3.0 ! 2008-04 (NEMO team) add in the reference version 10 10 !! 3.3 ! 2010-09 (E.O'Dea) modifications for Shelf configurations … … 15 15 !! 'key_bdy' Unstructured Open Boundary Conditions 16 16 !!---------------------------------------------------------------------- 17 !! bdy_dta : read u, v, t, s data along open boundaries18 !! bdy_dta_ bt: read depth-mean velocities and elevation along open boundaries17 !! bdy_dta_frs : read u, v, t, s data along open boundaries 18 !! bdy_dta_fla : read depth-mean velocities and elevation along open boundaries 19 19 !!---------------------------------------------------------------------- 20 20 USE oce ! ocean dynamics and tracers … … 33 33 PRIVATE 34 34 35 PUBLIC bdy_dta ! routines called by step.F9036 PUBLIC bdy_dta_ bt35 PUBLIC bdy_dta_frs ! routines called by step.F90 36 PUBLIC bdy_dta_fla 37 37 38 38 INTEGER :: numbdyt, numbdyu, numbdyv ! logical units for T-, U-, & V-points data file, resp. … … 65 65 CONTAINS 66 66 67 SUBROUTINE bdy_dta ( kt )67 SUBROUTINE bdy_dta_frs( kt ) 68 68 !!---------------------------------------------------------------------- 69 !! *** SUBROUTINE bdy_dta ***69 !! *** SUBROUTINE bdy_dta_frs *** 70 70 !! 71 71 !! ** Purpose : Read unstructured boundary data for FRS condition. … … 101 101 102 102 103 IF( ln_ bdy_dyn_frs .OR. ln_bdy_tra_frs &104 & .OR. ln_ bdy_ice_frs ) THEN ! If these are both false then this routine does nothing103 IF( ln_dyn_frs .OR. ln_tra_frs & 104 & .OR. ln_ice_frs ) THEN ! If these are both false then this routine does nothing 105 105 106 106 ! -------------------- ! … … 139 139 140 140 IF(lwp) WRITE(numout,*) 141 IF(lwp) WRITE(numout,*) 'bdy_dta : Initialize unstructured boundary data'141 IF(lwp) WRITE(numout,*) 'bdy_dta_frs : Initialize unstructured boundary data' 142 142 IF(lwp) WRITE(numout,*) '~~~~~~~' 143 143 144 IF ( n bdy_dta== 0 ) THEN144 IF ( nn_dtactl == 0 ) THEN 145 145 ! 146 146 IF(lwp) WRITE(numout,*) ' Bdy data are taken from initial conditions' 147 147 ! 148 ELSEIF (n bdy_dta== 1) THEN148 ELSEIF (nn_dtactl == 1) THEN 149 149 ! 150 150 IF(lwp) WRITE(numout,*) ' Bdy data are read in netcdf files' … … 155 155 ! ! necessary time dumps in file are included 156 156 ! 157 clfile(1) = filbdy_data_T158 clfile(2) = filbdy_data_U159 clfile(3) = filbdy_data_V157 clfile(1) = cn_dta_frs_T 158 clfile(2) = cn_dta_frs_U 159 clfile(3) = cn_dta_frs_V 160 160 ! 161 161 ! how many files are we to read in? 162 162 igrd_start = 1 163 163 igrd_end = 3 164 IF(.NOT. ln_ bdy_tra_frs .AND. .NOT. ln_bdy_ice_frs) THEN ! No T-grid file.164 IF(.NOT. ln_tra_frs .AND. .NOT. ln_ice_frs) THEN ! No T-grid file. 165 165 igrd_start = 2 166 ELSEIF ( .NOT. ln_ bdy_dyn_frs ) THEN ! No U-grid or V-grid file.166 ELSEIF ( .NOT. ln_dyn_frs ) THEN ! No U-grid or V-grid file. 167 167 igrd_end = 1 168 168 ENDIF … … 273 273 274 274 ! Check number of time dumps: 275 IF( ntimes_bdy == 1 .AND. .NOT. ln_ bdy_clim ) THEN275 IF( ntimes_bdy == 1 .AND. .NOT. ln_clim ) THEN 276 276 CALL ctl_stop( 'There is only one time dump in data files', & 277 & 'Choose ln_ bdy_clim=.true. in namelist for constant bdy forcing.' )277 & 'Choose ln_clim=.true. in namelist for constant bdy forcing.' ) 278 278 ENDIF 279 279 280 IF( ln_ bdy_clim ) THEN280 IF( ln_clim ) THEN 281 281 IF( ntimes_bdy /= 1 .AND. ntimes_bdy /= 12 ) THEN 282 CALL ctl_stop( 'For climatological boundary forcing (ln_ bdy_clim=.true.),', &282 CALL ctl_stop( 'For climatological boundary forcing (ln_clim=.true.),', & 283 283 & 'bdy data files must contain 1 or 12 time dumps.' ) 284 284 ELSEIF( ntimes_bdy == 1 ) THEN … … 301 301 IF(lwp) WRITE(numout,*) 'First record to read is ',nbdy_b 302 302 303 ENDIF ! endif (n bdy_dta== 1)304 305 306 ! 1.2 Read first record in file if necessary (ie if n bdy_dta== 1)303 ENDIF ! endif (nn_dtactl == 1) 304 305 306 ! 1.2 Read first record in file if necessary (ie if nn_dtactl == 1) 307 307 ! ***************************************************************** 308 308 309 IF( n bdy_dta== 0 ) THEN ! boundary data arrays are filled with initial conditions309 IF( nn_dtactl == 0 ) THEN ! boundary data arrays are filled with initial conditions 310 310 ! 311 IF (ln_ bdy_tra_frs) THEN311 IF (ln_tra_frs) THEN 312 312 igrd = 1 ! T-points data 313 313 DO ib = 1, nblen(igrd) … … 321 321 ENDIF 322 322 323 IF(ln_ bdy_dyn_frs) THEN323 IF(ln_dyn_frs) THEN 324 324 igrd = 2 ! U-points data 325 325 DO ib = 1, nblen(igrd) … … 342 342 ! 343 343 #if defined key_lim2 344 IF( ln_ bdy_ice_frs ) THEN344 IF( ln_ice_frs ) THEN 345 345 igrd = 1 ! T-points data 346 346 DO ib = 1, nblen(igrd) … … 351 351 ENDIF 352 352 #endif 353 ELSEIF( n bdy_dta== 1 ) THEN ! Set first record in the climatological case:353 ELSEIF( nn_dtactl == 1 ) THEN ! Set first record in the climatological case: 354 354 ! 355 IF( ln_ bdy_clim .AND. ntimes_bdy == 1 ) THEN355 IF( ln_clim .AND. ntimes_bdy == 1 ) THEN 356 356 nbdy_a = 1 357 ELSEIF( ln_ bdy_clim .AND. ntimes_bdy == iman ) THEN357 ELSEIF( ln_clim .AND. ntimes_bdy == iman ) THEN 358 358 nbdy_b = 0 359 359 nbdy_a = imois … … 368 368 ipi = nblendta(igrd) 369 369 370 IF(ln_ bdy_tra_frs) THEN370 IF(ln_tra_frs) THEN 371 371 ! 372 372 igrd = 1 ! Temperature … … 399 399 END DO 400 400 END DO 401 ENDIF ! ln_ bdy_tra_frs401 ENDIF ! ln_tra_frs 402 402 403 IF( ln_ bdy_dyn_frs ) THEN403 IF( ln_dyn_frs ) THEN 404 404 ! 405 405 igrd = 2 ! u-velocity … … 430 430 END DO 431 431 END DO 432 ENDIF ! ln_ bdy_dyn_frs432 ENDIF ! ln_dyn_frs 433 433 434 434 #if defined key_lim2 435 IF( ln_ bdy_ice_frs ) THEN435 IF( ln_ice_frs ) THEN 436 436 ! 437 437 igrd=1 ! leads fraction … … 458 458 hsnif_bdydta(ib,2) = zdta(nbmap(ib,igrd),1,1) 459 459 END DO 460 ENDIF ! just if ln_ bdy_ice_frs is set460 ENDIF ! just if ln_ice_frs is set 461 461 #endif 462 462 463 IF( .NOT.ln_ bdy_clim .AND. istep(1) > 0 ) THEN ! First data time is after start of run463 IF( .NOT.ln_clim .AND. istep(1) > 0 ) THEN ! First data time is after start of run 464 464 nbdy_b = nbdy_a ! Put first value in both time levels 465 IF( ln_ bdy_tra_frs ) THEN465 IF( ln_tra_frs ) THEN 466 466 tbdydta(:,:,1) = tbdydta(:,:,2) 467 467 sbdydta(:,:,1) = sbdydta(:,:,2) 468 468 ENDIF 469 IF( ln_ bdy_dyn_frs ) THEN469 IF( ln_dyn_frs ) THEN 470 470 ubdydta(:,:,1) = ubdydta(:,:,2) 471 471 vbdydta(:,:,1) = vbdydta(:,:,2) 472 472 ENDIF 473 473 #if defined key_lim2 474 IF( ln_ bdy_ice_frs ) THEN474 IF( ln_ice_frs ) THEN 475 475 frld_bdydta (:,1) = frld_bdydta(:,2) 476 476 hicif_bdydta(:,1) = hicif_bdydta(:,2) … … 480 480 END IF 481 481 ! 482 END IF ! n bdy_dta== 0/1482 END IF ! nn_dtactl == 0/1 483 483 484 484 ! In the case of constant boundary forcing fill bdy arrays once for all 485 IF( ln_ bdy_clim .AND. ntimes_bdy == 1 ) THEN486 IF( ln_ bdy_tra_frs ) THEN485 IF( ln_clim .AND. ntimes_bdy == 1 ) THEN 486 IF( ln_tra_frs ) THEN 487 487 tbdy (:,:) = tbdydta (:,:,2) 488 488 sbdy (:,:) = sbdydta (:,:,2) 489 489 ENDIF 490 IF( ln_ bdy_dyn_frs) THEN490 IF( ln_dyn_frs) THEN 491 491 ubdy (:,:) = ubdydta (:,:,2) 492 492 vbdy (:,:) = vbdydta (:,:,2) 493 493 ENDIF 494 494 #if defined key_lim2 495 IF( ln_ bdy_ice_frs ) THEN495 IF( ln_ice_frs ) THEN 496 496 frld_bdy (:) = frld_bdydta (:,2) 497 497 hicif_bdy(:) = hicif_bdydta(:,2) … … 500 500 #endif 501 501 502 IF( ln_ bdy_tra_frs .OR. ln_bdy_ice_frs) CALL iom_close( numbdyt )503 IF( ln_ bdy_dyn_frs ) CALL iom_close( numbdyu )504 IF( ln_ bdy_dyn_frs ) CALL iom_close( numbdyv )502 IF( ln_tra_frs .OR. ln_ice_frs) CALL iom_close( numbdyt ) 503 IF( ln_dyn_frs ) CALL iom_close( numbdyu ) 504 IF( ln_dyn_frs ) CALL iom_close( numbdyv ) 505 505 END IF 506 506 ! … … 509 509 510 510 ! !---------------------! 511 IF( n bdy_dta== 1 .AND. ntimes_bdy > 1 ) THEN ! at each time step !511 IF( nn_dtactl == 1 .AND. ntimes_bdy > 1 ) THEN ! at each time step ! 512 512 ! !---------------------! 513 513 ! Read one more record if necessary 514 514 !********************************** 515 515 516 IF( ln_ bdy_clim .AND. imois /= nbdy_b ) THEN ! remember that nbdy_b=0 for kt=nit000516 IF( ln_clim .AND. imois /= nbdy_b ) THEN ! remember that nbdy_b=0 for kt=nit000 517 517 nbdy_b = imois 518 518 nbdy_a = imois + 1 … … 520 520 nbdy_a = MOD( nbdy_a, iman ) ; IF( nbdy_a == 0 ) nbdy_a = iman 521 521 lect=.true. 522 ELSEIF( .NOT.ln_ bdy_clim .AND. itimer >= istep(nbdy_a) ) THEN522 ELSEIF( .NOT.ln_clim .AND. itimer >= istep(nbdy_a) ) THEN 523 523 524 524 IF( nbdy_a < ntimes_bdy ) THEN … … 530 530 ! put the last data time into both time levels 531 531 nbdy_b = nbdy_a 532 IF(ln_ bdy_tra_frs) THEN532 IF(ln_tra_frs) THEN 533 533 tbdydta(:,:,1) = tbdydta(:,:,2) 534 534 sbdydta(:,:,1) = sbdydta(:,:,2) 535 535 ENDIF 536 IF(ln_ bdy_dyn_frs) THEN536 IF(ln_dyn_frs) THEN 537 537 ubdydta(:,:,1) = ubdydta(:,:,2) 538 538 vbdydta(:,:,1) = vbdydta(:,:,2) 539 539 ENDIF 540 540 #if defined key_lim2 541 IF(ln_ bdy_ice_frs) THEN541 IF(ln_ice_frs) THEN 542 542 frld_bdydta (:,1) = frld_bdydta (:,2) 543 543 hicif_bdydta(:,1) = hicif_bdydta(:,2) … … 550 550 551 551 IF( lect ) THEN ! Swap arrays 552 IF( ln_ bdy_tra_frs ) THEN552 IF( ln_tra_frs ) THEN 553 553 tbdydta(:,:,1) = tbdydta(:,:,2) 554 554 sbdydta(:,:,1) = sbdydta(:,:,2) 555 555 ENDIF 556 IF( ln_ bdy_dyn_frs ) THEN556 IF( ln_dyn_frs ) THEN 557 557 ubdydta(:,:,1) = ubdydta(:,:,2) 558 558 vbdydta(:,:,1) = vbdydta(:,:,2) 559 559 ENDIF 560 560 #if defined key_lim2 561 IF( ln_ bdy_ice_frs ) THEN561 IF( ln_ice_frs ) THEN 562 562 frld_bdydta (:,1) = frld_bdydta (:,2) 563 563 hicif_bdydta(:,1) = hicif_bdydta(:,2) … … 569 569 ipk = jpk 570 570 571 IF( ln_ bdy_tra_frs ) THEN571 IF( ln_tra_frs ) THEN 572 572 ! 573 573 igrd = 1 ! temperature … … 588 588 END DO 589 589 END DO 590 ENDIF ! ln_ bdy_tra_frs591 592 IF(ln_ bdy_dyn_frs) THEN590 ENDIF ! ln_tra_frs 591 592 IF(ln_dyn_frs) THEN 593 593 ! 594 594 igrd = 2 ! u-velocity … … 609 609 END DO 610 610 END DO 611 ENDIF ! ln_ bdy_dyn_frs611 ENDIF ! ln_dyn_frs 612 612 ! 613 613 #if defined key_lim2 614 IF(ln_ bdy_ice_frs) THEN614 IF(ln_ice_frs) THEN 615 615 ! 616 616 igrd = 1 ! ice concentration … … 634 634 hsnif_bdydta(ib,2) = zdta( nbmap(ib,igrd), 1, 1 ) 635 635 END DO 636 ENDIF ! ln_ bdy_ice_frs636 ENDIF ! ln_ice_frs 637 637 #endif 638 638 ! 639 IF(lwp) WRITE(numout,*) 'bdy_dta : first record file used nbdy_b ',nbdy_b639 IF(lwp) WRITE(numout,*) 'bdy_dta_frs : first record file used nbdy_b ',nbdy_b 640 640 IF(lwp) WRITE(numout,*) '~~~~~~~~ last record file used nbdy_a ',nbdy_a 641 IF (.NOT.ln_ bdy_clim) THEN641 IF (.NOT.ln_clim) THEN 642 642 IF(lwp) WRITE(numout,*) 'first record time (s): ', istep(nbdy_b) 643 643 IF(lwp) WRITE(numout,*) 'model time (s) : ', itimer … … 651 651 ! ******************** 652 652 ! 653 IF( ln_ bdy_clim ) THEN ; zxy = REAL( nday ) / REAL( nmonth_len(nbdy_b) ) + 0.5 - i15653 IF( ln_clim ) THEN ; zxy = REAL( nday ) / REAL( nmonth_len(nbdy_b) ) + 0.5 - i15 654 654 ELSEIF( istep(nbdy_b) == istep(nbdy_a) ) THEN 655 655 zxy = 0.0_wp … … 657 657 END IF 658 658 659 IF(ln_ bdy_tra_frs) THEN659 IF(ln_tra_frs) THEN 660 660 igrd = 1 ! temperature & salinity 661 661 DO ib = 1, nblen(igrd) … … 667 667 ENDIF 668 668 669 IF(ln_ bdy_dyn_frs) THEN669 IF(ln_dyn_frs) THEN 670 670 igrd = 2 ! u-velocity 671 671 DO ib = 1, nblen(igrd) … … 684 684 685 685 #if defined key_lim2 686 IF(ln_ bdy_ice_frs) THEN686 IF(ln_ice_frs) THEN 687 687 igrd=1 688 688 DO ib=1, nblen(igrd) … … 691 691 hsnif_bdy(ib) = zxy * hsnif_bdydta(ib,2) + (1.-zxy) * hsnif_bdydta(ib,1) 692 692 END DO 693 ENDIF ! just if ln_ bdy_ice_frs is true693 ENDIF ! just if ln_ice_frs is true 694 694 #endif 695 695 696 END IF !end if ((n bdy_dta==1).AND.(ntimes_bdy>1))696 END IF !end if ((nn_dtactl==1).AND.(ntimes_bdy>1)) 697 697 698 698 … … 701 701 ! !---------------------! 702 702 IF( kt == nitend ) THEN 703 IF(ln_ bdy_tra_frs .or. ln_bdy_ice_frs) CALL iom_close( numbdyt ) ! Closing of the 3 files704 IF(ln_ bdy_dyn_frs) CALL iom_close( numbdyu )705 IF(ln_ bdy_dyn_frs) CALL iom_close( numbdyv )703 IF(ln_tra_frs .or. ln_ice_frs) CALL iom_close( numbdyt ) ! Closing of the 3 files 704 IF(ln_dyn_frs) CALL iom_close( numbdyu ) 705 IF(ln_dyn_frs) CALL iom_close( numbdyv ) 706 706 ENDIF 707 707 ! 708 ENDIF ! ln_ bdy_dyn_frs .OR. ln_bdy_tra_frs708 ENDIF ! ln_dyn_frs .OR. ln_tra_frs 709 709 ! 710 END SUBROUTINE bdy_dta 711 712 713 SUBROUTINE bdy_dta_ bt( kt, jit, icycl )710 END SUBROUTINE bdy_dta_frs 711 712 713 SUBROUTINE bdy_dta_fla( kt, jit, icycl ) 714 714 !!--------------------------------------------------------------------------- 715 !! *** SUBROUTINE bdy_dta_ bt***715 !! *** SUBROUTINE bdy_dta_fla *** 716 716 !! 717 717 !! ** Purpose : Read unstructured boundary data for Flather condition … … 749 749 !!--------------------------------------------------------------------------- 750 750 751 !!gm add here the same style as in bdy_dta 752 !!gm clearly bdy_dta_ bt and bdy_dtacan be combined...751 !!gm add here the same style as in bdy_dta_frs 752 !!gm clearly bdy_dta_fla and bdy_dta_frs can be combined... 753 753 !!gm too many things duplicated in the read of data... simplification can be done 754 754 … … 777 777 itimer = itimer + jit*rdt/REAL(nn_baro,wp) ! in non-climatological case 778 778 779 IF ( ln_ bdy_tides ) THEN779 IF ( ln_tides ) THEN 780 780 781 781 ! -------------------------------------! … … 787 787 ENDIF 788 788 789 IF ( ln_ bdy_dyn_fla ) THEN789 IF ( ln_dyn_fla ) THEN 790 790 791 791 ! -------------------------------------! … … 804 804 805 805 IF(lwp) WRITE(numout,*) 806 IF(lwp) WRITE(numout,*) 'bdy_dta_ bt:Initialize unstructured boundary data for barotropic variables.'806 IF(lwp) WRITE(numout,*) 'bdy_dta_fla :Initialize unstructured boundary data for barotropic variables.' 807 807 IF(lwp) WRITE(numout,*) '~~~~~~~' 808 808 809 IF( n bdy_dta== 0 ) THEN809 IF( nn_dtactl == 0 ) THEN 810 810 IF(lwp) WRITE(numout,*) 'Bdy data are taken from initial conditions' 811 811 812 ELSEIF (n bdy_dta== 1) THEN812 ELSEIF (nn_dtactl == 1) THEN 813 813 IF(lwp) WRITE(numout,*) 'Bdy data are read in netcdf files' 814 814 … … 818 818 ! necessary time dumps in file are included 819 819 820 clfile(4) = filbdy_data_bt_T821 clfile(5) = filbdy_data_bt_U822 clfile(6) = filbdy_data_bt_V820 clfile(4) = cn_dta_fla_T 821 clfile(5) = cn_dta_fla_U 822 clfile(6) = cn_dta_fla_V 823 823 824 824 DO igrd = 4,6 … … 872 872 END DO 873 873 874 IF ( .NOT. ln_ bdy_clim ) THEN874 IF ( .NOT. ln_clim ) THEN 875 875 ! Check that times in file span model run time: 876 876 … … 886 886 IF ( ntimes_bdy_bt == 1 ) CALL ctl_stop( & 887 887 'There is only one time dump in data files', & 888 'Set ln_ bdy_clim=.true. in namelist for constant bdy forcing.' )888 'Set ln_clim=.true. in namelist for constant bdy forcing.' ) 889 889 890 890 zinterval_s = zstepr(2) - zstepr(1) … … 899 899 CALL ctl_stop( 'Last time dump in bdy file is before model final time', ctmp1 ) 900 900 END IF 901 END IF ! .NOT. ln_ bdy_clim901 END IF ! .NOT. ln_clim 902 902 903 903 IF ( igrd .EQ. 4) THEN … … 938 938 939 939 ! Check number of time dumps: 940 IF (ln_ bdy_clim) THEN940 IF (ln_clim) THEN 941 941 SELECT CASE ( ntimes_bdy_bt ) 942 942 CASE( 1 ) … … 950 950 CASE DEFAULT 951 951 CALL ctl_stop( & 952 'For climatological boundary forcing (ln_ bdy_clim=.true.),',&952 'For climatological boundary forcing (ln_clim=.true.),',& 953 953 'bdy data files must contain 1 or 12 time dumps.' ) 954 954 END SELECT … … 966 966 IF(lwp) WRITE(numout,*) 'First record to read is ',nbdy_b_bt 967 967 968 ENDIF ! endif (n bdy_dta== 1)969 970 ! 1.2 Read first record in file if necessary (ie if n bdy_dta== 1)968 ENDIF ! endif (nn_dtactl == 1) 969 970 ! 1.2 Read first record in file if necessary (ie if nn_dtactl == 1) 971 971 ! ***************************************************************** 972 972 973 IF ( n bdy_dta== 0) THEN973 IF ( nn_dtactl == 0) THEN 974 974 ! boundary data arrays are filled with initial conditions 975 975 igrd = 5 ! U-points data … … 988 988 END DO 989 989 990 ELSEIF (n bdy_dta== 1) THEN990 ELSEIF (nn_dtactl == 1) THEN 991 991 992 992 ! Set first record in the climatological case: 993 IF ((ln_ bdy_clim).AND.(ntimes_bdy_bt==1)) THEN993 IF ((ln_clim).AND.(ntimes_bdy_bt==1)) THEN 994 994 nbdy_a_bt = 1 995 ELSEIF ((ln_ bdy_clim).AND.(ntimes_bdy_bt==iman)) THEN995 ELSEIF ((ln_clim).AND.(ntimes_bdy_bt==iman)) THEN 996 996 nbdy_b_bt = 0 997 997 nbdy_a_bt = imois … … 1002 1002 ! Open Netcdf files: 1003 1003 1004 CALL iom_open ( filbdy_data_bt_T, numbdyt_bt )1005 CALL iom_open ( filbdy_data_bt_U, numbdyu_bt )1006 CALL iom_open ( filbdy_data_bt_V, numbdyv_bt )1004 CALL iom_open ( cn_dta_fla_T, numbdyt_bt ) 1005 CALL iom_open ( cn_dta_fla_U, numbdyu_bt ) 1006 CALL iom_open ( cn_dta_fla_V, numbdyv_bt ) 1007 1007 1008 1008 ! Read first record: … … 1059 1059 1060 1060 ! In the case of constant boundary forcing fill bdy arrays once for all 1061 IF ((ln_ bdy_clim).AND.(ntimes_bdy_bt==1)) THEN1061 IF ((ln_clim).AND.(ntimes_bdy_bt==1)) THEN 1062 1062 1063 1063 ubtbdy (:) = ubtbdydta (:,2) … … 1077 1077 ! -------------------- ! 1078 1078 1079 IF ((n bdy_dta==1).AND.(ntimes_bdy_bt>1)) THEN1079 IF ((nn_dtactl==1).AND.(ntimes_bdy_bt>1)) THEN 1080 1080 1081 1081 ! 2.1 Read one more record if necessary 1082 1082 !************************************** 1083 1083 1084 IF ( (ln_ bdy_clim).AND.(imois/=nbdy_b_bt) ) THEN ! remember that nbdy_b_bt=0 for kt=nit0001084 IF ( (ln_clim).AND.(imois/=nbdy_b_bt) ) THEN ! remember that nbdy_b_bt=0 for kt=nit000 1085 1085 nbdy_b_bt = imois 1086 1086 nbdy_a_bt = imois+1 … … 1091 1091 lect=.true. 1092 1092 1093 ELSEIF ((.NOT.ln_ bdy_clim).AND.(itimer >= istep_bt(nbdy_a_bt))) THEN1093 ELSEIF ((.NOT.ln_clim).AND.(itimer >= istep_bt(nbdy_a_bt))) THEN 1094 1094 nbdy_b_bt=nbdy_a_bt 1095 1095 nbdy_a_bt=nbdy_a_bt+1 … … 1143 1143 1144 1144 1145 IF(lwp) WRITE(numout,*) 'bdy_dta : first record file used nbdy_b_bt ',nbdy_b_bt1145 IF(lwp) WRITE(numout,*) 'bdy_dta_fla : first record file used nbdy_b_bt ',nbdy_b_bt 1146 1146 IF(lwp) WRITE(numout,*) '~~~~~~~~ last record file used nbdy_a_bt ',nbdy_a_bt 1147 IF (.NOT.ln_ bdy_clim) THEN1147 IF (.NOT.ln_clim) THEN 1148 1148 IF(lwp) WRITE(numout,*) 'first record time (s): ', istep_bt(nbdy_b_bt) 1149 1149 IF(lwp) WRITE(numout,*) 'model time (s) : ', itimer … … 1156 1156 ! *************************** 1157 1157 1158 IF (ln_ bdy_clim) THEN1158 IF (ln_clim) THEN 1159 1159 zxy = REAL( nday, wp ) / REAL( nmonth_len(nbdy_b_bt), wp ) + 0.5 - i15 1160 1160 ELSE … … 1181 1181 1182 1182 1183 END IF !end if ((n bdy_dta==1).AND.(ntimes_bdy_bt>1))1183 END IF !end if ((nn_dtactl==1).AND.(ntimes_bdy_bt>1)) 1184 1184 1185 1185 ! ------------------- ! … … 1194 1194 ENDIF 1195 1195 1196 ENDIF ! ln_ bdy_dyn_frs1197 1198 END SUBROUTINE bdy_dta_ bt1196 ENDIF ! ln_dyn_frs 1197 1198 END SUBROUTINE bdy_dta_fla 1199 1199 1200 1200 … … 1204 1204 !!---------------------------------------------------------------------- 1205 1205 CONTAINS 1206 SUBROUTINE bdy_dta ( kt ) ! Empty routine1207 WRITE(*,*) 'bdy_dta : You should not have seen this print! error?', kt1208 END SUBROUTINE bdy_dta 1209 SUBROUTINE bdy_dta_ bt( kt, kit, icycle ) ! Empty routine1210 WRITE(*,*) 'bdy_dta : You should not have seen this print! error?', kt, kit1211 END SUBROUTINE bdy_dta_ bt1206 SUBROUTINE bdy_dta_frs( kt ) ! Empty routine 1207 WRITE(*,*) 'bdy_dta_frs: You should not have seen this print! error?', kt 1208 END SUBROUTINE bdy_dta_frs 1209 SUBROUTINE bdy_dta_fla( kt, kit, icycle ) ! Empty routine 1210 WRITE(*,*) 'bdy_dta_frs: You should not have seen this print! error?', kt, kit 1211 END SUBROUTINE bdy_dta_fla 1212 1212 #endif 1213 1213 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90
r2287 r2305 60 60 !!---------------------------------------------------------------------- 61 61 ! 62 IF(ln_ bdy_dyn_frs) THEN ! If this is false, then this routine does nothing.62 IF(ln_dyn_frs) THEN ! If this is false, then this routine does nothing. 63 63 ! 64 64 IF( kt == nit000 ) THEN 65 65 IF(lwp) WRITE(numout,*) 66 IF(lwp) WRITE(numout,*) 'bdy_dyn : Flow Relaxation Scheme on momentum'66 IF(lwp) WRITE(numout,*) 'bdy_dyn_frs : Flow Relaxation Scheme on momentum' 67 67 IF(lwp) WRITE(numout,*) '~~~~~~~' 68 68 ENDIF … … 89 89 CALL lbc_lnk( ua, 'U', -1. ) ; CALL lbc_lnk( va, 'V', -1. ) ! Boundary points should be updated 90 90 ! 91 ENDIF ! ln_ bdy_dyn_frs91 ENDIF ! ln_dyn_frs 92 92 ! 93 93 END SUBROUTINE bdy_dyn_frs … … 107 107 !! 108 108 !! - Apply Flather boundary conditions on normal barotropic velocities 109 !! (ln_ bdy_dyn_fla=.true. or ln_bdy_tides=.true.)109 !! (ln_dyn_fla=.true. or ln_tides=.true.) 110 110 !! 111 111 !! ** WARNINGS about FLATHER implementation: … … 134 134 ! ---------------------------------! 135 135 136 IF(ln_ bdy_dyn_fla .OR. ln_bdy_tides) THEN ! If these are both false, then this routine does nothing.136 IF(ln_dyn_fla .OR. ln_tides) THEN ! If these are both false, then this routine does nothing. 137 137 138 138 ! Fill temporary array with ssh data (here spgu): … … 142 142 ii = nbi(jb,igrd) 143 143 ij = nbj(jb,igrd) 144 IF( ln_ bdy_dyn_fla ) spgu(ii, ij) = sshbdy(jb)145 IF( ln_ bdy_tides ) spgu(ii, ij) = spgu(ii, ij) + sshtide(jb)144 IF( ln_dyn_fla ) spgu(ii, ij) = sshbdy(jb) 145 IF( ln_tides ) spgu(ii, ij) = spgu(ii, ij) + sshtide(jb) 146 146 END DO 147 147 ! … … 175 175 CALL lbc_lnk( va_e, 'V', -1. ) ! 176 176 ! 177 ENDIF ! ln_ bdy_dyn_fla .or. ln_bdy_tides177 ENDIF ! ln_dyn_fla .or. ln_tides 178 178 ! 179 179 END SUBROUTINE bdy_dyn_fla -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice.F90
r2287 r2305 11 11 !! 'key_lim2' LIM-2 sea ice model 12 12 !!---------------------------------------------------------------------- 13 !! bdy_ice : Relaxation of tracers on unstructured open boundaries13 !! bdy_ice_frs : Relaxation of tracers on unstructured open boundaries 14 14 !!---------------------------------------------------------------------- 15 15 USE oce ! ocean dynamics and tracers variables … … 23 23 PRIVATE 24 24 25 PUBLIC bdy_ice ! routine called in sbcmod25 PUBLIC bdy_ice_frs ! routine called in sbcmod 26 26 27 27 !!---------------------------------------------------------------------- … … 32 32 CONTAINS 33 33 34 SUBROUTINE bdy_ice ( kt )34 SUBROUTINE bdy_ice_frs( kt ) 35 35 !!------------------------------------------------------------------------------ 36 !! *** SUBROUTINE bdy_ice ***36 !! *** SUBROUTINE bdy_ice_frs *** 37 37 !! 38 38 !! ** Purpose : Apply the Flow Relaxation Scheme for sea-ice fields in the case … … 51 51 jgrd = 1 ! Everything is at T-points here 52 52 ! 53 IF( ln_ bdy_ice_frs ) THEN ! update ice fields by relaxation at the boundary53 IF( ln_ice_frs ) THEN ! update ice fields by relaxation at the boundary 54 54 DO jb = 1, nblen(jgrd) 55 55 DO jk = 1, jpkm1 … … 66 66 CALL lbc_lnk( hicif, 'T', 1. ) ; CALL lbc_lnk( hsnif, 'T', 1. ) 67 67 ! 68 ELSE ! we have called this routine without ln_ bdy_ice_frs not set69 IF( kt == nit000 ) CALL ctl_warn( 'E R R O R (possible) called bdy_ice when ln_bdy_ice_frs is false?' )68 ELSE ! we have called this routine without ln_ice_frs not set 69 IF( kt == nit000 ) CALL ctl_warn( 'E R R O R (possible) called bdy_ice_frs when ln_ice_frs is false?' ) 70 70 ENDIF 71 71 ! 72 END SUBROUTINE bdy_ice 72 END SUBROUTINE bdy_ice_frs 73 73 #else 74 74 !!--------------------------------------------------------------------------------- … … 76 76 !!--------------------------------------------------------------------------------- 77 77 CONTAINS 78 SUBROUTINE bdy_ice ( kt ) ! Empty routine79 WRITE(*,*) 'bdy_ice : You should not have seen this print! error?', kt80 END SUBROUTINE bdy_ice 78 SUBROUTINE bdy_ice_frs( kt ) ! Empty routine 79 WRITE(*,*) 'bdy_ice_frs: You should not have seen this print! error?', kt 80 END SUBROUTINE bdy_ice_frs 81 81 #endif 82 82 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
r2287 r2305 66 66 CHARACTER(LEN=80),DIMENSION(6) :: clfile 67 67 !! 68 NAMELIST/nambdy/ filbdy_mask, filbdy_data_T, filbdy_data_U, filbdy_data_V, &69 & filbdy_data_bt_T, filbdy_data_bt_U, filbdy_data_bt_V, &70 & ln_ bdy_tides, ln_bdy_clim, ln_bdy_vol, ln_bdy_mask, &71 & ln_ bdy_dyn_fla, ln_bdy_dyn_frs, ln_bdy_tra_frs,ln_bdy_ice_frs, &72 & n bdy_dta, nb_rimwidth, volbdy68 NAMELIST/nambdy/cn_mask, cn_dta_frs_T, cn_dta_frs_U, cn_dta_frs_V, & 69 & cn_dta_fla_T, cn_dta_fla_U, cn_dta_fla_V, & 70 & ln_tides, ln_clim, ln_vol, ln_mask, & 71 & ln_dyn_fla, ln_dyn_frs, ln_tra_frs,ln_ice_frs, & 72 & nn_dtactl, nn_rimwidth, nn_volctl 73 73 !!---------------------------------------------------------------------- 74 74 … … 90 90 IF(lwp) WRITE(numout,*) ' nambdy' 91 91 92 ! ! check type of data used (n bdy_dtavalue)93 IF(lwp) WRITE(numout,*) 'n bdy_dta =', nbdy_dta92 ! ! check type of data used (nn_dtactl value) 93 IF(lwp) WRITE(numout,*) 'nn_dtactl =', nn_dtactl 94 94 IF(lwp) WRITE(numout,*) 95 SELECT CASE( n bdy_dta) !95 SELECT CASE( nn_dtactl ) ! 96 96 CASE( 0 ) ; IF(lwp) WRITE(numout,*) ' initial state used for bdy data' 97 97 CASE( 1 ) ; IF(lwp) WRITE(numout,*) ' boundary data taken from file' 98 CASE DEFAULT ; CALL ctl_stop( 'n bdy_dtamust be 0 or 1' )98 CASE DEFAULT ; CALL ctl_stop( 'nn_dtactl must be 0 or 1' ) 99 99 END SELECT 100 100 101 101 IF(lwp) WRITE(numout,*) 102 IF(lwp) WRITE(numout,*) 'Boundary rim width for the FRS n b_rimwidth = ', nb_rimwidth102 IF(lwp) WRITE(numout,*) 'Boundary rim width for the FRS nn_rimwidth = ', nn_rimwidth 103 103 104 104 IF(lwp) WRITE(numout,*) 105 IF(lwp) WRITE(numout,*) ' volbdy = ', volbdy106 107 IF( ln_ bdy_vol ) THEN ! check volume conservation (volbdyvalue)108 SELECT CASE ( volbdy)105 IF(lwp) WRITE(numout,*) ' nn_volctl = ', nn_volctl 106 107 IF( ln_vol ) THEN ! check volume conservation (nn_volctl value) 108 SELECT CASE ( nn_volctl ) 109 109 CASE( 1 ) ; IF(lwp) WRITE(numout,*) ' The total volume will be constant' 110 110 CASE( 0 ) ; IF(lwp) WRITE(numout,*) ' The total volume will vary according to the surface E-P flux' 111 CASE DEFAULT ; CALL ctl_stop( ' volbdymust be 0 or 1' )111 CASE DEFAULT ; CALL ctl_stop( 'nn_volctl must be 0 or 1' ) 112 112 END SELECT 113 113 IF(lwp) WRITE(numout,*) … … 117 117 ENDIF 118 118 119 IF( ln_ bdy_tides ) THEN119 IF( ln_tides ) THEN 120 120 IF(lwp) WRITE(numout,*) 'Tidal harmonic forcing at unstructured open boundaries' 121 121 IF(lwp) WRITE(numout,*) 122 122 ENDIF 123 123 124 IF( ln_ bdy_dyn_fla ) THEN124 IF( ln_dyn_fla ) THEN 125 125 IF(lwp) WRITE(numout,*) 'Flather condition on U, V at unstructured open boundaries' 126 126 IF(lwp) WRITE(numout,*) 127 127 ENDIF 128 128 129 IF( ln_ bdy_dyn_frs ) THEN129 IF( ln_dyn_frs ) THEN 130 130 IF(lwp) WRITE(numout,*) 'FRS condition on U and V at unstructured open boundaries' 131 131 IF(lwp) WRITE(numout,*) 132 132 ENDIF 133 133 134 IF( ln_ bdy_tra_frs ) THEN134 IF( ln_tra_frs ) THEN 135 135 IF(lwp) WRITE(numout,*) 'FRS condition on T & S fields at unstructured open boundaries' 136 136 IF(lwp) WRITE(numout,*) 137 137 ENDIF 138 138 139 IF( ln_ bdy_ice_frs ) THEN139 IF( ln_ice_frs ) THEN 140 140 IF(lwp) WRITE(numout,*) 'FRS condition on ice fields at unstructured open boundaries' 141 141 IF(lwp) WRITE(numout,*) 142 142 ENDIF 143 143 144 IF( ln_ bdy_tides ) CALL tide_init ! Read tides namelist144 IF( ln_tides ) CALL tide_init ! Read tides namelist 145 145 146 146 … … 156 156 zmask( : ,:) = 0.e0 157 157 zmask(jpizoom+1:jpizoom+jpiglo-2,:) = 1.e0 158 ELSE IF( ln_ bdy_mask ) THEN159 CALL iom_open( filbdy_mask, inum )158 ELSE IF( ln_mask ) THEN 159 CALL iom_open( cn_mask, inum ) 160 160 CALL iom_get ( inum, jpdom_data, 'bdy_msk', zmask(:,:) ) 161 161 CALL iom_close( inum ) … … 190 190 IF( cp_cfg == "eel" .AND. jp_cfg == 5 ) THEN 191 191 icount = 0 192 DO ir = 1, n b_rimwidth ! Define west boundary (from ii=2 to ii=1+nb_rimwidth):192 DO ir = 1, nn_rimwidth ! Define west boundary (from ii=2 to ii=1+nn_rimwidth): 193 193 DO ij = 3, jpjglo-2 194 194 icount = icount + 1 … … 199 199 END DO 200 200 ! 201 DO ir = 1, n b_rimwidth ! Define east boundary (from ii=jpiglo-1 to ii=jpiglo-nb_rimwidth):201 DO ir = 1, nn_rimwidth ! Define east boundary (from ii=jpiglo-1 to ii=jpiglo-nn_rimwidth): 202 202 DO ij=3,jpjglo-2 203 203 icount = icount + 1 … … 211 211 ELSE ! Read indices and distances in unstructured boundary data files 212 212 ! 213 IF( ln_ bdy_tides ) THEN ! Read tides input files for preference in case there are no bdydata files213 IF( ln_tides ) THEN ! Read tides input files for preference in case there are no bdydata files 214 214 clfile(4) = TRIM(filtide)//TRIM(tide_cpt(1))//'_grid_T.nc' 215 215 clfile(5) = TRIM(filtide)//TRIM(tide_cpt(1))//'_grid_U.nc' 216 216 clfile(6) = TRIM(filtide)//TRIM(tide_cpt(1))//'_grid_V.nc' 217 217 ENDIF 218 IF( ln_ bdy_dyn_fla .AND. .NOT. ln_bdy_tides ) THEN219 clfile(4) = filbdy_data_bt_T220 clfile(5) = filbdy_data_bt_U221 clfile(6) = filbdy_data_bt_V218 IF( ln_dyn_fla .AND. .NOT. ln_tides ) THEN 219 clfile(4) = cn_dta_fla_T 220 clfile(5) = cn_dta_fla_U 221 clfile(6) = cn_dta_fla_V 222 222 ENDIF 223 223 224 IF( ln_ bdy_tra_frs ) THEN225 clfile(1) = filbdy_data_T226 IF( .NOT. ln_ bdy_dyn_frs ) THEN227 clfile(2) = filbdy_data_T ! Dummy read re read T file for sake of 6 files228 clfile(3) = filbdy_data_T !224 IF( ln_tra_frs ) THEN 225 clfile(1) = cn_dta_frs_T 226 IF( .NOT. ln_dyn_frs ) THEN 227 clfile(2) = cn_dta_frs_T ! Dummy read re read T file for sake of 6 files 228 clfile(3) = cn_dta_frs_T ! 229 229 ENDIF 230 230 ENDIF 231 IF( ln_ bdy_dyn_frs ) THEN232 IF( .NOT. ln_ bdy_tra_frs ) clfile(1) = filbdy_data_U ! Dummy Read233 clfile(2) = filbdy_data_U234 clfile(3) = filbdy_data_V231 IF( ln_dyn_frs ) THEN 232 IF( .NOT. ln_tra_frs ) clfile(1) = cn_dta_frs_U ! Dummy Read 233 clfile(2) = cn_dta_frs_U 234 clfile(3) = cn_dta_frs_V 235 235 ENDIF 236 236 237 237 ! ! how many files are we to read in? 238 IF(ln_ bdy_tides .OR. ln_bdy_dyn_fla) igrd_start = 4239 ! 240 IF(ln_ bdy_tra_frs ) THEN ; igrd_start = 1241 ELSEIF(ln_ bdy_dyn_frs) THEN ; igrd_start = 2238 IF(ln_tides .OR. ln_dyn_fla) igrd_start = 4 239 ! 240 IF(ln_tra_frs ) THEN ; igrd_start = 1 241 ELSEIF(ln_dyn_frs) THEN ; igrd_start = 2 242 242 ENDIF 243 243 ! 244 IF( ln_ bdy_tra_frs ) igrd_end = 1245 ! 246 IF(ln_ bdy_dyn_fla .OR. ln_bdy_tides) THEN ; igrd_end = 6247 ELSEIF( ln_ bdy_dyn_frs ) THEN ; igrd_end = 3244 IF( ln_tra_frs ) igrd_end = 1 245 ! 246 IF(ln_dyn_fla .OR. ln_tides) THEN ; igrd_end = 6 247 ELSEIF( ln_dyn_frs ) THEN ; igrd_end = 3 248 248 ENDIF 249 249 … … 274 274 IF(lwp) WRITE(numout,*) 275 275 IF(lwp) WRITE(numout,*) ' Maximum rimwidth in file is ', ibr_max 276 IF(lwp) WRITE(numout,*) ' n b_rimwidth from namelist is ', nb_rimwidth277 IF (ibr_max < n b_rimwidth) CALL ctl_stop( 'nb_rimwidth is larger than maximum rimwidth in file' )276 IF(lwp) WRITE(numout,*) ' nn_rimwidth from namelist is ', nn_rimwidth 277 IF (ibr_max < nn_rimwidth) CALL ctl_stop( 'nn_rimwidth is larger than maximum rimwidth in file' ) 278 278 ENDIF !Check igrd < 4 279 279 ! … … 296 296 nblenrim(igrd) = 0 297 297 nblendta(igrd) = 0 298 DO ir=1, n b_rimwidth298 DO ir=1, nn_rimwidth 299 299 DO ib = 1, jpbdta 300 300 ! check if point is in local domain and equals ir … … 327 327 DO ib = 1, nblen(igrd) 328 328 nbw(ib,igrd) = 1.- TANH( FLOAT( nbr(ib,igrd) - 1 ) *0.5 ) ! tanh formulation 329 ! nbw(ib,igrd) = (FLOAT(n b_rimwidth+1-nbr(ib,igrd))/FLOAT(nb_rimwidth))**2 ! quadratic330 ! nbw(ib,igrd) = FLOAT(n b_rimwidth+1-nbr(ib,igrd))/FLOAT(nb_rimwidth) ! linear329 ! nbw(ib,igrd) = (FLOAT(nn_rimwidth+1-nbr(ib,igrd))/FLOAT(nn_rimwidth))**2 ! quadratic 330 ! nbw(ib,igrd) = FLOAT(nn_rimwidth+1-nbr(ib,igrd))/FLOAT(nn_rimwidth) ! linear 331 331 END DO 332 332 END DO … … 382 382 CALL lbc_lnk( bdyumask(:,:), 'U', 1. ) ; CALL lbc_lnk( bdyvmask(:,:), 'V', 1. ) 383 383 384 IF( ln_ bdy_vol .OR. ln_bdy_dyn_fla ) THEN ! Indices and directions of rim velocity components384 IF( ln_vol .OR. ln_dyn_fla ) THEN ! Indices and directions of rim velocity components 385 385 ! 386 386 !flagu = -1 : u component is normal to the dynamical boundary but its direction is outward … … 431 431 ! ---------------------------------------------------- 432 432 bdysurftot = 0.e0 433 IF( ln_ bdy_vol ) THEN433 IF( ln_vol ) THEN 434 434 igrd = 2 ! Lateral surface at U-points 435 435 DO ib = 1, nblenrim(igrd) … … 468 468 ! Read in tidal constituents and adjust for model start time 469 469 ! ---------------------------------------------------------- 470 IF( ln_ bdy_tides ) CALL tide_data470 IF( ln_tides ) CALL tide_data 471 471 ! 472 472 END SUBROUTINE bdy_init -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/BDY/bdytra.F90
r2287 r2305 11 11 !! 'key_bdy' Unstructured Open Boundary Conditions 12 12 !!---------------------------------------------------------------------- 13 !! bdy_tra : Relaxation of tracers on unstructured open boundaries13 !! bdy_tra_frs : Relaxation of tracers on unstructured open boundaries 14 14 !!---------------------------------------------------------------------- 15 15 USE oce ! ocean dynamics and tracers variables … … 22 22 PRIVATE 23 23 24 PUBLIC bdy_tra ! routine called in tranxt.F9024 PUBLIC bdy_tra_frs ! routine called in tranxt.F90 25 25 26 26 !!---------------------------------------------------------------------- … … 31 31 CONTAINS 32 32 33 SUBROUTINE bdy_tra ( kt )33 SUBROUTINE bdy_tra_frs( kt ) 34 34 !!---------------------------------------------------------------------- 35 !! *** SUBROUTINE bdy_tra ***35 !! *** SUBROUTINE bdy_tra_frs *** 36 36 !! 37 37 !! ** Purpose : Apply the Flow Relaxation Scheme for tracers in the … … 47 47 !!---------------------------------------------------------------------- 48 48 ! 49 IF(ln_ bdy_tra_frs) THEN ! If this is false, then this routine does nothing.49 IF(ln_tra_frs) THEN ! If this is false, then this routine does nothing. 50 50 ! 51 51 IF( kt == nit000 ) THEN 52 52 IF(lwp) WRITE(numout,*) 53 IF(lwp) WRITE(numout,*) 'bdy_tra : Flow Relaxation Scheme for tracers'53 IF(lwp) WRITE(numout,*) 'bdy_tra_frs : Flow Relaxation Scheme for tracers' 54 54 IF(lwp) WRITE(numout,*) '~~~~~~~' 55 55 ENDIF … … 68 68 CALL lbc_lnk( ta, 'T', 1. ) ; CALL lbc_lnk( sa, 'T', 1. ) ! Boundary points should be updated 69 69 ! 70 ENDIF ! ln_ bdy_tra_frs70 ENDIF ! ln_tra_frs 71 71 ! 72 END SUBROUTINE bdy_tra 72 END SUBROUTINE bdy_tra_frs 73 73 74 74 #else … … 77 77 !!---------------------------------------------------------------------- 78 78 CONTAINS 79 SUBROUTINE bdy_tra (kt) ! Empty routine80 WRITE(*,*) 'bdy_tra : You should not have seen this print! error?', kt81 END SUBROUTINE bdy_tra 79 SUBROUTINE bdy_tra_frs(kt) ! Empty routine 80 WRITE(*,*) 'bdy_tra_frs: You should not have seen this print! error?', kt 81 END SUBROUTINE bdy_tra_frs 82 82 #endif 83 83 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
r2287 r2305 61 61 !! zero (z_cflxemp=0) to calculate the correction velocity. So 62 62 !! it will only balance the flux through open boundaries. 63 !! (set volbdyto 0 in tne namelist for this option)63 !! (set nn_volctl to 0 in tne namelist for this option) 64 64 !! 2/ The volume is constant even with E-P flux. In this case 65 65 !! the correction velocity must balance both the flux 66 66 !! through open boundaries and the ones through the free 67 67 !! surface. 68 !! (set volbdyto 1 in tne namelist for this option)68 !! (set nn_volctl to 1 in tne namelist for this option) 69 69 !!---------------------------------------------------------------------- 70 70 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 74 74 REAL(wp) :: zubtpecor, z_cflxemp, ztranst 75 75 !!----------------------------------------------------------------------------- 76 77 IF( ln_vol ) THEN 76 78 77 79 IF( kt == nit000 ) THEN … … 109 111 ! The normal velocity correction 110 112 ! ------------------------------ 111 IF( volbdy==1 ) THEN ; zubtpecor = ( zubtpecor - z_cflxemp) / bdysurftot113 IF( nn_volctl==1 ) THEN ; zubtpecor = ( zubtpecor - z_cflxemp) / bdysurftot 112 114 ELSE ; zubtpecor = zubtpecor / bdysurftot 113 115 END IF … … 148 150 END IF 149 151 ! 152 END IF ! ln_vol 153 150 154 END SUBROUTINE bdy_vol 151 155 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
r2287 r2305 193 193 #endif 194 194 #if defined key_bdy 195 ! Update velocities on unstructured boundary using the Flow Relaxation Scheme 196 CALL bdy_dyn_frs( kt ) 197 198 IF (ln_bdy_vol) THEN 199 ! Correction of the barotropic component velocity to control the volume of the system 200 CALL bdy_vol( kt ) 201 ENDIF 195 CALL bdy_dyn_frs( kt ) ! Update velocities on unstructured boundary using the Flow Relaxation Scheme 196 CALL bdy_vol( kt ) ! Correction of the barotropic component velocity to control the volume of the system 202 197 #endif 203 198 #if defined key_agrif -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r2287 r2305 352 352 ! !* Update the forcing (OBC, BDY and tides) 353 353 ! ! ------------------ 354 IF( lk_obc 355 IF( lk_bdy .OR. ln_bdy_tides ) CALL bdy_dta_bt( kt, jn+1, icycle )354 IF( lk_obc ) CALL obc_dta_bt( kt, jn ) 355 IF( lk_bdy ) CALL bdy_dta_fla( kt, jn+1, icycle ) 356 356 357 357 ! !* after ssh_e -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r2287 r2305 36 36 USE closea ! closed sea 37 37 USE bdy_par ! unstructured open boundary data variables 38 USE bdyice ! unstructured open boundary data (bdy_ice routine)38 USE bdyice ! unstructured open boundary data (bdy_ice_frs routine) 39 39 40 40 USE prtctl ! Print control (prt_ctl routine) … … 241 241 ! 242 242 CASE( 2 ) ; CALL sbc_ice_lim_2( kt, nsbc ) ! LIM 2.0 ice model 243 IF( lk_bdy ) CALL bdy_ice ( kt )243 IF( lk_bdy ) CALL bdy_ice_frs( kt ) 244 244 ! 245 245 CASE( 3 ) ; CALL sbc_ice_lim ( kt, nsbc, nn_ico_cpl) ! LIM 3.0 ice model -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r2289 r2305 36 36 USE obc_oce 37 37 USE obctra ! open boundary condition (obc_tra routine) 38 USE bdytra ! Unstructured open boundary condition (bdy_tra routine) 38 USE bdy_par ! Unstructured open boundary condition (bdy_tra_frs routine) 39 USE bdytra ! Unstructured open boundary condition (bdy_tra_frs routine) 39 40 USE in_out_manager ! I/O manager 40 41 USE lbclnk ! ocean lateral boundary conditions (or mpp link) … … 119 120 #endif 120 121 #if defined key_bdy 121 IF( lk_bdy ) CALL bdy_tra ( kt ) ! BDY open boundaries122 IF( lk_bdy ) CALL bdy_tra_frs( kt ) ! BDY open boundaries 122 123 #endif 123 124 #if defined key_agrif -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step.F90
r2303 r2305 104 104 IF( lk_obc ) CALL obc_dta( kstp ) ! update dynamic and tracer data at open boundaries 105 105 IF( lk_obc ) CALL obc_rad( kstp ) ! compute phase velocities at open boundaries 106 IF( lk_bdy ) CALL bdy_dta ( kstp ) ! update dynamic and tracer data at unstructured open boundary106 IF( lk_bdy ) CALL bdy_dta_frs( kstp ) ! update dynamic and tracer data for FRS conditions (BDY) 107 107 108 108 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Note: See TracChangeset
for help on using the changeset viewer.