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 1524 – NEMO

Changeset 1524


Ignore:
Timestamp:
2009-07-22T14:04:35+02:00 (15 years ago)
Author:
ctlod
Message:

style changes only, see ticket: #406

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/SBC/sbcssr.F90

    r1494 r1524  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  sbcssr  *** 
    4    !! Surface module :  add to heat and fresh water fluxes a restoring term 
    5    !!                   toward observed SST/SSS 
     4   !! Surface module :  heat and fresh water fluxes a restoring term toward observed SST/SSS 
    65   !!====================================================================== 
    7    !! History :  1.0  !  2006-06  (G. Madec)  Original code 
     6   !! History :  3.0  !  2006-06  (G. Madec)  Original code 
    87   !!            3.2  !  2009-04  (B. Lemaire)  Introduce iom_put 
    98   !!---------------------------------------------------------------------- 
     
    2928   PUBLIC   sbc_ssr    ! routine called in sbcmod 
    3029    
    31    REAL(wp), ALLOCATABLE, DIMENSION(:)  ::   buffer   ! Temporary buffer for exchange 
    3230 
     31   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   erp      !: evaporation damping   [kg/m2/s] 
     32   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qrp      !: heat flux damping        [w/m2] 
     33 
     34   !                              !!* Namelist namsbc_ssr * 
     35   INTEGER ::   nn_sstr, nn_sssr   ! SST/SSS restoring indicator 
     36   REAL(wp) ::  dqdt   , deds      ! restoring factor on SST and SSS 
     37 
     38   REAL(wp) , ALLOCATABLE, DIMENSION(:) ::   buffer   ! Temporary buffer for exchange 
    3339   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_sst   ! structure of input SST (file informations, fields read) 
    3440   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_sss   ! structure of input SSS (file informations, fields read) 
    35  
    36    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   erp      !: evaporation damping                          [kg/m2/s] 
    37    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qrp      !: heat flux damping                            [w/m2] 
    38  
    39    !                               !!* Namelist namsbc_ssr * 
    40    INTEGER ::   nn_sstr, nn_sssr   ! SST/SSS indicator 
    41    REAL(wp) ::  dqdt   , deds      ! restoring term factor 
    4241 
    4342   !! * Substitutions 
     
    7776      NAMELIST/namsbc_ssr/ cn_dir, nn_sstr, nn_sssr, dqdt, deds, sn_sst, sn_sss 
    7877      !!---------------------------------------------------------------------- 
     78      ! 
    7979      !                                               ! -------------------- ! 
    8080      IF( kt == nit000 ) THEN                         ! First call kt=nit000 ! 
    8181         !                                            ! -------------------- ! 
    82          !                         ! set file information 
    83          nn_sstr = 0 
     82         nn_sstr = 0                  !* set file information 
    8483         nn_sssr = 0 
    85          dqdt = -40.e0 
    86          deds = -27.70 
    87          cn_dir = './'       ! directory in which the model is executed 
     84         dqdt    = -40.e0 
     85         deds    = -27.70 
     86         cn_dir  = './'            ! directory in which the model is executed 
    8887         ! ... default values (NB: frequency positive => hours, negative => months) 
    8988         !            !   file    ! frequency !  variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation   ! 
     
    9291         sn_sss = FLD_N( 'sss'    ,    -1.    ,  'sss'     ,  .true.    , .false. ,   'yearly'  , ''       , ''         ) 
    9392 
    94          REWIND ( numnam )         ! ... read in namlist namflx 
     93         REWIND ( numnam )            !* read in namlist namflx 
    9594         READ( numnam, namsbc_ssr )  
    9695 
    97          IF(lwp) THEN              ! control print 
     96         IF(lwp) THEN                 !* control print 
    9897            WRITE(numout,*) 
    9998            WRITE(numout,*) 'sbc_ssr : SST and/or SSS damping term ' 
     
    106105         ENDIF 
    107106 
    108          IF( nn_sstr == 1 ) THEN      ! set sf_sst structure 
     107         IF( nn_sstr == 1 ) THEN      !* set sf_sst structure 
    109108            ! 
    110109            ALLOCATE( sf_sst(1), STAT=ierror ) 
     
    114113            ALLOCATE( sf_sst(1)%fnow(jpi,jpj) ) 
    115114            ALLOCATE( sf_sst(1)%fdta(jpi,jpj,2) ) 
    116  
     115            ! 
    117116            ! fill sf_sst with sn_sst and control print 
    118117            CALL fld_fill( sf_sst, (/ sn_sst /), cn_dir, 'sbc_ssr', 'SST restoring term toward SST data', 'namsbc_ssr' ) 
    119  
    120118         ENDIF 
    121119         ! 
     
    128126            ALLOCATE( sf_sss(1)%fnow(jpi,jpj) ) 
    129127            ALLOCATE( sf_sss(1)%fdta(jpi,jpj,2) ) 
    130  
     128            ! 
    131129            ! fill sf_sss with sn_sss and control print 
    132130            CALL fld_fill( sf_sss, (/ sn_sss /), cn_dir, 'sbc_ssr', 'SSS restoring term toward SSS data', 'namsbc_ssr' ) 
    133  
    134131         ENDIF 
    135132         ! 
     
    140137 
    141138      IF( nn_sstr + nn_sssr /= 0 ) THEN 
    142  
    143          IF( nn_sstr == 1)   CALL fld_read( kt, nn_fsbc, sf_sst )   ! Read SST data and provides it 
    144          !                                                          ! at the current time-step 
    145          IF( nn_sssr >= 1)   CALL fld_read( kt, nn_fsbc, sf_sss )   ! Read SSS data and provides it 
    146          !                                                          ! at the current time-step 
    147   
     139         ! 
     140         IF( nn_sstr == 1)   CALL fld_read( kt, nn_fsbc, sf_sst )   ! Read SST data and provides it at kt 
     141         IF( nn_sssr >= 1)   CALL fld_read( kt, nn_fsbc, sf_sss )   ! Read SSS data and provides it at kt 
     142         ! 
    148143         !                                         ! ========================= ! 
    149144         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN      !    Add restoring term     ! 
    150145            !                                      ! ========================= ! 
    151146            ! 
    152             IF( nn_sstr == 1 ) THEN                   ! Temperature restoring term 
     147            IF( nn_sstr == 1 ) THEN                   !* Temperature restoring term 
    153148!CDIR COLLAPSE 
    154                ! use zqrp scalar to optimize memory access (speedup the loop) 
    155149               DO jj = 1, jpj 
    156150                  DO ji = 1, jpi 
     
    163157            ENDIF 
    164158            ! 
    165             IF( nn_sssr == 1 ) THEN                   ! Salinity damping term (salt flux, emps only) 
     159            IF( nn_sssr == 1 ) THEN                   !* Salinity damping term (salt flux, emps only) 
    166160               zsrp = deds / rday                                     ! from [mm/day] to [kg/m2/s] 
    167161!CDIR COLLAPSE 
    168                ! use zerp scalar to optimize memory access (speedup the loop) 
    169162               DO jj = 1, jpj 
    170163                  DO ji = 1, jpi 
     
    177170               END DO 
    178171               CALL iom_put( "erp", erp )                             ! freshwater flux damping 
    179             ELSEIF( nn_sssr == 2 ) THEN               ! Salinity damping term (volume flux, emp and emps) 
     172            ELSEIF( nn_sssr == 2 ) THEN               !* Salinity damping term (volume flux, emp and emps) 
    180173               zsrp = deds / rday                                     ! from [mm/day] to [kg/m2/s] 
    181174!CDIR COLLAPSE 
    182                ! use zerp scalar to optimize memory access (speedup the loop) 
    183175               DO jj = 1, jpj 
    184176                  DO ji = 1, jpi                             
Note: See TracChangeset for help on using the changeset viewer.