Back to home page

MITgcm

 
 

    


Warning, /tools/OAD_support/cb2mGetModules.csh is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 51e381e9 on 2023-11-07 18:00:07 UTC
8702af1f36 Patr*0001 #!/bin/csh -f
                0002 set fileName=${1:r}
4d72283393 Mart*0003 set awkScript=${2}
8702af1f36 Patr*0004 echo '      MODULE '${fileName}_mod   > ${fileName}_temp
b7f13583ad Jean*0005 echo '#include "PACKAGES_CONFIG.h"'   >> ${fileName}_temp
                0006 echo '#include "CPP_OPTIONS.h"'       >> ${fileName}_temp
                0007 echo '#ifdef ALLOW_AUTODIFF'          >> ${fileName}_temp
                0008 echo '# include "AUTODIFF_OPTIONS.h"' >> ${fileName}_temp
                0009 echo '#endif'                         >> ${fileName}_temp
                0010 echo '#ifdef ALLOW_COST'              >> ${fileName}_temp
                0011 echo '# include "COST_OPTIONS.h"'     >> ${fileName}_temp
                0012 echo '#endif'                         >> ${fileName}_temp
                0013 echo '#ifdef ALLOW_CTRL'              >> ${fileName}_temp
                0014 echo '# include "CTRL_OPTIONS.h"'     >> ${fileName}_temp
                0015 echo '#endif'                         >> ${fileName}_temp
                0016 echo '#ifdef ALLOW_ECCO'              >> ${fileName}_temp
                0017 echo '# include "ECCO_OPTIONS.h"'     >> ${fileName}_temp
                0018 echo '#endif'                         >> ${fileName}_temp
51e381e9c9 Jean*0019 if ( ${fileName} == 'DIC_LOAD' || ${fileName} == 'DIC_VARS' ) then
a6e3d9e6f0 Oliv*0020   echo '#include "DIC_OPTIONS.h"'    >> ${fileName}_temp
                0021 endif
9f3ad1881a Patr*0022 if ( ${fileName} == 'GAD' ) then
                0023   echo '#include "GAD_OPTIONS.h"'    >> ${fileName}_temp
                0024 endif
e22615ff1f Patr*0025 if ( ${fileName} == 'GGL90' ) then
                0026   echo '#include "GGL90_OPTIONS.h"'    >> ${fileName}_temp
                0027 endif
9f3ad1881a Patr*0028 if ( ${fileName} == 'GMREDI' ) then
                0029   echo '#include "GMREDI_OPTIONS.h"'    >> ${fileName}_temp
                0030 endif
71108ddfe4 Patr*0031 if ( ${fileName} == 'KPP' ) then
                0032   echo '#include "KPP_OPTIONS.h"'    >> ${fileName}_temp
                0033 endif
9f3ad1881a Patr*0034 if ( ${fileName} == 'MOM_VISC' ) then
                0035   echo '#include "MOM_COMMON_OPTIONS.h"'    >> ${fileName}_temp
                0036 endif
8979406661 Patr*0037 if ( ${fileName} == 'RBCS' ) then
                0038   echo '#include "RBCS_OPTIONS.h"'    >> ${fileName}_temp
                0039 endif
9f3ad1881a Patr*0040 if ( ${fileName} == 'SHAP_FILT' ) then
                0041   echo '#include "SHAP_FILT_OPTIONS.h"'    >> ${fileName}_temp
                0042 endif
cdf60b9aad Patr*0043 if ( ${fileName} == 'STREAMICE' ) then
                0044   echo '#include "STREAMICE_OPTIONS.h"'    >> ${fileName}_temp
                0045 endif
8702af1f36 Patr*0046 if ( ${fileName} != 'SIZE' &&  ${fileName} != 'MNC_COMMON' &&  ${fileName} != 'EEPARAMS' ) then
                0047   echo '      use SIZE_mod'          >> ${fileName}_temp
                0048 endif
                0049 if ( ${fileName} != 'EEPARAMS' &&  ${fileName} != 'SIZE' &&  ${fileName} != 'MNC_COMMON' ) then
                0050   echo '      use EEPARAMS_mod'      >> ${fileName}_temp
                0051 endif
                0052 if ( ${fileName} != 'PARAMS' && ${fileName} != 'EEPARAMS' &&  ${fileName} != 'SIZE' &&  ${fileName} != 'MNC_COMMON' && ${fileName} != 'GAD' && ${fileName} != 'GRID' ) then
                0053   echo '      use PARAMS_mod'        >> ${fileName}_temp
                0054 endif
edcd27be69 Mart*0055 if ( ${fileName} == 'CTRL' || ${fileName} == 'CTRL_DUMMY' || ${fileName} == 'CTRL_GENARR' ) then
8702af1f36 Patr*0056   echo '      use CTRL_SIZE_mod'     >> ${fileName}_temp
                0057 endif
89a3164c52 Jean*0058 if ( ${fileName} == 'DIAGSTATS_REGIONS' || ${fileName} == 'DIAGNOSTICS' ) then
                0059   echo '      use DIAGNOSTICS_SIZE_mod'     >> ${fileName}_temp
                0060 endif
a6e3d9e6f0 Oliv*0061 if ( ${fileName} == 'PTRACERS_FIELDS' || ${fileName} == 'PTRACERS_PARAMS' || \
                0062      ${fileName} == 'PTRACERS_START' || ${fileName} == 'PTRACERS_TAVE' || \
                0063      ${fileName} == 'GCHEM_FIELDS' ) then
                0064   echo '      use PTRACERS_SIZE_mod' >> ${fileName}_temp
ea8c470233 Oliv*0065 endif
8979406661 Patr*0066 if ( ${fileName} == 'RBCS_FIELDS' ) then
                0067   echo '      use RBCS_SIZE_mod' >> ${fileName}_temp
                0068 endif
4d72283393 Mart*0069 #echo awk -f ${awkScript} ${fileName}.h
8702af1f36 Patr*0070 awk -f ${awkScript} ${fileName}.h | grep -v mpif.h   >> ${fileName}_temp
                0071 echo '      END MODULE' ${fileName}_mod   >> ${fileName}_temp
                0072 cp ${fileName}_temp ${fileName}_mod.FF90
                0073 \rm ${fileName}_temp