Diagnostic variables outputs - benthic_predator model

41 views
Skip to first unread message

Alexandre Forest

unread,
Jun 27, 2012, 9:59:15 PM6/27/12
to fabm-...@googlegroups.com
Dear FABM users,

I'm currently on my learning curve of the FABM-GOTM interface and I
encountered two issues (not connected):

1) The first issue is related to the Netcdf outputs of diagnostic
variables. I never get any good plots of any diagnostic variables (e.g.
PAR, GPP, etc.), whereas all the state variables are always good. I've
attached two plots so you can see the difference (taken from one of the
test-cases). The strange 'vertical' line plot I get for every diagnostic
variables is always the same, whatsoever is the biogeochemical model
(Ergom, NPZD, carbonates, etc.). I've discussed this issue with Gennadi
Lessin who suggested to port this discussion on the FABM user-list. Do you
have any thoughts?

2) The second issue is related to the 'examples_benthic_predator' model.
When I try to couple this model with any other model, I always get the
same fatal error at initialization (i.e. FATAL ERROR:
examples_benthic_predator_init: Namelist examples_benthic_predator was not
found). This is strange as other coupled models (e.g. Mnemiopsis) work
fine when correctly listed in the fabm.nml file (even the test-cases with
benthic_predator does not work).

Thanks a lot for any feedback,

Here are my settings:
Mac OS X 10.7
Gfortran 4.6
Netcdf 4.2
GOTM 4.1 (from git, 7 June 2012)
FABM ? (from git, 7 June 2012)

fabm_ergom_par_nns_seasonal.png
fabm_ergom_diatoms_nns_seasonal.png

Alexandre Forest

unread,
Jul 3, 2012, 9:56:33 PM7/3/12
to fabm-...@googlegroups.com
Dear FABM users,

I was just wondering if anybody would have any thoughts regarding the two
issues I faced with FABM (see below)?

I have not managed to resolve my problems so far.

Thanks in advance,

Alexandre



On 12-06-27 9:59 PM, "Alexandre Forest"
fabm_ergom_par_nns_seasonal.png
fabm_ergom_diatoms_nns_seasonal.png

Alexandre Forest

unread,
Aug 8, 2012, 8:34:50 PM8/8/12
to fabm-...@googlegroups.com
Dear FABM users,

A quick update on the 2 issues I faced below.

1) I solved my problem related to diagnostic variables by upgrading my
gcc/gfortran from 4.2/4.6 to 4.7/4.7. I think that there was some derived
type functionalities from FABM that my old gcc/gfortran was not able to
understand. Any thoughts?

2) I solved the problem on the benthos namelist by making a copy-paste
from the npzd_f2003_benthic namelist, instead of the normal npzd-benthos
namelist. Still, I cannot understand what was wrong, but working on
various copy-paste solved the issue.

Alexandre




On 12-07-03 9:56 PM, "Alexandre Forest"

Jorn Bruggeman

unread,
Aug 9, 2012, 8:21:53 AM8/9/12
to fabm-...@googlegroups.com
Hi Alexandre,

First, apologies for not responding to your earlier mails - they slipped
through while I was on vacation. Second, great to hear you were able to
resolve both issues!

> 1) I solved my problem related to diagnostic variables by upgrading my
> gcc/gfortran from 4.2/4.6 to 4.7/4.7. I think that there was some
> derived type functionalities from FABM that my old gcc/gfortran was not
> able to understand. Any thoughts?

Did you compile FABM with FABM_F2003 set or not?

Fortran 2003 support (activated with FABM_F2003) certainly requires a recent
gfortran version. However, we assumed until now that as gfortran 4.6 does
compile FABM with F2003, it also works ok. It's worrying to hear that even
though compilation succeeds, the executable does not do what it is supposed
to. I guess we'll have to recommend gfortran 4.7 from now on.

If you were compiling without F2003 support, I would be surprised that
gfortran fails, as without FABM_F2003 most fancy Fortran constructs are
deactivated... Please let us know if that's the case!

> 2) I solved the problem on the benthos namelist by making a copy-paste
> from the npzd_f2003_benthic namelist, instead of the normal npzd-
> benthos namelist. Still, I cannot understand what was wrong, but
> working on various copy-paste solved the issue.

I'm not sure what was the issue here. If I use the provided
fabm-npzd-benthos.nml with a fresh gotm-fabm build (ifort), it seems to work
fine. Can you send the fabm.nml that fails?

> Alexandre

Cheers,

Jorn


Alexandre Forest

unread,
Aug 9, 2012, 10:22:26 AM8/9/12
to fabm-...@googlegroups.com
Dear Jorn,

Thanks for the reply, no problem for the delay.

As for the gfortran issue, I need to say that I've tried a lot of things
(including with and without F2003) before deciding to rebuild a complete
new gcc/gfortran. What was very strange is that the state variable plots
were always good, whereas the diagnostic plots were always bad. Anyway, I
solved the issue by building a new gcc/gfortran completely from source. I
should mention that the old gcc was the one provided with the Apple
Developer's Kit (4.2.1) and the old gfortran was 4.6.2 (from a binary
available on gcc web site). Installing from source is always a better
choice I guess.

