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 756 for branches – NEMO

Changeset 756 for branches


Ignore:
Timestamp:
2007-12-07T15:32:45+01:00 (16 years ago)
Author:
ctlod
Message:

make modifications closer to the initial GYRE forcing, see ticket:#36

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_001_SBC/NEMO/OPA_SRC/SBC/sbcana.F90

    r702 r756  
    166166      zcos_sais2 = COS( (ztime - ztimemax2) / (ztimemax2 - ztimemin2) * rpi ) 
    167167 
    168       ztrp= - 40.          ! retroaction term on heat fluxes (W/m2/K) 
     168      ztrp= - 40.e0        ! retroaction term on heat fluxes (W/m2/K) 
    169169      zconv = 3.16e-5      ! convertion factor: 1 m/yr => 3.16e-5 mm/s 
    170170      DO jj = 1, jpj 
     
    192192      emps(:,:) = emp(:,:) 
    193193 
    194       ! compute the emp flux such as its integration on the whole domain and at each time be zero 
    195       zsumemp = 0.e0 
    196       zsurf = 0.e0 
    197       DO jj = 1, jpj 
    198          DO ji = 1, jpi 
    199             zsumemp = zsumemp + emp(ji,jj) * tmask(ji,jj,1) * tmask_i(ji,jj) 
    200             zsurf   = zsurf   +              tmask(ji,jj,1) * tmask_i(ji,jj) 
     194      ! Compute the emp flux such as its integration on the whole domain at each time is zero 
     195      IF( nbench /= 1 .AND. nbit_cmp /= 1 ) THEN 
     196         zsumemp = 0.e0   ;   zsurf = 0.e0 
     197         DO jj = 1, jpj 
     198            DO ji = 1, jpi 
     199               zsumemp = zsumemp + emp(ji,jj) * tmask(ji,jj,1) * tmask_i(ji,jj) 
     200               zsurf   = zsurf   +              tmask(ji,jj,1) * tmask_i(ji,jj) 
     201            END DO 
    201202         END DO 
    202       END DO 
    203  
    204       IF( lk_mpp )   CALL mpp_sum( zsumemp  )       ! sum over the global domain 
    205       IF( lk_mpp )   CALL mpp_sum( zsurf    )       ! sum over the global domain 
    206  
    207       IF( nbench /= 0 ) THEN 
    208          ! Benchmark GYRE configuration (to allow the bit to bit comparison between Mpp/Mono case) 
    209          zsumemp = 0.e0 
    210       ELSE 
     203 
     204         IF( lk_mpp )   CALL mpp_sum( zsumemp  )       ! sum over the global domain 
     205         IF( lk_mpp )   CALL mpp_sum( zsurf    )       ! sum over the global domain 
     206 
    211207         ! Default GYRE configuration 
    212208         zsumemp = zsumemp / zsurf 
     209      ELSE 
     210         ! Benchmark GYRE configuration (to allow the bit to bit comparison between Mpp/Mono case) 
     211         zsumemp = 0.e0   ;    zsurf = 0.e0 
    213212      ENDIF 
    214213 
     
    227226      zday0   =   ndate0 - zyear0 * 10000 - zmonth0 * 100 
    228227      !Calculates nday_year, day since january 1st 
    229       zday_year0 = zday0 
     228      zday_year0 = (zmonth0-1)*30.+zday0 
     229 
    230230      !accumulates days of previous months of this year 
    231  
    232       DO js = 1, zmonth0 
    233          IF( nleapy > 1 ) THEN 
    234             zday_year0 = zday_year0 + nleapy 
    235          ELSE 
    236             IF( MOD(zyear0, 4 ) == 0 ) THEN 
    237                zday_year0 = zday_year0 + nbiss(js) 
    238             ELSE 
    239                zday_year0 = zday_year0 + nobis(js) 
    240             ENDIF 
    241          ENDIF 
    242       END DO 
    243  
    244231      ! day (in hours) since january the 1st 
    245232      ztime = FLOAT( kt ) * rdt / (rmmss * rhhmm)  &  ! incrementation in hour 
    246          &     - (nyear - 1) * rjjhh * raajj       &  !  - nber of hours the precedent years 
    247          &     + zday_year0 / 24                      ! nber of hours initial date 
    248       ! day 21th counted since the 1st January 
    249       zdaymax = 21                                    ! 21th day of the month 
    250       DO js = 1, 5                                    ! count each day  until end May 
    251          IF( nleapy > 1 ) THEN 
    252             zdaymax = zdaymax + nleapy 
    253          ELSE 
    254             IF( MOD(zyear0, 4 ) == 0 ) THEN 
    255                 zdaymax = zdaymax + nbiss(js) 
    256             ELSE 
    257                 zdaymax = zdaymax + nobis(js) 
    258             ENDIF 
    259          ENDIF 
    260       END DO 
    261       ztimemax = zdaymax * 24                      ! 21th june     in hours 
     233         &     - (nyear - 1) * rjjhh * raajj          !  - nber of hours the precedent years 
     234      ztimemax = ((5.*30.)+21.)* 24.               ! 21th june     in hours 
    262235      ztimemin = ztimemax + rjjhh * raajj / 2      ! 21th december in hours 
    263236      !                                            ! NB: rjjhh * raajj / 4 = 1 seasonal cycle in hours 
     
    281254      ! ---------------------------------- ! 
    282255      IF( kt == nit000 .AND. lwp ) THEN  
    283          WRITE(numout,*)' sbc_gyre : analytical surface fluxes for GYRE configuration'                
    284          WRITE(numout,*)' ~~~~~~~~ '  
     256         WRITE(numout,*) 
     257         WRITE(numout,*)'sbc_gyre : analytical surface fluxes for GYRE configuration'                
     258         WRITE(numout,*)'~~~~~~~~ '  
    285259         WRITE(numout,*)'           nyear      = ', nyear 
    286260         WRITE(numout,*)'           nmonth     = ', nmonth 
     
    317291         WRITE(numout,*)'           zday0      = ', zday0 
    318292         WRITE(numout,*)'           zday_year0 = ',zday_year0 
    319          WRITE(numout,*)'           nobis(2)', nobis(2) 
    320          WRITE(numout,*)'           nobis(5)', nobis(5) 
    321          WRITE(numout,*)'           nobis(6)', nobis(6) 
    322          WRITE(numout,*)'           nobis(1)', nobis(1) 
    323          WRITE(numout,*)'           nobis(zmonth0 -1)', nobis(zmonth0 - 1) 
    324293         WRITE(numout,*)'           raajj  = ', raajj 
    325294      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.