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 14952 for utils/tools/DOMAINcfg/make_namelist.py – NEMO

Ignore:
Timestamp:
2021-06-04T17:42:50+02:00 (3 years ago)
Author:
jchanut
Message:

#2638, closed domains AGRIF new convention + various add ons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/tools/DOMAINcfg/make_namelist.py

    r14690 r14952  
    4343print("Found", len(grid), "grids", ":") 
    4444 
    45 f1="namelist_ref" 
     45f1="namelist_cfg" 
    4646 
    4747 
     
    6565    f2.close() 
    6666 
    67     if int(grid[cnt-1][2]) == 1: 
    68         nbghostcells_y_s = 0 
    69     if int(grid[cnt-1][3]) == int(Nj0glo_parent) + 1: 
    70         nbghostcells_y_n = 0 
    71     if int(grid[cnt-1][1]) + int(grid[cnt-1][0]) == int(Ni0glo_parent) + 2 : 
     67    print(int(Ni0glo_parent), int(Nj0glo_parent)) 
     68 
     69    if (int(grid[cnt-1][2]) == 2 ): 
     70        nbghostcells_y_s = 1  
     71    if int(grid[cnt-1][3]) == int(Nj0glo_parent) : 
     72        nbghostcells_y_n = 1  
     73    if int(grid[cnt-1][1]) - int(grid[cnt-1][0]) == int(Ni0glo_parent) : 
    7274        nbghostcells_x = 0 
     75 
    7376    Ni0glo = (int(grid[cnt-1][1])-int(grid[cnt-1][0]))*int(grid[cnt-1][4]) + 2*nbghostcells_x 
    7477    Nj0glo = (int(grid[cnt-1][3])-int(grid[cnt-1][2]))*int(grid[cnt-1][5]) + nbghostcells_y_n  + nbghostcells_y_s 
    7578    #print( "Grid "+str(cnt)+" : jpiglo = "+cnt(jpiglo)+ "  jpjglo = "+str(jpjglo) )  
     79    print(int(grid[cnt-1][0]), int(grid[cnt-1][1]), int(grid[cnt-1][2]),int(grid[cnt-1][3])) 
     80    print(nbghostcells_x, nbghostcells_y_s, nbghostcells_y_n) 
    7681    print('Grid {:1d} : Ni0glo = {:3d} , Nj0glo = {:3d}'.format(cnt, Ni0glo, Nj0glo)) 
    7782 
     
    8388           line = fp.readline() 
    8489           if line.strip().startswith('jperio'): 
    85                if int(grid[cnt-1][1]) + int(grid[cnt-1][0]) == int(Ni0glo_parent) + 2: 
     90               if int(grid[cnt-1][1]) - int(grid[cnt-1][0]) == int(Ni0glo_parent): 
    8691                   line = "   jperio = 1\n" 
    8792               else: 
Note: See TracChangeset for help on using the changeset viewer.