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 2715 for trunk/NEMOGCM/EXTERNAL/AGRIF/LIB/toamr.c – NEMO

Ignore:
Timestamp:
2011-03-30T17:58:35+02:00 (13 years ago)
Author:
rblod
Message:

First attempt to put dynamic allocation on the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/EXTERNAL/AGRIF/LIB/toamr.c

    r2528 r2715  
    243243  strcpy(lvargridname2,""); 
    244244  sprintf(lvargridname,"Agrif_%s_var(Agrif_Curgrid%%fixedrank)%%%s",var->v_modulename,var->v_nomvar); 
     245  printf("modulename = %s %s\n",var->v_nomvar, var->v_modulename); 
    245246  } 
    246247  else 
     
    665666   FILE *paramtoamr; 
    666667   char ligne[LONGNOM]; 
     668   char ligne2[LONGNOM];    
    667669   variable *v; 
    668670   int IndiceMax; 
     
    829831           } 
    830832           strcat (ligne," = "); 
    831            strcat (ligne,initialvalue); 
     833 
     834           if (v->v_nbdim == 0) 
     835           { 
     836           strcpy(ligne2,initialvalue); 
     837           } 
     838           else 
     839           { 
     840           sprintf(ligne2,"RESHAPE(%s,SHAPE(%s))",initialvalue,vargridnametabvars(v,0)); 
     841           } 
     842           strcat (ligne,ligne2); 
    832843           /*                                                                 */ 
    833844           Save_Length(ligne,48); 
Note: See TracChangeset for help on using the changeset viewer.