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 3881 for branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES – NEMO

Ignore:
Timestamp:
2013-04-22T12:05:52+02:00 (11 years ago)
Author:
cetlod
Message:

v3_4_stable: fix on passive tracer damping, see ticket #1083

Location:
branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90

    r3294 r3881  
    4040   LOGICAL  ::   ln_pisdmp         !: relaxation or not of nutrients to a mean value 
    4141   INTEGER  ::   nn_pisdmp         !: frequency of relaxation or not of nutrients to a mean value 
    42    LOGICAL  ::   ln_pisclo         !: Restoring or not of nutrients to initial value 
    4342                                   !: on close seas 
    4443 
  • branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90

    r3294 r3881  
    5656#endif 
    5757      NAMELIST/nampisdia/ pisdia3d, pisdia2d     ! additional diagnostics 
    58       NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp, ln_pisclo 
     58      NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp 
    5959 
    6060      !!---------------------------------------------------------------------- 
     
    170170         WRITE(numout,*) '    Relaxation of tracer to glodap mean value             ln_pisdmp      =', ln_pisdmp 
    171171         WRITE(numout,*) '    Frequency of Relaxation                               nn_pisdmp      =', nn_pisdmp 
    172          WRITE(numout,*) '    Restoring of tracer to initial value  on closed seas  ln_pisclo      =', ln_pisclo 
    173172         WRITE(numout,*) ' ' 
    174173      ENDIF 
  • branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcrst_pisces.F90

    r3294 r3881  
    4242      !!---------------------------------------------------------------------- 
    4343 
    44       ! 
    45       IF( ln_trcdta .AND. ln_pisclo ) CALL pis_dmp_clo  ! restoring of nutrients on close seas 
    4644      ! 
    4745      IF(lwp) WRITE(numout,*) 
     
    9997   END SUBROUTINE trc_rst_wri_pisces 
    10098 
    101    SUBROUTINE pis_dmp_clo    
    102       !!--------------------------------------------------------------------- 
    103       !!                  ***  ROUTINE pis_dmp_clo  *** 
    104       !! 
    105       !! ** Purpose :   Closed sea domain initialization 
    106       !! 
    107       !! ** Method  :   if a closed sea is located only in a model grid point 
    108       !!                we restore to initial data 
    109       !! 
    110       !! ** Action  :   ictsi1(), ictsj1() : south-west closed sea limits (i,j) 
    111       !!                ictsi2(), ictsj2() : north-east Closed sea limits (i,j) 
    112       !!---------------------------------------------------------------------- 
    113       INTEGER, PARAMETER           ::   npicts   = 4        ! number of closed sea 
    114       INTEGER, DIMENSION(npicts)   ::   ictsi1, ictsj1      ! south-west closed sea limits (i,j) 
    115       INTEGER, DIMENSION(npicts)   ::   ictsi2, ictsj2      ! north-east closed sea limits (i,j) 
    116       INTEGER :: ji, jj, jk, jn, jl, jc                     ! dummy loop indices 
    117       INTEGER :: ierr                                       ! local integer 
    118       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::  ztrcdta ! 4D  workspace 
    119       !!---------------------------------------------------------------------- 
    120  
    121       IF(lwp) WRITE(numout,*)  
    122       IF(lwp) WRITE(numout,*)' pis_dmp_clo : closed seas ' 
    123       IF(lwp) WRITE(numout,*)'~~~~~~~' 
    124  
    125       ! initial values 
    126       ictsi1(:) = 1  ;  ictsi2(:) = 1 
    127       ictsj1(:) = 1  ;  ictsj2(:) = 1 
    128  
    129       ! set the closed seas (in data domain indices) 
    130       ! ------------------- 
    131  
    132       IF( cp_cfg == "orca" ) THEN 
    133          ! 
    134          SELECT CASE ( jp_cfg ) 
    135          !                                           ! ======================= 
    136          CASE ( 2 )                                  !  ORCA_R2 configuration 
    137             !                                        ! ======================= 
    138             !                                            ! Caspian Sea 
    139             ictsi1(1)   =  11  ;  ictsj1(1)   = 103 
    140             ictsi2(1)   =  17  ;  ictsj2(1)   = 112 
    141             !                                            ! Great North American Lakes 
    142             ictsi1(2)   =  97  ;  ictsj1(2)   = 107 
    143             ictsi2(2)   = 103  ;  ictsj2(2)   = 111 
    144             !                                            ! Black Sea 1 : west part of the Black Sea 
    145             ictsi1(3)   = 174  ; ictsj1(3)   = 107 
    146             ictsi2(3)   = 181  ; ictsj2(3)   = 112 
    147             !                                            ! Black Sea 2 : est part of the Black Sea 
    148             ictsi1(4)   =   2  ;  ictsj1(4)   = 107 
    149             ictsi2(4)   =   6  ;  ictsj2(4)   = 112 
    150             !                                        ! ======================= 
    151          CASE ( 4 )                                  !  ORCA_R4 configuration 
    152             !                                        ! ======================= 
    153             !                                            ! Caspian Sea 
    154             ictsi1(1)   =  4  ;  ictsj1(1)   = 53 
    155             ictsi2(1)   =  4  ;  ictsj2(1)   = 56 
    156             !                                            ! Great North American Lakes 
    157             ictsi1(2)   = 49  ;  ictsj1(2)   = 55 
    158             ictsi2(2)   = 51  ;  ictsj2(2)   = 56 
    159             !                                            ! Black Sea 
    160             ictsi1(3)   = 88  ;  ictsj1(3)   = 55 
    161             ictsi2(3)   = 91  ;  ictsj2(3)   = 56 
    162             !                                            ! Baltic Sea 
    163             ictsi1(4)   = 75  ;  ictsj1(4)   = 59 
    164             ictsi2(4)   = 76  ;  ictsj2(4)   = 61 
    165             !                                        ! ======================= 
    166             !                                        ! ======================= 
    167          CASE ( 025 )                                ! ORCA_R025 configuration 
    168             !                                        ! ======================= 
    169                                                      ! Caspian + Aral sea 
    170             ictsi1(1)   = 1330 ; ictsj1(1)   = 645 
    171             ictsi2(1)   = 1400 ; ictsj2(1)   = 795 
    172             !                                        ! Azov Sea 
    173             ictsi1(2)   = 1284 ; ictsj1(2)   = 722 
    174             ictsi2(2)   = 1304 ; ictsj2(2)   = 747 
    175             ! 
    176          END SELECT 
    177          ! 
    178       ENDIF 
    179  
    180       ! convert the position in local domain indices 
    181       ! -------------------------------------------- 
    182       DO jc = 1, npicts 
    183          ictsi1(jc)   = mi0( ictsi1(jc) ) 
    184          ictsj1(jc)   = mj0( ictsj1(jc) ) 
    185  
    186          ictsi2(jc)   = mi1( ictsi2(jc) ) 
    187          ictsj2(jc)   = mj1( ictsj2(jc) ) 
    188       END DO 
    189  
    190       ! Restore close seas values to initial data 
    191       IF( nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping 
    192         ALLOCATE( ztrcdta(jpi,jpj,jpk,nb_trcdta), STAT=ierr ) 
    193         IF( ierr > 0 ) THEN 
    194            CALL ctl_stop( 'trc_ini: unable to allocate ztrcdta array' )   ;   RETURN 
    195         ENDIF 
    196         ! 
    197         CALL trc_dta( nittrc000, ztrcdta )   ! read tracer data at nittrc000 
    198         ! 
    199         DO jn = 1, jptra 
    200            IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    201               jl = n_trc_index(jn) 
    202               DO jc = 1, npicts 
    203                  DO jk = 1, jpkm1 
    204                     DO jj = ictsj1(jc), ictsj2(jc) 
    205                        DO ji = ictsi1(jc), ictsi2(jc) 
    206                           trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk,jl) * tmask(ji,jj,jk)  
    207                           trb(ji,jj,jk,jn) = trn(ji,jj,jk,jn) 
    208                        ENDDO 
    209                     ENDDO 
    210                  ENDDO 
    211               ENDDO 
    212            ENDIF 
    213         ENDDO 
    214         DEALLOCATE( ztrcdta ) 
    215       ENDIF 
    216       ! 
    217    END SUBROUTINE pis_dmp_clo 
    21899 
    219100#else 
Note: See TracChangeset for help on using the changeset viewer.