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

Changeset 14626


Ignore:
Timestamp:
2021-03-21T19:47:16+01:00 (3 years ago)
Author:
ldebreu
Message:

AGFdomcfg: Update make_namelist.py (Use of NiGlo0, NjGlo0 instead of jpiglo, jpjglo #2638

File:
1 edited

Legend:

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

    r13204 r14626  
    5656        while line : 
    5757           line = fp.readline() 
    58            if line.strip().startswith('jpiglo'): 
    59                jpi_parent=line.strip().split()[2]                
     58           if line.strip().startswith('Ni0glo'): 
     59               Ni0glo_parent=line.strip().split()[2]                
    6060           f2.write(line) 
    6161           cnt1 += 1 
     
    6464    if int(grid[cnt-1][2]) == 1: 
    6565        nbghostcells_y_s = 0 
    66     if int(grid[cnt-1][1]) + int(grid[cnt-1][0]) == int(jpi_parent) : 
     66    if int(grid[cnt-1][1]) + int(grid[cnt-1][0]) == int(Ni0glo_parent) : 
    6767        nbghostcells_x = 0 
    6868 
    69     jpiglo = (int(grid[cnt-1][1])-int(grid[cnt-1][0]))*int(grid[cnt-1][4]) +2 +2*nbghostcells_x 
    70     jpjglo = (int(grid[cnt-1][3])-int(grid[cnt-1][2]))*int(grid[cnt-1][5]) +2 + nbghostcells_y_n  + nbghostcells_y_s 
     69    Ni0glo = (int(grid[cnt-1][1])-int(grid[cnt-1][0]))*int(grid[cnt-1][4]) + 2 + 2*nbghostcells_x 
     70    Nj0glo = (int(grid[cnt-1][3])-int(grid[cnt-1][2]))*int(grid[cnt-1][5]) + 2 + nbghostcells_y_n  + nbghostcells_y_s 
    7171    #print( "Grid "+str(cnt)+" : jpiglo = "+cnt(jpiglo)+ "  jpjglo = "+str(jpjglo) )  
    72     print('Grid {:1d} : jpiglo = {:3d} , jpjglo = {:3d}'.format(cnt, jpiglo, jpjglo)) 
     72    print('Grid {:1d} : Ni0glo = {:3d} , Nj0glo = {:3d}'.format(cnt, Ni0glo, Nj0glo)) 
    7373 
    7474    f2 = open(str(cnt)+'_'+namfile,'w') 
     
    7979           line = fp.readline() 
    8080           if line.strip().startswith('jperio'): 
    81                if int(grid[cnt-1][1]) + int(grid[cnt-1][0]) == int(jpi_parent) : 
     81               if int(grid[cnt-1][1]) + int(grid[cnt-1][0]) == int(Ni0glo_parent) : 
    8282                   line = "   jperio = 1\n" 
    8383               else: 
     
    9797           if line.strip().startswith('rn_scale'): 
    9898               line = "   rn_scale = -1\n" 
    99            if line.strip().startswith('jpiglo'): 
    100                line = "   jpiglo = "+str(jpiglo)+"\n" 
    101            if line.strip().startswith('jpjglo'): 
    102                line = "   jpjglo = "+str(jpjglo)+"\n" 
     99           if line.strip().startswith('Ni0glo'): 
     100               line = "   Ni0glo = "+str(Ni0glo)+"\n" 
     101           if line.strip().startswith('Nj0glo'): 
     102               line = "   Nj0glo = "+str(Nj0glo)+"\n" 
    103103           if line.strip().startswith('jpidta'): 
    104                line = "   jpidta = "+str(jpiglo)+"\n" 
     104               line = "   jpidta = "+str(Ni0glo)+"\n" 
    105105           if line.strip().startswith('jpjdta'): 
    106                line = "   jpjdta = "+str(jpjglo)+"\n" 
     106               line = "   jpjdta = "+str(Nj0glo)+"\n" 
    107107           if line.strip().startswith('cp_cfg'): 
    108                line = "   cp_cfg = 'dumb'\n"                  
     108               line = "   cp_cfg = 'dumb'\n"      
     109           if line.strip().startswith('ln_read_cfg'): 
     110               line = "   ln_read_cfg = .false.\n"               
    109111           f2.write(line) 
    110112           cnt1 += 1 
Note: See TracChangeset for help on using the changeset viewer.