Era5 data is not read by the ROMS

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
AMIRHOSSEIN
Posts: 43
Joined: Tue Feb 11, 2020 6:03 pm
Location: IUST

Era5 data is not read by the ROMS

#1 Unread post by AMIRHOSSEIN »

Hi,

Using the pre-made Python code(below), I downloaded the Era5 data and converted it to ROMS input
ERA5-ROMS-master.zip
(18.88 KiB) Downloaded 353 times
When the model wants to read the data, I get the following error:

........................................................
NETCDF_GET_TIME_1D - error while inquiring ID for variable: srf_time
in input file: era5_msdwswrf_year_2013_roms.nc
call from: ROMS/Utility/get_cycle.F
NetCDF: Variable not found
........................................................

I'm confused
Please suggest the best way to use Era5 data for the model(should I create a Netcdf by myself?)

thanks a lot

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Era5 data is not read by the ROMS

#2 Unread post by kate »

NETCDF_GET_TIME_1D - error while inquiring ID for variable: srf_time
in input file: era5_msdwswrf_year_2013_roms.nc
What does "ncdump -h era5_msdwswrf_year_2013_roms.nc" look like? Is there a time variable? What is it called? ROMS is looking for srf_time and it could have gotten this from (a) the varinfo.dat file, or (b) the "time" attribute on the variable in the netcdf file. Here's a working ncdump:

Code: Select all

chinook04.rcs.alaska.edu 239% ncdump -h JRA55DO_1.4_swrad_1990.nc
netcdf JRA55DO_1.4_swrad_1990 {
dimensions:
	lon = 640 ;
	lat = 320 ;
	time = UNLIMITED ; // (2920 currently)
variables:
	double lon(lon) ;
		lon:units = "degrees_east" ;
		lon:valid_min = 0. ;
		lon:valid_max = 359.4375 ;
		lon:long_name = "longitude" ;
	double lat(lat) ;
		lat:units = "degrees_north" ;
		lat:valid_min = -89.5700895506066 ;
		lat:valid_max = 89.5700895506066 ;
		lat:long_name = "latitude" ;
	double time(time) ;
		time:units = "days since 1900-01-01 00:00:00" ;
		time:valid_min = 32872.0625 ;
		time:valid_max = 33236.9375 ;
		time:calendar = "gregorian" ;
	float swrad(time, lat, lon) ;
		swrad:long_name = "Surface Downwelling Shortwave Radiation" ;
		swrad:units = "W m-2" ;
		swrad:coordinates = "lon lat" ;
		swrad:time = "time" ;
		swrad:_FillValue = 1.e+15f ;
		swrad:missing_value = 1.e+15f ;

// global attributes:
		:About = "File created by SOSIE interpolation environement, Laurent Brodeau, 2010, (brodeau@gmail.com)" ;
		:history = "Fri May 24 12:45:17 2019: ncatted -O -a valid_range,,d,f, JRA55DO_1.4_swrad_1990.nc\n",
			"Fri May 24 12:38:54 2019: ncatted -O -a calendar,time,m,c,gregorian JRA55DO_1.4_swrad_1990.nc" ;
		:NCO = "\"4.6.1\"" ;
ROMS knows to read the variable swrad from the varinfo.dat file, then the swrad:time = "time" tells it to read the "time" variable instead of srf_time. It is far faster to use ncatted from the NCO package to fix these things than to fix and rerun all the Python scripts.

AMIRHOSSEIN
Posts: 43
Joined: Tue Feb 11, 2020 6:03 pm
Location: IUST

Re: Era5 data is not read by the ROMS

#3 Unread post by AMIRHOSSEIN »

What does "ncdump -h era5_msdwswrf_year_2013_roms.nc" look like? Is there a time variable? What is it called?
......................................
dimensions:
lon = 89 ;
lat = 49 ;
swrad_time = UNLIMITED ; // (744 currently)
variables:
double lon(lon) ;
lon:_FillValue = 1.e+35 ;
lon:long_name = "Longitude" ;
lon:units = "degree_east" ;
lon:standard_name = "longitude" ;
double lat(lat) ;
lat:_FillValue = 1.e+35 ;
lat:long_name = "Latitude" ;
lat:units = "degree_north" ;
lat:standard_name = "latitude" ;
double swrad_time(swrad_time) ;
swrad_time:_FillValue = 1.e+35 ;
swrad_time:long_name = "time" ;
swrad_time:units = "days since 1948-01-01 00:00:00" ;
swrad_time:field = "time, scalar, series" ;
swrad_time:calendar = "gregorian" ;
double swrad(swrad_time, lat, lon) ;
swrad:_FillValue = 1.e+35 ;
swrad:long_name = "Mean surface downward short-wave radiation flux" ;
swrad:standard_name = "msdwswrf" ;
swrad:coordinates = "lon lat swrad_time" ;
swrad:units = "W m**-2" ;
swrad:missing_value = 1.e+35 ;

// global attributes:
:title = "ERA5 ECMWF model forcing for parameter mean_surface_downward_short_wave_radiation_flux" ;
:description = "Created by Trond Kristiansen (at) niva.no.Atmospheric data on original grid but converted to ROMS units and parameter names.Files created using the ECMWF_tools toolbox:https://github.com/trondkr/ERA5-ROMS" ;
:history = "Created 2021-03-16 00:14:21.133620" ;
:link = "https://github.com/trondkr/" ;
:Conventions = "CF-1.0" ;
}
..........................................

