#- 
#---------------------------------------------------------------------
#- Creation des elements relatifs a ORCHIDEE :
#-      ORCHIDEE (creation du run.def en fonction du flag)
##      $Header: /home/ssipsl/CVSREP/ORCHIDEE_OL/EXP00/make_ORCHIDEE,v 1.2 2004/03/29 12:17:43 ssipsl Exp $
##
##      Rachid BENSHILA & Patricia CADULE
#---------------------------------------------------------------------
#!/bin/ksh
#---------------------------------------------------------------------
# This script aims to construct a run.def for pre-defined namelist available at dods.ipsl.jussieu.fr/orchidee
# You can add some flags using sed
# Example : sed -e "s/# STOMATE_OK_STOMATE is not set/STOMATE_OK_STOMATE=y/g" -e "s/HYDROL_CWRR=n/HYDROL_CWRR=y/g" $${F_FILE}.def

all : SECHIBA OK_CO2 OK_STOMATE

SECHIBA :
	( cp ${R_STOCKAGE}/${F_FILE}.def ${F_FILE}.def ; cp $${F_FILE}.def  ${F_FILE}_SECHIBA.def ;)
	rm  -f ${F_FILE}.def

OK_CO2 :
	( cp ${R_STOCKAGE}/${F_FILE}.def ${F_FILE}.def  ; sed "s/# STOMATE_OK_CO2 is not set/STOMATE_OK_CO2=y/g" $${F_FILE}.def > ${F_FILE}_OK_CO2.def ;)
	rm  -f ${F_FILE}.def


OK_STOMATE :
	( cp ${R_STOCKAGE}/${F_FILE}.def ${F_FILE}.def ; sed "s/# STOMATE_OK_STOMATE is not set/STOMATE_OK_STOMATE=y/g" $${F_FILE}.def > ${F_FILE}_OK_STOMATE.def;)
	rm  -f ${F_FILE}.def



 
