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 11362 for NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icesbc.F90 – NEMO

Ignore:
Timestamp:
2019-07-29T13:54:58+02:00 (5 years ago)
Author:
clem
Message:

debug the ice output by adding a missing value to the outputed fields. Unfortunately this method imposes a value of 1.e20 where there is no ice, which is annoying when using ncview for example, but this is the only way (from what I know) to output averages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icesbc.F90

    r11317 r11362  
    114114      INTEGER, INTENT(in) ::   ksbc   ! flux formulation (user defined, bulk or Pure Coupled) 
    115115      ! 
    116       INTEGER  ::   ji, jj, jl                                ! dummy loop index 
    117       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky 
    118       REAL(wp), DIMENSION(jpi,jpj)     ::   zalb              ! 2D workspace 
     116      INTEGER  ::   ji, jj, jl      ! dummy loop index 
     117      REAL(wp) ::   zmiss_val       ! missing value retrieved from xios  
     118      REAL(wp), DIMENSION(jpi,jpj,jpl)              ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky 
     119      REAL(wp), DIMENSION(:,:)        , ALLOCATABLE ::   zalb, zmsk00      ! 2D workspace 
    119120      !!-------------------------------------------------------------------- 
    120121      ! 
     
    126127         WRITE(numout,*)'~~~~~~~~~~~~~~~' 
    127128      ENDIF 
     129 
     130      ! get missing value from xml 
     131      CALL iom_miss_val( "icethic", zmiss_val ) 
    128132 
    129133      ! --- cloud-sky and overcast-sky ice albedos --- ! 
     
    152156 
    153157      !--- output ice albedo and surface albedo ---! 
    154       IF( iom_use('icealb') ) THEN 
    155          WHERE( at_i_b <= epsi06 )   ;   zalb(:,:) = rn_alb_oce 
    156          ELSEWHERE                   ;   zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b 
     158      IF( iom_use('icealb') .OR. iom_use('albedo') ) THEN 
     159 
     160         ALLOCATE( zalb(jpi,jpj), zmsk00(jpi,jpj) ) 
     161 
     162         WHERE( at_i_b <= epsi06 ) 
     163            zmsk00(:,:) = 0._wp 
     164            zalb  (:,:) = rn_alb_oce 
     165         ELSEWHERE 
     166            zmsk00(:,:) = 1._wp             
     167            zalb  (:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b 
    157168         END WHERE 
    158          CALL iom_put( "icealb" , zalb(:,:) ) 
    159       ENDIF 
    160       IF( iom_use('albedo') ) THEN 
     169         ! ice albedo 
     170         CALL iom_put( "icealb" , zalb * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) 
     171         ! ice+ocean albedo 
    161172         zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) + rn_alb_oce * ( 1._wp - at_i_b ) 
    162          CALL iom_put( "albedo" , zalb(:,:) ) 
     173         CALL iom_put( "albedo" , zalb ) 
     174 
     175         DEALLOCATE( zalb, zmsk00 ) 
     176 
    163177      ENDIF 
    164178      ! 
Note: See TracChangeset for help on using the changeset viewer.