As for the namelist issue, I could repeat the error by using the attached
fabm.nml file (error pasted below). Probably there is something very
simple that I jus do not see ;-). Using the npzd_f2003_benthic nml does
not produce such error.
_____
Initializing biogeochemical model "gotm_npzd"...
model "gotm_npzd" initialized successfully.
Initializing biogeochemical model "examples_benthic_predator"...
FATAL ERROR: examples_benthic_predator_init: Error reading namelist
examples_benthic_predator
STOP 1
____




Thanks for the feedback! And apart of those few issues, I should say that
it is really nice to develop within FABM (easy, fast, etc.)!
Congratulations for all the work behind that.

Alexandre
fabm.nml

Jorn Bruggeman

unread,
Aug 13, 2012, 4:43:18 AM8/13/12
to fabm-...@googlegroups.com
Hi Alexandre,

> As for the namelist issue, I could repeat the error by using the
> attached fabm.nml file (error pasted below). Probably there is
> something very simple that I jus do not see ;-). Using the
> npzd_f2003_benthic nml does not produce such error.
> _____
> Initializing biogeochemical model "gotm_npzd"...
> model "gotm_npzd" initialized successfully.
> Initializing biogeochemical model "examples_benthic_predator"...
> FATAL ERROR: examples_benthic_predator_init: Error reading namelist
> examples_benthic_predator STOP 1 ____

Really I have no idea what causes this error. If I use your fabm.nml with an
ifort-compiled gotm executable, it works fine. We have seen differences
between ifort and gfortran namelist parsing in the past, so perhaps gfortran
is complaining about a namelist formatting issue that is not fully according
to the Fortran spec. However, I just do not see what that issue could be...
I'll set up a system with gfortran to try this later this week. I'm not sure
what the npzd_f2003_benthic file is that you refer to - is that a
combination of npzd_f2003 and benthic_predator that you put together
yourself?

Glad to hear you are otherwise are pleased with FABM as a framework!

Cheers,

Jorn


Alexandre Forest

unread,
Aug 13, 2012, 8:26:56 AM8/13/12
to fabm-...@googlegroups.com
Dear Jorn,

Thanks for the further reply. I forgot to tell that the npzd_f2003_benthic
namelist was a file that I created myself by writing by hands into the
npzd_f2003 the 'benthic section' (not a simply copy-paste). Anyway, this
strange issue was probably related to gfortran or my Mac. It is not a
problem anymore.

Thanks,

Alexandre

Onur

unread,
Jan 25, 2013, 11:42:39 AM1/25/13
to fabm-...@googlegroups.com
Dear FABM users,

I had exactly the same problems about the diagnostic variables Alexandre described earlier under this thread. I'm using the virtual machine Karsten provided:

Following Alexandre's solution, I 'upgraded' the gcc from 4.6 to 4.7.0 compiling from source, recompiled FABM, but compiling GOTM quits with:

ncdfout.F90:36.7:
   use netcdf
       1
Fatal Error: Wrong module version '6' (expected '9') for file 'netcdf.mod' opened at (1)

I thought it's because netcdf was compiled with gfortran-4.6, and that it needs to be recompiled with -4.7, however, it's the same after doing so (from the source directories of netcdf-4.2 and netcdf-fortran-4.2 in the ~/compile folder of the virtual machine: make check's and make install's running with success).

Googling for the error, it seems that there might be issues between netcdf and gfortran-4.7 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674805).

Has anyone experienced something similar? Any ideas for fixing it?

Cheers,
Onur

Alexandre Forest

unread,
Jan 28, 2013, 12:11:18 AM1/28/13
to fabm-...@googlegroups.com
Hi Onur,

I have not experienced the error that you have, but I realized that I was
indeed using GCC 4.8.0 (experimental), and not GCC 4.7. This is because
I've downloaded GCC through SVN (http://gcc.gnu.org/svn.html). Also, I am
using Netcdf 4.2 with GCC 4.8 on Mac OSX 10.7 - and everything works fine.

You should give a try to GCC 4.8, maybe it will solve your issue.
Otherwise, it might be related to the Virtual machine itself?

Good luck,

Alexandre

_____
--



Karsten Bolding

unread,
Jan 28, 2013, 7:31:52 AM1/28/13
to fabm-...@googlegroups.com
Hi Onur

I can't remember if the NetCDF libraries are costum compiled in the
virtual machine - or installed by the package manager. If the latter -
and you have installed and are using a different Fortran compiler
version you likely have to re-compile the NetCDF libraries.

This is likely beyond the scope of this maling list :-)

Karsten
> > On 12-08-13 4:43 AM, "Jorn Bruggeman" <jo...@bolding-burchard.com<javascript:>>
> --
>
>

--
Installing FABM:
mkdir ~/FABM && cd ~/FABM/
git clone git://fabm.git.sourceforge.net/gitroot/fabm/fabm fabm-git

Email patches to:
fabm-...@lists.sourceforge.net

Wiki:
http://sourceforge.net/apps/mediawiki/fabm/

Onur

unread,
Jan 29, 2013, 4:57:17 AM1/29/13
to fabm-...@googlegroups.com
Hi Alexandre,

Thanks for your clarification. In the meanwhile I built another system from scratch with ifort and I don't have those issues anymore with the diagnostic variables, which is in line with your earlier conclusion that it is probably the gcc4.6 causing problems. I will still try the gcc4.8 at some point.

Cheers,
Onur
Reply all
Reply to author
Forward
0 new messages