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 15 and Version 16 of ticket/0846


Ignore:
Timestamp:
2011-10-23T16:37:56+02:00 (12 years ago)
Author:
momme
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ticket/0846

    v15 v16  
    372372========= Marcello's comments  ========= Christian's comment is remarking the importance of FCM as "the tool" to incorporate other models into the system with little modification of the source code. I definitely agree with this point. The way we handle the coupling with the BFM now is to have a directory called nemo within the BFM tree that contains all needed routines. In our case, This directory is exactly what should go into MY_SRC. Extending on this method, the solution would be to totally substitute the main calling routines (trcstp and trctrp) with modified copies that will be maintained by each group in the tree of the biological model. In that case, I think we should be able to fit into the MY_TRC layout easily. As far as I can understand, FCM should consider the content opf MY_SRC directory in place of the files with the same names in the WORK directory. My only concern is whether FCM can eventually put the content of an external directory into MY_SRC, without the need to do it manually. 
    373373 
    374 ========= Momme's comments on FCM use and my_trc interface  ========= 
    375 '''How to compile external "trc" code with NEMO using FCM, modifying only the fcm file of the local configuration.''' (Leaving the repository code untouched.) 
     374========= Momme's comments on FCM use and my_trc interface  ========= '''How to compile external "trc" code with NEMO using FCM, modifying only the fcm file of the local configuration.''' (Leaving the repository code untouched.) 
    376375 
    377376Example of fcm configuration file: 
     
    406405All this is based on the NEMO src of the last tag (3.3), I haven't checked back against the trunk. 
    407406 
    408 {{{ 
    409 lk_qsr_bio -> TRUE requires key_pisces, should be switchable in relation to user requirements for my_tracer: 
     407trc_oce.F90: 
     408 
     409''     lk_qsr_bio -> TRUE requires key_pisces, should be switchable in relation to user requirements for my_tracer:'' 
     410 
     411{{{ 
    410412!===============================================  
    411413! Modification to NEMO trunk for ERSEM coupling  
     
    418420!===============================================  
    419421}}} 
    420 mapping of ERSEM states to trn: 
    421  
    422 {{{ 
    423 !=============================================== ! Modification to NEMO trunk for ERSEM coupling ! M.Butenschoen, PML - March 2009 ! \/ ! \/ #if defined key_PMLersem 
    424  
     422trcstp.F90: 
     423 
     424''     mapping of ERSEM states to trn:'' 
     425 
     426{{{ 
     427!===============================================  
     428! Modification to NEMO trunk for ERSEM coupling  
     429! M.Butenschoen, PML - March 2009  
     430! \/  
     431! \/  
     432#if defined key_PMLersem 
    425433  CALL trc_trp_PMLersem( kt ) 
    426  
    427 #else ! /\ ! /\ !=============================================== 
    428  
     434#else  
     435! /\  
     436! /\  
     437!=============================================== 
    429438  CALL trc_trp( kt )           ! transport of passive tracers 
    430  
    431 !=============================================== ! Modification to NEMO trunk for ERSEM coupling ! M.Butenschoen, PML - March 2009 ! \/ ! \/ #endif ! /\ ! /\ !=============================================== }}} avoid NEMO output of trc: {{{!=============================================== ! Modification to NEMO trunk for ERSEM coupling ! M.Butenschoen, PML - March 2009 ! \/ ! \/ #if defined key_PMLersem 
    432  
     439!===============================================  
     440! Modification to NEMO trunk for ERSEM coupling  
     441! M.Butenschoen, PML - March 2009  
     442! \/  
     443! \/  
     444#endif  
     445! /\  
     446! /\  
     447!===============================================  
     448}}} 
     449''     avoid NEMO output of trc: '' 
     450 
     451{{{ 
     452!===============================================  
     453! Modification to NEMO trunk for ERSEM coupling  
     454! M.Butenschoen, PML - March 2009  
     455! \/  
     456! \/  
     457#if defined key_PMLersem 
    433458  CALL trc_dia_PMLErsem( kt ) 
    434  
    435459#else 
    436  
    437   IF( lk_iomput ) THEN  ;   CALL trc_wri( kt )           ! output of passive tracers ELSE                  ;   CALL trc_dia( kt ) ENDIF 
    438  
    439 !=============================================== ! Modification to NEMO trunk for ERSEM coupling ! M.Butenschoen, PML - March 2009 
    440  
    441   \/ 
    442  
    443 ! \/ #endif 
    444 }}} 
    445  
     460! /\ 
     461! /\ 
     462!=============================================== 
     463  IF( lk_iomput ) THEN  ;   CALL trc_wri( kt )           ! output of passive tracers 
     464  ELSE                  ;   CALL trc_dia( kt )  
     465  ENDIF 
     466!===============================================  
     467! Modification to NEMO trunk for ERSEM coupling  
     468! M.Butenschoen, PML - March 2009 
     469! \/ 
     470! \/  
     471#endif 
     472! /\ 
     473! /\ 
     474!=============================================== 
     475}}} 
    446476=== Status === 
    447477Outcomes of the videoconference held on September 17th. Participants: Marcello Vichi, Christian Ethe', Karen Edwards, Momme Butenschoen. Christian's proposal of using FCM is seen as the way forward to minimize the impacts on the current NEMO code and allow all the developers of external ecosystem models to carry on their own development still maintaining the possibility to couple with NEMO in a seamless way. A powerpoint presentation is attached to this page, explaining the status and the possible solution.  The underlying idea is to explore the method used at MetOffice where different components are first extracted (using FCM extract.cfg configuration script) and then built. Currently, FCM is used within NEMO just to perform the build phase (build.cfg) as the extraction is not needed being the code part of the downloaded NEMO version. A possible strategy to explore is to include an additional flag for the makenemo script that should look for a user-provided build.cfg file with all the information on the external biogeochemical model. This model code will then be copied at the same level of the WORK directory. The proper versions of trcini.F90 and trcstp.F0 will instead be put in the MY_SRC directory. All files present in MY_SRC directory are compiled in place of the ones in the WORK directory. The current development branch will thus be used as a testing ground for the usage of FCM as interface to . It is not expected that this development will be part of the next release, but we believe this strategy will facilitate any future inclusion of other external models.