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 7923 for branches/UKMO/dev_r5518_GO6_package_XIOS_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90 – NEMO

Ignore:
Timestamp:
2017-04-18T15:26:56+02:00 (7 years ago)
Author:
andmirek
Message:

merge changes up to 7573

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package_XIOS_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r6912 r7923  
    240240         &                  sn_rcv_qns , sn_rcv_emp   , sn_rcv_rnf   , sn_rcv_cal   , sn_rcv_iceflx,  & 
    241241         &                  sn_rcv_co2 , sn_rcv_grnm  , sn_rcv_antm  , sn_rcv_ts_ice, nn_cplmodel  ,  & 
    242          &                  ln_usecplmask, ln_coupled_iceshelf_fluxes, rn_greenland_calving_fraction, & 
     242         &                  ln_usecplmask, ln_coupled_iceshelf_fluxes, ln_iceshelf_init_atmos,        & 
     243         &                  rn_greenland_calving_fraction, & 
    243244         &                  rn_antarctica_calving_fraction, rn_iceshelf_fluxes_tolerance 
    244245      !!--------------------------------------------------------------------- 
     
    311312         WRITE(numout,*)'  ln_usecplmask                       = ', ln_usecplmask 
    312313         WRITE(numout,*)'  ln_coupled_iceshelf_fluxes          = ', ln_coupled_iceshelf_fluxes 
     314         WRITE(numout,*)'  ln_iceshelf_init_atmos              = ', ln_iceshelf_init_atmos 
    313315         WRITE(numout,*)'  rn_greenland_calving_fraction       = ', rn_greenland_calving_fraction 
    314316         WRITE(numout,*)'  rn_antarctica_calving_fraction      = ', rn_antarctica_calving_fraction 
     
    13441346         greenland_icesheet_mass_array(:,:) = frcv(jpr_grnm)%z3(:,:,1) 
    13451347         ! take average over ocean points of input array to avoid cumulative error over time 
    1346  
    13471348         ! The following must be bit reproducible over different PE decompositions 
    13481349         zgreenland_icesheet_mass_in = glob_sum( greenland_icesheet_mass_array(:,:) * tmask(:,:,1) ) 
     
    13501351         zgreenland_icesheet_mass_in = zgreenland_icesheet_mass_in / zmask_sum 
    13511352         greenland_icesheet_timelapsed = greenland_icesheet_timelapsed + rdt          
     1353 
     1354         IF( ln_iceshelf_init_atmos .AND. kt == 1 ) THEN 
     1355            ! On the first timestep (of an NRUN) force the ocean to ignore the icesheet masses in the ocean restart 
     1356            ! and take them from the atmosphere to avoid problems with using inconsistent ocean and atmosphere restarts. 
     1357            zgreenland_icesheet_mass_b = zgreenland_icesheet_mass_in 
     1358            greenland_icesheet_mass = zgreenland_icesheet_mass_in 
     1359         ENDIF 
     1360 
    13521361         IF( ABS( zgreenland_icesheet_mass_in - greenland_icesheet_mass ) > zepsilon ) THEN 
    13531362            zgreenland_icesheet_mass_b = greenland_icesheet_mass 
    13541363             
    1355             ! Only update the mass if it has increased 
     1364            ! Only update the mass if it has increased. 
    13561365            IF ( (zgreenland_icesheet_mass_in - greenland_icesheet_mass) > 0.0 ) THEN 
    13571366               greenland_icesheet_mass = zgreenland_icesheet_mass_in 
     
    13771386         zantarctica_icesheet_mass_in = zantarctica_icesheet_mass_in / zmask_sum 
    13781387         antarctica_icesheet_timelapsed = antarctica_icesheet_timelapsed + rdt          
     1388 
     1389         IF( ln_iceshelf_init_atmos .AND. kt == 1 ) THEN 
     1390            ! On the first timestep (of an NRUN) force the ocean to ignore the icesheet masses in the ocean restart 
     1391            ! and take them from the atmosphere to avoid problems with using inconsistent ocean and atmosphere restarts. 
     1392            zantarctica_icesheet_mass_b = zantarctica_icesheet_mass_in 
     1393            antarctica_icesheet_mass = zantarctica_icesheet_mass_in 
     1394         ENDIF 
     1395 
    13791396         IF( ABS( zantarctica_icesheet_mass_in - antarctica_icesheet_mass ) > zepsilon ) THEN 
    13801397            zantarctica_icesheet_mass_b = antarctica_icesheet_mass 
    13811398             
    1382             ! Only update the mass if it has increased 
     1399            ! Only update the mass if it has increased. 
    13831400            IF ( (zantarctica_icesheet_mass_in - antarctica_icesheet_mass) > 0.0 ) THEN 
    13841401               antarctica_icesheet_mass = zantarctica_icesheet_mass_in 
     
    17281745         zemp_ice(:,:) = ( frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1) ) * zicefr(:,:) 
    17291746#endif                   
    1730             CALL iom_put( 'rain'         , frcv(jpr_rain)%z3(:,:,1)              )   ! liquid precipitation  
     1747         CALL iom_put( 'rain'         , frcv(jpr_rain)%z3(:,:,1) * tmask(:,:,1)      )   ! liquid precipitation  
     1748         CALL iom_put( 'rain_ao_cea'  , frcv(jpr_rain)%z3(:,:,1)* p_frld(:,:) * tmask(:,:,1)      )   ! liquid precipitation  
    17311749         IF( iom_use('hflx_rain_cea') )   & 
    1732             &  CALL iom_put( 'hflx_rain_cea',   frcv(jpr_rain)%z3(:,:,1) * zcptn(:,:)                                            )  ! heat flux from liq. precip.  
     1750            &  CALL iom_put( 'hflx_rain_cea', frcv(jpr_rain)%z3(:,:,1) * zcptn(:,:) * tmask(:,:,1))   ! heat flux from liq. precip.  
     1751         IF( iom_use('hflx_prec_cea') )   & 
     1752            & CALL iom_put( 'hflx_prec_cea', ztprecip * zcptn(:,:) * tmask(:,:,1) * p_frld(:,:) )   ! heat content flux from all precip  (cell avg) 
     1753         IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') )   & 
     1754            & ztmp(:,:) = frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) 
    17331755         IF( iom_use('evap_ao_cea'  ) )   & 
    1734             &  CALL iom_put( 'evap_ao_cea'  ,   frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:)                )  ! ice-free oce evap (cell average) 
     1756            &  CALL iom_put( 'evap_ao_cea'  , ztmp * tmask(:,:,1)                  )   ! ice-free oce evap (cell average) 
    17351757         IF( iom_use('hflx_evap_cea') )   & 
    1736             &  CALL iom_put( 'hflx_evap_cea', ( frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) ) * zcptn(:,:) )  ! heat flux from from evap (cell average) 
     1758            &  CALL iom_put( 'hflx_evap_cea', ztmp(:,:) * zcptn(:,:) * tmask(:,:,1) )   ! heat flux from from evap (cell average) 
    17371759      CASE( 'oce and ice' )   ! received fields: jpr_sbpr, jpr_semp, jpr_oemp, jpr_ievp 
    17381760         zemp_tot(:,:) = p_frld(:,:) * frcv(jpr_oemp)%z3(:,:,1) + zicefr(:,:) * frcv(jpr_sbpr)%z3(:,:,1) 
     
    17981820      ! runoffs and calving (put in emp_tot) 
    17991821      IF( srcv(jpr_rnf)%laction )   rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 
     1822      IF( iom_use('hflx_rnf_cea') )   & 
     1823         CALL iom_put( 'hflx_rnf_cea' , rnf(:,:) * zcptn(:,:) ) 
    18001824      IF( srcv(jpr_cal)%laction ) THEN  
    18011825         zemp_tot(:,:) = zemp_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) 
Note: See TracChangeset for help on using the changeset viewer.