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

(RESOLVED) Interploate & remap SST from wrfout to wrflowinp

Arty

Member
Hello,

After finally succeeding running ndown.exe... getting uncorrupted WRF input and boundary files... expecting wrfouts' SST in these files... which are in fact not accounted for : I need to get SSTs from original wrfouts into wrflowinp files for WRF.

I already tried CDO (see here), but long story short : the operator "remapbil" (and CDO in general apparently) converts WRF-NetCDF to CF-conventional NetCDF, hence changing the date-time format from :

"2005-01-01_06:00:00",
"2005-01-01_12:00:00",
"2005-01-01_18:00:00",
"2005-01-02_00:00:00",

to

Times = 20050101.25, 20050101.5, 20050101.75, 20050102,

...without any possibility to get date-time back to the right format in the output NetCDF file.

I noticed the UPP channel on this forum. I also read UPP for WRF can't handle NetCDF4 (on dedicated site's FAQ). But some people apprently tried. Unfortunately, there are not much posts in this section, not much answer either. So, questions : did some of you managed to use UPP with wrfout* (WRF v3.6.1 and up) ? Did you use UPPv4.1 ? Which "parm" file ?

Else : is there another way to get SSTs from preivous wrfout into my run, on the right grids ?

P.S. : I posted in General Question because I'm pretty sure it won't be possible for me to use UPP ; please prove me wrong, I beg you. That would take away a lot of my current problems.
 
Last edited:
I got some extra-help. For others who may face the same problem using CDO remapping with WRF files (you'll also need NCO toolkit) :

#1 Create grid description file
cdo griddes wanted_grid_file.nc > griddes.grd

#2 Remap according to grid descrition file
cdo remapbil,griddes.grd, infile.nc outfile.nc

#3 Renamme variable
ncrename -d Times,Time outfile.nc

#4 Delete uncorrectly formated datetimes in outfile.nc
ncks -C -x -v Times outfile.nc outfile.timeless.nc

#5 Add correct datetimes format in outfile from another file (infile.nc for example)
ncks -A -v infile.nc outfile.timeless.nc

#6 Rename outfile.timeless.nc
mv outfile.timeless.nc outfile.nc

Now : outfile.nc has got desired WRF-formated datetimes


P.S. : you may also want to look to NCL regridding option (NCL: Regridding data using NCL with Earth System Modeling Framework (ESMF) software) that I didn't know of when I tried CDO. Didn't try it yet.
Also see this post for more information about CDO and CF Cnnvention : Remapbil changed datetime format from WRF files - CDO - Project Management Service
 
Last edited:
Hy there i can see your post i have some suggestion

  1. Extract SST data from wrfout: Open the wrfout file using appropriate tools or libraries (e.g., NetCDF tools, Python libraries like xarray) and extract the SST data. SST data may be stored as a 2D field with latitude and longitude coordinates.
  2. Prepare wrflowinp file: Create or obtain the wrflowinp file for the desired domain and time period. The wrflowinp file typically includes information about the model grid, topography, initial and boundary conditions, etc. MyAARPMedicare Register
  3. Interpolation: The wrfout data and wrflowinp data may have different grid resolutions and spatial extents. Perform an interpolation of the SST data to match the grid of the wrflowinp file. Common interpolation methods include bilinear, bicubic, or nearest-neighbor interpolation.

Thanks and regards
CeceliaBrown
 
Last edited:
Hy there i can see your post i have some suggestion

  1. Extract SST data from wrfout: Open the wrfout file using appropriate tools or libraries (e.g., NetCDF tools, Python libraries like xarray) and extract the SST data. SST data may be stored as a 2D field with latitude and longitude coordinates.
  2. Prepare wrflowinp file: Create or obtain the wrflowinp file for the desired domain and time period. The wrflowinp file typically includes information about the model grid, topography, initial and boundary conditions, etc.
  3. Interpolation: The wrfout data and wrflowinp data may have different grid resolutions and spatial extents. Perform an interpolation of the SST data to match the grid of the wrflowinp file. Common interpolation methods include bilinear, bicubic, or nearest-neighbor interpolation.

Thanks and regards
CeceliaBrown
Hello,

Thank you. The problem was that WRF NetCDF outputs don't respect CF convention which causes trouble when using NCO/CDO. I got all figured out for wrflowinp and wrfinput despite some challenges ; I posted it all there also for wrfinput : (RESOLVED) Remapping / regridding of wrfinput file
 
Top