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 473 for trunk/NEMO/OPA_SRC/SBC/tau_forced_monthly.h90 – NEMO

Ignore:
Timestamp:
2006-05-11T17:04:37+02:00 (18 years ago)
Author:
opalod
Message:

nemo_v1_update_060: SM: IOM + 301 levels + CORE + begining of ctl_stop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/SBC/tau_forced_monthly.h90

    r392 r473  
    99   !! * local modules variables 
    1010   INTEGER ::   & 
    11       numtau,   &  ! logical unit for the i-component of the wind data 
    12       numtav,   &  ! logical unit for the j-component of the wind data 
     11      numtau,   &   ! logical unit for the i-component of the wind data 
     12      numtav,   &   ! logical unit for the j-component of the wind data 
    1313      ntau1, ntau2  ! index of the first and second record used 
    14  
    15    CHARACTER (len=34) ::   &      !!! * monthly climatology/interanual fields 
    16       cl_taux,  & ! generic name of the i-component monthly NetCDF file 
    17       cl_tauy     ! generic name of the j-component monthly NetCDF file 
    18  
    1914   REAL(wp), DIMENSION(jpi,jpj,2) ::   & 
    2015      taux_dta,    &  ! i- and j-components of the surface stress (Pascal) 
     
    5651      !!---------------------------------------------------------------------- 
    5752      !! * Modules used 
    58       USE ioipsl       ! NetCDF library 
     53      USE iom       
    5954      !! * Arguments 
    6055      INTEGER, INTENT( in  ) ::   kt   ! ocean time step 
    6156 
    6257      !! * Local declarations 
    63       INTEGER, PARAMETER ::   jpmonth = 12 
    64       INTEGER ::   & 
    65          imois, iman, itime,   & 
    66          i15,   & 
    67          ipi, ipj, ipk 
    68       INTEGER, DIMENSION(jpmonth) ::   istep 
    69       REAL(wp) , DIMENSION(jpi,jpj)::  & 
    70          zlon  , & 
    71          zlat 
    72       REAL(wp) , DIMENSION(jpk)::  & 
    73          zlev 
    74       REAL(wp) ::   & 
    75          zsecond,   & ! ??? 
    76          zdate0,    & ! ??? 
    77          zxy          ! coefficient of the linear time interpolation 
     58      INTEGER :: imois, iman, i15 
     59      REAL(wp) :: zxy          ! coefficient of the linear time interpolation 
    7860      !!--------------------------------------------------------------------- 
    79       cl_taux = 'taux_1m.nc' 
    80       cl_tauy = 'tauy_1m.nc' 
    8161 
    8262      ! -------------- ! 
     
    8666      ! iman=number of dates in data file (12 for a year of monthly values) 
    8767      iman  = INT( raamo ) 
    88       itime = jpmonth 
    89       ipi   = jpiglo 
    90       ipj   = jpjglo 
    91       ipk   = jpk 
    92  
    9368      i15 = INT( 2*FLOAT( nday ) / ( FLOAT( nobis(nmonth) ) + 0.5 ) ) 
    94  
    9569      imois = nmonth + i15 - 1 
    9670      IF( imois == 0 ) imois = iman 
    97  
    9871 
    9972      ! -------------------- ! 
     
    10275 
    10376      IF( kt == nit000 ) THEN 
    104          ntau1 = 0 
    105          IF(lwp) WRITE(numout,*) 
    106          IF(lwp) WRITE(numout,*) ' tau    : MONTHLY climatological wind stress (NetCDF files)' 
    107          IF(lwp) WRITE(numout,*) ' ~~~    ' 
    10877          
    109          ! title, dimensions and tests 
    110  
    111 #if defined key_agrif 
    112       if ( .NOT. Agrif_Root() ) then 
    113          cl_taux = TRIM(Agrif_CFixed())//'_'//TRIM(cl_taux) 
    114       endif 
    115 #endif 
     78         ntau1 = 0   ! initialization 
     79         IF(lwp) THEN 
     80            WRITE(numout,*) 
     81            WRITE(numout,*) ' tau    : MONTHLY climatological wind stress (NetCDF files)' 
     82         ENDIF 
     83         CALL iom_open ( 'taux_1m.nc', numtau ) 
     84         CALL iom_open ( 'tauy_1m.nc', numtav ) 
    11685          
    117          CALL flinopen( cl_taux, mig(1), nlci, mjg(1), nlcj,   &   ! taux on U-grid 
    118                         .FALSE., ipi   , ipj, ipk   ,        & 
    119                         zlon , zlat  , zlev   , itime,       & 
    120                         istep, zdate0, zsecond, numtau ) 
    121           
    122          IF( itime /= jpmonth ) THEN 
    123             IF(lwp) WRITE(numout,cform_err) 
    124             IF(lwp) WRITE(numout,*) '   problem with time coordinates in file ', cl_taux 
    125             IF(lwp) WRITE(numout,*) '   itime = ', itime,' jpmonth = ',jpmonth 
    126             nstop = nstop + 1 
    127          ENDIF 
    128          IF( ipi /= jpidta .AND. ipj /= jpjdta .AND. ipk /= 1 ) THEN 
    129             IF(lwp) WRITE(numout,cform_err) 
    130             IF(lwp) WRITE(numout,*) '   problem with size read in file ', cl_taux 
    131             IF(lwp) WRITE(numout,*) '   ipi = ',ipi,' jpidta = ',jpidta 
    132             IF(lwp) WRITE(numout,*) '   ipj = ',ipj,' jpjdta = ',jpjdta 
    133             IF(lwp) WRITE(numout,*) '   ipk = ',ipk,' must be 1' 
    134             nstop = nstop + 1 
    135          ENDIF 
    136 #if defined key_agrif 
    137       if ( .NOT. Agrif_Root() ) then 
    138          cl_tauy = TRIM(Agrif_CFixed())//'_'//TRIM(cl_tauy) 
    139       endif 
    140 #endif 
    141          CALL flinopen( cl_tauy, mig(1), nlci, mjg(1), nlcj,   &   ! tauy on V-grid 
    142                         .FALSE., ipi   , ipj, ipk   ,        & 
    143                         zlon , zlat  , zlev   , itime,       & 
    144                         istep, zdate0, zsecond, numtav ) 
    145  
    146          IF( itime /= jpmonth ) THEN           
    147             IF(lwp) WRITE(numout,cform_err) 
    148             IF(lwp) WRITE(numout,*) '   problem with time coordinates in file ', cl_tauy 
    149             IF(lwp) WRITE(numout,*) '   itime = ', itime,' jpmonth = ',jpmonth 
    150             nstop = nstop + 1 
    151          ENDIF 
    152          IF( ipi /= jpidta .AND. ipj /= jpjdta .AND. ipk /= 1) THEN 
    153             IF(lwp) WRITE(numout,cform_err) 
    154             IF(lwp) WRITE(numout,*) '   problem with size read in file ', cl_tauy 
    155             IF(lwp) WRITE(numout,*) '   ipi = ',ipi,' jpidta = ',jpidta 
    156             IF(lwp) WRITE(numout,*) '   ipj = ',ipj,' jpjdta = ',jpjdta 
    157             IF(lwp) WRITE(numout,*) '   ipk = ',ipk,' must be 1' 
    158             nstop = nstop + 1 
    159          ENDIF 
    16086      ENDIF 
    16187       
     
    178104         ! Read the corresponding 2 monthly stress data 
    179105         ! ntau1 
    180          CALL flinget( numtau,'sozotaux',    &               ! i-component at U-pt 
    181             jpidta,jpjdta,1,jpmonth,ntau1,   & 
    182             ntau1,mig(1),nlci,mjg(1),nlcj,taux_dta(1:nlci,1:nlcj,1) ) 
    183          CALL flinget( numtav,'sometauy',    &               ! j-component at V-pt 
    184             jpidta,jpjdta,1,jpmonth,ntau1,   & 
    185             ntau1,mig(1),nlci,mjg(1),nlcj,tauy_dta(1:nlci,1:nlcj,1) ) 
    186          ! ntau2 
    187          CALL flinget( numtau,'sozotaux',    &               ! i-component at U-pt 
    188             jpidta,jpjdta,1,jpmonth,ntau2,   & 
    189             ntau2,mig(1),nlci,mjg(1),nlcj,taux_dta(1:nlci,1:nlcj,2) ) 
    190          CALL flinget( numtav,'sometauy',    &               ! j-component at V-pt 
    191             jpidta,jpjdta,1,jpmonth,ntau2,   & 
    192             ntau2,mig(1),nlci,mjg(1),nlcj,tauy_dta(1:nlci,1:nlcj,2) ) 
     106         CALL iom_get ( numtau, jpdom_data, 'sozotaux', taux_dta(:,:,1), ntau1 ) 
     107         CALL iom_get ( numtav, jpdom_data, 'sometauy', tauy_dta(:,:,1), ntau1 ) 
     108 
     109         CALL iom_get ( numtau, jpdom_data, 'sozotaux', taux_dta(:,:,2), ntau2 ) 
     110         CALL iom_get ( numtav, jpdom_data, 'sometauy', tauy_dta(:,:,2), ntau2 ) 
    193111          
    194112         IF(lwp .AND. nitend-nit000 <= 100 ) THEN 
     
    230148      ! Closing of the 2 files (required in mpp) 
    231149      IF( kt == nitend ) THEN 
    232           CALL flinclo(numtau) 
    233           CALL flinclo(numtav) 
     150          CALL iom_close(numtau) 
     151          CALL iom_close(numtav) 
    234152      ENDIF 
    235153 
Note: See TracChangeset for help on using the changeset viewer.