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

Strange output graphs when using nesting

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.


I'm runnning a two-way nesting simulation in a region located over Panama.
Since wrfout files aren't in the commen CF_compilant netcdf format, I modified the output files using pandas library to set XLAT and XLONG as indexes and extract RAINC+RAINNC variable and merge time. Something goes wrong with domain 1 as the final file has missing information in the region where the domain 2 is set as shown in fig1 (zommed in fig2). The code I'm using is (just an example with the extraction of T2):
for i in range(len(wrfouts)):
    df_tq = ds['T2'].to_dataframe()
    df_tq = df_tq.reset_index()
    df_tq = df_tq.drop(['Time','south_north','west_east'],1)
    df_tq = df_tq.drop_duplicates()
    df_tq = df_tq.rename(columns={"XLAT":"lat","XLONG":"lon", "XTIME":"time", "T2":"t"})
big_frame = pd.concat(dfs, ignore_index=True)
big_frame_multi = big_frame.set_index(['lat','lon','time'])
The pandas dataframe has the wright dimensions (100x160x73), but when checking for different values of latitude and longitude (len(list(dict.fromkeys(list(df.Latitude))) a 118 pomps out instead of 100. The final netcdf file has a dimension of 118x178x73 pixels which cause plots to have white points. Where do these extra pixels come from?
I assume it's related to the relation of lat-lon values between the two domains, as the same code works fine when merging only domain 2 files or merging domain 1 files that result from a 1 domain simulation (for example first step of ndown).
Thanks in advance,


  • namelist.wps
    1.3 KB · Views: 27
  • fig1.PNG
    15.6 KB · Views: 454
  • fig2.PNG
    15.6 KB · Views: 454
This is a question beyond the WRF scope. I am sorry that due to limited human power, we cannot debug users' code for post processing.
Hi Ming Chen,
I found that the problem is found inside the wrfout files. When checking XLAT and XLONG, the lat-lon values placed in the d02 moved with respect to d01. When manipulating wrfout files with python this problem arises serious issues. I understant that my way of working with wrfoutfiles with pandas is not the conventional way so maybe no one else has faced this problem before.
I would appreciate if someone could check my namelist.wps in case there is a problem with domain definition, making the two domains not well centered for example.


  • namelist.wps
    1.3 KB · Views: 22
Your namelist.wps looks fine. I don't think it is the reason for your issue. I believe it is caused by the postprocess program you used.
Thanks Ming Chen,
I found that using two-way nesting (feedback=1) makes wrfout_d01 files save information about d02 coordinates, while one-way nesting doesn't cause any problem (I assume related to the lack of communication between domains). I found a way to solve this problem adding steps in the post-processing code but wanted to post what I found in case it can help someone in the future.
Hi jana,
yes please post whatever you found. This forum is established for the convenience of WRF users to exchange information.