Re: Creating .nc files

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 18 Jul 2007 09:19:57 -0600

"tbnds" .... I speculate it refers to temporal bounds.
                  The CF netCDF convention has a section on "Data
Representative of Cells"
  
                   [
http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/ ]

                   Specifically, see

                  [
http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/ch07.html ]

D
Rosa Maria Nascimento dos Santos wrote:
> Hi Mary,
>
> It's working! I'll just have to make some ajustments in "time" dimension
> because it's showing only zeros, but the data are there!
>
> Thanks again,
>
> Rosa
> P.S.: Can you tell me what is the dimension "tbnds" which appears when
> using "ncdump" in .nc files?!
>
>
>
>> Hi Rosa,
>>
>> Perhaps the files being written do are not being closed properly.
>> Right before the very last "end do", try adding the line:
>>
>> delete(ncdf)
>>
>> Deleting the variable may force the file to close properly (Dave or
>> Rick, let me know if I'm wrong on this). I can't imagine what
>> else may be wrong.
>>
>> Also, you have some places in your script that you can clean up a
>> little. It's not necessary to use ":" type syntax if you are using
>> the whole variable. It is more expensive to use this syntax as well.
>>
>> Thus, lines like:
>>
>> latitude = f->lat(:)
>> lon = f->lon(:)
>> level=f->lev(:)
>>
>> Should be changed to:
>>
>> latitude = f->lat
>> lon = f->lon
>> level=f->lev
>>
>>
>> Also:
>>
>> Q_sat(:,:,:,:) =
>> 0.622*(sat_vap_pressure(:,:,:,:)/(pressure(:,:,:,:)-0.378*s\
>> at_vap_pressure(:,:,:,:)))
>>
>> RH(:,:,:,:) = (spec_hum(:,:,:,:)/Q_sat(:,:,:,:))*100.0
>>
>> should be changed to:
>>
>> Q_sat = 0.622*(sat_vap_pressure/(pressure-0.378*sat_vap_pressure))
>>
>> RH = (spec_hum/Q_sat)*100.0
>>
>> Finally, the code:
>>
>> do j = 0, dimsizes(level)-1
>> pressure(:,j,:,:) = level(j)
>> end do
>>
>>
>> can be rewritten using "conform":
>>
>> pressure = conform(pressure,level,1)
>>
>> Cheers,
>>
>> --Mary
>>
>>
>> On Mon, 16 Jul 2007, Rosa Maria Nascimento dos Santos wrote:
>>
>>
>>> Hi,
>>>
>>> I'm still having problems creating .nc files with NCL! I've created the
>>> file variables using "filevardef","filedimdef", and
>>> "filevarattdef". The problem is that NCL is creating the file that I
>>> want
>>> but it isn't writing the variables into the file. That's weird! I'm
>>> sending the script attached, if anyone could take a look at it?!
>>>
>>> Thanks,
>>>
>>> Rosa
>>>
>>> --
>>> Rosa Maria Nascimento dos Santos
>>> Doutora em Meteorologia
>>> LBA/INPA
>>> Tel: +55 92 36433623
>>> e-mail: rosasto_at_inpa.gov.br
>>> rosa_sto_at_yahoo.com
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Rosa Maria Nascimento dos Santos
>>> Doutora em Meteorologia
>>> LBA/INPA
>>> Tel: +55 92 36433623
>>> e-mail: rosasto_at_inpa.gov.br
>>> rosa_sto_at_yahoo.com
>>>
>
>
>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 18 2007 - 09:19:57 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 18 2007 - 17:38:11 MDT