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.
Changeset 3390 – NEMO

Changeset 3390


Ignore:
Timestamp:
2012-05-14T17:24:00+02:00 (12 years ago)
Author:
rblod
Message:

NEMO branch dev_r3387_LOCEAN6_AGRIF_LIM : preliminary commit to allow faster compilation with AGRIF

Location:
branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM/CONFIG/makenemo

    r3294 r3390  
    302302#if AGRIF we do a first preprocessing 
    303303    if [ ${#x_c} -eq 0 ]; then 
    304         [ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${COMPIL_DIR}/$USEBLD 
    305         [ "$AGRIFUSE" == 1 ] && rm -rf  ${NEMO_TDIR}/${NEW_CONF}/BLD/* 
     304       if [ "$AGRIFUSE" == 1 ]; then  
     305          fcm build --ignore-lock  -j 1 ${COMPIL_DIR}/bld_preproagr.cfg ||{ cd - ; exit ;} 
     306          echo "" 
     307          echo "---------------------------------" 
     308          echo "CONV preprocessing successfull !!" 
     309          echo "---------------------------------" 
     310          echo "" 
     311       fi 
    306312    fi 
    307313    fcm build ${x_c} --ignore-lock -v ${x_v} -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD || cd - 
     
    311317#add remove for clean option 
    312318    if  [ ${#x_c} -ne 0 ]; then 
     319        rm -rf ${NEMO_TDIR}/${NEW_CONF}/OPAFILES 
    313320        rm -rf ${NEMO_TDIR}/${NEW_CONF}/WORK 
    314321        rm -rf ${NEMO_TDIR}/${NEW_CONF}/BLD 
  • branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM/NEMO/NST_SRC/agrif2model.F90

    r2528 r3390  
    55   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    66   !!---------------------------------------------------------------------- 
     7   SUBROUTINE Agrif2Model 
     8      !!--------------------------------------------- 
     9      !!   *** ROUTINE Agrif2Model *** 
     10      !!---------------------------------------------  
     11   END SUBROUTINE Agrif2model 
    712 
    813   SUBROUTINE Agrif_Set_numberofcells(Agrif_Gr) 
  • branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM/NEMO/NST_SRC/agrif_user.F90

    r3294 r3390  
    55   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    66   !!---------------------------------------------------------------------- 
     7   SUBROUTINE agrif_user 
     8   END SUBROUTINE 
     9 
    710   SUBROUTINE agrif_before_regridding 
    811   END SUBROUTINE 
  • branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM/NEMO/OPA_SRC/lib_cray.f90

    r2528 r3390  
    1010!! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    1111!!---------------------------------------------------------------------- 
     12SUBROUTINE lib_cray 
     13      WRITE(*,*) 'lib_cray: You should not have seen this print! error?' 
     14END SUBROUTINE lib_cray 
     15 
    1216SUBROUTINE wheneq ( i, x, j, t, ind, nn ) 
    1317        IMPLICIT NONE 
  • branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM/TOOLS/COMPILE/agrifpp.sh

    r2520 r3390  
    2626# 
    2727# 
    28 # Look after key agrif, if yes the conv is used, otherwise standard pre-processing is performed. 
     28# Preprocess file using the conv in OPAFILES directory 
     29# Standard preprocessed files are stored in OPAFILES/ppsrc/nemo 
     30# Source files are stored under OPAFILES/obj 
     31# Include filess  in OPAFILES/inc 
     32# Note that agrif2model.F90 should not be preprocess (standard one)  
    2933# 
    3034# EXAMPLES 
     
    3337# :: 
    3438# 
    35 #  $ ./agrifpp.sh 1 -Dkey 
     39#  $ ./agrifpp.sh FILE_TO_PROCESS 
    3640#  
    37 #  or 
    38 # 
    39 #  $ ./agrifpp.sh -Dkey 
    40 # 
    4141# TODO 
    4242# ==== 
     
    5555# 
    5656#- 
    57  
    58 if [ "$1" == "1" ]; then 
    59    shift 
    60    MYFILE=`echo $* |awk -F" " '{print $NF}' `   
    61    FPP_OPT=` echo $* |awk '{  for (i=1 ; i<NF ; i++ )  { printf " %s",  $i } }'` 
    62  
    63  
    64    if [ "${MYFILE}" != "par_oce.F90" -a  ! -f ${NEMO_TDIR}/${NEW_CONF}}/OPAFILES/param_done ]; then 
    65       cpp ${FPP_OPT} ${CONFIG_DIR}/${NEW_CONF}/WORK/par_oce.F90 > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/par_oce.F90 
    66       (cd ${NEMO_TDIR}/${NEW_CONF}/OPAFILES ; ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/conv agrif_opa.in -rm -comdirin ./ -comdirout AGRIF_MODELFILES/ -convfile par_oce.F90 > /dev/null ) 
    67       cpp ${FPP_OPT}  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC  ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_MODELFILES/par_oce.F90 > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/par_oce.F90 
    68       touch ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/param_done 
    69    elif  [ "${MYFILE}" == "par_oce.F90" -a -f ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/param_done ] ; then 
    70       cd  ${NEMO_TDIR}/${NEW_CONF}/OPAFILES 
    71       cpp ${FPP_OPT} -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC ${MYFILE} 
    72       exit 
    73    fi 
    74  
    75    if [ "${MYFILE}" == agrif2model.F90 ]; then 
    76       cpp  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC $@ 
    77       exit 
    78    fi  
    79  
    80    cpp  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC $@ > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/${MYFILE} 
    81    ( cd ${NEMO_TDIR}/${NEW_CONF}/OPAFILES ; ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/conv agrif_opa.in -rm -comdirin ./ -comdirout AGRIF_MODELFILES/ -convfile ${MYFILE} > /dev/null ) 
    82    cd  ${NEMO_TDIR}/${NEW_CONF} 
    83    sed 's/[    ]*$//' OPAFILES/AGRIF_MODELFILES/${MYFILE}> OPAFILES/${MYFILE} 
    84    cpp ${FPP_OPT} -IOPAFILES/AGRIF_INC OPAFILES/${MYFILE}  
     57MYFILE=$(basename "$1") 
     58if [ "$MYFILE" == "agrif2model.f90" ];then 
     59   \cp ${NEMO_TDIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/obj/$MYFILE 
    8560else 
    86    shift 
    87    cpp $@ 
     61cd ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/ppsrc/nemo ; ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/conv ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/agrif_opa.in -rm -incdir ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/inc -comdirout ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/obj -convfile ${MYFILE} > /dev/null  
    8862fi 
    89  
  • branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM/TOOLS/COMPILE/bld.cfg

    r3294 r3390  
    2323src::ioipsl               $MAIN_DIR/EXTERNAL/IOIPSL/src 
    2424src::agrif                $MAIN_DIR/EXTERNAL/AGRIF/AGRIF_FILES 
    25 src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK 
     25src::nemo                 $CONFIG_DIR/$NEW_CONF/OPAFILES/obj 
    2626 
    2727#bld::lib::xmlf90           xmlf90 
     
    5454bld::pp::nemo     1 
    5555bld::pp::agrif    1 
    56 bld::tool::fpp       $COMPIL_DIR/agrifpp.sh 
    57 bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 
    58 bld::tool::fppflags::xmlio    0 %FPPFLAGS 
    59 bld::tool::fppflags::ioserver 0 %FPPFLAGS 
    60 bld::tool::fppflags::ioipsl   0 %FPPFLAGS 
    61 bld::tool::fppflags::agrif    0 %FPPFLAGS 
     56bld::tool::fppflags::nemo      %FPPFLAGS -I$CONFIG_DIR/$NEW_CONF/OPAFILES/inc 
     57bld::tool::fppflags::xmlio     %FPPFLAGS 
     58bld::tool::fppflags::ioserver  %FPPFLAGS 
     59bld::tool::fppflags::ioipsl    %FPPFLAGS 
     60bld::tool::fppflags::agrif     %FPPFLAGS 
    6261 
    6362# Ignore the following dependencies 
     
    8281# Allow ".h90" as an extension for CPP include files 
    8382bld::infile_ext::h90  CPP::INCLUDE 
     83bld::infile_ext::f90  FPP::FPP9X::SOURCE 
    8484 
    8585# extension for module output 
     
    8888# rename executable to nemo.exe 
    8989bld::exe_name::model  nemo.exe 
    90  
  • branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM/TOOLS/COMPILE/bldxag.cfg

    r2734 r3390  
    4444bld::pp::ioipsl   1 
    4545bld::pp::nemo     1 
    46 bld::tool::fpp       $COMPIL_DIR/agrifpp.sh 
    47 bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 
    48 bld::tool::fppflags::xmlio    0 %FPPFLAGS 
    49 bld::tool::fppflags::ioserver 0 %FPPFLAGS 
    50 bld::tool::fppflags::ioipsl   0 %FPPFLAGS 
     46bld::tool::fppflags::nemo     %FPPFLAGS 
     47bld::tool::fppflags::xmlio    %FPPFLAGS 
     48bld::tool::fppflags::ioserver %FPPFLAGS 
     49bld::tool::fppflags::ioipsl   %FPPFLAGS 
    5150 
    5251# Ignore the following dependencies 
  • branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM/TOOLS/COMPILE/bldxio.cfg

    r2437 r3390  
    1515src::ioipsl               $MAIN_DIR/EXTERNAL/IOIPSL/src 
    1616src::agrif                $MAIN_DIR/EXTERNAL/AGRIF/AGRIF_FILES 
    17 src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK 
    18  
     17src::nemo                 $CONFIG_DIR/$NEW_CONF/OPAFILES/obj  
    1918bld::target  nemo.exe 
    2019bld::exe_dep 
    2120 
    22  
    2321dir::root            $NEMO_TDIR/$NEW_CONF/BLD 
    24  
    2522 
    2623bld::tool::fc        %FC  
     
    3734bld::pp::nemo     1 
    3835bld::pp::agrif    1 
    39 bld::tool::fpp       $COMPIL_DIR/agrifpp.sh 
    40 bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 
    41 bld::tool::fppflags::ioipsl   0 %FPPFLAGS 
    42 bld::tool::fppflags::agrif    0 %FPPFLAGS 
     36bld::tool::fppflags::nemo     %FPPFLAGS -I$CONFIG_DIR/$NEW_CONF/OPAFILES/inc 
     37bld::tool::fppflags::ioipsl   %FPPFLAGS 
     38bld::tool::fppflags::agrif    %FPPFLAGS 
    4339 
    4440# Ignore the following dependencies 
     
    6359# Allow ".h90" as an extension for CPP include files 
    6460bld::infile_ext::h90  CPP::INCLUDE 
     61bld::infile_ext::f90  FPP::FPP9X::SOURCE 
    6562 
    6663# extension for module output 
     
    6966# rename executable to nemo.exe 
    7067bld::exe_name::model  nemo.exe 
    71  
  • branches/2012/dev_r3387_LOCEAN6_AGRIF_LIM/NEMOGCM/TOOLS/COMPILE/bldxioxag.cfg

    r2734 r3390  
    3434bld::pp::ioipsl   1 
    3535bld::pp::nemo     1 
    36 bld::tool::fpp       $COMPIL_DIR/agrifpp.sh 
    37 bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 
    38 bld::tool::fppflags::ioipsl   0 %FPPFLAGS 
     36bld::tool::fppflags::nemo     %FPPFLAGS 
     37bld::tool::fppflags::ioipsl   %FPPFLAGS 
    3938 
    4039# Ignore the following dependencies 
Note: See TracChangeset for help on using the changeset viewer.