[gradsusr] [EXTERNAL] Re: How to store a map, based on station data, in GRADS, in a NetCDF-file?

Adams, Jennifer M. (GSFC-610.2)[ADNET SYSTEMS INC] jennifer.m.adams at nasa.gov
Mon Sep 13 18:15:55 EDT 2021


Pavel,
Isimar is on the right track. You need to use ‘set gxout fwrite’ and ‘display’ instead of the ‘define’ and ‘sdfwrite’ commands. That will create a flat binary file, and you’ll have to write a descriptor file based on the specs of your destination grid. If you use use ‘set stat on’ GrADS will print out some helpful information about your new gridded variable.

If you really need netCDF output, then you can open your newly created descriptor file, make sure the dimension environment is set properly, define the variable, and then use ‘sdfwrite’ to write out the result.
--Jennifer
--
Jennifer Miletta Adams
Senior Scientific Software Developer
Goddard Earth Sciences Data and Information Services Center (GES DISC)
NASA/GSFC, Code 610.2
Building 32, Room S159


From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Isimar de Azevedo Santos <isimar.uenf at gmail.com>
Reply-To: GrADS Users Forum <gradsusr at gradsusr.org>
Date: Monday, September 13, 2021 at 4:58 PM
To: "pavel at cyclone.tau.ac.il" <pavel at cyclone.tau.ac.il>, GrADS Users Forum <gradsusr at gradsusr.org>
Subject: [EXTERNAL] Re: [gradsusr] How to store a map, based on station data, in GRADS, in a NetCDF-file?

Hi, Pavel
Why not use simply: "x= ... ", without "define"
Isimar from Brazil.

Em seg., 13 de set. de 2021 às 12:43, Pavel Kishcha <pavel at cyclone.tau.ac.il<mailto:pavel at cyclone.tau.ac.il>> escreveu:
Hello to all users of grads,

A Cressman objective analysis was conducted on the station data to obtain a map representing the station data.
'set gxout shaded'
'd oacres (gexpr, sexpr)'
As a result, the map was successfully created.
To store the obtained map in a NetCDF-file, we tried to use the following GRADS commands:
'set sdfwrite map.nc<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmap.nc%2F&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7C5b187041c0984b1d51df08d976f93c6e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637671635239815388%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Nl%2BAt0H6142tF7jBgd9szNJiCaKViGVu6yx0Dqas4zk%3D&reserved=0>'
‘define x = oacres (gexpr, sexpr)'
'sdfwrite x'

Unfortunately, we got the following error info:
DEFINE error: Define not yet valid for station data
              Default file is a station data file

How to solve this problem and to store the obtained map (based on station data) in GRADS, in a NetCDF-file? Any ideas?

Thank you,
Pavel Kishcha

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7C5b187041c0984b1d51df08d976f93c6e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637671635239815388%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=6x%2Fe%2FB5QCB5KbTPyqORmazuFaqc43%2BN0U%2BLtuOzq9Bg%3D&reserved=0>
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7C5b187041c0984b1d51df08d976f93c6e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637671635239825342%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=KRekKdxWTTW81kt8%2Bhw17ioW5p%2BFR3fQjfkGbScDB%2F4%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20210913/2b581616/attachment-0001.html>


More information about the gradsusr mailing list