[cam-users] ozone initial dataset

Peter Paul Smolka smolka at uni-muenster.de
Mon Oct 4 23:30:20 MDT 2004


On Mon, 4 Oct 2004, Cathryn Meyer wrote:

> Date: Mon,  4 Oct 2004 15:46:43 -0400
> From: Cathryn Meyer <cathryn.meyer at yale.edu>
> To: cam-users at ucar.edu
> Subject: [cam-users] ozone initial dataset
>
> I want to change the input ozone dataset that I downloaded with the
> CAM3.0 source code; at this time I want to multiply all of the ozone
> values by 0.5.  I have looked through the source code, however I do not
> see a good way to simply pull the OZONE variable out of the input netcdf
> file and multiply it by a constant.  Is there a way to do this?  Or do I
> need to create a new netcdf file with new ozone values, which seems like
> a lot of work?

Dear Cathy,

regarding "a lot of work" (deduced from ccm3.6 netCDF issues)

(on Ozone specifically I cannot comment):

I think: Apply ncdump to the netCDF file you got. You should get
an ASCII File of comparable size.

Read the header and the instructions to find out after which text
(such as variable name) your data start and end (such as the next
variable).

Extract with your editor or change with a short program your data.

In case of extraction: Insert the changed data with the editor at
the right place.

Observe that about col 78 should not be exceeded.

Apply ncgen or ncgens (depending on which you have) to transfer
it back to netCDF with the options:

ncgens -b -o fn.nc fn.txt

Where fn.nc is the resulting netCDF file
and fn.txt the ASCII-File to be transferred.

An editor to do handle such large files (the transferred ASCII-File)

On Unix: The "THE" (The Hessling Editor) which is an XEDIT/KEDIT
for various Unixes and for DOS/Windows (freeware).

On NT, should also work with W2000 and XP: The KEDIT (www.kedit.com).

Above line is NOT intended as commercial. I found it quite practical
for me and I hope the company still exists and is not against
this posting.

The number and sequence of the data should be verified to be correct
as you have factually no "safety belt" in case for example "one line
is missing".

Above is a quite "primitive" approach. For those thinking in terms of
"numbers one knows" (instead of applying netCDF routines) it might
be a quite "fossil" way to do it but in terms of "wallclock time"
(a safe method that works without experimenting) the fastest.

>
> Thanks,
> Cathy

Best regards,


Peter


**********************************************************************
Dr. Peter P. Smolka
University Muenster
Geological Institute
Corrensstr. 24
D-48149 Muenster

Tel.: +49/251/833-3989   +49/2533/4401
Fax:  +49/251/833-3989   +49/2533/4401
E-Mail: smolka at uni-muenster.de
E-Mail: PSmolka at T-Online.de
**********************************************************************


More information about the cam-users mailing list