Opened 9 years ago

Closed 7 years ago

#19 closed task (fixed)

Propostion for re-organization of source code in svn system

Reported by: jgipsl Owned by: jgipsl
Priority: minor Milestone: ORCHIDEE 2.0
Component: Driver files Version: orchidee_1_9_6
Keywords: Cc:

Description (last modified by jgipsl)

This is a proposition (J Ghattas) to simplify the use of the depot ORCHIDEE at svn. See today HEAD of the trunk rev 999 here :
https://forge.ipsl.jussieu.fr/orchidee/browser/trunk?rev=999

I would like to re-organize to have :

  • one directory with all fortran source code : ORCHIDEE
  • one directory with offline configurations using libIGCM : ORCHIDEE_OL_CONFIG
  • one directory with other scripts and tools (already existing) : TOOLS

Creation ORCHIDEE/src_driver

I propose to move all fortran source code for the drivers acutally stored in ORCHIDEE_OL/ into a new directory in ORCHIDEE/src_driver/. The makefile in ORCHIDEE will be modified to compile all code as follow :

gmake        # compile all libraries (as now)
gmake driver # compile all libraries + executables

Main advantages :

  • One directory for all source code : ORCHIDEE. The drivers is part of the modele
  • Easier use of SVN : One specific revion number includes libraires as well as drivers.

Clean up in ORCHIDEE_OL
The directory ORCHIDEE_OL/Utilitaire will be moved to TOOLS/script_python as will as the script bench_ORCHIDEE.

Rename ORCHIDEE_OL
Left in directory ORCHIDEE_OL will be only directories for scripts using libIGCM :

> ls ORCHIDEE_OL
OOL_SEC
FLUXNET
FORCESOIL
ENSEMBLE
EXP00
OOL_SEC_STO
TESTSTOMATE
SPINUP

This directory could therefore be renamed to ORCHIDEE_OL_CONFIG.


Note 1 : All operations above, would be done such as no history in svn will be lost. In partice, this means that I will extract the whole trunk and use svn mv :

