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 10091 – NEMO

Changeset 10091


Ignore:
Timestamp:
2018-09-05T16:21:46+02:00 (6 years ago)
Author:
rblod
Message:

Compilation for NESTING_AGRIF

Location:
utils/tools_AGRIF_CMEMS_2020/NESTING_AGRIF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • utils/tools_AGRIF_CMEMS_2020/NESTING_AGRIF/MODEL.CPP

    r10086 r10091  
     1#define key_agrif 
  • utils/tools_AGRIF_CMEMS_2020/NESTING_AGRIF/Makefile

    r10086 r10091  
    1717FILES=src/* 
    1818OBJS=$(addsuffix .o,$(addprefix $(DIR_OBJS)/,$(FILENAMES))) 
     19OBJS := $(filter-out obj/agrif2model.o, $(OBJS)) 
     20 
    1921PROG=create_coordinate 
    2022 
     
    2830 
    2931create_coordinate: $(DIR_LIB)/libnesting.a $(DIR_PPSRC)/create_coordinate.f90 
    30       $(FC) $(LINKFLAGS) $(FFLAGS) -o create_coordinate $(DIR_PPSRC_2)/create_coordinate.f90 $(DIR_LIB)/libnesting.a $(LIBS) -I$(DIR_OBJS) $(FFLAGS_SPEC) -I../../ext/AGRIF 
     32      $(FC) $(LINKFLAGS) $(FFLAGS) -o create_coordinate -L$(DIR_LIB) -lnesting $(LIBS) -I$(DIR_OBJS) $(FFLAGS_SPEC) -I../../ext/AGRIF  -L../../ext/AGRIF -lagrif 
    3133 
    3234prepagrif: 
     
    4749 
    4850conv: 
    49       gmake -C ../../ext/AGRIF/LIB 
     51      $(MAKE) -C ../../ext/AGRIF/LIB 
    5052 
    5153AGRIF_LIB:  
    52       gmake -C ../../ext/AGRIF FC=$(FC) CPP=$(CPP) FFLAGS="$(FFLAGS)" 
     54      $(MAKE) -C ../../ext/AGRIF FC=$(FC) CPP=$(CPP) FFLAGS="$(FFLAGS)" 
    5355 
    54 $(DIR_LIB)/libnesting.a: $(OBJS) 
     56$(DIR_LIB)/libnesting.a: $(OBJS) $(DIR_OBJS)/agrif2model.o 
    5557      @echo 
    5658      @echo =================================================== 
    5759      @echo   Compile Nesting library... 
    5860      @echo =================================================== 
    59       $(AR) -r $@ $(OBJS) 
     61      $(AR) -r $@ $(OBJS) $(DIR_OBJS)/agrif2model.o 
    6062      ranlib $@ 
    6163      @echo 
    6264 
    6365 
     66$(DIR_OBJS)/agrif2model.o: $(DIR_FILES)/agrif2model.F90 Makefile  MODEL.CPP  
     67      $(CPP) -I$(DIR_PPSRC)/AGRIF_INC -include MODEL.CPP $(CPPFLAGS) $(DIR_FILES)/$(*F).F90 > $(DIR_PPSRC_2)/$(*F).f90 
     68      $(FC) $(FFLAGS) -c $(DIR_PPSRC_2)/$(*F).f90 -o $(DIR_OBJS)/$(*F).o -I../../ext/AGRIF -I$(DIR_OBJS)   
    6469 
    6570$(DIR_OBJS)/%.o: $(DIR_FILES)/%.F90 Makefile  MODEL.CPP  
     
    6873      -comdirin ./ -comdirout AGRIF_MODELFILES/. -convfile $(*F).f90) 
    6974      $(CPP) -I$(DIR_PPSRC)/AGRIF_INC -include MODEL.CPP $(CPPFLAGS)  $(DIR_PPSRC)/AGRIF_MODELFILES/$(*F).f90 >$(DIR_PPSRC_2)/$(*F).f90    
    70       $(FC) $(FFLAGS) -c $(DIR_PPSRC_2)/$(*F).f90 -o $(DIR_OBJS)/$(*F).o -I../../ext/AGRIF -I$(DIR_OBJS)  $(FFLAGS_SPEC)  
     75      $(FC) $(FFLAGS) -c $(DIR_PPSRC_2)/$(*F).f90 -o $(DIR_OBJS)/$(*F).o -I../../ext/AGRIF -I$(DIR_OBJS)  -J$(DIR_OBJS) 
    7176 
    7277$(DIR_OBJS)/%.o: $(DIR_FILES)/%.f90 Makefile MODEL.CPP  
     
    7580      -comdirin ./ -comdirout AGRIF_MODELFILES/. -convfile $(*F).f90) 
    7681      $(CPP) -I$(DIR_PPSRC)/AGRIF_INC -include MODEL.CPP $(CPPFLAGS)  $(DIR_PPSRC)/AGRIF_MODELFILES/$(*F).f90 >$(DIR_PPSRC_2)/$(*F).f90    
    77       $(FC) $(FFLAGS) -c $(DIR_PPSRC_2)/$(*F).f90 -o $(DIR_OBJS)/$(*F).o -I../../ext/AGRIF -I$(DIR_OBJS)  $(FFLAGS_SPEC)  
     82      $(FC) $(FFLAGS) -c $(DIR_PPSRC_2)/$(*F).f90 -o $(DIR_OBJS)/$(*F).o -I../../ext/AGRIF -I$(DIR_OBJS)  -J$(DIR_OBJS)  
    7883 
    7984#$(DIR_OBJS)/%.o: $(DIR_FILES)/%.F Makefile MODEL.CPP 
     
    118123      @echo =================================================== 
    119124      $(RM) -rf $(DIR_PPSRC) $(DIR_PPSRC_2) $(DIR_LIB) $(DIR_OBJS) $(PROGS)  
     125 
     126cleangrif:   
     127      @echo 
     128      @echo =================================================== 
     129      @echo   Clean agrif and conv ... 
     130      @echo =================================================== 
     131      $(MAKE) clean -C ../../ext/AGRIF/LIB  
     132      $(MAKE) clean -C ../../ext/AGRIF  
     133 
     134cleanall: clean cleangrif 
    120135    
    121136# DO NOT DELETE THIS LINE - used by make depend  
Note: See TracChangeset for help on using the changeset viewer.