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 2613 for branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/BDY – NEMO

Ignore:
Timestamp:
2011-02-25T11:45:57+01:00 (13 years ago)
Author:
gm
Message:

dynamic mem: #785 ; move the allocation of ice in iceini_2/iceini module + bug fixes (define key_esopa)

Location:
branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/BDY
Files:
2 edited

Legend:

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

    r2590 r2613  
    3232   LOGICAL ::   ln_vol  = .false.     !: =T volume correction              
    3333   LOGICAL ::   ln_mask = .false.     !: =T read bdymask from file 
    34    LOGICAL ::   ln_clim = .false.     !: if true, we assume that bdy data files contain  
    35    !                                    !  1 time dump  (-->bdy forcing will be constant)  
    36    !                                    !  or 12 months (-->bdy forcing will be cyclic)  
     34   LOGICAL ::   ln_clim = .false.     !: =T bdy data files contain  1 time dump  (-->bdy forcing will be constant)  
     35   !                                  !                         or 12 months     (-->bdy forcing will be cyclic)  
    3736   LOGICAL ::   ln_dyn_fla  = .false. !: =T Flather boundary conditions on barotropic velocities 
    3837   LOGICAL ::   ln_dyn_frs  = .false. !: =T FRS boundary conditions on velocities 
     
    4039   LOGICAL ::   ln_ice_frs  = .false. !: =T FRS boundary conditions on seaice (leads fraction, ice depth, snow depth) 
    4140   ! 
    42    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    !                                    !  = 1 the volume will be constant during all the integration. 
     41   INTEGER ::   nn_rimwidth = 7       !: boundary rim width 
     42   INTEGER ::   nn_dtactl   = 1       !: = 0 use the initial state as bdy dta ; = 1 read it in a NetCDF file 
     43   INTEGER ::   nn_volctl   = 1       !: = 0 the total volume will have the variability of the surface Flux E-P  
     44   !                                  !  = 1 the volume will be constant during all the integration. 
    4645 
    4746   !!---------------------------------------------------------------------- 
     
    6362   INTEGER, DIMENSION(jpbdim,jpbgrd) ::   nbmap           !: Indices of data in file for data in memory  
    6463     
    65    REAL(wp) ::   bdysurftot                             !: Lateral surface of unstructured open boundary 
     64   REAL(wp) ::   bdysurftot                               !: Lateral surface of unstructured open boundary 
    6665 
    6766   REAL(wp), DIMENSION(jpbdim)        ::   flagu, flagv   !: Flag for normal velocity compnt for velocity components 
     
    7574   REAL(wp), DIMENSION(jpbdim) ::   utide, vtide          !: Tidal boundary array : U and V 
    7675#if defined key_lim2 
    77    REAL(wp), DIMENSION(jpbdim) ::  & 
    78       frld_bdy, hicif_bdy,  & !: Now clim of ice leads fraction, ice   
    79       hsnif_bdy               !: thickness and snow thickness 
     76   REAL(wp), DIMENSION(jpbdim) ::   frld_bdy    !: now ice leads fraction climatology    
     77   REAL(wp), DIMENSION(jpbdim) ::   hicif_bdy   !: Now ice  thickness climatology 
     78   REAL(wp), DIMENSION(jpbdim) ::   hsnif_bdy   !: now snow thickness 
    8079#endif 
     80 
     81   !!---------------------------------------------------------------------- 
     82   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
     83   !! $Id$  
     84   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     85   !!---------------------------------------------------------------------- 
     86CONTAINS 
     87 
     88   FUNCTION bdy_oce_alloc() 
     89      !!---------------------------------------------------------------------- 
     90      INTEGER :: bdy_oce_alloc 
     91      !!---------------------------------------------------------------------- 
     92      ! 
     93      ALLOCATE( bdytmask(jpi,jpj) , tbdy(jpbdim,jpk) , sbdy(jpbdim,jpk) ,     & 
     94         &      bdyumask(jpi,jpj) , ubdy(jpbdim,jpk) ,                        & 
     95         &      bdyvmask(jpi,jpj) , vbdy(jpbdim,jpk) ,                    STAT=bdy_oce_alloc ) 
     96         ! 
     97      IF( lk_mpp             )   CALL mpp_sum ( bdy_oce_alloc ) 
     98      IF( bdy_oce_alloc /= 0 )   CALL ctl_warn('bdy_oce_alloc: failed to allocate arrays.') 
     99      ! 
     100   END FUNCTION bdy_oce_alloc 
    81101 
    82102#else 
     
    87107#endif 
    88108 
    89    !!---------------------------------------------------------------------- 
    90    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    91    !! $Id$  
    92    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    93109   !!====================================================================== 
    94 #if defined key_bdy  
    95 CONTAINS 
    96  
    97    FUNCTION bdy_oce_alloc() 
    98       INTEGER :: bdy_oce_alloc 
    99  
    100       ALLOCATE(bdytmask(jpi,jpj), bdyumask(jpi,jpj), bdyvmask(jpi,jpj), & 
    101                tbdy(jpbdim,jpk),  sbdy(jpbdim,jpk),                     & 
    102                ubdy(jpbdim,jpk),  vbdy(jpbdim,jpk),                     & 
    103                Stat=bdy_oce_alloc) 
    104   
    105       IF(bdy_oce_alloc /= 0)THEN 
    106          CALL ctl_warn('bdy_oce_alloc: failed to allocate arrays.') 
    107       END IF 
    108  
    109    END FUNCTION bdy_oce_alloc 
    110 #endif 
    111  
    112110END MODULE bdy_oce 
  • branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90

    r2528 r2613  
    3333 
    3434   !!---------------------------------------------------------------------- 
    35    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     35   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
    3636   !! $Id$  
    37    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     37   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3838   !!---------------------------------------------------------------------- 
    3939CONTAINS 
     
    4444      !!          
    4545      !! ** Purpose :   Initialization of the dynamics and tracer fields with  
    46       !!      unstructured open boundaries. 
     46      !!              unstructured open boundaries. 
    4747      !! 
    48       !! ** Method  :  Read initialization arrays (mask, indices) to identify  
    49       !!               an unstructured open boundary 
     48      !! ** Method  :   Read initialization arrays (mask, indices) to identify  
     49      !!              an unstructured open boundary 
    5050      !! 
    5151      !! ** Input   :  bdy_init.nc, input file for unstructured open boundaries 
    5252      !!----------------------------------------------------------------------       
    53       INTEGER ::   ii, ij, ik, igrd, ib, ir   ! dummy loop indices 
    54       INTEGER ::   icount, icountr 
    55       INTEGER ::   ib_len, ibr_max 
    56       INTEGER ::   iw, ie, is, in  
    57       INTEGER ::   inum                 ! local logical unit 
    58       INTEGER ::   id_dummy             ! local integers 
    59       INTEGER ::   igrd_start, igrd_end ! start and end of loops on igrd 
     53      INTEGER  ::   ii, ij, ik, igrd, ib, ir   ! dummy loop indices 
     54      INTEGER  ::   icount, icountr, ib_len, ibr_max   ! local integers 
     55      INTEGER  ::   iw, ie, is, in, inum, id_dummy     !   -       - 
     56      INTEGER  ::   igrd_start, igrd_end               !   -       - 
     57      REAL(wp) ::   zefl, zwfl, znfl, zsfl              ! local scalars 
    6058      INTEGER, DIMENSION (2)             ::   kdimsz 
    6159      INTEGER, DIMENSION(jpbdta, jpbgrd) ::   nbidta, nbjdta   ! Index arrays: i and j indices of bdy dta 
    6260      INTEGER, DIMENSION(jpbdta, jpbgrd) ::   nbrdta           ! Discrete distance from rim points 
    63       REAL(wp) :: zefl, zwfl, znfl, zsfl                       ! temporary scalars 
    64       REAL(wp) , DIMENSION(jpidta,jpjdta) ::   zmask           ! global domain mask 
    65       REAL(wp) , DIMENSION(jpbdta,1)      ::   zdta            ! temporary array  
    66       CHARACTER(LEN=80),DIMENSION(6)      ::   clfile 
     61      REAL(wp), DIMENSION(jpidta,jpjdta) ::   zmask            ! global domain mask 
     62      REAL(wp), DIMENSION(jpbdta,1)      ::   zdta             ! temporary array  
     63      CHARACTER(LEN=80),DIMENSION(6)     ::   clfile 
    6764      !! 
    68       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,     & 
     65      NAMELIST/nambdy/cn_mask, cn_dta_frs_T, cn_dta_frs_U, cn_dta_frs_V,   & 
     66         &            cn_dta_fla_T, cn_dta_fla_U, cn_dta_fla_V,            & 
     67         &            ln_tides, ln_clim, ln_vol, ln_mask,                  & 
     68         &            ln_dyn_fla, ln_dyn_frs, ln_tra_frs,ln_ice_frs,       & 
    7269         &            nn_dtactl, nn_rimwidth, nn_volctl 
    7370      !!---------------------------------------------------------------------- 
     
    7774      IF(lwp) WRITE(numout,*) '~~~~~~~~' 
    7875      ! 
     76      !                                      ! allocate bdy_oce arrays 
     77      IF( bdy_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'bdy_init : unable to allocate arrays' ) 
     78 
    7979      IF( jperio /= 0 )   CALL ctl_stop( 'Cyclic or symmetric,',   & 
    8080         &                               ' and unstructured open boundary condition are not compatible' ) 
Note: See TracChangeset for help on using the changeset viewer.