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 3658 for branches/2012/dev_r3604_LEGI8_TAM/NEMOGCM/NEMO/OPATAM_SRC/SBC/sbcssr_tam.F90 – NEMO

Ignore:
Timestamp:
2012-11-26T14:08:30+01:00 (11 years ago)
Author:
pabouttier
Message:

Missing allocation for sbcssr_tam variables - see Ticket #1022

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3604_LEGI8_TAM/NEMOGCM/NEMO/OPATAM_SRC/SBC/sbcssr_tam.F90

    r3611 r3658  
    3636   PUBLIC   sbc_ssr_tan    ! routine called in sbcmod_tam 
    3737   PUBLIC   sbc_ssr_adj    ! routine called in sbcmod_tam 
     38   PUBLIC   sbc_ssr_ini_tam    ! routine called in sbcmod_tam 
    3839   PUBLIC   sbc_ssr_adj_tst! routine called in tst 
    3940 
     
    8889      ! 
    8990      !                                               ! -------------------- ! 
    90       IF( kt == nit000 ) THEN                         ! First call kt=nit000 ! 
    91          !                                            ! -------------------- ! 
    92          ! Allocate erp and qrp array 
    93          ALLOCATE( qrp_tl(jpi,jpj), erp_tl(jpi,jpj), STAT=ierror ) 
    94          IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_ssr: unable to allocate erp and qrp array' ) 
    95          CALL sbc_ssr_ini_tam ( 0 ) 
    96       ENDIF 
     91      !IF( kt == nit000 ) THEN                         ! First call kt=nit000 ! 
     92         !!                                            ! -------------------- ! 
     93         !! Allocate erp and qrp array 
     94         !ALLOCATE( qrp_tl(jpi,jpj), erp_tl(jpi,jpj), STAT=ierror ) 
     95         !IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_ssr: unable to allocate erp and qrp array' ) 
     96         !CALL sbc_ssr_ini_tam ( 0 ) 
     97      !ENDIF 
    9798 
    9899      IF( nn_sstr + nn_sssr /= 0 ) THEN 
     
    150151      zqrpad = 0.0 
    151152      !                                               ! -------------------- ! 
    152       IF( kt == nit000 ) THEN                         ! First call kt=nit000 ! 
    153          !                                            ! -------------------- ! 
    154          ! Allocate erp and qrp array 
    155          ALLOCATE( qrp_ad(jpi,jpj), erp_ad(jpi,jpj), STAT=ierror ) 
    156          IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_ssr: unable to allocate erp and qrp array' ) 
    157          CALL sbc_ssr_ini_tam ( 1 ) 
    158       ENDIF 
     153      !IF( kt == nit000 ) THEN                         ! First call kt=nit000 ! 
     154         !!                                            ! -------------------- ! 
     155         !! Allocate erp and qrp array 
     156         !ALLOCATE( qrp_ad(jpi,jpj), erp_ad(jpi,jpj), STAT=ierror ) 
     157         !IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_ssr: unable to allocate erp and qrp array' ) 
     158         !CALL sbc_ssr_ini_tam ( 1 ) 
     159      !ENDIF 
    159160 
    160161      IF( nn_sstr + nn_sssr /= 0 ) THEN 
     
    346347   END SUBROUTINE sbc_ssr_adj_tst 
    347348 
    348  
    349    SUBROUTINE sbc_ssr_ini_tam( kindic ) 
     349   SUBROUTINE sbc_ssr_ini_tam 
    350350      USE fldread 
     351      INTEGER :: ierror 
    351352      CHARACTER(len=100) ::  cn_dir          ! Root directory for location of ssr files 
    352353      TYPE(FLD_N) ::   sn_sst, sn_sss        ! informations about the fields to be read 
    353354      !!---------------------------------------------------------------------- 
    354       INTEGER, INTENT(IN) :: kindic 
    355355      NAMELIST/namsbc_ssr/ cn_dir, nn_sstr, nn_sssr, rn_dqdt, rn_deds, sn_sst, & 
    356356         &                 sn_sss, ln_sssr_bnd, rn_sssr_bnd 
     
    369369         WRITE(numout,*) '          dE/dS (restoring magnitude on SST)     deds    = ', rn_deds, ' mm/day' 
    370370      ENDIF 
     371         ALLOCATE( qrp_ad(jpi,jpj), erp_ad(jpi,jpj), & 
     372            &      qrp_tl(jpi,jpj), erp_tl(jpi,jpj), STAT=ierror ) 
     373         IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_ssr: unable to allocate erp and qrp array' ) 
    371374 
    372375      ! 
    373376      ! Initialize qrp and erp if no restoring 
    374       IF ( kindic == 0 ) THEN 
    375          qrp_tl(:,:) = 0.e0 
    376          erp_tl(:,:) = 0.e0 
    377       ELSEIF ( kindic == 1 ) THEN 
    378          qrp_ad(:,:) = 0.e0 
    379          erp_ad(:,:) = 0.e0 
    380       END IF 
     377      qrp_tl(:,:) = 0.e0 
     378      erp_tl(:,:) = 0.e0 
     379      qrp_ad(:,:) = 0.e0 
     380      erp_ad(:,:) = 0.e0 
    381381   END SUBROUTINE sbc_ssr_ini_tam 
    382382 
Note: See TracChangeset for help on using the changeset viewer.