Fixing the values of the variable

From: Rashed Mahmood <rashidcomsis_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 27 2010 - 23:26:00 MDT

Dear Adam

Thanks for your suggestion.
Yes this is the variable that I want modify.
one thing that is confusing me is that the file contains decadal monthly
averages so for one decade there would be 12 time steps.
for example time=145 (Jan1970)...156(Dec1970). How would I fix the values
for these 12 time steps.

And also the values would be different at each grid point so I dont have one
value to enter,,I need something that automatically fixes the values over a
specified domain. Or we can say something that will not allow this
variable's values to increase from 1970s values.

Thanks and regards

Rashed

Hi Rashed,
I would use the read/write option in addfile to read in the file, grab
the variable you want, modify it, and write it back to the netCDF file.
(Note: Make a backup copy of your aerosol.climatology.nc file first
before you attempt to alter it.)
http://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml
a = addfile("aerosol.climatology.nc","w")
arr = a->so4_anthro ; not sure if that's the variable you want
arr = ; set to whatever value(s) you want
a->so4_anthro = arr
That should be it. Just to be clear, the above snippet of code will
overwrite the so4_anthro variable from the aerosol.climatology.nc file.
If the above doesn't help let the ncl-talk group know..
Adam

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 27 23:26:06 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 09 2010 - 05:56:39 MDT