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 12675 for NEMO – NEMO

Changeset 12675 for NEMO


Ignore:
Timestamp:
2020-04-03T18:00:43+02:00 (4 years ago)
Author:
dancopsey
Message:

Fix compile errors.

Location:
NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE/ICB/icbclv.F90

    r12576 r12675  
    5353      ! 
    5454      REAL(wp)      ::   zcalving_used, zdist, zfact 
    55       REAL(wp)      ::   zgreenland_calving_sum, zantarctica_calving_sum  
     55      REAL(wp), DIMENSION(1)      ::   zgreenland_calving_sum, zantarctica_calving_sum  
     56      LOGICAL       ::   ll_write 
    5657      INTEGER       ::   jn, ji, jj                    ! loop counters 
    5758      INTEGER       ::   imx                           ! temporary integer for max berg class 
     
    7778          ! to preserve total freshwater conservation in coupled models without an active ice sheet model. 
    7879 
    79            zgreenland_calving_sum = SUM( berg_grid%calving(:,:) * greenland_icesheet_mask(:,:) ) 
    80            IF( lk_mpp ) CALL mpp_sum( zgreenland_calving_sum ) 
     80           zgreenland_calving_sum(1) = SUM( berg_grid%calving(:,:) * greenland_icesheet_mask(:,:) ) 
     81           IF( lk_mpp ) CALL mpp_sum( 'icbclv', zgreenland_calving_sum ) 
    8182           WHERE( greenland_icesheet_mask(:,:) == 1.0 )                                                                                 & 
    8283          &    berg_grid%calving(:,:) = berg_grid%calving(:,:) * greenland_icesheet_mass_rate_of_change * rn_greenland_calving_fraction & 
    83           &                                     / ( zgreenland_calving_sum + 1.0e-10_wp ) 
     84          &                                     / ( zgreenland_calving_sum(1) + 1.0e-10_wp ) 
    8485 
    8586           ! check 
    86            IF(ll_write) WRITE(numout, *) 'Greenland iceberg calving climatology (kg/s) : ',zgreenland_calving_sum 
    87            zgreenland_calving_sum = SUM( berg_grid%calving(:,:) * greenland_icesheet_mask(:,:) ) 
    88            IF( lk_mpp ) CALL mpp_sum( zgreenland_calving_sum ) 
    89            IF(ll_write) WRITE(numout, *) 'Greenland iceberg calving adjusted value (kg/s) : ',zgreenland_calving_sum 
    90  
    91            zantarctica_calving_sum = SUM( berg_grid%calving(:,:) * antarctica_icesheet_mask(:,:) ) 
    92            IF( lk_mpp ) CALL mpp_sum( zantarctica_calving_sum ) 
     87           IF(ll_write) WRITE(numout, *) 'Greenland iceberg calving climatology (kg/s) : ',zgreenland_calving_sum(1) 
     88           zgreenland_calving_sum(1) = SUM( berg_grid%calving(:,:) * greenland_icesheet_mask(:,:) ) 
     89           IF( lk_mpp ) CALL mpp_sum( 'icbclv', zgreenland_calving_sum ) 
     90           IF(ll_write) WRITE(numout, *) 'Greenland iceberg calving adjusted value (kg/s) : ',zgreenland_calving_sum(1) 
     91 
     92           zantarctica_calving_sum(1) = SUM( berg_grid%calving(:,:) * antarctica_icesheet_mask(:,:) ) 
     93           IF( lk_mpp ) CALL mpp_sum( 'icbclv', zantarctica_calving_sum ) 
    9394           WHERE( antarctica_icesheet_mask(:,:) == 1.0 )                                                                              & 
    9495           berg_grid%calving(:,:) = berg_grid%calving(:,:) * antarctica_icesheet_mass_rate_of_change * rn_antarctica_calving_fraction & 
    95           &                           / ( zantarctica_calving_sum + 1.0e-10_wp ) 
     96          &                           / ( zantarctica_calving_sum(1) + 1.0e-10_wp ) 
    9697 
    9798           ! check 
    98            IF(ll_write) WRITE(numout, *) 'Antarctica iceberg calving climatology (kg/s) : ',zantarctica_calving_sum 
    99            zantarctica_calving_sum = SUM( berg_grid%calving(:,:) * antarctica_icesheet_mask(:,:) ) 
    100            IF( lk_mpp ) CALL mpp_sum( zantarctica_calving_sum ) 
    101            IF(ll_write) WRITE(numout, *) 'Antarctica iceberg calving adjusted value (kg/s) : ',zantarctica_calving_sum 
     99           IF(ll_write) WRITE(numout, *) 'Antarctica iceberg calving climatology (kg/s) : ',zantarctica_calving_sum(1) 
     100           zantarctica_calving_sum(1) = SUM( berg_grid%calving(:,:) * antarctica_icesheet_mask(:,:) ) 
     101           IF( lk_mpp ) CALL mpp_sum( 'icbclv', zantarctica_calving_sum ) 
     102           IF(ll_write) WRITE(numout, *) 'Antarctica iceberg calving adjusted value (kg/s) : ',zantarctica_calving_sum(1) 
    102103 
    103104        ENDIF 
  • NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE/SBC/cpl_oasis3.F90

    r12580 r12675  
    3333   USE in_out_manager               ! I/O manager 
    3434   USE lbclnk                       ! ocean lateral boundary conditions (or mpp link) 
     35   USE lib_mpp 
    3536 
    3637   IMPLICIT NONE 
     
    5253   PUBLIC   cpl_finalize 
    5354 
     55#if defined key_mpp_mpi 
     56   INCLUDE 'mpif.h' 
     57#endif 
     58 
     59   INTEGER, PARAMETER         ::   localRoot  = 0 
    5460   INTEGER, PUBLIC            ::   OASIS_Rcv  = 1    !: return code if received field 
    5561   INTEGER, PUBLIC            ::   OASIS_idle = 0    !: return code if nothing done by oasis 
     
    115121      CHARACTER(len = *), INTENT(in   ) ::   cd_modname   ! model name as set in namcouple file 
    116122      INTEGER           , INTENT(  out) ::   kl_comm      ! local communicator of the model 
     123      INTEGER                           ::   error 
    117124      !!-------------------------------------------------------------------- 
    118125 
     
    627634                     WRITE(numout,*) '     - Start of data is ', pdata(1:number_to_print) 
    628635                     WRITE(numout,*) '****************' 
    629                      IF(lflush) CALL flush(numout) 
    630636                  ENDIF 
    631637                   
     
    635641             
    636642       ENDDO 
    637         
     643 
     644#if defined key_mpp_mpi 
    638645       ! Set the precision that we want to broadcast using MPI_BCAST 
    639646       SELECT CASE( wp ) 
     
    651658       ! to deal with that w/o NEMO adopting a UM-style test mechanism 
    652659       ! to determine active put/get timesteps.  
    653        CALL mpi_bcast( pdata, nitems, MPI_WORKING_PRECISION, localRoot, mpi_comm_opa, ierr ) 
     660       CALL mpi_bcast( pdata, nitems, MPI_WORKING_PRECISION, localRoot, mpi_comm_oce, ierr ) 
     661#else 
     662       CALL oasis_abort( ncomp_id, "cpl_rcv_1d", "Unable to use mpi_bcast without key_mpp_mpi present. Please add key_mpp_mpi to your list of NEMO keys." ) 
     663#endif 
    654664 
    655665      ! 
  • NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE/SBC/cpl_rnf_1d.F90

    r12580 r12675  
    1919   USE lib_mpp         ! MPP library 
    2020   USE iom 
    21    USE wrk_nemo        ! Memory allocation 
    2221   USE dom_oce         ! Domain sizes (for grid box area e1e2t) 
    2322   USE sbc_oce         ! Surface boundary condition: ocean fields 
     
    3130    
    3231   TYPE, PUBLIC ::   RIVERS_DATA     !: Storage for river outflow data 
    33       INTEGER, POINTER, DIMENSION(:,:)    ::   river_number       !: River outflow number 
    34       REAL(wp), POINTER, DIMENSION(:)     ::   river_area         ! 1D array listing areas of each river outflow (m2) 
    35       COMPLEX(wp), POINTER, DIMENSION(:)  ::   river_area_c       ! Comlex version of river_area for use in bit reproducible sums (m2) 
     32      INTEGER, ALLOCATABLE, DIMENSION(:,:)    ::   river_number       !: River outflow number 
     33      REAL(wp), ALLOCATABLE, DIMENSION(:)     ::   river_area         ! 1D array listing areas of each river outflow (m2) 
     34      COMPLEX(wp), ALLOCATABLE, DIMENSION(:)  ::   river_area_c       ! Comlex version of river_area for use in bit reproducible sums (m2) 
    3635   END TYPE RIVERS_DATA 
    3736    
     
    6059      INTEGER                                   ::   ii, jj, rr          !: Loop indices 
    6160      INTEGER                                   ::   max_river 
    62       REAL(wp), POINTER, DIMENSION(:,:)         ::   river_number        ! 2D array containing the river outflow numbers 
     61      REAL(wp), DIMENSION(jpi,jpj)              ::   river_number        ! 2D array containing the river outflow numbers 
    6362       
    6463      NAMELIST/nam_cpl_rnf_1d/file_riv_number, nn_cpl_river, ln_print_river_info 
    6564      !!---------------------------------------------------------------------- 
    6665 
    67       IF( nn_timing == 1 ) CALL timing_start('cpl_rnf_1d_init') 
     66      IF( ln_timing ) CALL timing_start('cpl_rnf_1d_init') 
    6867       
    6968      IF(lwp) WRITE(numout,*) 
    7069      IF(lwp) WRITE(numout,*) 'cpl_rnf_1d_init : initialization of river runoff coupling' 
    7170      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    72       IF(lwp .AND. lflush) CALL flush(numout) 
     71      IF(lwp) CALL flush(numout) 
    7372       
    7473      REWIND(numnam_cfg) 
     
    7675      ! Read the namelist 
    7776      READ  ( numnam_ref, nam_cpl_rnf_1d, IOSTAT = ios, ERR = 901) 
    78 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_cpl_rnf_1d in reference namelist', lwp ) 
     77901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_cpl_rnf_1d in reference namelist' ) 
    7978      READ  ( numnam_cfg, nam_cpl_rnf_1d, IOSTAT = ios, ERR = 902 ) 
    80 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_cpl_rnf_1d in configuration namelist', lwp ) 
     79902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_cpl_rnf_1d in configuration namelist' ) 
    8180      IF(lwm .AND. nprint > 2) WRITE ( numond, nam_cpl_rnf_1d ) 
    8281 
     
    8887      IF(lwp) WRITE(numout,*) '             Print river information = ',ln_print_river_info 
    8988      IF(lwp) WRITE(numout,*) ' ' 
    90       IF(lwp .AND. lflush) CALL flush(numout) 
    91        
     89      IF(lwp) CALL flush(numout) 
     90 
    9291      ! Assign space for river numbers 
    9392      ALLOCATE( rivers%river_number( jpi, jpj ) ) 
    94       CALL wrk_alloc( jpi, jpj, river_number ) 
    9593       
    9694      ! Read the river numbers from netcdf file 
     
    113111      IF ( ln_print_river_info .AND. lwp) THEN 
    114112         WRITE(numout,*) 'Maximum river number in input file = ',max_river 
    115          IF(lflush) CALL flush(numout) 
     113         CALL flush(numout) 
    116114      END IF 
    117115       
     
    132130       
    133131      ! Use mpp_sum to add together river areas on other processors 
    134       CALL mpp_sum( rivers%river_area_c, nn_cpl_river ) 
     132      CALL mpp_sum( 'cpl_rnf_1d', rivers%river_area_c ) 
    135133       
    136134      ! Convert from complex number to real 
     
    142140      IF ( ln_print_river_info .AND. lwp) THEN 
    143141        WRITE(numout,*) 'Area of rivers 1 to 10 are ',rivers%river_area(1:10) 
    144         IF(lflush) CALL flush(numout) 
     142        CALL flush(numout) 
    145143      END IF 
    146144       
  • NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE/SBC/sbccpl.F90

    r12580 r12675  
    262262         &                  sn_rcv_icb   , sn_rcv_isf   , sn_rcv_wfreq , sn_rcv_tauw, nn_cats_cpl  ,   & 
    263263         &                  sn_rcv_ts_ice, sn_rcv_grnm  , sn_rcv_antm  ,                               & 
    264          &                  nn_coupled_iceshelf_fluxes  , ln_iceshelf_init_atmos                       & 
     264         &                  nn_coupled_iceshelf_fluxes  , ln_iceshelf_init_atmos ,                     & 
    265265         &                  rn_greenland_total_fw_flux  , rn_greenland_calving_fraction  ,             & 
    266266         &                  rn_antarctica_total_fw_flux , rn_antarctica_calving_fraction ,             & 
     
    11851185      INTEGER  ::   ji, jj, jn             ! dummy loop indices 
    11861186      INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdt did not change since nit000) 
    1187       REAL(wp) ::   zcumulneg, zcumulpos   ! temporary scalars   
     1187      REAL(wp) ::   zcumulneg, zcumulpos   ! temporary scalars      
     1188      REAL(wp) ::   zcoef                  ! temporary scalar 
     1189      LOGICAL  ::   ll_wrtstp              ! write diagnostics? 
     1190      REAL(wp) ::   zrhoa  = 1.22          ! Air density kg/m3 
     1191      REAL(wp) ::   zcdrag = 1.5e-3        ! drag coefficient 
    11881192      REAL(wp) ::   zgreenland_icesheet_mass_in, zantarctica_icesheet_mass_in  
    11891193      REAL(wp) ::   zgreenland_icesheet_mass_b, zantarctica_icesheet_mass_b  
    11901194      REAL(wp) ::   zmask_sum, zepsilon     
    1191       REAL(wp) ::   zcoef                  ! temporary scalar 
    1192       REAL(wp) ::   zrhoa  = 1.22          ! Air density kg/m3 
    1193       REAL(wp) ::   zcdrag = 1.5e-3        ! drag coefficient 
    11941195      REAL(wp) ::   zzx, zzy               ! temporary variables 
    11951196      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, zty, zmsk, zemp, zqns, zqsr 
    11961197      !!---------------------------------------------------------------------- 
     1198      ! 
     1199      ll_wrtstp  = ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
    11971200      ! 
    11981201      IF( ln_mixcpl )   zmsk(:,:) = 1. - xcplmask(:,:,0) 
     
    15741577            WRITE(numout,*) 'Greenland icesheet mass rate of change (kg/s) is ', greenland_icesheet_mass_rate_of_change 
    15751578            WRITE(numout,*) 'Greenland icesheet seconds lapsed since last change is ', greenland_icesheet_timelapsed 
    1576             IF(lflush) CALL flush(numout) 
    15771579         ENDIF 
    15781580      ELSE IF ( nn_coupled_iceshelf_fluxes == 2 ) THEN 
     
    16121614            WRITE(numout,*) 'Antarctica icesheet mass rate of change (kg/s) is ', antarctica_icesheet_mass_rate_of_change 
    16131615            WRITE(numout,*) 'Antarctica icesheet seconds lapsed since last change is ', antarctica_icesheet_timelapsed 
    1614             IF(lflush) CALL flush(numout) 
    16151616         ENDIF 
    16161617      ELSE IF ( nn_coupled_iceshelf_fluxes == 2 ) THEN 
  • NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE/SBC/sbcisf.F90

    r12576 r12675  
    9696      REAL(wp), DIMENSION(:,:)  , ALLOCATABLE ::   zqhcisf2d 
    9797      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   zfwfisf3d, zqhcisf3d, zqlatisf3d 
     98      LOGICAL :: ll_wrtstp 
    9899      !!--------------------------------------------------------------------- 
    99100      ! 
     101      ll_wrtstp  = ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
    100102      IF( MOD( kt-1, nn_fsbc) == 0 ) THEN    ! compute salt and heat flux 
    101103         ! 
     
    138140 
    139141                ! All related global sums must be done bit reproducibly 
    140                  zgreenland_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
     142                 zgreenland_fwfisf_sum = glob_sum( 'sbcisf', fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
    141143 
    142144                 ! use ABS function because we need to preserve the sign of fwfisf 
     
    148150                 IF(lwp .AND. ll_wrtstp) WRITE(numout, *) 'Greenland iceshelf melting climatology (kg/s) : ',zgreenland_fwfisf_sum 
    149151 
    150                  zgreenland_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
     152                 zgreenland_fwfisf_sum = glob_sum( 'sbcisf', fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
    151153 
    152154                 IF(lwp .AND. ll_wrtstp) WRITE(numout, *) 'Greenland iceshelf melting adjusted value (kg/s) : ',zgreenland_fwfisf_sum 
    153155 
    154                  zantarctica_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     156                 zantarctica_fwfisf_sum = glob_sum( 'sbcisf', fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
    155157 
    156158                 ! use ABS function because we need to preserve the sign of fwfisf 
     
    162164                 IF(lwp .AND. ll_wrtstp) WRITE(numout, *) 'Antarctica iceshelf melting climatology (kg/s) : ',zantarctica_fwfisf_sum 
    163165 
    164                  zantarctica_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     166                 zantarctica_fwfisf_sum = glob_sum( 'sbcisf', fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
    165167 
    166168                 IF(lwp .AND. ll_wrtstp) WRITE(numout, *) 'Antarctica iceshelf melting adjusted value (kg/s) : ',zantarctica_fwfisf_sum 
     
    189191 
    190192                ! All related global sums must be done bit reproducibly 
    191                  zgreenland_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
     193                 zgreenland_fwfisf_sum = glob_sum( 'sbcisf', fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
    192194 
    193195                 ! use ABS function because we need to preserve the sign of fwfisf 
     
    199201                 IF(lwp .AND. ll_wrtstp) WRITE(numout, *) 'Greenland iceshelf melting climatology (kg/s) : ',zgreenland_fwfisf_sum 
    200202 
    201                  zgreenland_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
     203                 zgreenland_fwfisf_sum = glob_sum( 'sbcisf', fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
    202204 
    203205                 IF(lwp .AND. ll_wrtstp) WRITE(numout, *) 'Greenland iceshelf melting adjusted value (kg/s) : ',zgreenland_fwfisf_sum 
    204206 
    205                  zantarctica_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     207                 zantarctica_fwfisf_sum = glob_sum( 'sbcisf', fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
    206208 
    207209                 ! use ABS function because we need to preserve the sign of fwfisf 
     
    213215                 IF(lwp .AND. ll_wrtstp) WRITE(numout, *) 'Antarctica iceshelf melting climatology (kg/s) : ',zantarctica_fwfisf_sum 
    214216 
    215                  zantarctica_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     217                 zantarctica_fwfisf_sum = glob_sum( 'sbcisf', fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
    216218 
    217219                 IF(lwp .AND. ll_wrtstp) WRITE(numout, *) 'Antarctica iceshelf melting adjusted value (kg/s) : ',zantarctica_fwfisf_sum 
Note: See TracChangeset for help on using the changeset viewer.