output of netcdf --look forward to your reply , thank you very much

From: nlcheng <cnl88_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 03 2011 - 01:51:43 MDT

My script is below.Each time I extract a varible that is a constant ,because I make its dimensions constant.
I have to use the double circle "do " command because there is much count that I have omitted in this script below that it takes so much time to read.
 
but my idea is clear . when the constant vaible is extracted I have to write it in the netcdf file one by one!
On This Premise thatdo not change the the double circle "do " structure ,how can i
write the command ¡£hope for your help!
 
my script is below:
 ;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "/usr/local/ncl/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
load "/usr/local/ncl/lib/ncarg/nclscripts/csm/contributed.ncl"
;************************************************
begin
   fn = "/storage/sdd1/Model_Out_Data/CMAQ/2010/domain1/ln/"+"20101230.nc";
   a = addfile(fn,"r")
    fon = "API20101230.nc"
 system("rm -f "+fon)
 fo = addfile(fon,"c")
time =12
do m =0,159
do n=0,199
NO2=a->NO2(time,0,m,n)
NO=a->NO(time,0,m,n)
SO2=a->SO2(time,0,m,n)
NOx =NO2+NO

         fo->avgSO2 = SO2
        avgSO2!0 = "ROW"
        avgSO2!1 = "COL"
        avgSO2&ROW = m
        avgSO2&COL = n
       avgSO2@@units = "mg/m^3"
      
      fo->avgNOx = NOx
        avgNOx!0 = "ROW"
        avgNOx!1 = "COL"
        avgNOx&ROW = m
        avgNOx&COL = n
        avgNOx@@units = "mg/m^3"

end do
end do
end

 
 
 

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

____1.png
Received on Thu Nov 3 01:52:03 2011

This archive was generated by hypermail 2.1.8 : Fri Nov 04 2011 - 08:43:41 MDT