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 – 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)

Location:
branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB
Files:
3 edited

Legend:

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

    r3381 r3383  
    8080   !                                                             !!! parameters controlling iceberg characteristics and modelling 
    8181   REAL(wp)                            ::   berg_dt                   !: Time-step between iceberg CALLs (should make adaptive?) 
    82    INTEGER                             ::   current_year              !:  
    83    REAL(wp)                            ::   current_yearday           !: 1.00-365.99 
    8482   REAL(wp), DIMENSION(:), ALLOCATABLE ::   first_width, first_length !:  
    8583   LOGICAL                             ::   l_restarted_bergs=.FALSE.  ! Indicate whether we read state from a restart or not 
  • 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                  ! 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbstp.F90

    r3379 r3383  
    5959      INTEGER, INTENT(in) ::   kt   ! time step index 
    6060      ! 
    61       INTEGER ::   iyr, imon, iday, ihr, imin, isec        ! local integers 
    6261      LOGICAL ::   ll_sample_traj, ll_budget, ll_verbose   ! local logical 
    6362      !!---------------------------------------------------------------------- 
     
    7978      CALL icb_dia_step() 
    8079 
    81       ! Manage time 
    82       ! Convert nemo time variables from dom_oce into local versions 
    83       ! Note that yearday function assumes 365 day year!! 
    84       iyr = nyear 
    85       imon = nmonth 
    86       iday = nday 
    87       ihr = INT(nsec_day/3600) 
    88       imin = INT((nsec_day-ihr*3600)/60) 
    89       isec = nsec_day - ihr*3600 - imin*60 
    90       current_year    = iyr 
    91       current_yearday = icb_utl_yearday(imon, iday, ihr, imin, isec) 
    92  
    9380      ll_verbose = .FALSE. 
    9481      IF( nn_verbose_write > 0 .AND. & 
    9582          MOD(kt-1,nn_verbose_write ) == 0 )   ll_verbose = nn_verbose_level >= 0 
    96       IF( ll_verbose ) WRITE(numicb,9100) iyr, imon, iday, ihr, imin, isec, & 
    97                                         current_year, current_yearday 
    98  9100 FORMAT('y,m,d=',3i5,' h,m,s=',3i5,' yr,yrdy=',i5,f8.3) 
     83 
     84      ! write out time 
     85      IF( ll_verbose ) WRITE(numicb,9100) nktberg, ndastp, nsec_day 
     86 9100 FORMAT('kt= ',i8, ' day= ',i8,' secs=',i8) 
    9987 
    10088      ! copy nemo forcing arrays into iceberg versions with extra halo 
Note: See TracChangeset for help on using the changeset viewer.