Can't read observation file in 4DVAR

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
smartboy
Posts: 6
Joined: Wed Mar 31, 2021 1:14 pm
Location: Ocean University of China

Can't read observation file in 4DVAR

#1 Unread post by smartboy »

Hi, everyone. I do some 4DVAR tests in my own application. When I activate the I4DVAR option which is similar to the WC13 application, the observation file I made is always not read by ROMS. The errors are as follows:

Code: Select all

Number of State Observations Processed:  ObsTime =   16816.0000,  2016-01-16 00:00:00.00

          Variable          IstrObs    IendObs      Count   Rejected


          Total                                         0          0
          Obs Tally                                     0          0

 Wrote NLM state at observation locations, datum = 1 - 0
I have checked the observation files several times. Its generated by the ROMS toolbox function obs_ijpos and obs_depth. In my observation file, the obs_meta is NaN. The obs_depth is positive.
I also viewed this discussion.
I guess my question may be also related to the observation file, while I can't find the error by myself. Is anyone can help me? The full log file is also attached in the end. My observation NetCDF file header is as follows:

Code: Select all

netcdf YS_obs {
dimensions:
	survey = 3 ;
	state_variable = 7 ;
	datum = UNLIMITED ; // (13804 currently)
variables:
	int spherical ;
		spherical:long_name = "grid type logical switch" ;
		spherical:flag_values = "0, 1" ;
		spherical:flag_meanings = "Cartesian spherical" ;
	int Nobs(survey) ;
		Nobs:long_name = "number of observations with the same survey time" ;
	double survey_time(survey) ;
		survey_time:long_name = "survey time" ;
		survey_time:units = "days since 1970-01-01 00:00:00 GMT" ;
		survey_time:calendar = "gregorian" ;
	double obs_variance(state_variable) ;
		obs_variance:long_name = "global time and space observation variance" ;
	int obs_type(datum) ;
		obs_type:long_name = "model state variable associated with observation" ;
		obs_type:flag_values = "1, 2, 3, 4, 5, 6, 7" ;
		obs_type:flag_meanings = "zeta ubar vbar u v temperature salinity" ;
	int obs_provenance(datum) ;
		obs_provenance:long_name = "observation origin" ;
		obs_provenance:flag_values = 1, 2 ;
		obs_provenance:flag_meanings = "CTD_T CTD_S" ;
	double obs_time(datum) ;
		obs_time:long_name = "time of observation" ;
		obs_time:units = "days since 1970-01-01 00:00:00 GMT" ;
		obs_time:calendar = "gregorian" ;
	double obs_lon(datum) ;
		obs_lon:long_name = "observation longitude" ;
		obs_lon:units = "degrees_east" ;
	double obs_lat(datum) ;
		obs_lat:long_name = "observation latitude" ;
		obs_lat:units = "degrees_north" ;
	double obs_depth(datum) ;
		obs_depth:long_name = "depth of observation" ;
		obs_depth:units = "meter" ;
		obs_depth:negative = "downwards" ;
	double obs_Xgrid(datum) ;
		obs_Xgrid:long_name = "x-grid observation location" ;
		obs_Xgrid:left = "INT(obs_Xgrid(datum))" ;
		obs_Xgrid:right = "INT(obs_Xgrid(datum))+1" ;
	double obs_Ygrid(datum) ;
		obs_Ygrid:long_name = "y-grid observation location" ;
		obs_Ygrid:top = "INT(obs_Ygrid(datum))+1" ;
		obs_Ygrid:bottom = "INT(obs_Ygrid(datum))" ;
	double obs_Zgrid(datum) ;
		obs_Zgrid:long_name = "z-grid observation location" ;
		obs_Zgrid:up = "INT(obs_Zgrid(datum))+1" ;
		obs_Zgrid:down = "INT(obs_Zgrid(datum))" ;
	double obs_error(datum) ;
		obs_error:long_name = "observation error covariance" ;
		obs_error:units = "squared state variable units" ;
	double obs_value(datum) ;
		obs_value:long_name = "observation value" ;
		obs_value:units = "state variable units" ;
	double obs_meta(datum) ;
		obs_meta:long_name = "observation meta value" ;
		obs_meta:units = "associated state variable units" ;

// global attributes:
		:type = "ROMS Observations" ;
		:title = "East China Sea" ;
		:Conventions = "CF-1.4" ;
		:grd_file = "ECS_v4.nc" ;
		:state_variables = "\n",
			"1: free-surface (m) \n",
			"2: vertically integrated u-momentum component (m/s) \n",
			"3: vertically integrated v-momentum component (m/s) \n",
			"4: u-momentum component (m/s) \n",
			"5: v-momentum component (m/s) \n",
			"6: potential temperature (Celsius) \n",
			"7: salinity (nondimensional)" ;
		:obs_provenance = "\n",
			" 1: CTD Temperature \n",
			" 2: CTD Salinity \n",
			"" ;
		:source = "http://hadobs.metoffice.com/en3" ;
		:history = "4DVAR observations, Monday - June 21, 2010 - 11:00:00 AM" ;
}
Attachments
roms_run.log
(3.53 MiB) Downloaded 110 times

rtoste
Posts: 11
Joined: Wed Sep 26, 2012 4:20 pm
Location: UFRJ

Re: Can't read observation file in 4DVAR

#2 Unread post by rtoste »

Hi
It looks like you are trying to use an assimilation window from 2016/01/01 12:00h to 2016/01/31 12:00h and the model is only trying to read the observations at 2016/01/16 00h.

It is a very large window to perform assimilation. I think you should evaluate the dynamics in your region and apply a reduced window.. something like 4 or 7 days depending on how the linearization is still delivering a valid solution for your application.

In addition, since the model is not reading any observations from your obs file, you should check its time vector. Are there only observations for 2016/01/16 00h?

What kind of observations are you trying to assimilate? Codar velocities? Since I'm still not assimilating codar velocities, my observation file is not updated with the obs_meta variable. If you are not assimilating radial velocities, I think you should try writing any value to this variable and making sure NextraObs is equal to zero in 4dvar.in.. but I'm not sure about that

I hope some of these points can help you.
Cheers

User avatar
smartboy
Posts: 6
Joined: Wed Mar 31, 2021 1:14 pm
Location: Ocean University of China

Re: Can't read observation file in 4DVAR

#3 Unread post by smartboy »

Thank you for your reply!
The model can read observation data in 4DVAR successfully. However, there still are some errors during my model running. The error information is "Negative Ritz value found". The full log file is appended at the end. Could you please help me figure out this question?
Besides, there are some questions that puzzled me just as follows:
(1) How to change the assimilation window time?
(2) Why was the Negative Ritz value found?
Attachments
roms_run.log
(6.37 MiB) Downloaded 97 times

Post Reply