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.
[RNF] River runoff time-stepping – Message List – Discussion – NEMO

Skilled (#3) - [RNF] River runoff time-stepping (#14) - Message List

[RNF] River runoff time-stepping
 solved

Dear all,

i'm new to NEMO and i'm trying to include river runoff into a GYRE-based model (i've included my own bathymetry and switched to s-coordinates). NEMO however starts reading my hourly river runoff netCDFs with 49th hour and not with the first one ( = from the beginning), as I explain below. The time stepping is as follows:

nn_it000    =       1   !  first time step
nn_itend    =    2160   !  last  time step
rn_rdt = 120

The starting date of my 72 hour simulation is arbitrary and set to

nn_date0 = 20170103

I've created the river runoff netCDF files with hourly discharge, which NEMO reads ok, but it seems to start reading with record 49 (instead of 1), that is 2 days after 20170103:

iom_nf90_open ~~~ open existing file: ./adriatic_rivers_y2017m01.nc in READ mode
                    ---> ./adriatic_rivers_y2017m01.nc OK
read rorunoff (rec:     49) in ./adriatic_rivers_y2017m01.nc ok
fld_read: var rorunoff kt =        1 (   2.0007 days), Y/M/D = 2017/01/03, record:   0049 (days    2.0000 <->    2.0417)

Having started 2 days after it was supposed to, NEMO of course crashes when it runs out of river runoff records after 24 hours:

======>> time-step =     721      New day, DATE Y/M/D = 2017/01/04      nday_year = 004
         nsec_year =   259260   nsec_month =  259260   nsec_day =    60
   nsec_week =   172860
 ===>>> : E R R O R
         ===========
           iom_get_123d, file: ./adriatic_rivers_y2017m01.nc, var: rorunoff
 start and count too big regarding to the size of the data,
 (istart(3) + icnt(3) - 1) =    73
  is larger than idimsz(3) =    72

My river runoff namelist section is as follows:

!-----------------------------------------------------------------------
&namsbc_rnf    !   runoffs namelist surface boundary condition
!-----------------------------------------------------------------------
!          !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
   sn_rnf      = 'adriatic_rivers'       ,        1         , 'rorunoff',   .false.    , .false. , ''  , ''       , ''  , ''
   sn_s_rnf    = 'adriatic_rivers'       ,        1         , 'rosaline',   .false.    , .false. , ''  , ''       , ''  , ''
   sn_t_rnf    = 'adriatic_rivers'       ,        1         , 'rotemper',   .false.    , .false. , ''  , ''       , ''  , ''
   sn_dep_rnf  = 'adriatic_rivers'       ,        1         , 'rodepth' ,   .false.    , .false. , ''  , ''       , ''  , ''
   ln_rnf_mouth = .false.   !  specific treatment at rivers mouths
   ln_rnf_depth = .false.    !  read in depth information for runoff ! če tole postavim na .true., iz neznanega razloga dobim segmentation fault.
   ln_rnf_tem   = .true.    !  read in temperature information for runoff
   ln_rnf_sal   = .true.    !  read in salinity information for runoff
/

Can anyone perhaps suggest what i am doing wrong? Thanks for your time and kind regards!

Matjaz

  • Message #12

    Hi,

    NEMO assumes that the file is a monthly file containing hourly values for the whole month regardless of what your model start date is. It therefore assumes that the first value in your runoff file is for 1st January.

    The easiest way to get around this is probably to fill out the file with records for the first 2 days of the month (even if they are not real values).

    Hope that helps

    Tim

    • Message #13

      Hi,

      great, thanks so much! Then that's exactly what i'm going to do, thanks again!

      Matjaz

      • Message #14

        Hi all,

        just to wrap up: Tim Graham's comment solved my problem, but as far as I can tell, NEMO requires YEARLY, not MONTHLY files of discharge, regardless of the forcing frequency. To create a three day run with hourly river forcing in, say, mid February 2017, i needed to create an hourly river discharge file *_y2017m02.nc, starting on 2017 January 1st 00UTC with arbitrary values until the simulation period and real discharges during the simulation period. Then everything runs as it should.

        Regards,

        Matjaz

        • Message #16

          Hi Matjaz, the model assumes that input files are yearly if you do not specify differently in the input namelists under the field named 'yearly'/'monthly', just after clim.

          Beside the time frequency of input data (frequency), you need to specify which is the time-span of data in your input files by choosing among daily, monthly or yearly.

          So, going back to the simulation You want to start in mid february, your namelist should look like

          !-----------------------------------------------------------------------
          &namsbc_rnf    !   runoffs namelist surface boundary condition
          !-----------------------------------------------------------------------
          !              !  file name        ! frequency (hours) ! variable  ! time interp. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
          !              !                   !  (if <0  months)  !   name    !   (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      !
             sn_rnf      = 'adriatic_rivers' ,        1          , 'rorunoff',   .false.    , .false. , 'monthly'  , ''       , ''  , ''
             sn_s_rnf    = 'adriatic_rivers' ,        1          , 'rosaline',   .false.    , .false. , 'monthly'  , ''       , ''  , ''
             sn_t_rnf    = 'adriatic_rivers' ,        1          , 'rotemper',   .false.    , .false. , 'monthly'  , ''       , ''  , ''
             sn_dep_rnf  = 'adriatic_rivers' ,        1          , 'rodepth' ,   .false.    , .false. , 'monthly'  , ''       , ''  , ''
             ln_rnf_mouth = .false.   !  specific treatment at rivers mouths
             ln_rnf_depth = .false.    !  read in depth information for runoff ! če tole postavim na .true., iz neznanega razloga dobim segmentation fault.
             ln_rnf_tem   = .true.    !  read in temperature information for runoff
             ln_rnf_sal   = .true.    !  read in salinity information for runoff
          /
          

          and the input file adriatic_rivers_y2017m02.nc should then be starting from 1st February and contains the required hourly fields. Then you can check the fldread counter (as you already did) to see if it correctly works as required.

          If you are quite familiar with fortran code, you can have a look into NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90 to see how input data structure like this one are handled within NEMO code.

Attachments

No attachments created.