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 7646 for trunk/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90 – NEMO

Ignore:
Timestamp:
2017-02-06T10:25:03+01:00 (7 years ago)
Author:
timgraham
Message:

Merge of dev_merge_2016 into trunk. UPDATE TO ARCHFILES NEEDED for XIOS2.
LIM_SRC_s/limrhg.F90 to follow in next commit due to change of kind (I'm unable to do it in this commit).
Merged using the following steps:

1) svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk .
2) Resolve minor conflicts in sette.sh and namelist_cfg for ORCA2LIM3 (due to a change in trunk after branch was created)
3) svn commit
4) svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
5) svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2016/dev_merge_2016 .
6) At this stage I checked out a clean copy of the branch to compare against what is about to be committed to the trunk.
6) svn commit #Commit code to the trunk

In this commit I have also reverted a change to Fcheck_archfile.sh which was causing problems on the Paris machine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90

    r6140 r7646  
    5353      INTEGER, INTENT(in) ::   kt       ! number of iteration 
    5454      ! 
    55       CHARACTER(LEN=20)   ::   clkt     ! ocean time-step define as a character 
    56       CHARACTER(LEN=50)   ::   clname   ! ice output restart file name 
     55      CHARACTER(len=20)   ::   clkt     ! ocean time-step define as a character 
     56      CHARACTER(len=50)   ::   clname   ! ice output restart file name 
    5757      CHARACTER(len=256)  ::   clpath   ! full path to ice output restart file  
    5858      !!---------------------------------------------------------------------- 
     
    9191      ENDIF 
    9292      ! 
    93       IF( ln_icectl )   CALL lim_prt( kt, iiceprt, jiceprt, 1, ' - Beginning the time step - ' )   ! control print 
     93      IF( ln_limctl )   CALL lim_prt( kt, iiceprt, jiceprt, 1, ' - Beginning the time step - ' )   ! control print 
    9494   END SUBROUTINE lim_rst_opn 
    9595 
     
    105105      INTEGER ::   ji, jj, jk ,jl   ! dummy loop indices 
    106106      INTEGER ::   iter 
    107       CHARACTER(len=15) ::   znam 
    108       CHARACTER(len=1)  ::   zchar, zchar1 
     107      CHARACTER(len=25) ::   znam 
     108      CHARACTER(len=2)  ::   zchar, zchar1 
    109109      REAL(wp), POINTER, DIMENSION(:,:) :: z2d 
    110110      !!---------------------------------------------------------------------- 
     
    128128      ! Prognostic variables  
    129129      DO jl = 1, jpl  
    130          WRITE(zchar,'(I1)') jl 
     130         WRITE(zchar,'(I2.2)') jl 
    131131         znam = 'v_i'//'_htc'//zchar 
    132132         z2d(:,:) = v_i(:,:,jl) 
     
    150150 
    151151      DO jl = 1, jpl  
    152          WRITE(zchar,'(I1)') jl 
     152         WRITE(zchar,'(I2.2)') jl 
    153153         znam = 'tempt_sl1'//'_htc'//zchar 
    154154         z2d(:,:) = e_s(:,:,1,jl) 
     
    157157 
    158158      DO jl = 1, jpl  
    159          WRITE(zchar,'(I1)') jl 
     159         WRITE(zchar,'(I2.2)') jl 
    160160         DO jk = 1, nlay_i  
    161             WRITE(zchar1,'(I1)') jk 
     161            WRITE(zchar1,'(I2.2)') jk 
    162162            znam = 'tempt'//'_il'//zchar1//'_htc'//zchar 
    163163            z2d(:,:) = e_i(:,:,jk,jl) 
     
    174174      CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass_b', snwice_mass_b ) 
    175175 
    176       DO jl = 1, jpl  
    177          WRITE(zchar,'(I1)') jl 
    178          znam = 'sxice'//'_htc'//zchar 
    179          z2d(:,:) = sxice(:,:,jl) 
    180          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    181          znam = 'syice'//'_htc'//zchar 
    182          z2d(:,:) = syice(:,:,jl) 
    183          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    184          znam = 'sxxice'//'_htc'//zchar 
    185          z2d(:,:) = sxxice(:,:,jl) 
    186          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    187          znam = 'syyice'//'_htc'//zchar 
    188          z2d(:,:) = syyice(:,:,jl) 
    189          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    190          znam = 'sxyice'//'_htc'//zchar 
    191          z2d(:,:) = sxyice(:,:,jl) 
    192          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    193          znam = 'sxsn'//'_htc'//zchar 
    194          z2d(:,:) = sxsn(:,:,jl) 
    195          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    196          znam = 'sysn'//'_htc'//zchar 
    197          z2d(:,:) = sysn(:,:,jl) 
    198          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    199          znam = 'sxxsn'//'_htc'//zchar 
    200          z2d(:,:) = sxxsn(:,:,jl) 
    201          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    202          znam = 'syysn'//'_htc'//zchar 
    203          z2d(:,:) = syysn(:,:,jl) 
    204          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    205          znam = 'sxysn'//'_htc'//zchar 
    206          z2d(:,:) = sxysn(:,:,jl) 
    207          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    208          znam = 'sxa'//'_htc'//zchar 
    209          z2d(:,:) = sxa(:,:,jl) 
    210          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    211          znam = 'sya'//'_htc'//zchar 
    212          z2d(:,:) = sya(:,:,jl) 
    213          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    214          znam = 'sxxa'//'_htc'//zchar 
    215          z2d(:,:) = sxxa(:,:,jl) 
    216          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    217          znam = 'syya'//'_htc'//zchar 
    218          z2d(:,:) = syya(:,:,jl) 
    219          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    220          znam = 'sxya'//'_htc'//zchar 
    221          z2d(:,:) = sxya(:,:,jl) 
    222          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    223          znam = 'sxc0'//'_htc'//zchar 
    224          z2d(:,:) = sxc0(:,:,jl) 
    225          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    226          znam = 'syc0'//'_htc'//zchar 
    227          z2d(:,:) = syc0(:,:,jl) 
    228          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    229          znam = 'sxxc0'//'_htc'//zchar 
    230          z2d(:,:) = sxxc0(:,:,jl) 
    231          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    232          znam = 'syyc0'//'_htc'//zchar 
    233          z2d(:,:) = syyc0(:,:,jl) 
    234          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    235          znam = 'sxyc0'//'_htc'//zchar 
    236          z2d(:,:) = sxyc0(:,:,jl) 
    237          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    238          znam = 'sxsal'//'_htc'//zchar 
    239          z2d(:,:) = sxsal(:,:,jl) 
    240          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    241          znam = 'sysal'//'_htc'//zchar 
    242          z2d(:,:) = sysal(:,:,jl) 
    243          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    244          znam = 'sxxsal'//'_htc'//zchar 
    245          z2d(:,:) = sxxsal(:,:,jl) 
    246          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    247          znam = 'syysal'//'_htc'//zchar 
    248          z2d(:,:) = syysal(:,:,jl) 
    249          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    250          znam = 'sxysal'//'_htc'//zchar 
    251          z2d(:,:) = sxysal(:,:,jl) 
    252          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    253          znam = 'sxage'//'_htc'//zchar 
    254          z2d(:,:) = sxage(:,:,jl) 
    255          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    256          znam = 'syage'//'_htc'//zchar 
    257          z2d(:,:) = syage(:,:,jl) 
    258          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    259          znam = 'sxxage'//'_htc'//zchar 
    260          z2d(:,:) = sxxage(:,:,jl) 
    261          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    262          znam = 'syyage'//'_htc'//zchar 
    263          z2d(:,:) = syyage(:,:,jl) 
    264          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    265          znam = 'sxyage'//'_htc'//zchar 
    266          z2d(:,:) = sxyage(:,:,jl) 
    267          CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    268       END DO 
    269  
    270       CALL iom_rstput( iter, nitrst, numriw, 'sxopw ' ,  sxopw  ) 
    271       CALL iom_rstput( iter, nitrst, numriw, 'syopw ' ,  syopw  ) 
    272       CALL iom_rstput( iter, nitrst, numriw, 'sxxopw' ,  sxxopw ) 
    273       CALL iom_rstput( iter, nitrst, numriw, 'syyopw' ,  syyopw ) 
    274       CALL iom_rstput( iter, nitrst, numriw, 'sxyopw' ,  sxyopw ) 
    275  
    276       DO jl = 1, jpl  
    277          WRITE(zchar,'(I1)') jl 
    278          DO jk = 1, nlay_i  
    279             WRITE(zchar1,'(I1)') jk 
    280             znam = 'sxe'//'_il'//zchar1//'_htc'//zchar 
    281             z2d(:,:) = sxe(:,:,jk,jl) 
    282             CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    283             znam = 'sye'//'_il'//zchar1//'_htc'//zchar 
    284             z2d(:,:) = sye(:,:,jk,jl) 
    285             CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    286             znam = 'sxxe'//'_il'//zchar1//'_htc'//zchar 
    287             z2d(:,:) = sxxe(:,:,jk,jl) 
    288             CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    289             znam = 'syye'//'_il'//zchar1//'_htc'//zchar 
    290             z2d(:,:) = syye(:,:,jk,jl) 
    291             CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    292             znam = 'sxye'//'_il'//zchar1//'_htc'//zchar 
    293             z2d(:,:) = sxye(:,:,jk,jl) 
    294             CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
    295          END DO 
    296       END DO 
    297  
     176      ! In case Prather scheme is used for advection, write second order moments 
     177      ! ------------------------------------------------------------------------ 
     178      IF( nn_limadv == -1 ) THEN 
     179          
     180         DO jl = 1, jpl  
     181            WRITE(zchar,'(I2.2)') jl 
     182            znam = 'sxice'//'_htc'//zchar 
     183            z2d(:,:) = sxice(:,:,jl) 
     184            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     185            znam = 'syice'//'_htc'//zchar 
     186            z2d(:,:) = syice(:,:,jl) 
     187            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     188            znam = 'sxxice'//'_htc'//zchar 
     189            z2d(:,:) = sxxice(:,:,jl) 
     190            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     191            znam = 'syyice'//'_htc'//zchar 
     192            z2d(:,:) = syyice(:,:,jl) 
     193            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     194            znam = 'sxyice'//'_htc'//zchar 
     195            z2d(:,:) = sxyice(:,:,jl) 
     196            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     197            znam = 'sxsn'//'_htc'//zchar 
     198            z2d(:,:) = sxsn(:,:,jl) 
     199            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     200            znam = 'sysn'//'_htc'//zchar 
     201            z2d(:,:) = sysn(:,:,jl) 
     202            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     203            znam = 'sxxsn'//'_htc'//zchar 
     204            z2d(:,:) = sxxsn(:,:,jl) 
     205            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     206            znam = 'syysn'//'_htc'//zchar 
     207            z2d(:,:) = syysn(:,:,jl) 
     208            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     209            znam = 'sxysn'//'_htc'//zchar 
     210            z2d(:,:) = sxysn(:,:,jl) 
     211            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     212            znam = 'sxa'//'_htc'//zchar 
     213            z2d(:,:) = sxa(:,:,jl) 
     214            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     215            znam = 'sya'//'_htc'//zchar 
     216            z2d(:,:) = sya(:,:,jl) 
     217            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     218            znam = 'sxxa'//'_htc'//zchar 
     219            z2d(:,:) = sxxa(:,:,jl) 
     220            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     221            znam = 'syya'//'_htc'//zchar 
     222            z2d(:,:) = syya(:,:,jl) 
     223            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     224            znam = 'sxya'//'_htc'//zchar 
     225            z2d(:,:) = sxya(:,:,jl) 
     226            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     227            znam = 'sxc0'//'_htc'//zchar 
     228            z2d(:,:) = sxc0(:,:,jl) 
     229            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     230            znam = 'syc0'//'_htc'//zchar 
     231            z2d(:,:) = syc0(:,:,jl) 
     232            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     233            znam = 'sxxc0'//'_htc'//zchar 
     234            z2d(:,:) = sxxc0(:,:,jl) 
     235            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     236            znam = 'syyc0'//'_htc'//zchar 
     237            z2d(:,:) = syyc0(:,:,jl) 
     238            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     239            znam = 'sxyc0'//'_htc'//zchar 
     240            z2d(:,:) = sxyc0(:,:,jl) 
     241            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     242            znam = 'sxsal'//'_htc'//zchar 
     243            z2d(:,:) = sxsal(:,:,jl) 
     244            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     245            znam = 'sysal'//'_htc'//zchar 
     246            z2d(:,:) = sysal(:,:,jl) 
     247            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     248            znam = 'sxxsal'//'_htc'//zchar 
     249            z2d(:,:) = sxxsal(:,:,jl) 
     250            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     251            znam = 'syysal'//'_htc'//zchar 
     252            z2d(:,:) = syysal(:,:,jl) 
     253            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     254            znam = 'sxysal'//'_htc'//zchar 
     255            z2d(:,:) = sxysal(:,:,jl) 
     256            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     257            znam = 'sxage'//'_htc'//zchar 
     258            z2d(:,:) = sxage(:,:,jl) 
     259            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     260            znam = 'syage'//'_htc'//zchar 
     261            z2d(:,:) = syage(:,:,jl) 
     262            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     263            znam = 'sxxage'//'_htc'//zchar 
     264            z2d(:,:) = sxxage(:,:,jl) 
     265            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     266            znam = 'syyage'//'_htc'//zchar 
     267            z2d(:,:) = syyage(:,:,jl) 
     268            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     269            znam = 'sxyage'//'_htc'//zchar 
     270            z2d(:,:) = sxyage(:,:,jl) 
     271            CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     272         END DO 
     273 
     274         CALL iom_rstput( iter, nitrst, numriw, 'sxopw ' ,  sxopw  ) 
     275         CALL iom_rstput( iter, nitrst, numriw, 'syopw ' ,  syopw  ) 
     276         CALL iom_rstput( iter, nitrst, numriw, 'sxxopw' ,  sxxopw ) 
     277         CALL iom_rstput( iter, nitrst, numriw, 'syyopw' ,  syyopw ) 
     278         CALL iom_rstput( iter, nitrst, numriw, 'sxyopw' ,  sxyopw ) 
     279          
     280         DO jl = 1, jpl  
     281            WRITE(zchar,'(I2.2)') jl 
     282            DO jk = 1, nlay_i  
     283               WRITE(zchar1,'(I2.2)') jk 
     284               znam = 'sxe'//'_il'//zchar1//'_htc'//zchar 
     285               z2d(:,:) = sxe(:,:,jk,jl) 
     286               CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     287               znam = 'sye'//'_il'//zchar1//'_htc'//zchar 
     288               z2d(:,:) = sye(:,:,jk,jl) 
     289               CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     290               znam = 'sxxe'//'_il'//zchar1//'_htc'//zchar 
     291               z2d(:,:) = sxxe(:,:,jk,jl) 
     292               CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     293               znam = 'syye'//'_il'//zchar1//'_htc'//zchar 
     294               z2d(:,:) = syye(:,:,jk,jl) 
     295               CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     296               znam = 'sxye'//'_il'//zchar1//'_htc'//zchar 
     297               z2d(:,:) = sxye(:,:,jk,jl) 
     298               CALL iom_rstput( iter, nitrst, numriw, znam , z2d ) 
     299            END DO 
     300         END DO 
     301 
     302      ENDIF 
     303       
     304      ! close restart file 
     305      ! ------------------ 
    298306      IF( iter == nitrst ) THEN 
    299          CALL iom_close( numriw )                         ! close the restart file 
     307         CALL iom_close( numriw ) 
    300308         lrst_ice = .FALSE. 
    301309      ENDIF 
     
    315323      REAL(wp) ::   zfice, ziter 
    316324      REAL(wp), POINTER, DIMENSION(:,:) ::   z2d 
    317       CHARACTER(len=15) ::   znam 
    318       CHARACTER(len=1)  ::   zchar, zchar1 
     325      CHARACTER(len=25) ::   znam 
     326      CHARACTER(len=2)  ::   zchar, zchar1 
    319327      INTEGER           ::   jlibalt = jprstlib 
    320328      LOGICAL           ::   llok 
     
    347355         &                   '   control of time parameter  nrstdt' ) 
    348356 
     357      ! Prognostic variables  
    349358      DO jl = 1, jpl  
    350          WRITE(zchar,'(I1)') jl 
     359         WRITE(zchar,'(I2.2)') jl 
    351360         znam = 'v_i'//'_htc'//zchar 
    352361         CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     
    370379 
    371380      DO jl = 1, jpl  
    372          WRITE(zchar,'(I1)') jl 
     381         WRITE(zchar,'(I2.2)') jl 
    373382         znam = 'tempt_sl1'//'_htc'//zchar 
    374383         CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     
    377386 
    378387      DO jl = 1, jpl  
    379          WRITE(zchar,'(I1)') jl 
     388         WRITE(zchar,'(I2.2)') jl 
    380389         DO jk = 1, nlay_i  
    381             WRITE(zchar1,'(I1)') jk 
     390            WRITE(zchar1,'(I2.2)') jk 
    382391            znam = 'tempt'//'_il'//zchar1//'_htc'//zchar 
    383392            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     
    394403      CALL iom_get( numrir, jpdom_autoglo, 'snwice_mass_b', snwice_mass_b ) 
    395404 
    396       DO jl = 1, jpl  
    397          WRITE(zchar,'(I1)') jl 
    398          znam = 'sxice'//'_htc'//zchar 
    399          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    400          sxice(:,:,jl) = z2d(:,:) 
    401          znam = 'syice'//'_htc'//zchar 
    402          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    403          syice(:,:,jl) = z2d(:,:) 
    404          znam = 'sxxice'//'_htc'//zchar 
    405          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    406          sxxice(:,:,jl) = z2d(:,:) 
    407          znam = 'syyice'//'_htc'//zchar 
    408          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    409          syyice(:,:,jl) = z2d(:,:) 
    410          znam = 'sxyice'//'_htc'//zchar 
    411          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    412          sxyice(:,:,jl) = z2d(:,:) 
    413          znam = 'sxsn'//'_htc'//zchar 
    414          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    415          sxsn(:,:,jl) = z2d(:,:) 
    416          znam = 'sysn'//'_htc'//zchar 
    417          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    418          sysn(:,:,jl) = z2d(:,:) 
    419          znam = 'sxxsn'//'_htc'//zchar 
    420          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    421          sxxsn(:,:,jl) = z2d(:,:) 
    422          znam = 'syysn'//'_htc'//zchar 
    423          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    424          syysn(:,:,jl) = z2d(:,:) 
    425          znam = 'sxysn'//'_htc'//zchar 
    426          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    427          sxysn(:,:,jl) = z2d(:,:) 
    428          znam = 'sxa'//'_htc'//zchar 
    429          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    430          sxa(:,:,jl) = z2d(:,:) 
    431          znam = 'sya'//'_htc'//zchar 
    432          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    433          sya(:,:,jl) = z2d(:,:) 
    434          znam = 'sxxa'//'_htc'//zchar 
    435          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    436          sxxa(:,:,jl) = z2d(:,:) 
    437          znam = 'syya'//'_htc'//zchar 
    438          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    439          syya(:,:,jl) = z2d(:,:) 
    440          znam = 'sxya'//'_htc'//zchar 
    441          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    442          sxya(:,:,jl) = z2d(:,:) 
    443          znam = 'sxc0'//'_htc'//zchar 
    444          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    445          sxc0(:,:,jl) = z2d(:,:) 
    446          znam = 'syc0'//'_htc'//zchar 
    447          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    448          syc0(:,:,jl) = z2d(:,:) 
    449          znam = 'sxxc0'//'_htc'//zchar 
    450          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    451          sxxc0(:,:,jl) = z2d(:,:) 
    452          znam = 'syyc0'//'_htc'//zchar 
    453          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    454          syyc0(:,:,jl) = z2d(:,:) 
    455          znam = 'sxyc0'//'_htc'//zchar 
    456          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    457          sxyc0(:,:,jl) = z2d(:,:) 
    458          znam = 'sxsal'//'_htc'//zchar 
    459          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    460          sxsal(:,:,jl) = z2d(:,:) 
    461          znam = 'sysal'//'_htc'//zchar 
    462          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    463          sysal(:,:,jl) = z2d(:,:) 
    464          znam = 'sxxsal'//'_htc'//zchar 
    465          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    466          sxxsal(:,:,jl) = z2d(:,:) 
    467          znam = 'syysal'//'_htc'//zchar 
    468          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    469          syysal(:,:,jl) = z2d(:,:) 
    470          znam = 'sxysal'//'_htc'//zchar 
    471          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    472          sxysal(:,:,jl) = z2d(:,:) 
    473          znam = 'sxage'//'_htc'//zchar 
    474          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    475          sxage(:,:,jl) = z2d(:,:) 
    476          znam = 'syage'//'_htc'//zchar 
    477          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    478          syage(:,:,jl) = z2d(:,:) 
    479          znam = 'sxxage'//'_htc'//zchar 
    480          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    481          sxxage(:,:,jl) = z2d(:,:) 
    482          znam = 'syyage'//'_htc'//zchar 
    483          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    484          syyage(:,:,jl) = z2d(:,:) 
    485          znam = 'sxyage'//'_htc'//zchar 
    486          CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    487          sxyage(:,:,jl)= z2d(:,:) 
    488       END DO 
    489  
    490       CALL iom_get( numrir, jpdom_autoglo, 'sxopw ' ,  sxopw  ) 
    491       CALL iom_get( numrir, jpdom_autoglo, 'syopw ' ,  syopw  ) 
    492       CALL iom_get( numrir, jpdom_autoglo, 'sxxopw' ,  sxxopw ) 
    493       CALL iom_get( numrir, jpdom_autoglo, 'syyopw' ,  syyopw ) 
    494       CALL iom_get( numrir, jpdom_autoglo, 'sxyopw' ,  sxyopw ) 
    495  
    496       DO jl = 1, jpl  
    497          WRITE(zchar,'(I1)') jl 
    498          DO jk = 1, nlay_i  
    499             WRITE(zchar1,'(I1)') jk 
    500             znam = 'sxe'//'_il'//zchar1//'_htc'//zchar 
    501             CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    502             sxe(:,:,jk,jl) = z2d(:,:) 
    503             znam = 'sye'//'_il'//zchar1//'_htc'//zchar 
    504             CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    505             sye(:,:,jk,jl) = z2d(:,:) 
    506             znam = 'sxxe'//'_il'//zchar1//'_htc'//zchar 
    507             CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    508             sxxe(:,:,jk,jl) = z2d(:,:) 
    509             znam = 'syye'//'_il'//zchar1//'_htc'//zchar 
    510             CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    511             syye(:,:,jk,jl) = z2d(:,:) 
    512             znam = 'sxye'//'_il'//zchar1//'_htc'//zchar 
    513             CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
    514             sxye(:,:,jk,jl) = z2d(:,:) 
    515          END DO 
    516       END DO 
    517       ! 
     405      ! In case Prather scheme is used for advection, read second order moments 
     406      ! ------------------------------------------------------------------------ 
     407      IF( nn_limadv == -1 ) THEN 
     408 
     409         DO jl = 1, jpl  
     410            WRITE(zchar,'(I2.2)') jl 
     411            znam = 'sxice'//'_htc'//zchar 
     412            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     413            sxice(:,:,jl) = z2d(:,:) 
     414            znam = 'syice'//'_htc'//zchar 
     415            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     416            syice(:,:,jl) = z2d(:,:) 
     417            znam = 'sxxice'//'_htc'//zchar 
     418            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     419            sxxice(:,:,jl) = z2d(:,:) 
     420            znam = 'syyice'//'_htc'//zchar 
     421            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     422            syyice(:,:,jl) = z2d(:,:) 
     423            znam = 'sxyice'//'_htc'//zchar 
     424            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     425            sxyice(:,:,jl) = z2d(:,:) 
     426            znam = 'sxsn'//'_htc'//zchar 
     427            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     428            sxsn(:,:,jl) = z2d(:,:) 
     429            znam = 'sysn'//'_htc'//zchar 
     430            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     431            sysn(:,:,jl) = z2d(:,:) 
     432            znam = 'sxxsn'//'_htc'//zchar 
     433            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     434            sxxsn(:,:,jl) = z2d(:,:) 
     435            znam = 'syysn'//'_htc'//zchar 
     436            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     437            syysn(:,:,jl) = z2d(:,:) 
     438            znam = 'sxysn'//'_htc'//zchar 
     439            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     440            sxysn(:,:,jl) = z2d(:,:) 
     441            znam = 'sxa'//'_htc'//zchar 
     442            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     443            sxa(:,:,jl) = z2d(:,:) 
     444            znam = 'sya'//'_htc'//zchar 
     445            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     446            sya(:,:,jl) = z2d(:,:) 
     447            znam = 'sxxa'//'_htc'//zchar 
     448            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     449            sxxa(:,:,jl) = z2d(:,:) 
     450            znam = 'syya'//'_htc'//zchar 
     451            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     452            syya(:,:,jl) = z2d(:,:) 
     453            znam = 'sxya'//'_htc'//zchar 
     454            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     455            sxya(:,:,jl) = z2d(:,:) 
     456            znam = 'sxc0'//'_htc'//zchar 
     457            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     458            sxc0(:,:,jl) = z2d(:,:) 
     459            znam = 'syc0'//'_htc'//zchar 
     460            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     461            syc0(:,:,jl) = z2d(:,:) 
     462            znam = 'sxxc0'//'_htc'//zchar 
     463            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     464            sxxc0(:,:,jl) = z2d(:,:) 
     465            znam = 'syyc0'//'_htc'//zchar 
     466            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     467            syyc0(:,:,jl) = z2d(:,:) 
     468            znam = 'sxyc0'//'_htc'//zchar 
     469            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     470            sxyc0(:,:,jl) = z2d(:,:) 
     471            znam = 'sxsal'//'_htc'//zchar 
     472            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     473            sxsal(:,:,jl) = z2d(:,:) 
     474            znam = 'sysal'//'_htc'//zchar 
     475            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     476            sysal(:,:,jl) = z2d(:,:) 
     477            znam = 'sxxsal'//'_htc'//zchar 
     478            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     479            sxxsal(:,:,jl) = z2d(:,:) 
     480            znam = 'syysal'//'_htc'//zchar 
     481            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     482            syysal(:,:,jl) = z2d(:,:) 
     483            znam = 'sxysal'//'_htc'//zchar 
     484            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     485            sxysal(:,:,jl) = z2d(:,:) 
     486            znam = 'sxage'//'_htc'//zchar 
     487            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     488            sxage(:,:,jl) = z2d(:,:) 
     489            znam = 'syage'//'_htc'//zchar 
     490            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     491            syage(:,:,jl) = z2d(:,:) 
     492            znam = 'sxxage'//'_htc'//zchar 
     493            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     494            sxxage(:,:,jl) = z2d(:,:) 
     495            znam = 'syyage'//'_htc'//zchar 
     496            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     497            syyage(:,:,jl) = z2d(:,:) 
     498            znam = 'sxyage'//'_htc'//zchar 
     499            CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     500            sxyage(:,:,jl)= z2d(:,:) 
     501         END DO 
     502 
     503         CALL iom_get( numrir, jpdom_autoglo, 'sxopw ' ,  sxopw  ) 
     504         CALL iom_get( numrir, jpdom_autoglo, 'syopw ' ,  syopw  ) 
     505         CALL iom_get( numrir, jpdom_autoglo, 'sxxopw' ,  sxxopw ) 
     506         CALL iom_get( numrir, jpdom_autoglo, 'syyopw' ,  syyopw ) 
     507         CALL iom_get( numrir, jpdom_autoglo, 'sxyopw' ,  sxyopw ) 
     508 
     509         DO jl = 1, jpl  
     510            WRITE(zchar,'(I2.2)') jl 
     511            DO jk = 1, nlay_i  
     512               WRITE(zchar1,'(I2.2)') jk 
     513               znam = 'sxe'//'_il'//zchar1//'_htc'//zchar 
     514               CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     515               sxe(:,:,jk,jl) = z2d(:,:) 
     516               znam = 'sye'//'_il'//zchar1//'_htc'//zchar 
     517               CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     518               sye(:,:,jk,jl) = z2d(:,:) 
     519               znam = 'sxxe'//'_il'//zchar1//'_htc'//zchar 
     520               CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     521               sxxe(:,:,jk,jl) = z2d(:,:) 
     522               znam = 'syye'//'_il'//zchar1//'_htc'//zchar 
     523               CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     524               syye(:,:,jk,jl) = z2d(:,:) 
     525               znam = 'sxye'//'_il'//zchar1//'_htc'//zchar 
     526               CALL iom_get( numrir, jpdom_autoglo, znam , z2d ) 
     527               sxye(:,:,jk,jl) = z2d(:,:) 
     528            END DO 
     529         END DO 
     530         ! 
     531      END IF 
     532       
    518533      ! clem: I do not understand why the following IF is needed 
    519534      !       I suspect something inconsistent in the main code with option nn_icesal=1 
Note: See TracChangeset for help on using the changeset viewer.