How do I set the time in the bulk file

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

How do I set the time in the bulk file

#1 Unread post by jc_Sun »

Hello,
I'm having a problem running ROMs, which tells me that there is a problem with the timing. The driver field file I use is CFVR data, and the time is datenum(NECPTime-1980010100:00:00). Do I need to convert it into ROMS readable time? How do I set it?
MULTIFILE_INFO_S2D - Error while processing forcing multi-files:
data does not include initialization time = 0001-01-01 00:00:00.00

0040-07-30 00:00:00.00 0040-09-02 18:00:00.00 roms_blk_CFSR_Y2019M8.nc
Found Error: 04 Line: 481 Source: ROMS/Utility/check_multifile.F, multifile_info_s2d
Found Error: 04 Line: 188 Source: ROMS/Utility/check_multifile.F
Found Error: 04 Line: 656 Source: ROMS/Nonlinear/initial.F
Found Error: 04 Line: 197 Source: ROMS/Drivers/nl_roms.h, ROMS_initialize

jbettencourt

Re: How do I set the time in the bulk file

#2 Unread post by jbettencourt »

Hi,

It seems you need to check two things:
  • In your forcing file, the units attribute of the time variable to see if it matches with the time data.
  • In your input file, the initialisation time of the model, that is the value of TIMEREF and DSTART.

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: How do I set the time in the bulk file

#3 Unread post by jc_Sun »

jbettencourt wrote: Mon Sep 19, 2022 7:00 am Hi,

It seems you need to check two things:
  • In your forcing file, the units attribute of the time variable to see if it matches with the time data.
  • In your input file, the initialisation time of the model, that is the value of TIMEREF and DSTART.
Hello,
In my forcing file, the units attribute of the time variable as shown below. And do the values of TIMEREF and DSTART need to be checked in the in file?
wind_time
Size: 140x1
Dimensions: wind_time
Datatype: double
Attributes:
long_name = 'wind_time'
units = 'days'
field = 'Uwind_time, scalar, series'
Uwind
Size: 63x85x140
Dimensions: xrho,yrho,wind_time
Datatype: double
Attributes:
long_name = 'surface u-wind component'
units = 'meter second-1'
field = 'Uwind, scalar, series'
coordinates = 'lon lat'
time = 'wind_time'
Vwind
Size: 63x85x140
Dimensions: xrho,yrho,wind_time
Datatype: double
Attributes:
long_name = 'surface v-wind component'
units = 'meter second-1'
field = 'Vwind, scalar, series'
coordinates = 'lon lat'
time = 'wind_time'
Pair_time
Size: 140x1
Dimensions: Pair_time
Datatype: double
Attributes:
long_name = 'Pair_time'
units = 'days'
field = 'Pair_time, scalar, series'
Pair
Size: 63x85x140
Dimensions: xrho,yrho,Pair_time
Datatype: double
Attributes:
long_name = 'surface air pressure'
units = 'millibar'
field = 'Pair, scalar, series'
coordinates = 'lon lat'
time = 'Pair_time'

jbettencourt

Re: How do I set the time in the bulk file

#4 Unread post by jbettencourt »

Your units attribute should be like "days since 1980-01-01 00:00:00", so that the model can have a reference time from which to count the time units. In the input file, you should set TIMEREF to an appropriate reference time, that could be the same as the one in the forcing file, and then set DSTART accordingly.

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: How do I set the time in the bulk file

#5 Unread post by jc_Sun »

jbettencourt wrote: Mon Sep 19, 2022 7:49 am Your units attribute should be like "days since 1980-01-01 00:00:00", so that the model can have a reference time from which to count the time units. In the input file, you should set TIMEREF to an appropriate reference time, that could be the same as the one in the forcing file, and then set DSTART accordingly.
Hi jbettencourt

Thanks a lot for your replay, i'll take that in account

Have a nice day

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: How do I set the time in the bulk file

#6 Unread post by jc_Sun »

[/code]
jbettencourt wrote: Mon Sep 19, 2022 7:49 am Your units attribute should be like "days since 1980-01-01 00:00:00", so that the model can have a reference time from which to count the time units. In the input file, you should set TIMEREF to an appropriate reference time, that could be the same as the one in the forcing file, and then set DSTART accordingly.
Hello,
According to your proposal, I have changed the units into days since 19800101, as shown in the picture below, but I was also prompted to make a new error.

Code: Select all

 wind_time 
           Size:       140x1
           Dimensions: wind_time
           Datatype:   double
           Attributes:
                       long_name = 'wind_time'
                       units     = 'days since 1980-01-01'
                       field     = 'Uwind_time, scalar, series'
    Uwind     
           Size:       63x85x140
           Dimensions: xrho,yrho,wind_time
           Datatype:   double
           Attributes:
                       long_name   = 'surface u-wind component'
                       units       = 'meter second-1'
                       field       = 'Uwind, scalar, series'
                       coordinates = 'lon lat'
                       time        = 'wind_time'

Code: Select all

Found Error: 04   Line: 354      Source: ROMS/Utility/get_2dfld.F, get_2dfld_nf90

 GET_2DFLD_NF90 - error while reading variable: Uwind   at TIME index = 8
 Found Error: 04   Line: 112      Source: ROMS/Utility/get_2dfld.F
 Found Error: 04   Line: 169      Source: ROMS/Nonlinear/get_data.F
 Found Error: 04   Line: 670      Source: ROMS/Nonlinear/initial.F
 Found Error: 04   Line: 197      Source: ROMS/Drivers/nl_roms.h, ROMS_initialize