svn co svn://forge.ipsl.jussieu.fr/orchidee/trunk
cd trunk
svn mkdir ORCHIDEE/src_driver
svn mv ORCHIDEE_OL/*f90 ORCHIDEE/src_driver
svn ci
...

Note 2 : Plus d'expliquation en francais :

  • Le souci principal : Quand on travaille avec ORCHIDEE dans modipsl, on extrait d'abord ORCHIDEE et on le met dans modipsl/modeles/, ensuite en extrait ORCHIDEE_OL et en le met a coté. Quand il faut faire un opération svn (svn info, svn diff, svn update, svn ci,etc..) les 2 répertoires ne sont pas connecté. On peut faire un update dans ORCHIDEE et l'oublié de le faire aussi dans ORCHIDEE_OL. Quand on fait un commit, il faut d'abord le faire dans un répertoire et ensuite dans l'autre... Aussi, quand on fait un tag, le répertoire ORCHIDEE a un numéro de révision et ORCHIDEE_OL a un autre numéro.
  • Le philosophie : comme tu l'as deviné :
    • Un répertoire pour tout les sources fortran.
    • Un répertoire pour les configurations/scripts ORCHIDEE offline avec libIGCM : ORCHIDEE_OL_CONFIG (ou un autre nom si tu préfères)
    • Un répertoire avec d'autre scripts et outils : TOOLS (ce répertoire existe déjà)
  • Je voudrais séparé les scripts libIGCM des autres scripts parce que les scripts libIGCM sont déjà assez nombreux.
  • Un autre avantage c'est qu'on peut taggé les sources indépendant aux scripts.

Change History (8)

comment:1 Changed 9 years ago by jgipsl

  • Component changed from Anthropogenic processes to Driver files
  • Milestone set to ORCHIDEE 2.0
  • Owner changed from somebody to jgipsl
  • Status changed from new to accepted
  • Type changed from defect to task
  • Version set to orchidee_1_9_6

comment:2 Changed 9 years ago by jgipsl

  • Description modified (diff)

comment:3 Changed 9 years ago by jgipsl

NB! The script recup_my_ORCHIDEE needs to be adapted to handle the current and new structure. Lots of users will continue with the current structure in their perso/ directories.

comment:4 Changed 9 years ago by jgipsl

Creation de src_driver done in commit rev 1042

Clean up done in rev 1043.

comment:5 follow-up: Changed 9 years ago by jpolcher

  • Priority changed from major to critical

The AA_make file has not been updated correctly. At least not in such a way to allow the users to perform a make orchidee_ol in ORCHIDEE/src_driver.

If this intended then the following changes are needed to AA_Make

Index: AA_make
===================================================================
--- AA_make (revision 1051)
+++ AA_make (working copy)
@@ -11,6 +11,7 @@

all : orchidee_ol teststomate forcesoil


orchidee_ol:

+ $(M_K) all_libs

$(M_K) m_orchidee_ol
@echo orchidee_ol is OK


@@ -53,9 +54,32 @@

$(SXPARALLEL_LIB) $(SXORGLOB_LIB) $(SXPARAM_LIB) $(SXIOIPSL_LIB) $(NCDF_LIB)

$(RM) forcesoil.o


+all_libs:
+ $(M_K) libioipsl
+ $(M_K) libparameters
+ $(M_K) libparallel
+ $(M_K) liborglob
+ $(M_K) libstomate
+ $(M_K) libsechiba
+

libioipsl:

(cd ../../IOIPSL/src; $(M_K) -f Makefile)


+libparameters:
+ (cd ../src_parameters; $(M_K) -f Makefile)
+
+libparallel:
+ (cd ../src_parallel; $(M_K) -f Makefile)
+
+liborglob:
+ (cd ../src_global; $(M_K) -f Makefile)
+
+libstomate:
+ (cd ../src_stomate; $(M_K) -f Makefile)
+
+libsechiba:
+ (cd ../src_sechiba; $(M_K) -f Makefile)
+

clean:

$(RM) $(MODEL_LIB)

comment:6 in reply to: ↑ 5 Changed 9 years ago by jpolcher

Replying to jpolcher:

The AA_make file has not been updated correctly. At least not in such a way to allow the users to perform a make orchidee_ol in ORCHIDEE/src_driver.

If this intended then the following changes are needed to AA_Make

Index: AA_make
===================================================================
--- AA_make (revision 1051)
+++ AA_make (working copy)
@@ -11,6 +11,7 @@

all : orchidee_ol teststomate forcesoil


orchidee_ol:

+ $(M_K) all_libs

$(M_K) m_orchidee_ol
@echo orchidee_ol is OK


@@ -53,9 +54,32 @@

$(SXPARALLEL_LIB) $(SXORGLOB_LIB) $(SXPARAM_LIB) $(SXIOIPSL_LIB) $(NCDF_LIB)

$(RM) forcesoil.o


+all_libs:
+ $(M_K) libioipsl
+ $(M_K) libparameters
+ $(M_K) libparallel
+ $(M_K) liborglob
+ $(M_K) libstomate
+ $(M_K) libsechiba
+

libioipsl:

(cd ../../IOIPSL/src; $(M_K) -f Makefile)


+libparameters:
+ (cd ../src_parameters; $(M_K) -f Makefile)
+
+libparallel:
+ (cd ../src_parallel; $(M_K) -f Makefile)
+
+liborglob:
+ (cd ../src_global; $(M_K) -f Makefile)
+
+libstomate:
+ (cd ../src_stomate; $(M_K) -f Makefile)
+
+libsechiba:
+ (cd ../src_sechiba; $(M_K) -f Makefile)
+

clean:

$(RM) $(MODEL_LIB)

For the clean we are missing :

(cd ../../IOIPSL/src; $(M_K) -f Makefile clean)
(cd ../src_parameters; $(M_K) -f Makefile clean)
(cd ../src_parallel; $(M_K) -f Makefile clean)
(cd ../src_global; $(M_K) -f Makefile clean)
(cd ../src_sechiba; $(M_K) -f Makefile clean)
(cd ../src_stomate; $(M_K) -f Makefile clean)
$(RM) *.o core $(MODEL_LIB)

comment:7 Changed 9 years ago by jgipsl

  • Priority changed from critical to minor

Compiling has been adapted and is ok. ORCHIDEE/Makfile is the principal makefile that should be used.

# Compile drivers :
cd modipsl/modeles/ORCHIDEE
gmake driver


comment:8 Changed 7 years ago by jgipsl

  • Resolution set to fixed
  • Status changed from accepted to closed

The proposition has been done execept for the renaming of the offline configuration direcory ORCHIDEE_OL. This will not be done for the moment.

Note: See TracTickets for help on using tickets.