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 3383 for branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbclv.F90 – NEMO

Ignore:
Timestamp:
2012-05-04T16:06:37+02:00 (12 years ago)
Author:
sga
Message:

NEMO branch dev_r3337_NOCS10_ICB: rationalise date calculation (which also helps with key_agrif problems)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbclv.F90

    r3379 r3383  
    117117      TYPE(iceberg) ::   newberg 
    118118      TYPE(point)   ::   newpt 
    119       REAL(wp)      ::   zddt, zcalved_to_berg, zheat_to_berg 
     119      REAL(wp)      ::   zday, zcalved_to_berg, zheat_to_berg 
    120120      !!---------------------------------------------------------------------- 
    121121      ! 
    122122      icntmax = 0 
     123      zday    = REAL(nday_year,wp) + REAL(nsec_day,wp)/86400.0_wp 
    123124      ! 
    124125      DO jn = 1, nclasses 
     
    126127            DO ji = nicbdi, nicbei 
    127128               ! 
    128                zddt  = 0._wp 
    129129               icnt = 0 
    130130               ! 
     
    146146                  newpt%mass_of_bits   = 0._wp                          ! no bergy 
    147147                  ! 
    148                   newpt%year   = current_year 
    149                   newpt%day    = current_yearday + zddt / rday 
     148                  newpt%year   = nyear 
     149                  newpt%day    = zday 
    150150                  newpt%heat_density = berg_grid%stored_heat(ji,jj) / berg_grid%stored_ice(ji,jj,jn)   ! This is in J/kg 
    151151                  ! 
     
    162162                  berg_grid%stored_ice(ji,jj,jn) = berg_grid%stored_ice(ji,jj,jn) - zcalved_to_berg 
    163163                  ! 
    164                   zddt  = zddt + berg_dt * 2._wp / 17._wp    ! Minor offset to start day    !!gm why??? 
    165164                  icnt = icnt + 1 
    166165                  ! 
Note: See TracChangeset for help on using the changeset viewer.