Opened 15 years ago

Last modified 15 years ago

#375 closed upgrade

Generalized coupled biology and sediment models interface — at Initial Version

Reported by: arango Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.3
Component: Nonlinear Version: 3.3
Keywords: Cc:

Description

I updated the interface for the various ecosystem model in ROMS. This allows a lot of flexibility and customization:

  • The ecosystem model input parameters are declared in an new file xxx_mod.h which is included in module mod_biology.F as:
    #ifdef BIOLOGY
    # if defined BIO_FENNEL
    #  include <fennel_mod.h>
    # elif defined ECOSIM
    #  include <ecosim_mod.h>
    # elif defined NEMURO
    #  include <nemuro_mod.h>
    # elif defined NPZD_FRANKS
    #  include <npzd_Franks_mod.h>
    # elif defined NPZD_IRON
    #  include <npzd_iron_mod.h>
    # elif defined NPZD_POWELL
    #  include <npzd_Powell_mod.h>
    # endif
    #endif
    
  • The input parameters are now read from a new file xxx_inp.h which is included in inp_par.F as
    #ifdef BIOLOGY
    # if defined BIO_FENNEL
    #  include <fennel_inp.h>
    # elif defined NEMURO
    #  include <nemuro_inp.h>
    # elif defined NPZD_FRANKS
    #  include <npzd_Franks_inp.h>
    # elif defined NPZD_POWELL
    #  include <npzd_Powell_inp.h>
    # elif defined NPZD_IRON
    #  include <npzd_iron_inp.h>
    # elif defined ECOSIM
    #  include <ecosim_inp.h>
    # endif
    #endif
    
    #ifdef SEDIMENT
    # include <sediment_inp.h>
    #endif
    
  • The ecosystem model input parameters are defined (all output NetCDF files) in a new file xxx_def.h which is included in def_info.F as:
    #if defined BIOLOGY && defined SOLVE3D
    # if defined BIO_FENNEL
    #  include <fennel_def.h>
    # elif defined ECOSIM
    #  include <ecosim_def.h>
    # elif defined NEMURO
    #  include <nemuro_def.h>
    # elif defined NPZD_FRANKS
    #  include <npzd_Franks_def.h>
    # elif defined NPZD_IRON
    #  include <npzd_iron_def.h>
    # elif defined NPZD_POWELL
    #  include <npzd_Powell_def.h>
    # endif
    #endif
    
  • The ecosystem model input parameters are written (all output NetCDF files) in a new file xxx_wrt.h which is included in wrt_info.F as:
#if defined BIOLOGY && defined SOLVE3D
# if defined BIO_FENNEL
#  include <fennel_wrt.h>
# elif defined ECOSIM
#  include <ecosim_wrt.h>
# elif defined NEMURO
#  include <nemuro_wrt.h>
# elif defined NPZD_FRANKS
#  include <npzd_Franks_wrt.h>
# elif defined NPZD_IRON
#  include <npzd_iron_wrt.h>
# elif defined NPZD_POWELL
#  include <npzd_Powell_wrt.h>
# endif
#endif

Check any of these files if you are adding a new ecosystem model into ROMS for guidance. Note that all the new ecosystem *.h files are located in ROMS/Nonlinear/Biology and included within <...> to allow the user to cuztomize any of them in the project directory while keeping the distributed code intact (check the build script for details).

Also, notice that currently only sediment_inp.h is available for the sediment model. This will change in the future as this model evolves and more input parameters are required.

I also fixed couple unbound local arrays bugs in ecosim.h and the sink tracer indices for the silica group.

Change History (0)

Note: See TracTickets for help on using tickets.