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 5433 for branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diainsitutem.F90 – NEMO

Ignore:
Timestamp:
2015-06-18T08:37:20+02:00 (9 years ago)
Author:
deazer
Message:

Corrected loop order, and changed variable names, checked with sette , ok
new output also ok.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diainsitutem.F90

    r5260 r5433  
    2222  PUBLIC insitu_tem_alloc          ! routines called by step.F90 
    2323 
    24   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: insitu_t 
     24  REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: rinsitu_t 
    2525 
    2626   !! * Substitutions 
     
    3636      ierr = 0 
    3737      ! 
    38       ALLOCATE( insitu_t(jpi,jpj,jpk), STAT=ierr(1) ) 
     38      ALLOCATE( rinsitu_t(jpi,jpj,jpk), STAT=ierr(1) ) 
    3939         ! 
    4040      insitu_tem_alloc = MAXVAL(ierr) 
     
    5454  SUBROUTINE theta2t() 
    5555 
    56     INTEGER, PARAMETER :: num_steps=10                ! number of steps in integration 
    57     INTEGER            :: step                        ! iteration counter 
     56    INTEGER, PARAMETER :: inum_steps=10                ! number of steps in integration 
     57    INTEGER            :: jstep                        ! iteration counter 
    5858    INTEGER            :: ji, jj, jk                  ! loop indices 
    5959    REAL(wp), DIMENSION(jpi,jpj,jpk) :: zP            ! pressure (decibars) 
     
    7676           DO ji = 1, jpi 
    7777              ! These loops expanded for case where fsdept may be 1D 
    78               zDP(ji,jj,jk) = fsdept(ji,jj,jk) / real(num_steps) 
     78              zDP(ji,jj,jk) = fsdept(ji,jj,jk) / real(inum_steps) 
    7979           END DO 
    8080        END DO 
     
    9191     zTB(:,:,:) = zT(:,:,:)  - zLAPSE(:,:,:) * zDP(:,:,:) 
    9292 
    93      interation: DO step=1, num_steps 
     93     interation: DO jstep=1, inum_steps 
    9494        ! Calculate lapse rate (dT/dP) and hence TA 
    9595        CALL ATG(zP, zT, zSS, zLAPSE) 
     
    102102     END DO interation 
    103103 
    104      insitu_t(:,:,:) = zT(:,:,:) * tmask(:,:,:) 
    105      CALL lbc_lnk( insitu_t,  'T', 1.0) 
     104     rinsitu_t(:,:,:) = zT(:,:,:) * tmask(:,:,:) 
     105     CALL lbc_lnk( rinsitu_t,  'T', 1.0) 
    106106 
    107107   END SUBROUTINE theta2t 
Note: See TracChangeset for help on using the changeset viewer.