Changeset 6862 for branches/2016/dev_r6522_SIMPLIF_3
- Timestamp:
- 2016-08-12T15:16:24+02:00 (8 years ago)
- Location:
- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM
- Files:
-
- 1 deleted
- 40 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
r6489 r6862 208 208 / 209 209 !----------------------------------------------------------------------- 210 &nambdy ! unstructured open boundaries ("key_bdy") 210 &nambdy ! unstructured open boundaries 211 ln_bdy = .true. 211 212 nb_bdy = 1 212 213 cn_dyn2d = 'flather' … … 216 217 / 217 218 !----------------------------------------------------------------------- 218 &nambdy_dta ! open boundaries - external data ("key_bdy")219 &nambdy_dta ! open boundaries - external data 219 220 !----------------------------------------------------------------------- 220 221 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm
r6140 r6862 1 bld::tool::fppkeys key_bdykey_tide key_zdfgls key_diainstant key_mpp_mpi key_iomput1 bld::tool::fppkeys key_tide key_zdfgls key_diainstant key_mpp_mpi key_iomput -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/SHARED/namelist_ref
r6497 r6862 621 621 &nambdy ! unstructured open boundaries ("key_bdy") 622 622 !----------------------------------------------------------------------- 623 ln_bdy = .false. ! Use unstructured open boundaries 623 624 nb_bdy = 0 ! number of open boundary sets 624 625 ln_coords_file = .true. ! =T : read bdy coordinates from file -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/LIM_SRC_3/limcons.F90
r6416 r6862 286 286 REAL(wp), PARAMETER :: zconv = 1.e-9 ! convert W to GW and kg to Mt 287 287 288 #if ! defined key_bdy289 288 ! heat flux 290 289 zhfx = glob_sum( ( hfx_in - hfx_out - diag_heat - diag_trp_ei - diag_trp_es - SUM( qevap_ice * a_i_b, dim=3 ) ) & … … 304 303 IF( ABS( zsfx ) > zs_sill ) WRITE(numout,*) 'violation sfx [psu*Mt/day] (',cd_routine,') = ',(zsfx) 305 304 IF( ABS( zhfx ) > zh_sill ) WRITE(numout,*) 'violation hfx [GW] (',cd_routine,') = ',(zhfx) 306 #endif307 305 308 306 END SUBROUTINE lim_cons_final -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90
r6416 r6862 41 41 USE agrif_lim2_interp 42 42 #endif 43 #if defined key_bdy43 USE bdy_oce , ONLY: ln_bdy 44 44 USE bdyice_lim 45 #endif46 45 47 46 IMPLICIT NONE … … 460 459 CALL agrif_rhg_lim2( jter, nn_nevp, 'U' ) 461 460 #endif 462 #if defined key_bdy 463 CALL bdy_ice_lim_dyn( 'U' ) 464 #endif 461 IF( ln_bdy ) CALL bdy_ice_lim_dyn( 'U' ) 465 462 466 463 DO jj = k_j1+1, k_jpj-1 … … 486 483 CALL agrif_rhg_lim2( jter, nn_nevp, 'V' ) 487 484 #endif 488 #if defined key_bdy 489 CALL bdy_ice_lim_dyn( 'V' ) 490 #endif 485 IF( ln_bdy ) CALL bdy_ice_lim_dyn( 'V' ) 491 486 492 487 ELSE … … 513 508 CALL agrif_rhg_lim2( jter, nn_nevp, 'V' ) 514 509 #endif 515 #if defined key_bdy 516 CALL bdy_ice_lim_dyn( 'V' ) 517 #endif 510 IF( ln_bdy ) CALL bdy_ice_lim_dyn( 'V' ) 518 511 519 512 DO jj = k_j1+1, k_jpj-1 … … 538 531 CALL agrif_rhg_lim2( jter, nn_nevp, 'U' ) 539 532 #endif 540 #if defined key_bdy 541 CALL bdy_ice_lim_dyn( 'U' ) 542 #endif 533 IF( ln_bdy ) CALL bdy_ice_lim_dyn( 'U' ) 543 534 544 535 ENDIF … … 577 568 CALL agrif_rhg_lim2( nn_nevp , nn_nevp, 'V' ) 578 569 #endif 579 #if defined key_bdy 580 CALL bdy_ice_lim_dyn( 'U' ) 581 CALL bdy_ice_lim_dyn( 'V' ) 582 #endif 570 IF( ln_bdy ) THEN 571 CALL bdy_ice_lim_dyn( 'U' ) ; CALL bdy_ice_lim_dyn( 'V' ) 572 ENDIF 583 573 584 574 DO jj = k_j1+1, k_jpj-1 -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90
r6416 r6862 36 36 USE limctl ! 37 37 USE limcons ! 38 USE bdy_oce , ONLY: ln_bdy 38 39 ! 39 40 USE in_out_manager ! I/O manager … … 221 222 222 223 ! conservation test 223 IF( ln_limdiahsb ) CALL lim_cons_final( 'limsbc' )224 IF( ln_limdiahsb .AND. .NOT. ln_bdy) CALL lim_cons_final( 'limsbc' ) 224 225 225 226 ! control prints -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
r6140 r6862 61 61 USE nemogcm 62 62 USE tradmp 63 USE bdy_ par63 USE bdy_oce , ONLY: ln_bdy 64 64 65 65 IMPLICIT NONE … … 78 78 ln_tradmp = .FALSE. 79 79 ! no open boundary on fine grids 80 l k_bdy = .FALSE.80 ln_bdy = .FALSE. 81 81 82 82 -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90
r6140 r6862 10 10 !! 3.6 ! 2014-01 (C. Rousset) add ice boundary conditions for lim3 11 11 !!---------------------------------------------------------------------- 12 #if defined key_bdy13 !!----------------------------------------------------------------------14 !! 'key_bdy' Unstructured Open Boundary Condition15 !!----------------------------------------------------------------------16 12 USE par_oce ! ocean parameters 17 USE bdy_par ! Unstructured boundary parameters18 13 USE lib_mpp ! distributed memory computing 19 14 20 15 IMPLICIT NONE 21 16 PUBLIC 17 18 INTEGER, PUBLIC, PARAMETER :: jp_bdy = 10 !: Maximum number of bdy sets 19 INTEGER, PUBLIC, PARAMETER :: jpbgrd = 3 !: Number of horizontal grid types used (T, U, V) 22 20 23 21 TYPE, PUBLIC :: OBC_INDEX !: Indices and weights which define the open boundary … … 82 80 !! Namelist variables 83 81 !!---------------------------------------------------------------------- 82 LOGICAL, PUBLIC :: ln_bdy !: Unstructured Ocean Boundary Condition 83 84 84 CHARACTER(len=80), DIMENSION(jp_bdy) :: cn_coords_file !: Name of bdy coordinates file 85 85 CHARACTER(len=80) :: cn_mask_file !: Name of bdy mask file … … 166 166 END FUNCTION bdy_oce_alloc 167 167 168 #else169 !!----------------------------------------------------------------------170 !! Dummy module NO Unstructured Open Boundary Condition171 !!----------------------------------------------------------------------172 LOGICAL :: ln_tides = .false. !: =T apply tidal harmonic forcing along open boundaries173 #endif174 175 168 !!====================================================================== 176 169 END MODULE bdy_oce -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
r6140 r6862 12 12 !! 3.4 ! 2011 (D. Storkey) rewrite in preparation for OBC-BDY merge 13 13 !! 3.6 ! 2012-01 (C. Rousset) add ice boundary conditions for lim3 14 !!----------------------------------------------------------------------15 #if defined key_bdy16 !!----------------------------------------------------------------------17 !! 'key_bdy' Open Boundary Conditions18 14 !!---------------------------------------------------------------------- 19 15 !! bdy_dta : read external data along open boundaries from file … … 899 895 END SUBROUTINE bdy_dta_init 900 896 901 #else902 !!----------------------------------------------------------------------903 !! Dummy module NO Open Boundary Conditions904 !!----------------------------------------------------------------------905 CONTAINS906 SUBROUTINE bdy_dta( kt, jit, time_offset ) ! Empty routine907 INTEGER, INTENT( in ) :: kt908 INTEGER, INTENT( in ), OPTIONAL :: jit909 INTEGER, INTENT( in ), OPTIONAL :: time_offset910 WRITE(*,*) 'bdy_dta: You should not have seen this print! error?', kt911 END SUBROUTINE bdy_dta912 SUBROUTINE bdy_dta_init() ! Empty routine913 WRITE(*,*) 'bdy_dta_init: You should not have seen this print! error?'914 END SUBROUTINE bdy_dta_init915 #endif916 917 897 !!============================================================================== 918 898 END MODULE bdydta -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90
r6140 r6862 11 11 !! 3.3 ! 2010-09 (D.Storkey) add ice boundary conditions 12 12 !! 3.4 ! 2011 (D. Storkey) rewrite in preparation for OBC-BDY merge 13 !!----------------------------------------------------------------------14 #if defined key_bdy15 !!----------------------------------------------------------------------16 !! 'key_bdy' : Unstructured Open Boundary Condition17 13 !!---------------------------------------------------------------------- 18 14 !! bdy_dyn : split velocities into barotropic and baroclinic parts … … 137 133 END SUBROUTINE bdy_dyn 138 134 139 #else140 !!----------------------------------------------------------------------141 !! Dummy module NO Unstruct Open Boundary Conditions142 !!----------------------------------------------------------------------143 CONTAINS144 SUBROUTINE bdy_dyn( kt ) ! Empty routine145 WRITE(*,*) 'bdy_dyn: You should not have seen this print! error?', kt146 END SUBROUTINE bdy_dyn147 #endif148 149 135 !!====================================================================== 150 136 END MODULE bdydyn -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90
r5930 r6862 7 7 !! 3.5 ! 2012 (S. Mocavero, I. Epicoco) Optimization of BDY communications 8 8 !! 3.5 ! 2013-07 (J. Chanut) Compliant with time splitting changes 9 !!----------------------------------------------------------------------10 #if defined key_bdy11 !!----------------------------------------------------------------------12 !! 'key_bdy' : Unstructured Open Boundary Condition13 9 !!---------------------------------------------------------------------- 14 10 !! bdy_dyn2d : Apply open boundary conditions to barotropic variables. … … 310 306 END SUBROUTINE bdy_ssh 311 307 312 #else313 !!----------------------------------------------------------------------314 !! Dummy module NO Unstruct Open Boundary Conditions315 !!----------------------------------------------------------------------316 CONTAINS317 SUBROUTINE bdy_dyn2d( kt ) ! Empty routine318 INTEGER, intent(in) :: kt319 WRITE(*,*) 'bdy_dyn2d: You should not have seen this print! error?', kt320 END SUBROUTINE bdy_dyn2d321 322 #endif323 324 308 !!====================================================================== 325 309 END MODULE bdydyn2d -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90
r6140 r6862 6 6 !! History : 3.4 ! 2011 (D. Storkey) new module as part of BDY rewrite 7 7 !! 3.5 ! 2012 (S. Mocavero, I. Epicoco) Optimization of BDY communications 8 !!----------------------------------------------------------------------9 #if defined key_bdy10 !!----------------------------------------------------------------------11 !! 'key_bdy' : Unstructured Open Boundary Condition12 8 !!---------------------------------------------------------------------- 13 9 !! bdy_dyn3d : apply open boundary conditions to baroclinic velocities … … 296 292 END SUBROUTINE bdy_dyn3d_dmp 297 293 298 #else299 !!----------------------------------------------------------------------300 !! Dummy module NO Unstruct Open Boundary Conditions301 !!----------------------------------------------------------------------302 CONTAINS303 SUBROUTINE bdy_dyn3d( kt ) ! Empty routine304 WRITE(*,*) 'bdy_dyn3d: You should not have seen this print! error?', kt305 END SUBROUTINE bdy_dyn3d306 SUBROUTINE bdy_dyn3d_dmp( kt ) ! Empty routine307 WRITE(*,*) 'bdy_dyn3d_dmp: You should not have seen this print! error?', kt308 END SUBROUTINE bdy_dyn3d_dmp309 #endif310 311 294 !!====================================================================== 312 295 END MODULE bdydyn3d -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim.F90
r5836 r6862 8 8 !! - ! 2012-01 (C. Rousset) add lim3 and remove useless jk loop 9 9 !!---------------------------------------------------------------------- 10 #if defined key_bdy && ( defined key_lim2 || defined key_lim3 ) 11 !!---------------------------------------------------------------------- 12 !! 'key_bdy' and Unstructured Open Boundary Conditions 10 #if defined key_lim2 || defined key_lim3 11 !!---------------------------------------------------------------------- 13 12 !! 'key_lim2' LIM-2 sea ice model 14 13 !! 'key_lim3' LIM-3 sea ice model -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
r6140 r6862 13 13 !! 3.4 ! 2012 (J. Chanut) straight open boundary case update 14 14 !! 3.5 ! 2012 (S. Mocavero, I. Epicoco) optimization of BDY communications 15 !!---------------------------------------------------------------------- 16 #if defined key_bdy 17 !!---------------------------------------------------------------------- 18 !! 'key_bdy' Unstructured Open Boundary Conditions 15 !! 3.7 ! 2016 (T. Lovato) Remove bdy macro, call here init for dta and tides 19 16 !!---------------------------------------------------------------------- 20 17 !! bdy_init : Initialization of unstructured open boundaries … … 23 20 USE dom_oce ! ocean space and time domain 24 21 USE bdy_oce ! unstructured open boundary conditions 22 USE bdydta ! open boundary cond. setting (bdy_dta_init routine) 23 USE bdytides ! open boundary cond. setting (bdytide_init routine) 25 24 USE sbctide , ONLY: lk_tide ! Tidal forcing or not 26 25 USE phycst , ONLY: rday … … 94 93 INTEGER :: nbdyind, nbdybeg, nbdyend 95 94 !! 96 NAMELIST/nambdy/ nb_bdy, ln_coords_file, cn_coords_file,&95 NAMELIST/nambdy/ ln_bdy, nb_bdy, ln_coords_file, cn_coords_file, & 97 96 & ln_mask_file, cn_mask_file, cn_dyn2d, nn_dyn2d_dta, & 98 97 & cn_dyn3d, nn_dyn3d_dta, cn_tra, nn_tra_dta, & 99 98 & ln_tra_dmp, ln_dyn3d_dmp, rn_time_dmp, rn_time_dmp_out, & 100 & cn_ice_lim, nn_ice_lim_dta, &101 & rn_ice_tem, rn_ice_sal, rn_ice_age, &99 & cn_ice_lim, nn_ice_lim_dta, & 100 & rn_ice_tem, rn_ice_sal, rn_ice_age, & 102 101 & ln_vol, nn_volctl, nn_rimwidth 103 102 ! … … 108 107 IF( nn_timing == 1 ) CALL timing_start('bdy_init') 109 108 ! 110 IF(lwp) WRITE(numout,*)111 IF(lwp) WRITE(numout,*) 'bdy_init : initialization of open boundaries'112 IF(lwp) WRITE(numout,*) '~~~~~~~~'113 !114 IF( jperio /= 0 ) CALL ctl_stop( 'Cyclic or symmetric,', &115 & ' and general open boundary condition are not compatible' )116 117 109 cgrid = (/'t','u','v'/) 118 110 … … 133 125 ! ----------------------------------------- 134 126 ! ! control prints 135 IF(lwp) WRITE(numout,*) ' nambdy' 127 IF ( ln_bdy ) THEN 128 IF(lwp) WRITE(numout,*) 129 IF(lwp) WRITE(numout,*) 'bdy_init : initialization of open boundaries' 130 IF(lwp) WRITE(numout,*) '~~~~~~~~' 131 ELSE 132 IF(lwp) WRITE(numout,*) 133 IF(lwp) WRITE(numout,*) 'bdy_init : open boundaries not used (ln_bdy = F)' 134 IF(lwp) WRITE(numout,*) '~~~~~~~~' 135 IF( nn_timing == 1 ) CALL timing_stop('bdy_init') 136 return 137 ENDIF 138 139 IF( jperio /= 0 ) CALL ctl_stop( 'bdy_init: Cyclic or symmetric,', & 140 & ' and general open boundary condition are not compatible' ) 136 141 137 142 IF( nb_bdy == 0 ) THEN … … 1300 1305 CALL wrk_dealloc(jpi,jpj, zfmask ) 1301 1306 ! 1307 ! Open boundaries initialisation of external data arrays 1308 CALL bdy_dta_init 1309 ! 1310 ! Open boundaries initialisation of tidal harmonic forcing 1311 IF( lk_tide ) CALL bdytide_init 1312 1313 ! 1302 1314 IF( nn_timing == 1 ) CALL timing_stop('bdy_init') 1303 1315 ! … … 1713 1725 END SUBROUTINE bdy_ctl_corn 1714 1726 1715 #else1716 !!---------------------------------------------------------------------------------1717 !! Dummy module NO open boundaries1718 !!---------------------------------------------------------------------------------1719 CONTAINS1720 SUBROUTINE bdy_init ! Dummy routine1721 END SUBROUTINE bdy_init1722 #endif1723 1724 1727 !!================================================================================= 1725 1728 END MODULE bdyini -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdylib.F90
r6140 r6862 6 6 !! History : 3.6 ! 2013 (D. Storkey) original code 7 7 !!---------------------------------------------------------------------- 8 #if defined key_bdy9 !!----------------------------------------------------------------------10 !! 'key_bdy' : Unstructured Open Boundary Condition11 8 !!---------------------------------------------------------------------- 12 9 !! bdy_orlanski_2d … … 355 352 END SUBROUTINE bdy_orlanski_3d 356 353 357 358 #else359 !!----------------------------------------------------------------------360 !! Dummy module NO Unstruct Open Boundary Conditions361 !!----------------------------------------------------------------------362 CONTAINS363 SUBROUTINE bdy_orlanski_2d( idx, igrd, phib, phia, phi_ext ) ! Empty routine364 WRITE(*,*) 'bdy_orlanski_2d: You should not have seen this print! error?', kt365 END SUBROUTINE bdy_orlanski_2d366 SUBROUTINE bdy_orlanski_3d( idx, igrd, phib, phia, phi_ext ) ! Empty routine367 WRITE(*,*) 'bdy_orlanski_3d: You should not have seen this print! error?', kt368 END SUBROUTINE bdy_orlanski_3d369 #endif370 371 354 !!====================================================================== 372 355 END MODULE bdylib -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
r6140 r6862 11 11 !! 3.5 ! 2013-07 (J. Chanut) Compliant with time splitting changes 12 12 !!---------------------------------------------------------------------- 13 #if defined key_bdy14 !!----------------------------------------------------------------------15 !! 'key_bdy' Open Boundary Condition16 !!----------------------------------------------------------------------17 13 !! bdytide_init : read of namelist and initialisation of tidal harmonics data 18 14 !! tide_update : calculation of tidal forcing at each timestep … … 21 17 USE dom_oce ! ocean space and time domain 22 18 USE phycst ! physical constants 23 USE bdy_par ! Unstructured boundary parameters24 19 USE bdy_oce ! ocean open boundary conditions 25 20 USE tideini ! … … 598 593 END SUBROUTINE tide_init_velocities 599 594 600 #else601 !!----------------------------------------------------------------------602 !! Dummy module NO Unstruct Open Boundary Conditions for tides603 !!----------------------------------------------------------------------604 CONTAINS605 SUBROUTINE bdytide_init ! Empty routine606 WRITE(*,*) 'bdytide_init: You should not have seen this print! error?'607 END SUBROUTINE bdytide_init608 SUBROUTINE bdytide_update( kt, jit ) ! Empty routine609 WRITE(*,*) 'bdytide_update: You should not have seen this print! error?', kt, jit610 END SUBROUTINE bdytide_update611 SUBROUTINE bdy_dta_tides( kt, kit, time_offset ) ! Empty routine612 INTEGER, INTENT( in ) :: kt ! Dummy argument empty routine613 INTEGER, INTENT( in ),OPTIONAL :: kit ! Dummy argument empty routine614 INTEGER, INTENT( in ),OPTIONAL :: time_offset ! Dummy argument empty routine615 WRITE(*,*) 'bdy_dta_tides: You should not have seen this print! error?', kt, jit616 END SUBROUTINE bdy_dta_tides617 #endif618 619 595 !!====================================================================== 620 596 END MODULE bdytides -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdytra.F90
r6140 r6862 8 8 !! 3.4 ! 2011 (D. Storkey) rewrite in preparation for OBC-BDY merge 9 9 !! 3.5 ! 2012 (S. Mocavero, I. Epicoco) Optimization of BDY communications 10 !!----------------------------------------------------------------------11 #if defined key_bdy12 !!----------------------------------------------------------------------13 !! 'key_bdy' Unstructured Open Boundary Conditions14 10 !!---------------------------------------------------------------------- 15 11 !! bdy_tra : Apply open boundary conditions to T and S … … 308 304 END SUBROUTINE bdy_tra_dmp 309 305 310 #else311 !!----------------------------------------------------------------------312 !! Dummy module NO Unstruct Open Boundary Conditions313 !!----------------------------------------------------------------------314 CONTAINS315 SUBROUTINE bdy_tra(kt) ! Empty routine316 WRITE(*,*) 'bdy_tra: You should not have seen this print! error?', kt317 END SUBROUTINE bdy_tra318 319 SUBROUTINE bdy_tra_dmp(kt) ! Empty routine320 WRITE(*,*) 'bdy_tra_dmp: You should not have seen this print! error?', kt321 END SUBROUTINE bdy_tra_dmp322 #endif323 324 306 !!====================================================================== 325 307 END MODULE bdytra -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
r6140 r6862 9 9 !! 3.0 ! 2008-04 (NEMO team) add in the reference version 10 10 !! 3.4 ! 2011 (D. Storkey) rewrite in preparation for OBC-BDY merge 11 !!----------------------------------------------------------------------12 #if defined key_bdy13 !!----------------------------------------------------------------------14 !! 'key_bdy' unstructured open boundary conditions15 11 !!---------------------------------------------------------------------- 16 12 USE oce ! ocean dynamics and tracers … … 175 171 END SUBROUTINE bdy_vol 176 172 177 #else178 !!----------------------------------------------------------------------179 !! Dummy module NO Unstruct Open Boundary Conditions180 !!----------------------------------------------------------------------181 CONTAINS182 SUBROUTINE bdy_vol( kt ) ! Empty routine183 WRITE(*,*) 'bdy_vol: You should not have seen this print! error?', kt184 END SUBROUTINE bdy_vol185 #endif186 187 173 !!====================================================================== 188 174 END MODULE bdyvol -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
r6140 r6862 23 23 USE trabbc ! bottom boundary condition 24 24 USE trabbc ! bottom boundary condition 25 USE bdy_par ! (for lk_bdy)26 25 USE restart ! ocean restart 26 USE bdy_oce , ONLY: ln_bdy 27 27 ! 28 28 USE iom ! I/O manager … … 399 399 surf_tot = glob_sum( surf(:,:) ) ! total ocean surface area 400 400 401 IF( l k_bdy ) CALL ctl_warn( 'dia_hsb does not take open boundary fluxes into account' )401 IF( ln_bdy ) CALL ctl_warn( 'dia_hsb does not take open boundary fluxes into account' ) 402 402 ! 403 403 ! ---------------------------------- ! -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
r6140 r6862 88 88 !! are defined with the proper value at lateral domain boundaries. 89 89 !! 90 !! In case of open boundaries (l k_bdy=T):90 !! In case of open boundaries (ln_bdy=T): 91 91 !! - tmask is set to 1 on the points to be computed bay the open 92 92 !! boundaries routines. -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
r6140 r6862 32 32 USE dynspg_ts ! surface pressure gradient: split-explicit scheme 33 33 USE domvvl ! variable volume 34 USE bdy_oce ! ocean open boundary conditions34 USE bdy_oce , ONLY: ln_bdy 35 35 USE bdydta ! ocean open boundary conditions 36 36 USE bdydyn ! ocean open boundary conditions … … 77 77 !! * Apply lateral boundary conditions on after velocity 78 78 !! at the local domain boundaries through lbc_lnk call, 79 !! at the one-way open boundaries (l k_bdy=T),79 !! at the one-way open boundaries (ln_bdy=T), 80 80 !! at the AGRIF zoom boundaries (lk_agrif=T) 81 81 !! … … 147 147 CALL lbc_lnk( va, 'V', -1. ) 148 148 ! 149 # if defined key_bdy150 149 ! !* BDY open boundaries 151 IF( l k_bdy .AND. ln_dynspg_exp ) CALL bdy_dyn( kt )152 IF( l k_bdy .AND. ln_dynspg_ts ) CALL bdy_dyn( kt, dyn3d_only=.true. )150 IF( ln_bdy .AND. ln_dynspg_exp ) CALL bdy_dyn( kt ) 151 IF( ln_bdy .AND. ln_dynspg_ts ) CALL bdy_dyn( kt, dyn3d_only=.true. ) 153 152 154 153 !!$ Do we need a call to bdy_vol here?? 155 !156 # endif157 154 ! 158 155 IF( l_trddyn ) THEN ! prepare the atf trend computation + some diagnostics -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r6152 r6862 33 33 USE dynvor ! vorticity term 34 34 USE wet_dry ! wetting/drying flux limter 35 USE bdy_ par ! for lk_bdy35 USE bdy_oce , ONLY: ln_bdy 36 36 USE bdytides ! open boundary condition data 37 37 USE bdydyn2d ! open boundary conditions on barotropic variables … … 608 608 ! Update only tidal forcing at open boundaries 609 609 #if defined key_tide 610 IF( l k_bdy .AND. lk_tide ) CALL bdy_dta_tides( kt, kit=jn, time_offset= noffset+1 )610 IF( ln_bdy .AND. lk_tide ) CALL bdy_dta_tides( kt, kit=jn, time_offset= noffset+1 ) 611 611 IF( ln_tide_pot .AND. lk_tide ) CALL upd_tide ( kt, kit=jn, time_offset= noffset ) 612 612 #endif … … 705 705 CALL lbc_lnk( ssha_e, 'T', 1._wp ) 706 706 707 #if defined key_bdy708 707 ! Duplicate sea level across open boundaries (this is only cosmetic if linssh=T) 709 IF( l k_bdy ) CALL bdy_ssh( ssha_e )710 #endif 708 IF( ln_bdy ) CALL bdy_ssh( ssha_e ) 709 711 710 #if defined key_agrif 712 711 IF( .NOT.Agrif_Root() ) CALL agrif_ssh_ts( jn ) … … 967 966 CALL lbc_lnk_multi( ua_e, 'U', -1._wp, va_e , 'V', -1._wp ) 968 967 ! 969 #if defined key_bdy970 968 ! ! open boundaries 971 IF( l k_bdy ) CALL bdy_dyn2d( jn, ua_e, va_e, un_e, vn_e, hur_e, hvr_e, ssha_e )972 #endif 969 IF( ln_bdy ) CALL bdy_dyn2d( jn, ua_e, va_e, un_e, vn_e, hur_e, hvr_e, ssha_e ) 970 973 971 #if defined key_agrif 974 972 IF( .NOT.Agrif_Root() ) CALL agrif_dyn_ts( jn ) ! Agrif -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
r6152 r6862 22 22 USE divhor ! horizontal divergence 23 23 USE phycst ! physical constants 24 USE bdy_oce ! 25 USE bdy_par ! 24 USE bdy_oce , ONLY: ln_bdy, bdytmask 26 25 USE bdydyn2d ! bdy_ssh routine 27 26 #if defined key_agrif … … 116 115 CALL agrif_ssh( kt ) 117 116 # endif 118 # if defined key_bdy 119 IF( lk_bdy ) THEN 117 IF( ln_bdy ) THEN 120 118 CALL lbc_lnk( ssha, 'T', 1. ) ! Not sure that's necessary 121 119 CALL bdy_ssh( ssha ) ! Duplicate sea level across open boundaries 122 120 ENDIF 123 # endif124 121 ENDIF 125 122 … … 211 208 ENDIF 212 209 213 #if defined key_bdy 214 IF( lk_bdy ) THEN 210 IF( ln_bdy ) THEN 215 211 DO jk = 1, jpkm1 216 212 wn(:,:,jk) = wn(:,:,jk) * bdytmask(:,:) 217 213 END DO 218 214 ENDIF 219 #endif220 215 ! 221 216 IF( nn_timing == 1 ) CALL timing_stop('wzv') -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
r6140 r6862 666 666 !! using a general mapping (for open boundaries) 667 667 !!---------------------------------------------------------------------- 668 #if defined key_bdy 669 USE bdy_oce, ONLY: dta_global, dta_global2 ! workspace to read in global data arrays 670 #endif 668 USE bdy_oce, ONLY: ln_bdy, dta_global, dta_global2 ! workspace to read in global data arrays 669 671 670 INTEGER , INTENT(in ) :: num ! stream number 672 671 CHARACTER(LEN=*) , INTENT(in ) :: clvar ! variable name … … 692 691 ilendta = iom_file(num)%dimsz(1,idvar) 693 692 694 #if defined key_bdy 695 ipj = iom_file(num)%dimsz(2,idvar)696 IF( map%ll_unstruc) THEN ! unstructured open boundary data file697 dta_read => dta_global698 ELSE ! structured open boundary data file699 dta_read => dta_global2700 ENDIF701 #endif 693 IF ( ln_bdy ) THEN 694 ipj = iom_file(num)%dimsz(2,idvar) 695 IF( map%ll_unstruc) THEN ! unstructured open boundary data file 696 dta_read => dta_global 697 ELSE ! structured open boundary data file 698 dta_read => dta_global2 699 ENDIF 700 ENDIF 702 701 703 702 IF(lwp) WRITE(numout,*) 'Dim size for ', TRIM(clvar),' is ', ilendta -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
r6416 r6862 62 62 USE timing ! Timing 63 63 64 #if defined key_bdy 65 USE bdyice_lim ! unstructured open boundary data (bdy_ice_lim routine) 66 #endif 64 USE bdy_oce , ONLY: ln_bdy 65 USE bdyice_lim ! unstructured open boundary data (bdy_ice_lim routine) 67 66 68 67 IMPLICIT NONE … … 166 165 IF( nn_monocat /= 2 ) CALL lim_itd_me ! Mechanical redistribution ! (ridging/rafting) 167 166 ! 168 #if defined key_bdy 169 CALL bdy_ice_lim( kt ) ! bdy ice thermo 170 IF( ln_icectl ) CALL lim_prt( kt, iiceprt, jiceprt, 1, ' - ice thermo bdy - ' ) 171 #endif 167 IF( ln_bdy ) CALL bdy_ice_lim( kt ) ! bdy ice thermo 168 IF( ln_bdy .AND. ln_icectl ) CALL lim_prt( kt, iiceprt, jiceprt, 1, ' - ice thermo bdy - ' ) 172 169 ! 173 170 CALL lim_update1( kt ) ! Corrections … … 380 377 r1_nlay_s = 1._wp / REAL( nlay_s, wp ) 381 378 ! 382 #if defined key_bdy 383 IF( lwp .AND. ln_limdiahsb ) CALL ctl_warn('online conservation check activated but it does not work with BDY') 384 #endif 379 IF( lwp .AND. ln_bdy .AND. ln_limdiahsb ) & 380 & CALL ctl_warn('online conservation check activated but it does not work with BDY') 385 381 ! 386 382 END SUBROUTINE ice_run -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
r6140 r6862 54 54 # endif 55 55 56 #if defined key_bdy 56 USE bdy_oce , ONLY: ln_bdy 57 57 USE bdyice_lim ! unstructured open boundary data (bdy_ice_lim routine) 58 #endif59 58 60 59 IMPLICIT NONE … … 230 229 CALL lim_trp_2 ( kt ) ! Ice transport ( Advection/diffusion ) 231 230 IF( ln_limdmp ) CALL lim_dmp_2 ( kt ) ! Ice damping 232 #if defined key_bdy 233 CALL bdy_ice_lim( kt ) ! bdy ice thermo 234 #endif 231 IF( ln_bdy ) CALL bdy_ice_lim( kt ) ! bdy ice thermo 235 232 END IF 236 233 ! ! Ice surface fluxes in coupled mode -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r6460 r6862 47 47 USE traqsr ! active tracers: light penetration 48 48 USE sbcwave ! Wave module 49 USE bdy_ par ! Require lk_bdy49 USE bdy_oce , ONLY: ln_bdy 50 50 ! 51 51 USE prtctl ! Print control (prt_ctl routine) -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
r6140 r6862 12 12 !!---------------------------------------------------------------------- 13 13 USE oce ! 14 USE sbc_oce 15 USE bdy_oce !14 USE sbc_oce ! Surface boundary condition: ocean fields 15 USE bdy_oce , ONLY: ln_bdy, bdytmask 16 16 USE domvvl ! 17 17 ! … … 19 19 USE in_out_manager ! I/O manager 20 20 USE lib_mpp ! distribued memory computing library 21 USE fldread 21 USE fldread ! read input fields 22 22 USE wrk_nemo ! 23 23 … … 32 32 INTEGER , PARAMETER :: jp_wn = 3 ! index of wave number (1/m) at T-point 33 33 34 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_cd 35 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_sd 34 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_cd ! structure of input fields (file informations, fields read) Drag Coefficient 35 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_sd ! structure of input fields (file informations, fields read) Stokes Drift 36 36 37 37 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION (:,:) :: cdn_wave … … 172 172 wsd3d(:,:,jk) = wsd3d(:,:,jk+1) - ze3hdiv(:,:,jk) 173 173 END DO 174 #if defined key_bdy 175 IF( l k_bdy ) THEN174 ! 175 IF( ln_bdy ) THEN 176 176 DO jk = 1, jpkm1 177 177 wsd3d(:,:,jk) = wsd3d(:,:,jk) * bdytmask(:,:) 178 178 END DO 179 179 ENDIF 180 #endif 180 ! 181 181 CALL wrk_dealloc( jpi,jpj,jpk, zusd_t, zvsd_t, ze3hdiv ) 182 182 ! -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r6140 r6862 37 37 USE ldftra ! lateral physics on tracers 38 38 USE ldfslp 39 USE bdy_oce ! BDY open boundary condition variables39 USE bdy_oce , ONLY: ln_bdy 40 40 USE bdytra ! open boundary condition (bdy_tra routine) 41 41 ! … … 79 79 !! - Apply lateral boundary conditions on (ta,sa) 80 80 !! at the local domain boundaries through lbc_lnk call, 81 !! at the one-way open boundaries (l k_bdy=T),81 !! at the one-way open boundaries (ln_bdy=T), 82 82 !! at the AGRIF zoom boundaries (lk_agrif=T) 83 83 !! … … 111 111 CALL lbc_lnk( tsa(:,:,:,jp_sal), 'T', 1._wp ) 112 112 ! 113 #if defined key_bdy 114 IF( lk_bdy ) CALL bdy_tra( kt ) ! BDY open boundaries 115 #endif 113 IF( ln_bdy ) CALL bdy_tra( kt ) ! BDY open boundaries 116 114 117 115 ! set time step size (Euler/Leapfrog) -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r6152 r6862 52 52 #endif 53 53 USE tideini ! tidal components initialization (tide_ini routine) 54 USE bdy_oce , ONLY: ln_bdy 54 55 USE bdyini ! open boundary cond. setting (bdy_init routine) 55 USE bdydta ! open boundary cond. setting (bdy_dta_init routine)56 USE bdytides ! open boundary cond. setting (bdytide_init routine)57 56 USE sbctide, ONLY : lk_tide 58 57 USE istate ! initial state setting (istate_init routine) … … 435 434 IF( lk_tide ) CALL tide_init ! tidal harmonics 436 435 CALL sbc_init ! surface boundary conditions (including sea-ice) 437 !!gm ==>> bdy_init should call bdy_dta_init and bdytide_init NOT in nemogcm !!! 438 IF( lk_bdy ) CALL bdy_init ! Open boundaries initialisation 439 IF( lk_bdy ) CALL bdy_dta_init ! Open boundaries initialisation of external data arrays 440 IF( lk_bdy .AND. lk_tide ) & 441 & CALL bdytide_init ! Open boundaries initialisation of tidal harmonic forcing 442 436 CALL bdy_init ! Open boundaries initialisation 443 437 ! ! Ocean physics 444 438 ! ! Vertical physics … … 659 653 USE diadct , ONLY: diadct_alloc 660 654 #endif 661 #if defined key_bdy662 655 USE bdy_oce , ONLY: bdy_oce_alloc 663 #endif664 656 ! 665 657 INTEGER :: ierr … … 676 668 ierr = ierr + diadct_alloc () ! 677 669 #endif 678 #if defined key_bdy679 670 ierr = ierr + bdy_oce_alloc () ! bdy masks (incl. initialization) 680 #endif681 671 ! 682 672 IF( lk_mpp ) CALL mpp_sum( ierr ) -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/step.F90
r6464 r6862 106 106 IF( lk_tide ) CALL sbc_tide( kstp ) ! update tide potential 107 107 IF( ln_apr_dyn ) CALL sbc_apr ( kstp ) ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib) 108 IF( l k_bdy ) CALL bdy_dta ( kstp, time_offset=+1 ) ! update dynamic & tracer data at open boundaries108 IF( ln_bdy ) CALL bdy_dta ( kstp, time_offset=+1 ) ! update dynamic & tracer data at open boundaries 109 109 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 110 110 … … 200 200 IF( lk_asminc .AND. ln_asmiau .AND. ln_dyninc ) & 201 201 & CALL dyn_asm_inc ( kstp ) ! apply dynamics assimilation increment 202 IF( l k_bdy ) CALL bdy_dyn3d_dmp ( kstp ) ! bdy damping trends202 IF( ln_bdy ) CALL bdy_dyn3d_dmp ( kstp ) ! bdy damping trends 203 203 #if defined key_agrif 204 204 IF(.NOT. Agrif_Root()) & … … 259 259 IF( lk_trabbl ) CALL tra_bbl ( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme 260 260 IF( ln_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends 261 IF( l k_bdy ) CALL bdy_tra_dmp ( kstp ) ! bdy damping trends261 IF( ln_bdy ) CALL bdy_tra_dmp ( kstp ) ! bdy damping trends 262 262 #if defined key_agrif 263 263 IF(.NOT. Agrif_Root()) & -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
r6140 r6862 47 47 USE stopts 48 48 49 USE bdy_par ! for lk_bdy 50 USE bdy_oce ! for dmp logical 49 USE bdy_oce , ONLY: ln_bdy 51 50 USE bdydta ! open boundary condition data (bdy_dta routine) 52 51 USE bdytra ! bdy cond. for tracers (bdy_tra routine) -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r6165 r6862 59 59 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 60 60 USE icbstp ! handle bergs, calving, themodynamics and transport 61 #if defined key_bdy62 61 USE bdyini ! open boundary cond. setting (bdy_init routine). clem: mandatory for LIM3 63 USE bdydta ! open boundary cond. setting (bdy_dta_init routine). clem: mandatory for LIM364 #endif65 USE bdy_par66 62 67 63 IMPLICIT NONE … … 363 359 ! the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules. 364 360 ! This is not clean and should be changed in the future. 365 IF( lk_bdy ) CALL bdy_init 366 IF( lk_bdy ) CALL bdy_dta_init 361 CALL bdy_init 367 362 ! ==> 368 363 … … 514 509 USE diawri , ONLY: dia_wri_alloc 515 510 USE dom_oce , ONLY: dom_oce_alloc 516 #if defined key_bdy 517 USE bdy_oce , ONLY: bdy_oce_alloc 511 USE bdy_oce , ONLY: ln_bdy, bdy_oce_alloc 518 512 USE oce ! clem: mandatory for LIM3 because needed for bdy arrays 519 #else520 USE oce , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass521 #endif522 513 ! 523 514 INTEGER :: ierr,ierr1,ierr2,ierr3,ierr4,ierr5,ierr6,ierr7,ierr8 … … 527 518 ierr = dia_wri_alloc () 528 519 ierr = ierr + dom_oce_alloc () ! ocean domain 529 #if defined key_bdy530 520 ierr = ierr + bdy_oce_alloc () ! bdy masks (incl. initialization) 531 ierr = ierr + oce_alloc () ! (tsn...) 532 #endif 533 534 #if ! defined key_bdy 535 ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), & 536 & snwice_fmass(jpi,jpj) , STAT= ierr1 ) 537 ! 538 ! lim code currently uses surface temperature and salinity in tsn array for initialisation 539 ! and ub, vb arrays in ice dynamics, so allocate enough of arrays to use 540 ! clem: should not be needed. To be checked out 541 jpm = MAX(jp_tem, jp_sal) 542 ALLOCATE( tsn(jpi,jpj,1,jpm) , STAT=ierr2 ) 543 ALLOCATE( ub(jpi,jpj,1) , STAT=ierr3 ) 544 ALLOCATE( vb(jpi,jpj,1) , STAT=ierr4 ) 545 ALLOCATE( tsb(jpi,jpj,1,jpm) , STAT=ierr5 ) 546 ALLOCATE( sshn(jpi,jpj) , STAT=ierr6 ) 547 ALLOCATE( un(jpi,jpj,1) , STAT=ierr7 ) 548 ALLOCATE( vn(jpi,jpj,1) , STAT=ierr8 ) 549 ierr = ierr + ierr1 + ierr2 + ierr3 + ierr4 + ierr5 + ierr6 + ierr7 + ierr8 521 # if ! defined key_lim2 && ! defined key_lim3 522 ierr = ierr + oce_alloc () ! (tsn...) 523 # else 524 ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), & 525 & snwice_fmass(jpi,jpj) , STAT= ierr1 ) 526 ! 527 ! lim code currently uses surface temperature and salinity in tsn array for initialisation 528 ! and ub, vb arrays in ice dynamics, so allocate enough of arrays to use 529 ! clem: should not be needed. To be checked out 530 jpm = MAX(jp_tem, jp_sal) 531 ALLOCATE( tsn(jpi,jpj,1,jpm) , STAT=ierr2 ) 532 ALLOCATE( ub(jpi,jpj,1) , STAT=ierr3 ) 533 ALLOCATE( vb(jpi,jpj,1) , STAT=ierr4 ) 534 ALLOCATE( tsb(jpi,jpj,1,jpm) , STAT=ierr5 ) 535 ALLOCATE( sshn(jpi,jpj) , STAT=ierr6 ) 536 ALLOCATE( un(jpi,jpj,1) , STAT=ierr7 ) 537 ALLOCATE( vn(jpi,jpj,1) , STAT=ierr8 ) 538 ierr = ierr + ierr1 + ierr2 + ierr3 + ierr4 + ierr5 + ierr6 + ierr7 + ierr8 550 539 #endif 551 540 ! -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/SAS_SRC/step.F90
r6140 r6862 23 23 USE eosbn2 ! equation of state (eos_bn2 routine) 24 24 USE diawri ! Standard run outputs (dia_wri routine) 25 USE bdy_par ! clem: mandatory for LIM3 26 #if defined key_bdy 25 USE bdy_oce , ONLY: ln_bdy 27 26 USE bdydta ! clem: mandatory for LIM3 28 #endif29 27 USE stpctl ! time stepping control (stp_ctl routine) 30 28 ! … … 82 80 ! From SAS: ocean bdy data are wrong (but we do not care) and ice bdy data are OK. 83 81 ! This is not clean and should be changed in the future. 84 #if defined key_bdy 85 IF( lk_bdy ) CALL bdy_dta ( kstp, time_offset=+1 ) ! update dynamic & tracer data at open boundaries 86 #endif 82 IF( ln_bdy ) CALL bdy_dta ( kstp, time_offset=+1 ) ! update dynamic & tracer data at open boundaries 87 83 ! ==> 88 84 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
r6140 r6862 33 33 USE trdtra 34 34 USE tranxt 35 USE bdy_oce , ONLY: ln_bdy 35 36 USE trcbdy ! BDY open boundaries 36 USE bdy_par, only: lk_bdy37 37 # if defined key_agrif 38 38 USE agrif_top_interp … … 99 99 END DO 100 100 101 IF( l k_bdy ) CALL trc_bdy( kt )101 IF( ln_bdy ) CALL trc_bdy( kt ) 102 102 103 103 ! ! set time step size (Euler/Leapfrog) -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
r6309 r6862 25 25 USE trcsbc ! surface boundary condition (trc_sbc routine) 26 26 USE zpshde ! partial step: hor. derivative (zps_hde routine) 27 USE bdy_oce , ONLY: ln_bdy 27 28 USE trcbdy ! BDY open boundaries 28 USE bdy_par, only: lk_bdy29 29 30 30 #if defined key_agrif … … 65 65 IF( lk_trabbl ) CALL trc_bbl ( kt ) ! advective (and/or diffusive) bottom boundary layer scheme 66 66 IF( ln_trcdmp ) CALL trc_dmp ( kt ) ! internal damping trends 67 IF( l k_bdy ) CALL trc_bdy_dmp( kt ) ! BDY damping trends67 IF( ln_bdy ) CALL trc_bdy_dmp( kt ) ! BDY damping trends 68 68 CALL trc_adv ( kt ) ! horizontal & vertical advection 69 69 ! ! Partial top/bottom cell: GRADh( trb ) -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/TOP_SRC/trc.F90
r6140 r6862 14 14 USE par_oce 15 15 USE par_trc 16 #if defined key_bdy 17 USE bdy_oce, only: nb_bdy, OBC_DATA 18 #endif 16 USE bdy_oce, only: ln_bdy, nb_bdy, OBC_DATA 19 17 20 18 IMPLICIT NONE … … 189 187 # endif 190 188 ! 191 #if defined key_bdy192 189 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc_dflt ! Default OBC condition for all tracers 193 190 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc ! Choice of boundary condition for tracers … … 195 192 ! External data structure of BDY for TOP. Available elements: cn_obc, ll_trc, trcnow, dmp 196 193 TYPE(OBC_DATA), PUBLIC, ALLOCATABLE, DIMENSION(:,:), TARGET :: trcdta_bdy !: bdy external data (local process) 197 #endif198 194 ! 199 195 … … 210 206 !!------------------------------------------------------------------- 211 207 USE lib_mpp, ONLY: ctl_warn 208 INTEGER :: ierr(2) 212 209 !!------------------------------------------------------------------- 213 210 ! 211 ierr(:) = 0 214 212 ALLOCATE( trn(jpi,jpj,jpk,jptra), trb(jpi,jpj,jpk,jptra), tra(jpi,jpj,jpk,jptra), & 215 213 & trc_i(jpi,jpj,jptra) , trc_o(jpi,jpj,jptra) , & … … 223 221 & ln_trc_sbc(jptra) , ln_trc_cbc(jptra) , ln_trc_obc(jptra) , & 224 222 #endif 225 #if defined key_bdy 226 & cn_trc_dflt(nb_bdy) , cn_trc(nb_bdy) , nn_trcdmp_bdy(nb_bdy) , & 223 & STAT = ierr(1) ) 224 225 IF ( ln_bdy ) THEN 226 ALLOCATE( cn_trc_dflt(nb_bdy) , cn_trc(nb_bdy) , nn_trcdmp_bdy(nb_bdy) , & 227 227 & trcdta_bdy(jptra,nb_bdy) , & 228 #endif 229 & STAT = trc_alloc ) 228 & STAT = ierr(2) ) 229 ENDIF 230 ! 231 trc_alloc = MAXVAL( ierr ) 230 232 231 233 IF( trc_alloc /= 0 ) CALL ctl_warn('trc_alloc: failed to allocate arrays') -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/TOP_SRC/trcbc.F90
r6140 r6862 19 19 USE lib_mpp ! MPP library 20 20 USE fldread ! read input fields 21 #if defined key_bdy 22 USE bdy_oce, only: nb_bdy , idx_bdy, ln_coords_file, rn_time_dmp, rn_time_dmp_out 23 #endif 21 USE bdy_oce, ONLY: ln_bdy, nb_bdy , idx_bdy, ln_coords_file, rn_time_dmp, rn_time_dmp_out 24 22 25 23 IMPLICIT NONE … … 78 76 !! 79 77 NAMELIST/namtrc_bc/ cn_dir_sbc, cn_dir_cbc, cn_dir_obc, sn_trcobc, rn_trofac, sn_trcsbc, rn_trsfac, sn_trccbc, rn_trcfac 80 #if defined key_bdy81 78 NAMELIST/namtrc_bdy/ cn_trc_dflt, cn_trc, nn_trcdmp_bdy 82 #endif 79 83 80 !!---------------------------------------------------------------------- 84 81 IF( nn_timing == 1 ) CALL timing_start('trc_bc_init') … … 128 125 IF(lwm) WRITE ( numont, namtrc_bc ) 129 126 130 #if defined key_bdy 131 REWIND( numnat_ref ) ! Namelist namtrc_bc in reference namelist : Passive tracer data structure 132 READ ( numnat_ref, namtrc_bdy, IOSTAT = ios, ERR = 903) 133 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_bdy in reference namelist', lwp ) 134 135 REWIND( numnat_cfg ) ! Namelist namtrc_bc in configuration namelist : Passive tracer data structure 136 READ ( numnat_cfg, namtrc_bdy, IOSTAT = ios, ERR = 904 ) 137 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_bdy in configuration namelist', lwp ) 138 IF(lwm) WRITE ( numont, namtrc_bdy ) 139 ! setup up preliminary informations for BDY structure 140 DO jn = 1, ntrc 141 DO ib = 1, nb_bdy 142 ! Set type of obc in BDY data structure (around here we may plug user override of obc type from nml) 143 IF ( ln_trc_obc(jn) ) THEN 144 trcdta_bdy(jn,ib)%cn_obc = TRIM( cn_trc(ib) ) 145 ELSE 146 trcdta_bdy(jn,ib)%cn_obc = TRIM( cn_trc_dflt(ib) ) 147 ENDIF 148 ! set damping use in BDY data structure 149 trcdta_bdy(jn,ib)%dmp = .false. 150 IF(nn_trcdmp_bdy(ib) .EQ. 1 .AND. ln_trc_obc(jn) ) trcdta_bdy(jn,ib)%dmp = .true. 151 IF(nn_trcdmp_bdy(ib) .EQ. 2 ) trcdta_bdy(jn,ib)%dmp = .true. 152 IF(trcdta_bdy(jn,ib)%cn_obc == 'frs' .AND. nn_trcdmp_bdy(ib) .NE. 0 ) & 153 & CALL ctl_stop( 'Use FRS OR relaxation' ) 154 IF (nn_trcdmp_bdy(ib) .LT. 0 .OR. nn_trcdmp_bdy(ib) .GT. 2) & 155 & CALL ctl_stop( 'Not a valid option for nn_trcdmp_bdy. Allowed: 0,1,2.' ) 127 IF ( ln_bdy ) THEN 128 REWIND( numnat_ref ) ! Namelist namtrc_bdy in reference namelist : Passive tracer data structure 129 READ ( numnat_ref, namtrc_bdy, IOSTAT = ios, ERR = 903) 130 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_bdy in reference namelist', lwp ) 131 132 REWIND( numnat_cfg ) ! Namelist namtrc_bdy in configuration namelist : Passive tracer data structure 133 READ ( numnat_cfg, namtrc_bdy, IOSTAT = ios, ERR = 904 ) 134 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_bdy in configuration namelist', lwp ) 135 IF(lwm) WRITE ( numont, namtrc_bdy ) 136 137 ! setup up preliminary informations for BDY structure 138 DO jn = 1, ntrc 139 DO ib = 1, nb_bdy 140 ! Set type of obc in BDY data structure (around here we may plug user override of obc type from nml) 141 IF ( ln_trc_obc(jn) ) THEN 142 trcdta_bdy(jn,ib)%cn_obc = TRIM( cn_trc(ib) ) 143 ELSE 144 trcdta_bdy(jn,ib)%cn_obc = TRIM( cn_trc_dflt(ib) ) 145 ENDIF 146 ! set damping use in BDY data structure 147 trcdta_bdy(jn,ib)%dmp = .false. 148 IF(nn_trcdmp_bdy(ib) .EQ. 1 .AND. ln_trc_obc(jn) ) trcdta_bdy(jn,ib)%dmp = .true. 149 IF(nn_trcdmp_bdy(ib) .EQ. 2 ) trcdta_bdy(jn,ib)%dmp = .true. 150 IF(trcdta_bdy(jn,ib)%cn_obc == 'frs' .AND. nn_trcdmp_bdy(ib) .NE. 0 ) & 151 & CALL ctl_stop( 'Use FRS OR relaxation' ) 152 IF (nn_trcdmp_bdy(ib) .LT. 0 .OR. nn_trcdmp_bdy(ib) .GT. 2) & 153 & CALL ctl_stop( 'Not a valid option for nn_trcdmp_bdy. Allowed: 0,1,2.' ) 154 ENDDO 156 155 ENDDO 157 ENDDO 158 159 #else 160 ! Force all tracers OBC to false if bdy not used 161 ln_trc_obc = .false. 162 #endif 156 ELSE 157 ! Force all tracers OBC to false if bdy not used 158 ln_trc_obc = .false. 159 ENDIF 160 163 161 ! compose BC data indexes 164 162 DO jn = 1, ntrc … … 198 196 WRITE(numout,*) ' ' 199 197 WRITE(numout,'(a,i3)') ' Total tracers to be initialized with OPEN BCs data:', nb_trcobc 200 #if defined key_bdy 201 IF ( nb_trcobc > 0 ) THEN198 199 IF ( ln_bdy .AND. nb_trcobc > 0 ) THEN 202 200 WRITE(numout,*) ' #trc NAME Boundary Mult.Fact. OBC Settings' 203 201 DO jn = 1, ntrc … … 217 215 ENDDO 218 216 ENDIF 219 #endif 217 220 218 WRITE(numout,'(2a)') ' OPEN BC data repository : ', TRIM(cn_dir_obc) 221 219 ENDIF … … 225 223 226 224 ! 227 #if defined key_bdy228 225 ! OPEN Lateral boundary conditions 229 IF( nb_trcobc > 0 ) THEN226 IF( ln_bdy .AND. nb_trcobc > 0 ) THEN 230 227 ALLOCATE ( sf_trcobc(nb_trcobc), rf_trofac(nb_trcobc), nbmap_ptr(nb_trcobc), STAT=ierr1 ) 231 228 IF( ierr1 > 0 ) THEN … … 272 269 CALL fld_fill( sf_trcobc, slf_i, cn_dir_obc, 'trc_bc_init', 'Passive tracer OBC data', 'namtrc_bc' ) 273 270 ENDIF 274 #endif 271 275 272 ! SURFACE Boundary conditions 276 273 IF( nb_trcsbc > 0 ) THEN ! allocate only if the number of tracer to initialise is greater than zero -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/TOP_SRC/trcbdy.F90
r6140 r6862 10 10 !! 3.6 ! 2015 (T. Lovato) Adapt BDY for tracers in TOP component 11 11 !!---------------------------------------------------------------------- 12 #if defined key_bdy && key_top 13 !!---------------------------------------------------------------------- 14 !! 'key_bdy' Unstructured Open Boundary Conditions 12 #if defined key_top 15 13 !!---------------------------------------------------------------------- 16 14 !! trc_bdy : Apply open boundary conditions to T and S … … 24 22 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 25 23 USE in_out_manager ! I/O manager 26 USE bdy_oce, only: idx_bdy, OBC_INDEX, BDYTMASK, l k_bdy ! ocean open boundary conditions24 USE bdy_oce, only: idx_bdy, OBC_INDEX, BDYTMASK, ln_bdy ! ocean open boundary conditions 27 25 28 26 IMPLICIT NONE -
branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
r6140 r6862 20 20 #endif 21 21 #if defined key_zdfgls 22 USE zdfgls , ONLY: en22 USE zdfgls , ONLY: en 23 23 #endif 24 24 USE trabbl … … 26 26 USE domvvl 27 27 USE divhor ! horizontal divergence (div_hor routine) 28 USE sbcrnf , ONLY: h_rnf, nk_rnf ! River runoff29 USE bdy_oce 28 USE sbcrnf , ONLY: h_rnf, nk_rnf ! River runoff 29 USE bdy_oce , ONLY: ln_bdy, bdytmask ! BDY 30 30 #if defined key_agrif 31 31 USE agrif_opa_update … … 505 505 CALL agrif_ssh( kt ) 506 506 #endif 507 #if defined key_bdy 508 ssha(:,:) = ssha(:,:) * bdytmask(:,:)509 CALL lbc_lnk( ssha, 'T', 1. )510 #endif 507 IF( ln_bdy ) THEN 508 ssha(:,:) = ssha(:,:) * bdytmask(:,:) 509 CALL lbc_lnk( ssha, 'T', 1. ) 510 ENDIF 511 511 #endif 512 512 ! … … 520 520 & - ( e3t_a(:,:,jk) - e3t_b(:,:,jk) ) & 521 521 & * tmask(:,:,jk) * z1_2dt 522 #if defined key_bdy 523 wn(:,:,jk) = wn(:,:,jk) * bdytmask(:,:) 524 #endif 522 IF( ln_bdy ) wn(:,:,jk) = wn(:,:,jk) * bdytmask(:,:) 525 523 END DO 526 524 !
Note: See TracChangeset
for help on using the changeset viewer.