New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 3191 for branches/2011/dev_NEMO_MERGE_2011/NEMOGCM – NEMO

Ignore:
Timestamp:
2011-12-05T10:41:41+01:00 (12 years ago)
Author:
davestorkey
Message:
  1. Bug fix for BDY and fldread.F90.
  2. Update history comments for BDY.
  3. Remove redundant namelist variables in BDY.
Location:
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90

    r3116 r3191  
    77   !!            3.0  !  2008-04  (NEMO team)  add in the reference version      
    88   !!            3.3  !  2010-09  (D. Storkey) add ice boundary conditions 
    9    !!            3.4  !  2011     (D. Storkey, J. Chanut) OBC-BDY merge 
     9   !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge 
    1010   !!---------------------------------------------------------------------- 
    1111#if defined key_bdy  
     
    7979#endif 
    8080   ! 
    81    INTEGER, DIMENSION(jp_bdy) ::   nn_dmp2d_in              ! Damping timescale (days) for 2D solution for inward radiation or FRS  
    82    INTEGER, DIMENSION(jp_bdy) ::   nn_dmp2d_out             ! Damping timescale (days) for 2D solution for outward radiation  
    83    INTEGER, DIMENSION(jp_bdy) ::   nn_dmp3d_in              ! Damping timescale (days) for 3D solution for inward radiation or FRS  
    84    INTEGER, DIMENSION(jp_bdy) ::   nn_dmp3d_out             ! Damping timescale (days) for 3D solution for outward radiation 
    85  
    8681    
    8782   !!---------------------------------------------------------------------- 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_par.F90

    r3116 r3191  
    77   !!            3.0  !  2008-04  (NEMO team)  add in the reference version 
    88   !!            3.3  !  2010-09  (D. Storkey and E. O'Dea) update for Shelf configurations 
     9   !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge 
    910   !!---------------------------------------------------------------------- 
    1011#if defined   key_bdy 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90

    r3186 r3191  
    1010   !!            3.3  !  2010-09  (E.O'Dea) modifications for Shelf configurations  
    1111   !!            3.3  !  2010-09  (D.Storkey) add ice boundary conditions 
    12    !!            3.4  ???????????????? 
     12   !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge 
    1313   !!---------------------------------------------------------------------- 
    1414#if defined key_bdy 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90

    r3186 r3191  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  bdydyn  *** 
    4    !! Unstructured Open Boundary Cond. :   Flow relaxation scheme on velocities 
     4   !! Unstructured Open Boundary Cond. :   Apply boundary conditions to velocities 
    55   !!====================================================================== 
    66   !! History :  1.0  !  2005-02  (J. Chanut, A. Sellar)  Original code 
     
    1010   !!            3.3  !  2010-09  (E.O'Dea) modifications for Shelf configurations  
    1111   !!            3.3  !  2010-09  (D.Storkey) add ice boundary conditions 
     12   !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge 
    1213   !!---------------------------------------------------------------------- 
    1314#if defined key_bdy  
     
    1516   !!   'key_bdy' :                    Unstructured Open Boundary Condition 
    1617   !!---------------------------------------------------------------------- 
    17    !!   bdy_dyn3d        : apply open boundary conditions to baroclinic velocities 
    18    !!   bdy_dyn3d_frs    : apply Flow Relaxation Scheme 
     18   !!   bdy_dyn        : split velocities into barotropic and baroclinic parts 
     19   !!                    and call bdy_dyn2d and bdy_dyn3d to apply boundary 
     20   !!                    conditions 
    1921   !!---------------------------------------------------------------------- 
    2022   USE wrk_nemo        ! Memory Allocation 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90

    r3182 r3191  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  bdydyn  *** 
    4    !! Unstructured Open Boundary Cond. :   Flow relaxation scheme on velocities 
     4   !! Unstructured Open Boundary Cond. :   Apply boundary conditions to barotropic solution 
    55   !!====================================================================== 
    6    !! History :  1.0  !  2005-02  (J. Chanut, A. Sellar)  Original code 
    7    !!             -   !  2007-07  (D. Storkey) Move Flather implementation to separate routine. 
    8    !!            3.0  !  2008-04  (NEMO team)  add in the reference version 
    9    !!            3.2  !  2008-04  (R. Benshila) consider velocity instead of transport  
    10    !!            3.3  !  2010-09  (E.O'Dea) modifications for Shelf configurations  
    11    !!            3.3  !  2010-09  (D.Storkey) add ice boundary conditions 
     6   !! History :  3.4  !  2011     (D. Storkey) new module as part of BDY rewrite 
    127   !!---------------------------------------------------------------------- 
    138#if defined key_bdy  
     
    3025   PRIVATE 
    3126 
    32    PUBLIC   bdy_dyn2d     ! routine called in dynspg_ts and dyn_nxt and dynspg_flt 
     27   PUBLIC   bdy_dyn2d     ! routine called in dynspg_ts and bdy_dyn 
    3328 
    3429   !!---------------------------------------------------------------------- 
     
    6055            CALL bdy_dyn2d_fla( idx_bdy(ib_bdy), dta_bdy(ib_bdy) ) 
    6156         CASE DEFAULT 
    62             CALL ctl_stop( 'bdy_dyn3d : unrecognised option for open boundaries for barotropic variables' ) 
     57            CALL ctl_stop( 'bdy_dyn2d : unrecognised option for open boundaries for barotropic variables' ) 
    6358         END SELECT 
    6459      ENDDO 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90

    r3182 r3191  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  bdydyn3d  *** 
    4    !! Unstructured Open Boundary Cond. :   Flow relaxation scheme on velocities 
     4   !! Unstructured Open Boundary Cond. :   Flow relaxation scheme on baroclinic velocities 
    55   !!====================================================================== 
    6    !! History :  1.0  !  2005-02  (J. Chanut, A. Sellar)  Original code 
    7    !!             -   !  2007-07  (D. Storkey) Move Flather implementation to separate routine. 
    8    !!            3.0  !  2008-04  (NEMO team)  add in the reference version 
    9    !!            3.2  !  2008-04  (R. Benshila) consider velocity instead of transport  
    10    !!            3.3  !  2010-09  (E.O'Dea) modifications for Shelf configurations  
    11    !!            3.3  !  2010-09  (D.Storkey) add ice boundary conditions 
     6   !! History :  3.4  !  2011     (D. Storkey) new module as part of BDY rewrite  
    127   !!---------------------------------------------------------------------- 
    138#if defined key_bdy  
     
    2823   PRIVATE 
    2924 
    30    PUBLIC   bdy_dyn3d     ! routine called in dynspg_flt (free surface case ONLY) 
     25   PUBLIC   bdy_dyn3d     ! routine called by bdy_dyn 
    3126 
    3227   !!---------------------------------------------------------------------- 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim2.F90

    r3182 r3191  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  bdyice_lim2  *** 
    4    !! Unstructured Open Boundary Cond. :  Flow Relaxation Scheme applied sea-ice (LIM2) 
     4   !! Unstructured Open Boundary Cond. :  Open boundary conditions for sea-ice (LIM2) 
    55   !!====================================================================== 
    66   !!  History :  3.3  !  2010-09 (D. Storkey)  Original code 
     7   !!             3.4  !  2011    (D. Storkey) rewrite in preparation for OBC-BDY merge 
    78   !!---------------------------------------------------------------------- 
    89#if defined   key_bdy   &&   defined key_lim2 
     
    5455            CALL bdy_ice_frs( idx_bdy(ib_bdy), dta_idx(ib_bdy) ) 
    5556         CASE DEFAULT 
    56             CALL ctl_stop( 'bdy_tra : unrecognised option for open boundaries for T an S' ) 
     57            CALL ctl_stop( 'bdy_ice_lim_2 : unrecognised option for open boundaries for ice fields' ) 
    5758         END SELECT 
    5859      ENDDO 
     
    105106CONTAINS 
    106107   SUBROUTINE bdy_ice_lim_2( kt )      ! Empty routine 
    107       WRITE(*,*) 'bdy_ice_frs: You should not have seen this print! error?', kt 
     108      WRITE(*,*) 'bdy_ice_frs_lim_2: You should not have seen this print! error?', kt 
    108109   END SUBROUTINE bdy_ice_lim_2 
    109110#endif 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90

    r3182 r3191  
    1010   !!            3.3  !  2010-09  (E.O'Dea) updates for Shelf configurations 
    1111   !!            3.3  !  2010-09  (D.Storkey) add ice boundary conditions 
    12    !!            3.4  !  2011     (D. Storkey, J. Chanut) OBC-BDY merge 
    13    !!                 !  --- Renamed bdyini.F90 -> bdyini.F90 --- 
     12   !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge 
    1413   !!---------------------------------------------------------------------- 
    1514#if defined key_bdy 
     
    3130   PRIVATE 
    3231 
    33    PUBLIC   bdy_init   ! routine called by opa.F90 
     32   PUBLIC   bdy_init   ! routine called in nemo_init 
    3433 
    3534   !!---------------------------------------------------------------------- 
     
    8483         &             nn_ice_lim2, nn_ice_lim2_dta,                       & 
    8584#endif 
    86          &             ln_vol, nn_volctl,                                  & 
    87          &             nn_rimwidth, nn_dmp2d_in, nn_dmp2d_out,             & 
    88          &             nn_dmp3d_in, nn_dmp3d_out 
     85         &             ln_vol, nn_volctl, nn_rimwidth 
    8986      !! 
    9087      NAMELIST/nambdy_index/ nbdysege, jpieob, jpjedt, jpjeft,             & 
     
    131128      nn_volctl         = -1  ! uninitialised flag 
    132129      nn_rimwidth(:)    = -1  ! uninitialised flag 
    133       nn_dmp2d_in(:)    = -1  ! uninitialised flag 
    134       nn_dmp2d_out(:)   = -1  ! uninitialised flag 
    135       nn_dmp3d_in(:)    = -1  ! uninitialised flag 
    136       nn_dmp3d_out(:)   = -1  ! uninitialised flag 
    137130 
    138131      REWIND( numnam )                     
     
    562555                  IF( nbrdta(ib,igrd,ib_bdy) < nbrdta(ibm1,igrd,ib_bdy) ) THEN 
    563556                     CALL ctl_stop('bdy_init : ERROR : boundary data in file must be defined in order of distance from edge nbr.', & 
    564                                    'A utility for re-ordering boundary coordinates and data files exists in CDFTOOLS') 
     557                                   'A utility for re-ordering boundary coordinates and data files exists in the TOOLS/OBC directory') 
    565558                  ENDIF     
    566559               ENDIF 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90

    r3182 r3191  
    88   !!            3.0  !  2008-04  (NEMO team)  add in the reference version 
    99   !!            3.3  !  2010-09  (D.Storkey and E.O'Dea)  bug fixes 
     10   !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge 
    1011   !!---------------------------------------------------------------------- 
    1112#if defined key_bdy 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdytra.F90

    r3182 r3191  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  bdytra  *** 
    4    !! Ocean tracers:   Flow Relaxation Scheme of tracers on each open boundary 
     4   !! Ocean tracers:   Apply boundary conditions for tracers 
    55   !!====================================================================== 
    66   !! History :  1.0  !  2005-01  (J. Chanut, A. Sellar)  Original code 
    77   !!            3.0  !  2008-04  (NEMO team)  add in the reference version 
     8   !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge 
    89   !!---------------------------------------------------------------------- 
    910#if defined key_bdy 
     
    3637   SUBROUTINE bdy_tra( kt ) 
    3738      !!---------------------------------------------------------------------- 
    38       !!                  ***  SUBROUTINE bdy_dyn3d  *** 
     39      !!                  ***  SUBROUTINE bdy_tra  *** 
    3940      !! 
    40       !! ** Purpose : - Apply open boundary conditions for baroclinic velocities 
     41      !! ** Purpose : - Apply open boundary conditions for temperature and salinity 
    4142      !! 
    4243      !!---------------------------------------------------------------------- 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90

    r3182 r3191  
    33   !!                       ***  MODULE  bdyvol  *** 
    44   !! Ocean dynamic :  Volume constraint when unstructured boundary  
    5    !!                  and Free surface are used 
     5   !!                  and filtered free surface are used 
    66   !!====================================================================== 
    77   !! History :  1.0  !  2005-01  (J. Chanut, A. Sellar)  Original code 
    88   !!             -   !  2006-01  (J. Chanut) Bug correction 
    99   !!            3.0  !  2008-04  (NEMO team)  add in the reference version 
     10   !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge 
    1011   !!---------------------------------------------------------------------- 
    1112#if   defined key_bdy   &&   defined key_dynspg_flt 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90

    r3186 r3191  
    132132      INTEGER  ::   isecend    ! number of second since Jan. 1st 00h of nit000 year at nitend 
    133133      INTEGER  ::   isecsbc    ! number of seconds between Jan. 1st 00h of nit000 year and the middle of sbc time step 
    134       INTEGER  ::   time_add   ! local time_offset variable 
     134      INTEGER  ::   itime_add  ! local time offset variable 
    135135      LOGICAL  ::   llnxtyr    ! open next year  file? 
    136136      LOGICAL  ::   llnxtmth   ! open next month file? 
     
    148148      ENDIF 
    149149 
    150       time_add = 0 
    151       IF( PRESENT(time_offset) ) THEN 
    152          time_add = time_offset 
    153       ENDIF 
     150      itime_add = 0 
     151      IF( PRESENT(time_offset) ) itime_add = time_offset 
    154152          
    155153      ! Note that shifting time to be centrered in the middle of sbc time step impacts only nsec_* variables of the calendar  
    156154      IF( present(jit) ) THEN  
    157155         ! ignore kn_fsbc in this case 
    158          isecsbc = nsec_year + nsec1jan000 + (jit+time_add)*rdt/REAL(nn_baro,wp)  
     156         isecsbc = nsec_year + nsec1jan000 + (jit+itime_add)*rdt/REAL(nn_baro,wp)  
    159157      ELSE 
    160          isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdttra(1)) + time_add * rdttra(1)  ! middle of sbc time step 
     158         isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdttra(1)) + itime_add * rdttra(1)  ! middle of sbc time step 
    161159      ENDIF 
    162160      imf = SIZE( sd ) 
     
    190188 
    191189               IF( PRESENT(jit) ) THEN 
    192                   CALL fld_rec( kn_fsbc, sd(jf), jit=jit )              ! update record informations 
     190                  CALL fld_rec( kn_fsbc, sd(jf), time_offset=itime_add, jit=jit )              ! update record informations 
    193191               ELSE 
    194                   CALL fld_rec( kn_fsbc, sd(jf) )                       ! update record informations 
     192                  CALL fld_rec( kn_fsbc, sd(jf), time_offset=itime_add )                       ! update record informations 
    195193               ENDIF 
    196194 
     
    273271                  WRITE(numout, clfmt)  TRIM( sd(jf)%clvar ), kt, REAL(isecsbc,wp)/rday, nyear, nmonth, nday,   &             
    274272                     & sd(jf)%nrec_b(1), sd(jf)%nrec_a(1), REAL(sd(jf)%nrec_b(2),wp)/rday, REAL(sd(jf)%nrec_a(2),wp)/rday 
    275                   WRITE(numout, *) 'time_add is : ',time_add 
     273                  WRITE(numout, *) 'itime_add is : ',itime_add 
    276274               ENDIF 
    277275               ! temporal interpolation weights 
     
    448446 
    449447 
    450    SUBROUTINE fld_rec( kn_fsbc, sdjf, ldbefore, jit ) 
     448   SUBROUTINE fld_rec( kn_fsbc, sdjf, ldbefore, jit, time_offset ) 
    451449      !!--------------------------------------------------------------------- 
    452450      !!                    ***  ROUTINE fld_rec  *** 
     
    464462      INTEGER  , INTENT(in   ), OPTIONAL ::   jit       ! index of barotropic subcycle 
    465463                                                        ! used only if sdjf%ln_tint = .TRUE. 
     464      INTEGER  , INTENT(in   ), OPTIONAL ::   time_offset  ! Offset of required time level compared to "now" 
     465                                                           ! time level in units of time steps. 
    466466      !! 
    467467      LOGICAL  ::   llbefore    ! local definition of ldbefore 
     
    470470      INTEGER  ::   ifreq_sec   ! frequency mean (in seconds) 
    471471      INTEGER  ::   isec_week   ! number of seconds since the start of the weekly file 
     472      INTEGER  ::   itime_add   ! local time offset variable 
    472473      REAL(wp) ::   ztmp        ! temporary variable 
    473474      !!---------------------------------------------------------------------- 
     
    478479      ELSE                           ;   llbefore = .FALSE. 
    479480      ENDIF 
     481      ! 
     482      itime_add = 0 
     483      IF( PRESENT(time_offset) ) itime_add = time_offset 
    480484      ! 
    481485      !                                      ! =========== ! 
     
    496500            !                             
    497501            ztmp = REAL( nday, wp ) / REAL( nyear_len(1), wp ) + 0.5 
    498             IF( PRESENT(jit) ) ztmp = ztmp + jit*rdt/REAL(nn_baro,wp) 
     502            IF( PRESENT(jit) ) THEN  
     503               ztmp = ztmp + (jit+itime_add)*rdt/REAL(nn_baro,wp) 
     504            ELSE 
     505               ztmp = ztmp + itime_add*rdttra(1) 
     506            ENDIF 
    499507            sdjf%nrec_a(1) = 1 + INT( ztmp ) - COUNT((/llbefore/)) 
    500508            ! swap at the middle of the year 
     
    525533            !                             
    526534            ztmp = REAL( nday, wp ) / REAL( nmonth_len(nmonth), wp ) + 0.5 
    527             IF( PRESENT(jit) ) ztmp = ztmp + jit*rdt/REAL(nn_baro,wp) 
     535            IF( PRESENT(jit) ) THEN  
     536               ztmp = ztmp + (jit+itime_add)*rdt/REAL(nn_baro,wp) 
     537            ELSE 
     538               ztmp = ztmp + itime_add*rdttra(1) 
     539            ENDIF 
    528540            imth = nmonth + INT( ztmp ) - COUNT((/llbefore/)) 
    529541            IF( sdjf%cltype == 'monthly' ) THEN   ;   sdjf%nrec_a(1) = 1 + INT( ztmp ) - COUNT((/llbefore/)) 
     
    553565         ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdttra(1)   ! shift time to be centrered in the middle of sbc time step 
    554566         ztmp = ztmp + 0.01 * rdttra(1)                          ! add 0.01 time step to avoid truncation error  
    555          IF( PRESENT(jit) ) ztmp = ztmp + jit*rdt/REAL(nn_baro,wp) 
     567         IF( PRESENT(jit) ) THEN  
     568            ztmp = ztmp + (jit+itime_add)*rdt/REAL(nn_baro,wp) 
     569         ELSE 
     570            ztmp = ztmp + itime_add*rdttra(1) 
     571         ENDIF 
    556572         IF( sdjf%ln_tint ) THEN                ! time interpolation, shift by 1/2 record 
    557573            ! 
Note: See TracChangeset for help on using the changeset viewer.