New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
ticket/0846 (diff) – NEMO

Changes between Version 4 and Version 5 of ticket/0846


Ignore:
Timestamp:
2011-07-20T16:38:55+02:00 (13 years ago)
Author:
vichi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ticket/0846

    v4 v5  
    5858I think we can work out a common solution within the framework of my_trc, although I would propose to have an extended my_trc that allows more flexibility. Whether to achieve this through additional logical flags or by means of macros is a matter of discussion. I guess we all agree that it makes no sense to have a different key for each new model, though we also need to realize that we'll have to accommodate two different coupling strategies, one for SMS models and one for "ecosystem" models (which may also incorporate benthic systems like the ones we use now). 
    5959 
    60 One (very) simple solution is to have only an additional key to accommodate any BGC model that does not use at all the NEMO memory structure and facilities. 
     60One (very) simple solution is to have only an additional key (like key_obgcm, other biogeochemical model) to accommodate any BGC model that does not use at all the NEMO memory structure and facilities. 
    6161This would only involve two changes in the NEMO code, during the initialization step and during the time stepping 
    6262 
    63 TO BE COMPLETED 
     63{{{ 
     64nemogcm.F90: 
     65------------- 
     66#if defined key_top 
     67  #if defined key_obgcm 
     68      !                                     ! Other external biogeochemical model 
     69                            CALL     trc_init_obgc 
     70  #else 
     71      !                                     ! Passive tracers 
     72                            CALL     trc_init 
     73  #endif 
     74#endif 
     75 
     76step.F90: 
     77--------- 
     78#if defined key_top 
     79  #if defined key_obgcm 
     80      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     81      ! Passive Tracer Model 
     82      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     83                         CALL trc_stp_obgc( kstp )         ! time-stepping 
     84#else 
     85      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     86      ! Other Biogeochemical Model 
     87      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     88                         CALL trc_stp( kstp )         ! time-stepping 
     89  #endif 
     90#endif 
     91 
     92}}} 
     93 
     94The routines trc_init_obgc and trc_stp_obgc are wrappers that have to be provided by the external model in its own directory structure and linked during compilation. We can also put an EXTERNAL statement in the code to clarify this. 
     95 
    6496 
    6597The strategy is open for discussion because it is not urgent matter in the 2011 work plan, but it is important that we find a common way forward that will maximize all development efforts and the research carried on by the community of ecosystem modelling.