Hello,
I am a new user of ROMS model. I a using D_ECMWF2ROMS Matlab scripts for ECMWF atmospheric forcing. Now in ERA5 data we are getting hourly data for latest year. so, for hourly data how will I handle with the accumulation data? The following part is for 3-hourly datasets. how to edit it for hourly. please help me.
{
if (F(n).scale < 0),
step = rem(frc_time,0.5)*24;
if step == 3
fieldfinal = field;
else
fieldfinal = field - field_previous; % At other steps subtract
end % the previous accumulation
frc_time = frc_time - 1.5/24; % Center forcing time on the
% accumulation interval
field_previous = field; % Save this accumulation
% to on the next step
}
end
Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
I wrote that code long ago and have not updated from ERA-Interim to ERA5. You will have to figure out the accumulation logic yourself, if indeed that is still how the data are presented (it may not be, check the units).
I now access ERA5 from the NCAR Research Data Archive using roms_write_era5_NCARds633_frcfile.m from my code at
https://github.com/johnwilkin/roms_wilkin
I now access ERA5 from the NCAR Research Data Archive using roms_write_era5_NCARds633_frcfile.m from my code at
https://github.com/johnwilkin/roms_wilkin
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
-
- Posts: 27
- Joined: Fri Aug 19, 2022 12:24 pm
- Location: Institute of Oceanology of the Chinese Academy
Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
Hello wilkin,wilkin wrote: ↑Thu May 20, 2021 11:32 am I wrote that code long ago and have not updated from ERA-Interim to ERA5. You will have to figure out the accumulation logic yourself, if indeed that is still how the data are presented (it may not be, check the units).
I now access ERA5 from the NCAR Research Data Archive using roms_write_era5_NCARds633_frcfile.m from my code at
https://github.com/johnwilkin/roms_wilkin
Thank you for sharing the ROMS_WRITE_ERA5_NCAR_DS633 file, but when I used it as the driver field file, there was an error, missing some attribute. How to solve this problem?
Code: Select all
GET_CYCLE_NF90 - unable to get value for attribute: cycle_length
in variable: zeta_time
This attribute value is expected to be of
the same external type as the variable.
Found Error: 02 Line: 346 Source: ROMS/Utility/inquiry.F, inquiry_nf90
Found Error: 02 Line: 209 Source: ROMS/Utility/get_ngfld.F, get_ngfld_nf90
Found Error: 02 Line: 107 Source: ROMS/Utility/get_ngfld.F
Found Error: 02 Line: 888 Source: ROMS/Nonlinear/get_data.F
Found Error: 02 Line: 670 Source: ROMS/Nonlinear/initial.F
Found Error: 02 Line: 197 Source: ROMS/Drivers/nl_roms.h, ROMS_initialize
Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
The netcdf files created by roms_write_era5_NCARds633_frcfile.m have a time coordinate variable called "time" (not zeta_time) and the "time" attribute of all variables will point ROMS to read "time" in preference the default in varinfo.dat.
But, I can't imagine what meteorology forcing file would have "zeta_time". Zeta is sea level. I doubt this error is associated with the ERA5 forcing data but you've given too few details to suggest what might be the problem.
But, I can't imagine what meteorology forcing file would have "zeta_time". Zeta is sea level. I doubt this error is associated with the ERA5 forcing data but you've given too few details to suggest what might be the problem.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
-
- Posts: 27
- Joined: Fri Aug 19, 2022 12:24 pm
- Location: Institute of Oceanology of the Chinese Academy
Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
This are my h file and output log file.wilkin wrote: ↑Thu Sep 22, 2022 1:53 pm The netcdf files created by roms_write_era5_NCARds633_frcfile.m have a time coordinate variable called "time" (not zeta_time) and the "time" attribute of all variables will point ROMS to read "time" in preference the default in varinfo.dat.
But, I can't imagine what meteorology forcing file would have "zeta_time". Zeta is sea level. I doubt this error is associated with the ERA5 forcing data but you've given too few details to suggest what might be the problem.
- Attachments
-
- upwelling.h
- (1.68 KiB) Downloaded 213 times
-
- output.txt
- (48.43 KiB) Downloaded 228 times
Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
Your file output.txt indicates that the ERA5 forcing data were read successfully.
The next thing ROMS is doing when the error occurs is reading the open boundary conditions file, and the first variable it reads is zeta, so that's why you are getting an error about zeta_time.
The log says your Input Lateral Boundary File 01 is croco_bry_HYCOM_Y2019M8.nc, so that's where to look for what's wrong. If that's been made with CROCO tools, then you might have some inconsistency with MYROMS.
The next thing ROMS is doing when the error occurs is reading the open boundary conditions file, and the first variable it reads is zeta, so that's why you are getting an error about zeta_time.
The log says your Input Lateral Boundary File 01 is croco_bry_HYCOM_Y2019M8.nc, so that's where to look for what's wrong. If that's been made with CROCO tools, then you might have some inconsistency with MYROMS.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
-
- Posts: 27
- Joined: Fri Aug 19, 2022 12:24 pm
- Location: Institute of Oceanology of the Chinese Academy
Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
Thinks for your reply.wilkin wrote: ↑Thu Sep 22, 2022 2:30 pm Your file output.txt indicates that the ERA5 forcing data were read successfully.
The next thing ROMS is doing when the error occurs is reading the open boundary conditions file, and the first variable it reads is zeta, so that's why you are getting an error about zeta_time.
The log says your Input Lateral Boundary File 01 is croco_bry_HYCOM_Y2019M8.nc, so that's where to look for what's wrong. If that's been made with CROCO tools, then you might have some inconsistency with MYROMS.