Code Monkey home page Code Monkey logo

ops's Introduction

Het OPS-model (Operationele Prioritaire Stoffen model) is een rekenprogramma om de verspreiding van verontreinigende stoffen in de lucht te simuleren. Daarnaast berekent het model hoeveel van die stoffen per hectare op bodem of gewas terechtkomt (depositie). Het model wordt sinds 1989 gebruikt om de relatie tussen de uitstoot van stoffen in Europa enerzijds, en de concentratie of depositie van die stoffen anderzijds, in Nederland te bepalen. Het model wordt onder andere ingezet in de rekentool AERIUS en bij het maken van GCN/GDN kaarten.

Het OPS model is eigendom van het Rijksinstituut voor Volksgezondheid en Milieu (RIVM). Het model en bijbehorende documentatie kunnen via https://www.rivm.nl/operationele-prioritaire-stoffen-model worden gedownload. Een Windows- of Linux executable van OPS, met omgevingsdata, is te downloaden via dezelfde website. Voor de Windows omgeving is tevens een Grafische User Interface beschikbaar. Voor instructies voor het zelf compileren van de source code kunt u contact opnemen met [email protected].

Met het ter beschikking stellen van het model aan derden geeft het RIVM inzicht in de gebruikte methodieken en worden uniformiteit en vergelijkbaarheid van rekenresultaten bevorderd.

Deze repository op GitHub wordt op dit moment enkel gebruikt om de broncode van het OPS-model publiek beschikbaar te stellen. De ontwikkeling van OPS vindt (nog) niet op GitHub plaats, voor vragen of opmerkingen over de broncode kunt u het bovenstaande emailadres gebruiken, of kunt u hier een issue aanmaken. Geef daarin een bondige omschrijving van de vraag of het probleem, met eventueel een mogelijke oplossing.

ops's People

Contributors

rivm-ops avatar stikstofje avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ops's Issues

Unnecessary personal details

The current release contains change notes with the names of persons no longer involved in developing and/or maintaining the code base.

These are quite hard to remove completely thanks to git but maybe a good start would be to remove them from next release.

Suggestion to use Fortran 90 syntax or newer where available

Code contains constructs like in ops_cals_stats.f90:
if (somcpri .gt. 0.0) then
Starting with Fortran 90 when I am correct (correct me if wrong), this can be replaced by:

if (somcpri = 0.0) then
which is easier to understand by coders recently graduating. Replacing some other traditional Fortran constructs by more modern constructs might also help adoption.

Document estimated rounding errors

Related to #4.

The current code uses single precision numbers. But even with arbitrary precision numbers, cumulative errors can be introduced when executing many calculation steps and using the output of previous steps as input to next steps. Programmers typically need to take care that numeric errors do lead to outcomes with an accuracy outside of the pre-established required accuracy.

The current code does not ground-up document the rounding errors in terms of precision lost during the process; it may be documented elsewhere.

Also, it seems that during the evolution from the historical code into the current version the scope has been extended to a finer matrix resolution. Maybe the original code was checked for rounding errors, but such a scope change may require additional checks. These might also have been done outside of the code.

A little overly dramatic sample of the past when still studying at EUT was the Patriot software issue as documented on https://hownot2code.com/2016/11/09/r-17-vs-patriot-a-rounding-issue-bugs-in-a-missile-defense-system/.

Suggestion is to extend each method by some documentation assessing the precision loss, allowing top level determination of the accuracy boundaries of the model and whether they fall within the acceptable range.

Consider use of improved double precision to reduce cumulative errors

The code modules all use REAL*4 currently, which is (when I am correct) a single precision 32-bit floating decimal number.

For instance in ops-convec.f90:

  • REAL*4 z0
  • REAL*4 zi

I consider OPS a weather-related calculation model. As far as I know most of these nowadays use 64-bit double precision numbers for calculations. Especially during a large number of calculation steps, precision may get lost or unacceptable cumulative errors may be introduced.

From the historical perspective on 1989, I can imagine that an array with 100K numbers might have been hard to fit into memory of a HP/DEC workstation or time sharing solution, but nowadays a double precision no longer has to incur extra memory costs.
Back then, a FPU (when present) might have similated double precision using multiple single precision calculations or the main processor might have similated them. Nowadays, double precision is seen more often than single precision both in hardware as software from where I stand.

A related issue is created regarding estimating cumulative errors and to assess whether they do not influence the accuracy of the model as documented on the RIVM website.

Toevoegen achtergrond publiek maken model

Voor beter begrip van de context zou het openbaar maken van het openbaarmaken van Aerius en OPS helpen.

Mogelijk is de oorzaak beschreven in https://uitspraken.rechtspraak.nl/inziendocument?id=ECLI:NL:RBDHA:2019:13779, maar mogelijk eerdere of latere besluiten, binnen RIVM, ministeries of rechter, hebben hiertoe geleid. Als buitenstaander is best lastig om de historie te bepalen op basis van nieuwsartikelen zoals https://www.omropfryslan.nl/nl/nieuws/927198/rechter-rivm-moet-rekenmodel-voor-stikstof-vrijgeven.

Daarnaast is er gezien het NRC-artikel https://www.nrc.nl/nieuws/2022/06/11/de-man-achter-het-model-waarmee-den-haag-stikstofberekeningen-doet-a4133158 blijkbaar enige verwarring over de rollen van Aerius en OPS in het berekeningsproces. Mogelijk is het handig om relatie met Aerius beter te belichten in de readme, zoals bijvoorbeeld beschreven in https://nl.wikipedia.org/wiki/AERIUS.

Lack of a MAKEFILE

It's needlessly frustrating and against the principles of OpenSource to not include a Makefile.

Considering the RIVM is aware of the lack of makefile (hence the request to email them in the readme), It seems clear this frustration is on purpose.

Please just include the makefile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.