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

wrf_user_vert_interp,and fatal:wrf_vintrp

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.

Zhi Mao

New member
Hello,
I want to use the function "wrf_user_vert_interp" to interpolate variables(default eta coordinate) to pressure vertical coordinate.
I changed my NCL code many times,but the screen always show "fatal:wrf_vintrp: The pres and field arrays must have the same dimensionality",I don't know why! Is there anybody can help me?
The following is part of my NCL code,the version of my NCL is 6.4.0."wrf_user_vert_interp" is available in version 6.3.0 and later

f0=addfile("D:/WRF_DATA/wrfout_d03_2016-06-15_00_00_00.nc","r")
QV=f0->QVAPOR(5,:,:,:) ;;;;;;QVAPOR [ bottom_top | 32 x south_north | 201 x west_east | 219 ]
printVarSummary(QV)

interp_levels=ispan(200,500,50)
opts=True
QV_interpolate=wrf_user_vert_interp(f0,QV,"pressure",interp_levels,opts)
 
Hello,

It is necessary that your QVAPOR still have the time dimension when you pass it into wrf_user_vert_interp. When you just read in the one time NCL gets rid of that dimension. If you read in all the times like this:

QV = f0->QVAPOR

then interpolate and then take out time 5 it should work just fine.
 
Top