Still struggling with regrid2

Cut Erna Dewi cuternadewi at YAHOO.COM
Mon Jun 4 03:58:06 EDT 2007


Dear Rob, Mike and others;

  I have the same experience. In my laptop of 32 bit and using Suse 9.2, there is no problem at all to run regrid2.

  However, in my new laptop of 64 bit and using compat-g77 fortran compiler of Fedora Core 6, I have the same problem with Rob's problem.

  I guess:  The compat-g77 fortran compiler can not compile the regrid2beta.f
  If yes, the regrid2beta.f should be modified to accommodate the other compiler(s).

  Has anyone experience by using compat-g77 fortran compiler and successfull to compile regrid2?

  Best regards, Syamsul


Robert Burgman <rburgman at RSMAS.MIAMI.EDU> wrote:
    I am also having a problem with regrid2. I have compiled the function on our linux box and it is working fine, however when I compiled the code on my macbook pro I get an error


  ga-> d regrid2(sst,5,5,ba)
  number of arguments =            0


  regrid requires 2 or more arguements: <<a write statement tells me the nargs=0 here>>

  Error from regrid2: Error reading from transfer file
    File name: udf.regrid.gfi
  Operation Error:  Error from regrid2 function
    Error ocurred at column 1
  DISPLAY error:  Invalid expression
    Expression = regrid2(sst,5,5,ba)


  I am unsure why there is a problem reading from the udf.regrid.gfi file, which is created when I execute the command and is populated with data. The udf.regrid.gfo and udf.regrid.out are , of course empty.
  Has  any one compiled regrid2beta.f on an intel Mac?




  Thanks,
  Rob

    On May 29, 2007, at 3:17 PM, Daniel Victoria wrote:

    Mike, I'm resending an earlier email where I explain the dimensions of
  the files. Could it be that I'm trying to convert a gaussian grid to a
  uniform grid?


  -------------------------------------------------------------------------------------------------------
  I've daily NetCDF TMAX from ncep/ncar reanalysis at a gaussian grid
  (downloaded from cdc) and want to resample it to a 0.25 x 0.25 grid.
  So I issued the following command:


  lats4d -i input.nc -o output -de template_0.25.ctl -func regrid2(@,0.25,0.25,bs)


  And the output grid I got is all messed up! The dimensions and the
  template file are:


  Input dimensions:
  ga-> q file
  File 1 : daily NMC reanalysis (1948)
  Descriptor: tmax.ncep.1948.2006.nc
  Binary: tmax.ncep.1948.2006.nc
  Type = Gridded
  Xsize = 33  Ysize = 21  Zsize = 1  Tsize = 21550
  Number of Variables = 1
    tmax 0 -999 Daily Maximum Temperature at 2 m
  ga-> q dims
  Default file number is: 1
  X is varying   Lon = 270 to 330   X = 1.00001 to 33
  Y is varying   Lat = -29.5234 to 8.57257   Y = 1 to 21
  Z is fixed     Lev = 0  Z = 1
  T is fixed     Time = 00Z01JAN1948  T = 1


  Template file:
  dset nofile
  title "Template GrADS ctl at 0.25 horizontal grid"
  options template
  undef -999
  xdef 129 linear 279 0.25
  ydef 101 linear -20 0.25
  zdef 1 levels 1
  tdef 21550 linear 00z01jan1948 1dy
  vars 1
  var 0 0 generic
  endvars




  Anyone knows what am I doing wrong?
  Cheers
  Daniel


  On 5/29/07, Michael Fiorino <Michael.Fiorino at noaa.gov> wrote:
    daniel, this could be a bug, but it might also be the size of nimax,
  njmax -- you may need to increase for really big output files.  i wrote
  this over 10 y ago and the default nimax,njmax is now on the low side.
  also, check the open for udf.regrid.gfi (input grid file) and
  udf.regrid.gfo (output grid file).  i'm confused why you're getting more
  data out; you may need to do a 'set lat ...' 'set lon ...' to force
  output exactly where you want...  the version you're using is that
  latest...  best /r mike








  Daniel Victoria wrote:
  > Hi Michael,
  >
  > Xavier Francis helped me out and I figured out what was going on.
  > regrid2 was adding some more lines and columns to the output file. So,
  > the way I solved the issue was to export the regrided file to a binary
  > grid (set gxout fwrite). When I do this, GrADS reports the number of
  > columns/rows and the initial lat/lon. So I can then write a correct
  > .ctl file and export to NetCDF using lats4d. A lengthier process but
  > it works.
  >
  > As for the details, I did sent a more detailed email before but with
  > the input and output dimensions (template ctl and netcdf dims). I had
  > no idea it could be a compilation problem with regrid2, specially
  > because I know nothing about fortran.
  > Just to answer your questions, the open line in regrid2beta.f is:
  >
  > open (iunit_diag,file='udf.regrid.out',
  >     $       form='formatted',status='unknown')
  >
  > Can't recall where I got the code from but it was about an year ago.
  > Is there a more recent version?
  >
  > Cheers
  > Daniel
  >
  >
  > On 5/29/07, Michael Fiorino <Michael.Fiorino at noaa.gov> wrote:
  >> daniel, this looks like a regrid2 build problem.  the most annoying
  >> thing about fortran is the lack of a binary  i/o standard...  look at
  >> the 'open' line in the .f -- using direct access?  sequential?  and the
  >> usual plea -- if you want help, you HAVE to send details -- operating
  >> system, where you got the regrid code, the .ctl file you're working...
  >> /r mike
  >>
  >> Daniel Victoria wrote:
  >> > Hi all,
  >> >
  >> > I still haven't been able to regrid the gausian NCEP file to a uniform
  >> > 0.25 x 0.25 lat lon grid. The result I get is all messed up (attached
  >> > file). Does anyone knows what I'm doing wrong? Or is grads not able to
  >> > regrid the gaussian NCEP to uniform grid?
  >> >
  >> > Thanks
  >> > Daniel
  >> >
  >> >
  >> ------------------------------------------------------------------------
  >> >
  >>




    ----------------------------------------------------
  Dr. Robert Burgman
  Division of Meteorology and Physical Oceanography
  Rosenstiel School of Marine and Atmospheric Science
  University of Miami MPO, MSC 237
  4600 Rickenbacker Causeway
  Miami, FL 33149


  Tel:        (305) 421-4272
  Fax:       (305) 421-4696
  Email:    rburgman at rsmas.miami.edu
  ---------------------------------------------------








---------------------------------
Don't get soaked.  Take a quick peak at the forecast
 with theYahoo! Search weather shortcut.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070604/3a530d73/attachment.html 


More information about the gradsusr mailing list