Leeds-MONC / monc

MONC (Leeds fork)
BSD 3-Clause "New" or "Revised" License
5 stars 18 forks source link

Dephy forcings #34

Open sjboeing opened 3 years ago

sjboeing commented 3 years ago

@leifdenby @cemac-ccs : Here is some preliminary work on the DEPHY forcing implementation. It will need further improvements, cleaning, testing and documentation before it can go in.

Notes:

sjboeing commented 3 years ago

PS: apologies for all the whitespace changes.

sjboeing commented 3 years ago

@leifdenby: With gitk it is possible to filter out the whitespace, but I haven't been able to do this on github so far. I think number 2 (the bugfix for interpolation), will be quick to implement as a separate bugfix and I can do this tomorrow. Number 1 (the makefile compilation) could be a separate pull request as well. However, it breaks existing functionality as the moment, so I would not pull this into the master branch right now. On the other hand, I am currently using it to compile MONC, though I think fcm works as well.

Apologies for the somewhat sloppy pull request, the main thing will be the new dephy_forcings routine though.

sjboeing commented 3 years ago

Another issue I have been thinking about is how to read in forcings that are in the "normal DEPHY" format, rather than our "IDEPHYX" format (Implémentation de DEPHY avec des eXtensions ). The difference between the formats is that IDEPHYX has some additional time-dependent fields, which are characterised by their name having the subscript "_traj". There is also a quirk in DEPHY that I currently haven't dealt with, which are inputs which can be either a string or an integer (I have simply used integers for these).

I think eventually, we would want to check whether the "_traj" variable is present, and otherwise use the non-"_traj" ones in fortran. Throw a wobbly when none or both are present. This will make the code a bit ugly. As a first step, I could write a script that converts DEPHY to IDEPHYX.