Hi,
I am trying to create a netCDF file using NCL that has a character
variable in it. When I do a ncdump -h of the file, I want this variable
to look like this:
netcdf ICTP-REGCM3_CTL_ERA40_MM_50km_1961_2001_hfss {
dimensions:
time = 480 ;
tbnds = 2 ;
y = 98 ;
x = 86 ;
variables:
char Lambert_Conformal ;
Lambert_Conformal:latitude_of_projection_origin = 50.f ;
Lambert_Conformal:longitude_of_central_meridian = 13.f ;
Lambert_Conformal:standard_parallel = 13.f ;
Lambert_Conformal:grid_mapping_name =
"lambert_conformal_conic" ;
...rest of file
However, I can't seem to get it quite right. Right now, this is what I
am getting:
netcdf ICTP-REGCM3_CTL_ERA40_MM_50km_1961_2001_hfss {
dimensions:
ncl0 = 1 ;
time = 480 ;
tbnds = 2 ;
y = 98 ;
x = 86 ;
variables:
char Lambert_Conformal(ncl0) ;
Lambert_Conformal:latitude_of_projection_origin = 50.f ;
Lambert_Conformal:longitude_of_central_meridian = 13.f ;
Lambert_Conformal:standard_parallel = 13.f ;
Lambert_Conformal:grid_mapping_name =
"lambert_conformal_conic" ;
Lambert_Conformal:_FillValue = "" ;
...rest of file
I don't want "Lambert_Conformal" to have any dimension or missing value.
My code to create this is here:
Lambert_Conformal = new(1,character)
Lambert_Conformal_at_grid_mapping_name =
"lambert_conformal_conic"
Lambert_Conformal_at_standard_parallel = 13.0
Lambert_Conformal_at_longitude_of_central_meridian = 13.0
Lambert_Conformal_at_latitude_of_projection_origin = 50.0
I tried doing
Lambert_Conformal = new(1,character)
Lambert_Conformal_at_grid_mapping_name =
"lambert_conformal_conic"
Lambert_Conformal_at_standard_parallel = 13.0
Lambert_Conformal_at_longitude_of_central_meridian = 13.0
Lambert_Conformal_at_latitude_of_projection_origin = 50.0
Lambert_Conformal!0="Lambert_Conformal"
Lambert_Conformal&Lambert_Conformal=Lambert_Conformal
but this just changed "ncl0" to Lambert_Conformal.
Probably I could use NCO to edit the file attributes, but I have to do
this for hundreds of files, and so I would like to do this cleanly in my
NCL scripts. Can anyone help me? Thanks!
cheers,
sara
-- Dr. Sara A. Rauscher Earth System Physics Section The Abdus Salam International Centre for Theoretical Physics Strada Costiera 11 34014 Trieste ITALY ph: +39 040 2240 225 fax: +39 040 2240 449 email: srausche_at_ictp.it _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Mon Apr 02 2007 - 10:27:43 MDT
This archive was generated by hypermail 2.2.0 : Tue Apr 03 2007 - 09:49:39 MDT