Menu

MOSSCO / Tech blog: Recent posts

Adding openmpi-gcc5 to MacPortsport configure.tcl

My macports refused to install openmpi with the gcc5 compiler, i.e.

port install openmpi-gcc5

complained

 "Invalid value for configure.compiler: macports-gcc-5"

Looking at /opt/local/libexec/macports/lib/port1.0/portconfigure.tcl it is evident that the regex for deterimining the compiler is expecting a version as version.subversion and not just a plain major version. The fix is then to duplicate the gccX.Y sections in portconfigure.tcl and adjust the regexto deal with gccX. ... read more

Posted by Carsten Lemmen 2016-01-23 Labels: macports port regex openmpi gcc5 tcl configure.compiler portconfigure openmpi-gcc5 macports-openmpi-gcc5

FABM-Dependencies in ESMF

FABM's external dependencies are communicated in MOSSCO as fields (3d for bulk dependencies, 2d for horizontal dependencies) and are automatically created in the fabm_pelagic component. The dependencies just have to be specified ideally as standard_variable data type in the FABM model:

For 3d/bulk dependencies:

call self%register_dependency(self%id_tke,type_bulk_standard_variable(name='turbulent_kinetic_energy',units='m2/s2... [read more](/p/mossco/tech-blog/2015/10/fabm-dependencies-in-esmf/)
Posted by Richard H. 2015-10-19

Install OceanView package

To install the OceanView R package http://www.rforscience.com/rpackages/visualisation/, startup your R and type

install.packages("OceanView")

You will be asked for a mirror to download from and the package will install itself.
Sometimes, the dependencies are not immediately resolved.

Follow http://stackoverflow.com/questions/15292905/how-to-solve-the-error-missing-required-header-gl-gl-h-while-installing-the-p advice and update your libGL libraries, then again try installing OceanView; you can also manually try the dependencies... read more

Posted by Carsten Lemmen 2015-01-09 Labels: rgl oceanview r shape soetaert

Check externally visible IP from command line

Issue the following command (provided you have beget)

wget -qO- http://ipecho.net/plain ; echo
Posted by Carsten Lemmen 2014-10-16 Labels: IP

Logical OR on a makefile

There is no logical OR in makefile syntax.

You have to use filter:

ifneq (,$(filter $(A),$(B) $(C)))

The filter will return B and/or C if they match A, and the ifneq empty
string will be true if the filter returns any value.

We do this in Rules.make to check for either MOSSCO_FABM, MOSSCO_GOTM, or MOSSCO_GETM

Posted by Carsten Lemmen 2014-03-13 Labels: if or make

check existence of items within a state

ESMF_StateGet() can be used to check the existence of items (without raising an ESMF error in case of non-existing items):

type(ESMF_StateItem_Flag) :: itemType
call ESMF_StateGet(state, name, itemType)
if (itemType .eq. ESMF_STATEITEM_NOTFOUND) then

For more details see:
http://www.earthsystemmodeling.org/esmf_releases/public/last/ESMF_refdoc/node4.html#SECTION04077900000000000000

Posted by Knut 2014-02-25

Learning about doxygen

Onur today talked about his first experiences with doxygen

  • Fortran support in oxygen is still rudimentary,
    !> starts a documentation section
    !! continues the documentation.
  • You need special configuration to include function-body comments
  • with @fn you have to specify the full function interface (including module scope and arguments), this is problematic in FABM with its many macros
Posted by Carsten Lemmen 2014-02-25 Labels: doxygen doc

Welcome to this new blog

We installed a new blog that serves as a platform for exchanging arbitrary ideas on how to deal with coding issues within and around MOSSCO

Posted by Carsten Lemmen 2014-02-25 Labels: announce
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.