Thank you for your interesting and constant help

AMIRHOSSEIN
Posts: 43
Joined: Tue Feb 11, 2020 6:03 pm
Location: IUST

Re: Era5 data is not read by the ROMS

#4 Unread post by AMIRHOSSEIN »

thank you very much kate
finally, I did it by editing the varinfo.dat and a header script for lwrad error
but now, I face another problem:
.........................
Blowing-up: Saving latest model state into RESTART file
REASON: KEchar = NaN, PEchar = NaN
.........................
where do KEchar and PEchar come from?
even though I Reduced the timestep as I read in the forum but it had no effect on the results
here is my log file:
my_upwelling.log
(38.05 KiB) Downloaded 339 times
thank you again

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Era5 data is not read by the ROMS

#5 Unread post by kate »

Code: Select all

    GET_2DFLD   - surface u-wind component,                        2013-01-01 00:00:00.00
                   (Grid=01, Rec=1, Index=1, File: era5_u10_year_2013_roms.nc)
                   (Tmin=          0.0000 Tmax=         30.9583)      t =          0.0000
                   (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
    GET_2DFLD   - surface v-wind component,                        2013-01-01 00:00:00.00
                   (Grid=01, Rec=1, Index=1, File: era5_v10_year_2013_roms.nc)
                   (Tmin=          0.0000 Tmax=         30.9583)      t =          0.0000
                   (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
I believe this is your problem, same with all the other atmospheric fields.

AMIRHOSSEIN
Posts: 43
Joined: Tue Feb 11, 2020 6:03 pm
Location: IUST

Re: Era5 data is not read by the ROMS

#6 Unread post by AMIRHOSSEIN »

Thank you kate
I'll check it and try to solve the error

lushilima
Posts: 5
Joined: Tue Apr 17, 2018 4:59 pm
Location: INPE

Re: Era5 data is not read by the ROMS

#7 Unread post by lushilima »

Hi!
I had the same issue with ERA5 data forcing.
I am using Kate ROMS version, trying to run with ICE_MODEL.
Did you find the error related to ERA5 data, AMIRHOSSEIN?

Code: Select all

 Initial domain volumes:  TotVolume =  3.2449563409E+16 m3
                         MinCellVol =  1.1849078930E+07 m3
                         MaxCellVol =  1.4712066248E+11 m3
                            Max/Min =  1.2416210859E+04

 NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 000000012097 - 000000038880)

    GET_2DFLD   - surface u-wind component,                        1998-01-15 00:00:00.00
                   (Grid=01, Rec=0000113, Index=2, File: era5_u10_year_1998_roms.nc)
                   (Tmin=      18263.0000 Tmax=      18627.8750)      t =      18277.0000
                   (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
    GET_2DFLD   - surface v-wind component,                        1998-01-15 00:00:00.00
                   (Grid=01, Rec=0000113, Index=2, File: era5_v10_year_1998_roms.nc)
                   (Tmin=      18263.0000 Tmax=      18627.8750)      t =      18277.0000
                   (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
    GET_2DFLD   - surface air pressure,                            1998-01-15 00:00:00.00
                   (Grid=01, Rec=0000113, Index=2, File: era5_msl_year_1998_roms.nc)
                   (Tmin=      18263.0000 Tmax=      18627.8750)      t =      18277.0000
                   (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
Attachments
ANT_01_19980101.txt
(222.83 KiB) Downloaded 314 times

AMIRHOSSEIN
Posts: 43
Joined: Tue Feb 11, 2020 6:03 pm
Location: IUST

Re: Era5 data is not read by the ROMS

#8 Unread post by AMIRHOSSEIN »

Hi lushilima,

The reason it took so long to answer was that I had just found my way.
please check these two links and if you had any questions ask me.

viewtopic.php?t=5998
viewtopic.php?t=6019

Best,

AMIRHOSSEIN

Post Reply