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.
traswp.F90 in branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/TRA – NEMO

source: branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/TRA/traswp.F90 @ 4431

Last change on this file since 4431 was 3211, checked in by spickles2, 12 years ago

Stephen Pickles, 11 Dec 2011

Commit to bring the rest of the DCSE NEMO development branch
in line with the latest development version. This includes
array index re-ordering of all OPA_SRC/.

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1MODULE traswp
2   !!==============================================================================
3   !!                       ***  MODULE  traswp  ***
4   !! Ocean active tracers: swapping array
5   !!==============================================================================
6   USE par_oce         ! ocean parameters
7   USE oce             ! ocean dynamics and active tracers
8
9   IMPLICIT NONE
10   PRIVATE
11
12   PUBLIC   tra_swap     ! routine called by step.F90
13   PUBLIC   tra_unswap   ! routine called by step.F90
14
15   !! * Control permutation of array indices
16#  include "oce_ftrans.h90"
17
18   !!----------------------------------------------------------------------
19   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
20   !! $Id$
21   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
22   !!----------------------------------------------------------------------
23CONTAINS
24
25   SUBROUTINE tra_swap 
26      !!----------------------------------------------------------------------
27      !!                  ***  ROUTINE tra_swp  ***
28      !!                   
29      !! ** Purpose : Store temperature and salinity aaray into a 4D array
30      !!
31      !!----------------------------------------------------------------------
32      !
33      tsn(:,:,:,jp_tem) = tn(:,:,:)      ;      tsn(:,:,:,jp_sal) = sn(:,:,:)
34      tsb(:,:,:,jp_tem) = tb(:,:,:)      ;      tsb(:,:,:,jp_sal) = sb(:,:,:)
35      tsa(:,:,:,jp_tem) = ta(:,:,:)      ;      tsa(:,:,:,jp_sal) = sa(:,:,:)
36      !
37   END SUBROUTINE tra_swap
38
39   SUBROUTINE tra_unswap 
40      !!----------------------------------------------------------------------
41      !!                  ***  ROUTINE tra_unswap  ***
42      !!                   
43      !! ** Purpose : Store temperature and salinity aaray into a 4D array
44      !!
45      !!----------------------------------------------------------------------
46      !
47      tn(:,:,:) = tsn(:,:,:,jp_tem)      ;      sn(:,:,:) = tsn(:,:,:,jp_sal)
48      tb(:,:,:) = tsb(:,:,:,jp_tem)      ;      sb(:,:,:) = tsb(:,:,:,jp_sal)
49      ta(:,:,:) = tsa(:,:,:,jp_tem)      ;      sa(:,:,:) = tsa(:,:,:,jp_sal)
50      !
51   END SUBROUTINE tra_unswap
52
53   !!======================================================================
54END MODULE traswp
Note: See TracBrowser for help on using the repository browser.