ERDDAP / erddap

ERDDAP is a scientific data server that gives users a simple, consistent way to download subsets of gridded and tabular scientific datasets in common file formats and make graphs and maps. ERDDAP is a Free and Open Source (Apache and Apache-like) Java Servlet from NOAA NMFS SWFSC Environmental Research Division (ERD).
Creative Commons Zero v1.0 Universal
84 stars 59 forks source link

New ColorBar Converter #44

Open BobSimons opened 3 years ago

BobSimons commented 3 years ago

ERDDAP has a group of Converters which do useful things (usually conversions) related to ERDDAP. See https://coastwatch.pfeg.noaa.gov/erddap/convert/index.html It would be nice to add a ColorBar converter which takes a color bar specification (e.g., palette=Rainbow, Range=1 to 10000, Scale=log, NSections=4, Continuity=Continuous) and then converted a data value into a color or vice versa.

Skills required: Java programming.

Difficulty: Pretty easy. There are already Converters which could be used as templates for this converter. There is code in ERDDAP to convert a data value to a color. You probably have to write code for the reverse, but that is probably straightforward. Maybe 1-2 weeks of work (after you figure out ERDDAP).

Mentor: Bob Simons (main author of ERDDAP)

Please also read the Programmer's Guide at https://coastwatch.pfeg.noaa.gov/erddap/download/setup.html#programmersGuide especially the "Judging Your Code Contributions" section.

This was requested by Lynne Tablewski and others.

GAyan17 commented 3 years ago

Hello, This issue looks good to me can I work on it? Though I'm still a begginner in terms of JAVA Development but wanting to learn as I go, would be a great help if you guide me in some way to how to start working for this issue.

BobSimons commented 3 years ago

[I'm sorry for being so slow to answer (long weekend and mini emergency at work yesterday).]

Excellent! Yes, you can work on it. Here are suggested steps:

  1. Read the Programmer's Guide
  2. Use ERDDAP a little so you understand what it is and how it works. https://coastwatch.pfeg.noaa.gov/erddap/index.html
  3. Specifically, play around with a Make A Graph web page, so you understand color bars in ERDDAP and their options https://coastwatch.pfeg.noaa.gov/erddap/griddap/erdMWsstdmday_LonPM180.graph
  4. Play around with the converters so you understand what they are and how they work (one web page with instructions, a form, Details, and a description of how to do the conversion via the underlying service) https://coastwatch.pfeg.noaa.gov/erddap/convert/index.html
  5. Think in your head what your converter is going to look like. Email me to make sure we agree.
  6. Get ERDDAP set up on your computer, so you can compile it, run ERDDAP on your computer, and later test your code. Being able to install Tomcat and an application is a very useful skill to have since they are both widely used. https://coastwatch.pfeg.noaa.gov/erddap/download/setup.html
  7. Pick an existing Converter method that is similar to what you want to make (e.g., gov.noaa.pfel.erddap.Erddap.doConvertOceanicAtmosphericAcronyms() ), find that code and make a duplicate of it right below it, with the new name doConvertColorBar. (Also make a copy of the line of code that call that method, so it calls your code.)
  8. Modify your method to do what you want it to do (without modifying any other code).
  9. Test by hand by running ERDDAP on your computer.
  10. Make a copy of Erddap.testConvertInterpolate() and write a unit test for your code.

That looks like a lot, but it's just detailed instructions. This is a very do-able project.

I hope that makes sense. Email if/when you get stuck, but also at step 5 so we can talk about and agree on your plan. Thanks again for giving this a try.

P.S. Can I also ask: how did you find this project to work on? Were you already following ERDDAP or are the issues posted elsewhere?

GAyan17 commented 3 years ago

Thank you @BobSimons I'll surely follow these steps.

Also, I was following the GSoC organizations. I'm actually inclined to JAVA programming and was searching for the projects which use JAVA. And so I stumbled upon this project. Hope it does not make much a difference.

BobSimons commented 3 years ago

@GAyan17, are you still planning to work on this?

GAyan17 commented 3 years ago

Yes, I am sorry I was busy with some other work so didn't get the chance to dive deeper into it, but I will surely try to work on it in this summer.