(RESOLVED) Using two types of SST data - ungrib error: Data not found

Topics related to running the ungrib.exe program
Post Reply
Torben
Posts: 7
Joined: Thu Mar 26, 2020 11:36 am

(RESOLVED) Using two types of SST data - ungrib error: Data not found

Post by Torben » Fri Jul 24, 2020 8:16 pm

Hey guys,

I hope you all are doing well :)

For my thesis I want to simulate some cases with different SST-input data, and now I faced a problem, for which I cannot find the solution...
I have two different sst grib-files. First one is original.
For the second one I converted the grib-file into a netcdf file (via " cdo -f nc copy data_sst_zonal.grib data_sst_zonal.nc " )

For changing the values of the sst-variable, I have gotten another nc-file with only one variable which has the same dimensions as my original sst data.

So I just added those two variables together via:
sstnew = sst1(:,:,:) + sst2(:,:)

(sst2 is time invariant, so it hast only lon-lat dimension)
I checked and plotted the variable sstnew and everything seems fine and with ncwrite I replaced the old sst with my variable sstnew (and changed the name into sst)
It has the same dimension/size as the original sst variable, so I converted the nc file back to grib via: " cdo -f grb copy data_sst_zonal.nc data_sst_zonal.grib "

But when I link this grib-file and execute ungrib, it says that there is no data for my date...as you can see in the attached log_ungrib_sst.txt
almost at the end of the logfile it shows:
ERROR: Data not found: 2002-07-14_00:00:00.0000

The 07/14/2002 00:00:00 is the first timestep in my namelist.wps, so I guess I can not simply change the values via MatLab?
If so, how can I change them... I want to analyze the differences between the WRF-run with original SST and the one with modified SST.

I tried it the same way just with the original sst-grib file and everything works just fine.

Pls let me know if you need any more information and thank you very much in advance for helping me out :)

Cheers
Torben
Attachments
log_ungrib_sst.txt
(13.59 KiB) Downloaded 20 times

kwerner
Posts: 1926
Joined: Wed Feb 14, 2018 9:21 pm

Re: How to change values in grib-data and make ungrib.exe read it

Post by kwerner » Tue Jul 28, 2020 3:33 pm

Hi Torben,
Looking at the ungrib log file you attached, it looks like you have data available for 2002-07-01 through 2002-07-10, but not for 2002-07-14. If you use the utility g2print.exe (or g1print.exe, if it's a GRIB1 file), 1) can it read the file? 2) What dates does it show? If you'd like me to take a look, issue this command:

Code: Select all

./util/g2print.exe path-to-your-grib-file/your-grib-file >& grib.txt
and attach the grib.txt file, along with your namelist.wps file. Thanks!
NCAR/MMM

Torben
Posts: 7
Joined: Thu Mar 26, 2020 11:36 am

Re: How to change values in grib-data and make ungrib.exe read it

Post by Torben » Wed Jul 29, 2020 3:00 pm

Hey kwerner,

I found the solution for this problem. Thanks anyway :D

The problem was that by converting it via cdo the metadata reftime did not contain any values. So ungrib couldn't find the data...
After using the environment of my university to convert it via cdo it worked.
I thought it would be enough to just install cdo on my own laptop for converting...but I guess there were still missing some libraries, so the reference time values were just gone.

Cheers Torben

kwerner
Posts: 1926
Joined: Wed Feb 14, 2018 9:21 pm

Re: How to change values in grib-data and make ungrib.exe read it

Post by kwerner » Tue Aug 04, 2020 9:38 pm

Torben,
I'm glad to hear that you were able to resolve the issue. Thank you for updating the post - this could be useful for future users!
NCAR/MMM

Post Reply

Return to “ungrib”