[ncl-talk] replacing data

Guido Cioni guidocioni at gmail.com
Tue Dec 8 01:32:23 MST 2015


Dear Nitin,
if your goal it’s just to plot with a reverse axis why can’t you do everything in NCL without writing another file? However, if the variables are emiss_dom(time,lat,lon) I would do this:

begin

in1=addfile("emiss_2000_BC_T63.nc", “r")
in2=addfile("emiss_aerocom_II_BC_anthro_2000_T63_ori.nc", "w")
      
dum=in1->emiss_dom
in2->dum(:,::-1,:)

(…)

Please note that there is no need to use the “w” option if you are only reading in1. However, I think that this script will give you some trouble, because I don’t know how is the file in2 written.  Trying to modify the order of variable in a file that is already defined it’s not really a good thing :) 
What you should do instead is to create a new file and then populate it with the new data:
https://www.ncl.ucar.edu/Applications/o-netcdf.shtml <https://www.ncl.ucar.edu/Applications/o-netcdf.shtml>

Guido Cioni
http://guidocioni.altervista.org <http://guidocioni.altervista.org/> 




> Il giorno 08 dic 2015, alle ore 07:50, Nitin Patil <nitinpatil85 at gmail.com> ha scritto:
> 
> <new.ncl>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151208/a82b983d/attachment.html 


More information about the ncl-talk mailing list