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 1242 for trunk/NEMO/OPA_SRC/SBC/sbcrnf.F90 – NEMO

Ignore:
Timestamp:
2009-01-06T11:21:38+01:00 (15 years ago)
Author:
rblod
Message:

Fix runtime issues with AGRIF on NEC and add the ability to run without sea-ice on the fine grid hierarchy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r1200 r1242  
    6666      ! 
    6767      INTEGER  ::   ji, jj   ! dummy loop indices 
     68      INTEGER  ::   ierror   ! temporary integer 
    6869      !!---------------------------------------------------------------------- 
    6970      !                                    
    70       IF( kt == nit000 )   CALL sbc_rnf_init 
     71      IF( kt == nit000 ) THEN   
     72         IF( .NOT. ln_rnf_emp ) THEN 
     73            ALLOCATE( sf_rnf(1), STAT=ierror ) 
     74            IF( ierror > 0 ) THEN 
     75               CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN 
     76            ENDIF 
     77            ALLOCATE( sf_rnf(1)%fnow(jpi,jpj) ) 
     78            ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,2) ) 
     79         ENDIF 
     80         CALL sbc_rnf_init(sf_rnf) 
     81      ENDIF 
    7182 
    7283      !                                                   !-------------------! 
     
    97108 
    98109 
    99    SUBROUTINE sbc_rnf_init 
     110   SUBROUTINE sbc_rnf_init( sf_rnf ) 
    100111      !!---------------------------------------------------------------------- 
    101112      !!                  ***  ROUTINE sbc_rnf_init  *** 
     
    107118      !! ** Action  : - read parameters 
    108119      !!---------------------------------------------------------------------- 
    109       INTEGER  ::   ierror   ! temporary integer 
     120      TYPE(FLD), INTENT(inout), DIMENSION(:) :: sf_rnf   ! input data 
    110121      !! 
    111122      NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, sn_rnf, sn_cnf, ln_rnf_mouth,   & 
     
    148159      ELSE                                      ! runoffs read in a file : set sf_rnf structure  
    149160         ! 
    150          ALLOCATE( sf_rnf(1), STAT=ierror ) 
    151          IF( ierror > 0 ) THEN 
    152             CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN 
    153          ENDIF 
    154          ALLOCATE( sf_rnf(1)%fnow(jpi,jpj) ) 
    155          ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,2) ) 
    156  
     161         ! sf_rnf already allocated in main routine 
    157162         ! fill sf_rnf with sn_rnf and control print 
    158163         CALL fld_fill( sf_rnf, (/ sn_rnf /), cn_dir, 'sbc_rnf_init', 'read runoffs data', 'namsbc_rnf' ) 
Note: See TracChangeset for help on using the changeset viewer.