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 4148 for branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90 – NEMO

Ignore:
Timestamp:
2013-11-04T13:54:28+01:00 (10 years ago)
Author:
cetlod
Message:

merge in trunk changes between r3853 and r3940 and commit the changes, see ticket #1169

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90

    r4147 r4148  
    7777      ! 
    7878      IF( ln_rsttr .AND. kt == nittrc000 )                         CALL p4z_rst( nittrc000, 'READ' )  !* read or initialize all required fields  
    79       IF( ln_rsttr  .AND. ln_pisclo )                              CALL p4z_clo            ! damping on closed seas 
    8079      IF( ln_pisdmp .AND. MOD( kt - nn_dttrc, nn_pisdmp ) == 0 )   CALL p4z_dmp( kt )      ! Relaxation of some tracers 
    8180      ! 
     
    165164      NAMELIST/nampiskrp/ xkr_eta, xkr_zeta, xkr_ncontent, xkr_mass_min, xkr_mass_max 
    166165#endif 
    167       NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp, ln_pisclo 
     166      NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp 
    168167      NAMELIST/nampismass/ ln_check_mass 
    169168      INTEGER :: ios                 ! Local integer output status for namelist read 
     
    234233         WRITE(numout,*) '    Relaxation of tracer to glodap mean value             ln_pisdmp      =', ln_pisdmp 
    235234         WRITE(numout,*) '    Frequency of Relaxation                               nn_pisdmp      =', nn_pisdmp 
    236          WRITE(numout,*) '    Restoring of tracer to initial value  on closed seas  ln_pisclo      =', ln_pisclo 
    237235         WRITE(numout,*) ' ' 
    238236      ENDIF 
     
    436434   END SUBROUTINE p4z_chk_mass 
    437435 
    438    SUBROUTINE p4z_clo    
    439       !!--------------------------------------------------------------------- 
    440       !!                  ***  ROUTINE p4z_clo  *** 
    441       !! 
    442       !! ** Purpose :   Closed sea domain initialization 
    443       !! 
    444       !! ** Method  :   if a closed sea is located only in a model grid point 
    445       !!                we restore to initial data 
    446       !! 
    447       !! ** Action  :   ictsi1(), ictsj1() : south-west closed sea limits (i,j) 
    448       !!                ictsi2(), ictsj2() : north-east Closed sea limits (i,j) 
    449       !!---------------------------------------------------------------------- 
    450       INTEGER, PARAMETER           ::   npicts   = 4        ! number of closed sea 
    451       INTEGER, DIMENSION(npicts)   ::   ictsi1, ictsj1      ! south-west closed sea limits (i,j) 
    452       INTEGER, DIMENSION(npicts)   ::   ictsi2, ictsj2      ! north-east closed sea limits (i,j) 
    453       INTEGER :: ji, jj, jk, jn, jl, jc                     ! dummy loop indices 
    454       INTEGER :: ierr                                       ! local integer 
    455       REAL(wp), POINTER, DIMENSION(:,:,:,:) ::  ztrcdta     ! 4D  workspace 
    456       !!---------------------------------------------------------------------- 
    457  
    458       IF(lwp) WRITE(numout,*) 
    459       IF(lwp) WRITE(numout,*)' p4z_clo : closed seas ' 
    460       IF(lwp) WRITE(numout,*)'~~~~~~~' 
    461  
    462       ! initial values 
    463       ictsi1(:) = 1  ;  ictsi2(:) = 1  
    464       ictsj1(:) = 1  ;  ictsj2(:) = 1  
    465  
    466       ! set the closed seas (in data domain indices) 
    467       ! ------------------- 
    468  
    469       IF( cp_cfg == "orca" ) THEN 
    470          ! 
    471          SELECT CASE ( jp_cfg ) 
    472          !                                           ! ======================= 
    473          CASE ( 2 )                                  !  ORCA_R2 configuration 
    474             !                                        ! ======================= 
    475             !                                            ! Caspian Sea 
    476             ictsi1(1)   =  11  ;  ictsj1(1)   = 103 
    477             ictsi2(1)   =  17  ;  ictsj2(1)   = 112 
    478             !                                            ! Great North American Lakes 
    479             ictsi1(2)   =  97  ;  ictsj1(2)   = 107 
    480             ictsi2(2)   = 103  ;  ictsj2(2)   = 111 
    481             !                                            ! Black Sea 1 : west part of the Black Sea 
    482             ictsi1(3)   = 174  ; ictsj1(3)   = 107 
    483             ictsi2(3)   = 181  ; ictsj2(3)   = 112 
    484             !                                            ! Black Sea 2 : est part of the Black Sea 
    485             ictsi1(4)   =   2  ;  ictsj1(4)   = 107 
    486             ictsi2(4)   =   6  ;  ictsj2(4)   = 112 
    487             !                                        ! ======================= 
    488          CASE ( 4 )                                  !  ORCA_R4 configuration 
    489             !                                        ! ======================= 
    490             !                                            ! Caspian Sea 
    491             ictsi1(1)   =  4  ;  ictsj1(1)   = 53 
    492             ictsi2(1)   =  4  ;  ictsj2(1)   = 56 
    493             !                                            ! Great North American Lakes 
    494             ictsi1(2)   = 49  ;  ictsj1(2)   = 55 
    495             ictsi2(2)   = 51  ;  ictsj2(2)   = 56 
    496             !                                            ! Black Sea 
    497             ictsi1(3)   = 88  ;  ictsj1(3)   = 55 
    498             ictsi2(3)   = 91  ;  ictsj2(3)   = 56 
    499             !                                            ! Baltic Sea 
    500             ictsi1(4)   = 75  ;  ictsj1(4)   = 59 
    501             ictsi2(4)   = 76  ;  ictsj2(4)   = 61 
    502             !                                        ! ======================= 
    503             !                                        ! ======================= 
    504          CASE ( 025 )                                ! ORCA_R025 configuration 
    505             !                                        ! ======================= 
    506                                                      ! Caspian + Aral sea 
    507             ictsi1(1)   = 1330 ; ictsj1(1)   = 645 
    508             ictsi2(1)   = 1400 ; ictsj2(1)   = 795 
    509             !                                        ! Azov Sea 
    510             ictsi1(2)   = 1284 ; ictsj1(2)   = 722 
    511             ictsi2(2)   = 1304 ; ictsj2(2)   = 747 
    512             ! 
    513          END SELECT 
    514          ! 
    515       ENDIF 
    516  
    517       ! convert the position in local domain indices 
    518       ! -------------------------------------------- 
    519       DO jc = 1, npicts  
    520          ictsi1(jc)   = mi0( ictsi1(jc) ) 
    521          ictsj1(jc)   = mj0( ictsj1(jc) ) 
    522  
    523          ictsi2(jc)   = mi1( ictsi2(jc) ) 
    524          ictsj2(jc)   = mj1( ictsj2(jc) ) 
    525       END DO 
    526  
    527       ! Restore close seas values to initial data 
    528       IF( ln_trcdta .AND. nb_trcdta > 0 )  THEN   ! Initialisation of tracer from a file that may also be used for damping 
    529          ! 
    530          CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta )   ! Memory allocation 
    531          ! 
    532          CALL trc_dta( nittrc000, ztrcdta )   ! read tracer data at nittrc000 
    533          ! 
    534          DO jn = 1, jptra 
    535             IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    536                 jl = n_trc_index(jn) 
    537                 DO jc = 1, npicts 
    538                    DO jk = 1, jpkm1 
    539                       DO jj = ictsj1(jc), ictsj2(jc) 
    540                          DO ji = ictsi1(jc), ictsi2(jc) 
    541                             trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk,jl) * tmask(ji,jj,jk) 
    542                             trb(ji,jj,jk,jn) = trn(ji,jj,jk,jn) 
    543                          ENDDO 
    544                       ENDDO 
    545                    ENDDO 
    546                 ENDDO 
    547              ENDIF 
    548           ENDDO 
    549           CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) 
    550       ENDIF 
    551       ! 
    552    END SUBROUTINE p4z_clo 
    553436#else 
    554437   !!====================================================================== 
Note: See TracChangeset for help on using the changeset viewer.