jbettencourt

Re: How do I set the time in the bulk file

#7 Unread post by jbettencourt »

GET_2DFLD_NF90 - error while reading variable: Uwind at TIME index = 8
I think this means that the error is with the Uwind variable data in the file.

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: How do I set the time in the bulk file

#8 Unread post by jc_Sun »

jbettencourt wrote: Tue Sep 20, 2022 6:39 am
GET_2DFLD_NF90 - error while reading variable: Uwind at TIME index = 8
I think this means that the error is with the Uwind variable data in the file.
I'm sorry I left a little bit out, but it's related to the grid.But how to deal with that? The latitude and longitude of my bulk file is shown below.

Code: Select all

REGRID - input gridded data does not contain model grid:

          Gridded:  LonMin =  117.0000 LonMax =  124.0000
                    LatMin =   37.0000 LatMax =   41.0148
          Model:    LonMin =    0.0000 LonMax =    0.0000
                    LatMin =    0.0000 LatMax =    0.0000
 Found Error: 04   Line: 354      Source: ROMS/Utility/get_2dfld.F, get_2dfld_nf90

 GET_2DFLD_NF90 - error while reading variable: Uwind   at TIME index = 8
 Found Error: 04   Line: 112      Source: ROMS/Utility/get_2dfld.F
 Found Error: 04   Line: 169      Source: ROMS/Nonlinear/get_data.F
 Found Error: 04   Line: 670      Source: ROMS/Nonlinear/initial.F
 Found Error: 04   Line: 197      Source: ROMS/Drivers/nl_roms.h, ROMS_initialize

Code: Select all

lon       
           Size:       63x85
           Dimensions: xrho,yrho
           Datatype:   double
           Attributes:
                       long_name = 'longitude'
                       units     = 'degrees_east'
                       field     = 'xp, scalar, series'
    lat       
           Size:       63x85
           Dimensions: xrho,yrho
           Datatype:   double
           Attributes:
                       long_name = 'latitude'
                       units     = 'degrees_north'
                       field     = 'yp, scalar, series'

jbettencourt

Re: How do I set the time in the bulk file

#9 Unread post by jbettencourt »

Can you post the log file?

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: How do I set the time in the bulk file

#10 Unread post by jc_Sun »

jbettencourt wrote: Tue Sep 20, 2022 11:52 am Can you post the log file?
This si my log file.
Attachments
output.txt
(33.08 KiB) Downloaded 233 times

jbettencourt

Re: How do I set the time in the bulk file

#11 Unread post by jbettencourt »

From what I could gather, the problem might be that your forcing fields grid is inconsistent with your model grid. Your model grid appears to be defined in cartesian coordinates:

Code: Select all

 
 ANA_GRID    - x-location of RHO-points: x_rho
                   (Grid = 01, Min = -5.00000000E+02 Max =  8.35000000E+04)
ANA_GRID    - y-location of RHO-points: y_rho
                   (Grid = 01, Min = -5.00000000E+02 Max =  6.15000000E+04)
while your forcing fields appear to be defined on spherical coordinates:

Code: Select all

REGRID - input gridded data does not contain model grid:

          Gridded:  LonMin =  117.0000 LonMax =  124.0000
                    LatMin =   37.0000 LatMax =   41.0148
          Model:    LonMin =    0.0000 LonMax =    0.0000
                    LatMin =    0.0000 LatMax =    0.0000
If you look at the last two lines of the error message above, you'll see that the model doesn't have information about the spherical coordinates of the model grid (Lon and lat min/max are zero).
To use spherical coordinates in the model grid, you should activate the SPHERICAL CPP flag in the application header file and then define the spherical coordinates in ana_grid.h.

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: How do I set the time in the bulk file

#12 Unread post by jc_Sun »

jbettencourt wrote: Wed Sep 21, 2022 6:43 am From what I could gather, the problem might be that your forcing fields grid is inconsistent with your model grid. Your model grid appears to be defined in cartesian coordinates:

Code: Select all

 
 ANA_GRID    - x-location of RHO-points: x_rho
                   (Grid = 01, Min = -5.00000000E+02 Max =  8.35000000E+04)
ANA_GRID    - y-location of RHO-points: y_rho
                   (Grid = 01, Min = -5.00000000E+02 Max =  6.15000000E+04)
while your forcing fields appear to be defined on spherical coordinates:

Code: Select all

REGRID - input gridded data does not contain model grid:

          Gridded:  LonMin =  117.0000 LonMax =  124.0000
                    LatMin =   37.0000 LatMax =   41.0148
          Model:    LonMin =    0.0000 LonMax =    0.0000
                    LatMin =    0.0000 LatMax =    0.0000
If you look at the last two lines of the error message above, you'll see that the model doesn't have information about the spherical coordinates of the model grid (Lon and lat min/max are zero).
To use spherical coordinates in the model grid, you should activate the SPHERICAL CPP flag in the application header file and then define the spherical coordinates in ana_grid.h.
Thank you for your reply and have a nice day!

Post Reply