modifying WRF file

From: Jinwoong Yoo <jyoo2_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 06 2011 - 17:57:41 MST

Hello, NCL users.

I'd like to get some tips how to modify an file to modify
topography of the WRF model domain.
I know somebody had similar question in the ncl-talk previously and I
followed their ideas but I'm still struggling to modify my geo_em.d0X.ncfile.
First, I used NCL method, "Change netCDF file" as described in

 I collected HGT_M values from "ncdump -v HGT_M" for my
198 by 261 grid domain and pasted the HGT_M values

      in = addfile("./","w")
      HGT_M = (/30,40,89,78,45,234,98,23,456,294,12,17,40,56,17,32,85,93,72,\
                ... ... \



 where I put my modified elevation values in the HGT_M = (/.../).
However, this failed due to the dimension mismatch about which I could not
find any help or explanation on the web.
Because the domain is 198 by 261 array, there should be some (NCL) way to
specify the HGT_M = (/.../) instead of just putting numbers separated by
comma as I did.
If you know how, please let me know.

Second, I tried PyNIO to modify the file.
Actually, I could get array values with it and could modify the values on
the memory.
However, it seems that I cannot modify the original even when
I used the "w" mode although you can create a new nc file.
I found this line from PyNGL and PyNIO webpage: "Note that *PyNIO* never
overwrites an existing file with an entirely new file."
If I'm wrong and an existing nc file can be overwritten with new values,
please let me know how to.
Personally, I'd like to use PyNIO to modify the nc file if possible.
Maybe PyNIO developers can change the code to let users overwrite their nc
file directly in the future if it has not been done yet.

Thank you in advance.


Jinwoong Yoo, Ph.D.
University of South Florida

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue Dec 6 17:57:53 2011

This archive was generated by hypermail 2.1.8 : Fri Dec 09 2011 - 13:09:09 MST