[gradsusr] [EXTERNAL] udpt commands?

Davide Sacchetti davide.sacchetti at arpal.liguria.it
Tue Aug 2 05:05:24 EDT 2022


Ciao Jennifer
sorry for the answer delay ...
I realized most of my user-defined commands could have been replaced by your sys() function ...


Anyway Paolo, a collegue of mine, slightly modified the source code because:
1) we found some problems during compilation and run time
2) we wanted to maintain udxt file for extensions


#-------------------------------------------
source code changes for point 1)
* grib2.m4: now compilation does not depend on specific version of libpng (15)
* gadap.m4: added -ldapclient -ldapserver -ldap to GADAP_LIBS
* libsx.m4: added configuration needed if user wants to compile libsx from source; SUPPLIBS dependencies removed
* udunits.m4: as grads now is using udunits2 it was mandatory to update search paths
* configure.ac: UDUNITS replaced by UDUNITS2 in hdf_inc, hdf_lib, nc_inc, nc_libs; libsx dynamically linked to gui, removed cairo includes because of dynamically linked
* grads.c: removed keyword static from struct gacmn gcmn (otherwise we could not compile: could you?)
* gagui.c: removed lines (NEVER directive):
int gagui_main(int argc, char **argv)
{


[...]


#ifdef NEVER                                                                                                                            
  if ( gcmn.batflg ) return 0;  /* batch mode */


  argc = OpenDisplay(argc, argv);
  if (argc == FALSE)
    return argc;


#endif


[...]


}
otherwise the gui crashed using -d option (both cairo and x11)
* src/Makefile.am: SUPPLIBS dependencies were removed
* setup.py: added numpy import and included to ext_modules (otherwise it didn't compile)


#-------------------------------------------
source code changes for point 2)
* grads.c: removed:
#ifdef OPENGRADS
/* For opengrads, which needs a capital M for its 'main' routine */
int Main (int argc, char *argv[])  {
#else
#endif
  since it is not needed any more by the actual version of gaudx.c, otherwise the gui would not open at startup
* src/Makefile.am: added options to compile gaudx.c and added compilation directive -DOPENGRADS




#-------------------------------------------
If you think this work could be of interest we would discuss or share our changes


Have a nice summer
Davide and Paolo



Dott. Davide Sacchetti
Dipartimento Stato dell’Ambiente e Tutela dai Rischi Naturali
U.O. Clima Meteo Idro
Viale Brigate Partigiane 2, 16129 Genova (I)
tel: +39 0106437535
mail: davide.sacchetti at arpal.liguria.it  web: https://www.arpal.liguria.it/homepage/meteo.html



 Da:   "Adams, Jennifer M. (GSFC-610.2)[ADNET SYSTEMS INC]" <jennifer.m.adams at nasa.gov> 
 A:   GrADS Users Forum <gradsusr at gradsusr.org> 
 Inviato:   25/06/2022 14:22 
 Oggetto:   Re: [gradsusr] [EXTERNAL]  udpt commands? 



 
 
Ciao, Davide –  
Brian Doty did not want to implement user-defined commands; he felt there was too much risk for unintended consequences. What is the functionality of the command you would like to add? 
 --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 Davide Sacchetti <davide.sacchetti at arpal.liguria.it>
 Reply-To: GrADS Users Forum <gradsusr at gradsusr.org>
 Date: Saturday, June 25, 2022 at 8:07 AM
 To: GrADS Users Forum <gradsusr at gradsusr.org>
 Subject: [EXTERNAL] [gradsusr] udpt commands? 
 
  
Dears 
 
I've seen the User-Defined Plug-in feauture useful to write user functions in C 
 
in opengrads there is a similar mechanism called Grads Extensions 
 
I verified that opengrads Grads Extensions functions work in grads 2 
 
but in opengrads you can define "functions" (returning a grid) and "commands": I am asking if grads UDPT contains this chance or not 
 
It is possible to define new commands via UDPT? 
 
Thanks 
 
Bye bye 
 
Davide 
 
Dott. Davide Sacchetti 
Dipartimento Stato dell’Ambiente e Tutela dai Rischi Naturali
 U.O. Clima Meteo Idro
 Viale Brigate Partigiane 2, 16129 Genova (I)
 tel: +39 0106437535
 mail: davide.sacchetti at arpal.liguria.it  web: https://www.arpal.liguria.it/homepage/meteo.html 

_______________________________________________ 
gradsusr mailing list 
gradsusr at gradsusr.org 
 https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&e=7f48b148&h=e3a2c917&f=y&p=n  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20220802/34f2e000/attachment.html>


More information about the gradsusr mailing list