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 5510 for trunk/NEMOGCM/NEMO/SAS_SRC – NEMO

Ignore:
Timestamp:
2015-06-30T10:49:40+02:00 (9 years ago)
Author:
clem
Message:

enable the use of BDY with ice (LIM3) in case of SAS. Calls to bdy had to be added in SAS eventhough it is not very clean. This is something that needs to be rethought in the future but it does the job for now

Location:
trunk/NEMOGCM/NEMO/SAS_SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90

    r5407 r5510  
    5959   USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 
    6060   USE icbstp          ! handle bergs, calving, themodynamics and transport 
     61#if defined key_bdy 
     62   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 LIM3 
     64#endif 
     65   USE bdy_par 
    6166 
    6267   IMPLICIT NONE 
     
    354359 
    355360                            CALL sbc_init   ! Forcings : surface module  
     361                             
     362      ! ==> clem: open boundaries init. is mandatory for LIM3 because ice BDY is not decoupled from   
     363      !           the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules.  
     364      !           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 
     367      ! ==> 
    356368       
    357369      IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler 
     
    502514      USE diawri    , ONLY: dia_wri_alloc 
    503515      USE dom_oce   , ONLY: dom_oce_alloc 
    504       USE oce       , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass  
     516#if defined key_bdy    
     517      USE bdy_oce   , ONLY: bdy_oce_alloc 
     518      USE oce         ! clem: mandatory for LIM3 because needed for bdy arrays 
     519#else 
     520      USE oce       , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass 
     521#endif 
    505522      ! 
    506523      INTEGER :: ierr,ierr1,ierr2,ierr3,ierr4,ierr5,ierr6 
     
    510527      ierr =        dia_wri_alloc   () 
    511528      ierr = ierr + dom_oce_alloc   ()          ! ocean domain 
    512       ALLOCATE( snwice_mass(jpi,jpj)  , snwice_mass_b(jpi,jpj),             & 
    513          &      snwice_fmass(jpi,jpj), STAT= ierr1 ) 
     529#if defined key_bdy 
     530      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 ) 
    514537      ! 
    515538      ! lim code currently uses surface temperature and salinity in tsn array for initialisation 
    516       ! and ub, vb arrays in ice dynamics 
    517       ! so allocate enough of arrays to use 
    518       ! 
     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 
    519541      jpm = MAX(jp_tem, jp_sal) 
    520542      ALLOCATE( tsn(jpi,jpj,1,jpm)  , STAT=ierr2 ) 
     
    523545      ALLOCATE( tsb(jpi,jpj,1,jpm)  , STAT=ierr5 ) 
    524546      ALLOCATE( sshn(jpi,jpj)       , STAT=ierr6 ) 
    525  
    526547      ierr = ierr + ierr1 + ierr2 + ierr3 + ierr4 + ierr5 + ierr6  
     548#endif 
    527549      ! 
    528550      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
  • trunk/NEMOGCM/NEMO/SAS_SRC/step.F90

    r5407 r5510  
    3737 
    3838   USE timing           ! Timing             
     39 
     40   USE bdy_par          ! clem: mandatory for LIM3 
     41#if defined key_bdy 
     42   USE bdydta           ! clem: mandatory for LIM3 
     43#endif 
    3944 
    4045   IMPLICIT NONE 
     
    8186                             CALL iom_setkt( kstp - nit000 + 1, cxios_context )   ! tell iom we are at time step kstp 
    8287 
     88      ! ==> clem: open boundaries is mandatory for LIM3 because ice BDY is not decoupled from   
     89      !           the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules. 
     90      !           From SAS: ocean bdy data are wrong  (but we do not care) and ice bdy data are OK.   
     91      !           This is not clean and should be changed in the future.  
     92#if defined key_bdy 
     93      IF( lk_bdy     )       CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries 
     94#endif 
     95      ! ==> 
    8396                             CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice) 
    8497 
Note: See TracChangeset for help on using the changeset viewer.