[ncl-talk] Substitute, not overwrite all variables

Barry Lynn barry.h.lynn at gmail.com
Fri Dec 30 06:09:06 MST 2016


Hello:

I found this wonderful program on an e-mail exchange.

I have attached my version.

https://www.ncl.ucar.edu/Support/talk_archives/2011/0619.html

(how to replace a variable in a variable in an ncl file).

However, as set up, this overwrites the old wrfinput_d02, rather than just
replacing the modified variable.

Also, when I read this variable in the new wrfinput_d02.nc file (now just
three variables), it is missing coordinate information (below), although I
seem to add this information before writing it.

If someone could explain how to replace a single variable, rather than to
overwrite the whole file that would be great (and to add coordinate
information).

Thank you

      float L_OBS ( ncl0, ncl1, ncl2 )
         lon2d : <ARRAY of 39204 elements>
         lat2d : <ARRAY of 39204 elements>
         _FillValue : 9.96921e+36

      float xlat ( south_north, west_east )
         coordinates : XLONG XLAT
         stagger :
         units : degree_north
         description : LATITUDE, SOUTH IS NEGATIVE
         MemoryOrder : XY
         FieldType : 104


-- 
Barry H. Lynn, Ph.D
Senior Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
US 914 432 3108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161230/552c4f7d/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_data.ncl
Type: application/octet-stream
Size: 3098 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161230/552c4f7d/attachment-0001.obj 


More information about the ncl-talk mailing list