[gradsusr] How to convert *.nc file into grads format (*.ctl and *.grd file)

Tanmay Sarkar tanmays at barc.gov.in
Tue Jun 26 02:26:44 EDT 2018


Dear Justin and Users of Grads,

Thank you. Yea that’s working.

But still have some doubt,

Now I have the *.ctl file and I have changed the format *.nc to *.grd (also I changed inside *.ctl name as *grd from *.nc). 

These two files ( *.grd and *.ctl) is working like normal gridded file) but when I am trying the read these two files in some of my program using these lines:

open(ifid, file=trim(input_fpath)//trim(input_fname),status='old',form='unformatted', access='direct', recl=imax*jmax*input_size,iostat=ierr)

it gives some error            forrtl: severe (36): attempt to access non-existent record

 

 

Now my doubt is whether, the record length or the memory is changed when one make netCDF file or Gridded file (*.grd). Simply saving the *.nc format to *.grd format is not enough?

 

Tanmay

From: gradsusr [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Justin Hicks
Sent: 25 June 2018 23:31
To: GrADS Users Forum
Subject: Re: [gradsusr] How to convert *.nc file into grads format (*.ctl and *.grd file)

 

Tanmay,

 

You could also open the .nc file in GrADS and type the command 'q ctlinfo'; the output is what you could put into a control file. I find that the output rarely needs any edits.

 

-Justin

On Mon, Jun 25, 2018, 1:50 PM <tanmays at barc.gov.in> wrote:

Dear Grads Users,
Can you please help me/tell me how to convert *.nc (netCDF) file to *.ctl
and *.grd format.
 The opposite we all know (*ctl and *.grd to *.nc conversion) but what
about the conversion to *.grd and *.ctl from *.nc.
Please help.
Tanmay Sarkar

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20180626/1860a3f6/attachment.html>


More information about the gradsusr mailing list