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 5225 – NEMO

Changeset 5225


Ignore:
Timestamp:
2015-04-20T11:26:15+02:00 (9 years ago)
Author:
cetlod
Message:

dev_r5204_CNRS_PISCES_dcy : fixes to avoid compilation errors

Location:
branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90

    r5222 r5225  
    264264 
    265265      !   daily mean qsr when diurnal cycle is applied on physics - for BGC models 
    266       IF( l_trcdm2dc ) THEN qsr_mean(:,:) =  pfrld(:,:) * qsr_mean(:,:) + ( 1. - pfrld(:,:) ) * fstric_mean(:,:) 
     266      IF( l_trcdm2dc ) THEN  
    267267         !   computation the solar flux at ocean surface 
    268268         IF( lk_cpl ) THEN 
  • branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90

    r4990 r5225  
    6161#endif 
    6262 
    63    INTEGER, PUBLIC, PARAMETER ::   nmaxfld=40        ! Maximum number of coupling fields 
     63   INTEGER                    ::   nrcv         ! total number of fields received 
     64   INTEGER                    ::   nsnd         ! total number of fields sent 
     65   INTEGER                    ::   ncplmodel    ! Maximum number of models to/from which NEMO is potentialy sending/receiving data 
     66   INTEGER, PUBLIC, PARAMETER ::   nmaxfld=50   ! Maximum number of coupling fields 
    6467   INTEGER, PUBLIC, PARAMETER ::   nmaxcat=5    ! Maximum number of coupling fields 
    6568   INTEGER, PUBLIC, PARAMETER ::   nmaxcpl=5    ! Maximum number of coupling fields 
     
    144147      IF(lwp) WRITE(numout,*) 
    145148 
     149      ncplmodel = kcplmodel 
    146150      IF( kcplmodel > nmaxcpl ) THEN 
    147          CALL oasis_abort ( ncomp_id, 'cpl_define', 'kcplmodel is larger than nmaxcpl, increase nmaxcpl')   ;   RETURN 
     151         CALL oasis_abort ( ncomp_id, 'cpl_define', 'ncplmodel is larger than nmaxcpl, increase nmaxcpl')   ;   RETURN 
    148152      ENDIF 
     153 
     154      nrcv = krcv 
     155      IF( nrcv > nmaxfld ) THEN 
     156         CALL oasis_abort ( ncomp_id, 'cpl_define', 'nrcv is larger than nmaxfld, increase nmaxfld')   ;   RETURN 
     157      ENDIF 
     158 
     159      nsnd = ksnd 
     160      IF( nsnd > nmaxfld ) THEN 
     161         CALL oasis_abort ( ncomp_id, 'cpl_define', 'nsnd is larger than nmaxfld, increase nmaxfld')   ;   RETURN 
     162      ENDIF 
     163 
    149164      ! 
    150165      ! ... Define the shape for the area that excludes the halo 
     
    399414   END SUBROUTINE cpl_rcv 
    400415 
    401  
    402    INTEGER FUNCTION cpl_freq( kid )   
     416   INTEGER FUNCTION cpl_freq( cdfieldname ) 
    403417      !!--------------------------------------------------------------------- 
    404418      !!              ***  ROUTINE cpl_freq  *** 
     
    406420      !! ** Purpose : - send back the coupling frequency for a particular field 
    407421      !!---------------------------------------------------------------------- 
    408       INTEGER,INTENT(in) ::   kid   ! variable index 
    409       !! 
     422      CHARACTER(len = *), INTENT(in) ::   cdfieldname    ! field name as set in namcouple file 
     423      !! 
     424      INTEGER               :: id 
    410425      INTEGER               :: info 
    411426      INTEGER, DIMENSION(1) :: itmp 
     427      INTEGER               :: ji,jm     ! local loop index 
    412428      !!---------------------------------------------------------------------- 
    413       CALL oasis_get_freqs(kid, 1, itmp, info) 
    414       cpl_freq = itmp(1) 
     429      cpl_freq = 0   ! defaut definition 
     430      id = -1        ! defaut definition 
     431      ! 
     432      DO ji = 1, nsnd 
     433         DO jm = 1, ncplmodel 
     434            IF( ssnd(ji)%nid(1,jm) /= -1 ) THEN 
     435               IF( TRIM(cdfieldname) == TRIM(ssnd(ji)%clname) ) id = ssnd(ji)%nid(1,jm) 
     436            ENDIF 
     437         ENDDO 
     438      ENDDO 
     439      DO ji = 1, nrcv 
     440         DO jm = 1, ncplmodel 
     441            IF( srcv(ji)%nid(1,jm) /= -1 ) THEN 
     442               IF( TRIM(cdfieldname) == TRIM(srcv(ji)%clname) ) id = srcv(ji)%nid(1,jm) 
     443            ENDIF 
     444         ENDDO 
     445      ENDDO 
     446      ! 
     447      IF( id /= -1 ) THEN 
     448         CALL oasis_get_freqs(id, 1, itmp, info) 
     449         cpl_freq = itmp(1) 
     450      ENDIF 
    415451      ! 
    416452   END FUNCTION cpl_freq 
    417  
    418453 
    419454   SUBROUTINE cpl_finalize 
  • branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5222 r5225  
    586586      ENDIF 
    587587      ! 
    588       n_cpl_qsr = INT( 86400 / ( cpl_freq( jpr_qsroce ) + cpl_freq( jpr_qsrmix ) )  ! qsr coupling frequency per day 
     588      n_cpl_qsr = INT( 86400 / ( cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'S_QsrOce' ) + cpl_freq( 'S_QsrMix' ) ) ) 
    589589      ! 
    590590      IF( ln_dm2dc .AND. n_cpl_qsr /= 1 )   & 
     
    13551355         qsr_ice_tmp(:,:,:,n_cpl_qsr ) = qsr_ice(:,:,:) 
    13561356         ! 
    1357          qsr_mean    (:,:) = SUM( qsr_tot_tmp(:,:,:), 3 ) / n_cpl_qsr  
    1358          qsr_ice_mean(:,:) = SUM( qsr_ice_tmp(:,:,:), 4 ) / n_cpl_qsr  
     1357         qsr_mean    (:,:  ) = SUM( qsr_tot_tmp(:,:,:  ), 3 ) / n_cpl_qsr  
     1358         qsr_ice_mean(:,:,:) = SUM( qsr_ice_tmp(:,:,:,:), 4 ) / n_cpl_qsr  
    13591359         ! 
    13601360      ENDIF 
  • branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r5222 r5225  
    267267      IF( nsbc   == jp_cpl )   CALL sbc_cpl_init (nn_ice)      ! OASIS initialisation. must be done before first time step 
    268268       
    269       l_trcdm2dc == lk_top .AND. ( ln_dm2dc .OR. ( lk_cpl .AND. n_cpl_qsr /= 1 ) )   
     269      l_trcdm2dc = lk_top .AND. ( ln_dm2dc .OR. ( lk_cpl .AND. n_cpl_qsr /= 1 ) )   
    270270      IF( l_trcdm2dc .AND. lwp ) THEN 
    271271            WRITE(numout,*) "Coupling with passive tracers and used of diurnal cycle !!!!! " 
    272272            WRITE(numout,*) "Computation of a daily mean shortwave for some biogeochemical models" 
    273          ENDIF 
    274273      ENDIF 
    275274 
Note: See TracChangeset for help on using the changeset viewer.