Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Weird results after converting netcdf to WPS intermediate files

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

Dear WRF users,

I converted OISST netcdf to grib format.

I am using the script from the WRF directory.
https://www2.mmm.ucar.edu/wrf/users/special_code.html

netcdf-to-intermediate.f

When I compiled the code,
I removed this line:

integer, intrinsic :: iargc

and added this line:

open(11, file=filename, form='unformatted',convert='big_endian')

Then, it successfully compiled.

The output is read perfectly fine when I used rd_intermediate.exe.

When I tried using plotfmt.ncl, the code stops with the following error:

Output of rd_intermediate.exe
Code:
================================================
FIELD = SST
UNITS = K DESCRIPTION = Sea Surface Temperature
DATE = 2021-07-01_00:00:00.0000 FCST = 0.000000
SOURCE =
LEVEL = 200100.000000
I,J DIMS = 1440, 720
IPROJ = 0  PROJECTION = LAT LON
  REF_X, REF_Y = 1.000000, 1.000000
  REF_LAT, REF_LON = -89.875000, 0.125000
  DLAT, DLON = 0.250000, 0.250000
  EARTH_RADIUS = 6370.000000
DATA(1,1)=-999.000000

================================================
FIELD = LANDSEA
UNITS =  DESCRIPTION = Land Sea Mask
DATE = 2021-07-01_00:00:00.0000 FCST = 0.000000
SOURCE =
LEVEL = 200100.000000
I,J DIMS = 1440, 720
IPROJ = 0  PROJECTION = LAT LON
  REF_X, REF_Y = 1.000000, 1.000000
  REF_LAT, REF_LON = -89.875000, 0.125000
  DLAT, DLON = 0.250000, 0.250000
  EARTH_RADIUS = 6370.000000
DATA(1,1)=1.000000

 SUCCESSFUL COMPLETION OF PROGRAM RD_INTERMEDIATE


But when I tried the plotfmt.ncl in utilities, I get the following error:

Code:
At line 32 of file plotfmt_rdhead.f90 (unit = 10, file = 'SST:2021-07-01_00')
Fortran runtime error: I/O past end of record on unformatted file

I tried converting the file to netcdf and also used the plotfmt_nc.ncl but the results are weird.

I am attaching the output image here and the converted file.

any suggestions how to solve this?
Just remove the .txt extension in the SST file.


View attachment SST_2021-07-01_00.txtScreenshot 2021-10-16 124533.png
 
Are you having trouble running metgrid with this SST file? If the problem is just with plotting the file, you should post it in the NCL section of the forum, since the plotting utility is an NCL-specific script.
 
Hi Kwerner,

The problem is not the plotting.
I think it's the fortran converter code.
It did not successfully compiled.

Is there anyone here who was able to successfully compile this script (the nercdf to intermediate converter)?
https://www2.mmm.ucar.edu/wrf/users/special_code.html

I'll appreciate any help on this.
 
Hi,
Did you try to run metgrid using the SST file you created? The ncview image you sent looks normal to me, and I was able to run through metgrid with your file, and see SST, which has reasonable values.
 
Top