Changeset 2718 for LMDZ5/trunk


Ignore:
Timestamp:
Nov 29, 2016, 4:03:12 PM (8 years ago)
Author:
fhourdin
Message:

Correction de bug : (:) -> (1:knon) ou (1:klon) suivant les tableaux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/surf_ocean_mod.F90

    r2538 r2718  
    104104!
    105105!******************************************************************************
    106     radsol(:) = 0.0
     106    radsol(1:knon) = 0.0
    107107    radsol(1:knon) = swnet(1:knon) + lwnet(1:knon)
    108108
     
    118118! Si on suit les formulations par exemple de Tessel, on
    119119! a z0h=0.4*nu/u*, z0q=0.62*nu/u*, d'ou f_z0qh_oce=0.62/0.4=1.55
    120        cdragq(:)=cdragh(:)*                                      &
    121        log(z1lay(:)/z0h(:))/log(z1lay(:)/(f_z0qh_oce*z0h(:)))
     120       cdragq(1:knon)=cdragh(1:knon)*                                      &
     121       log(z1lay(1:knon)/z0h(1:knon))/log(z1lay(1:knon)/(f_z0qh_oce*z0h(1:knon)))
    122122    ELSE
    123        cdragq(:)=cdragh(:)
     123       cdragq(1:knon)=cdragh(1:knon)
    124124    ENDIF
    125125
     
    169169!******************************************************************************
    170170    IF (type_ocean.NE.'slab') THEN
    171         lmt_bils(:)=0.
     171        lmt_bils(1:knon)=0.
    172172        DO i=1,knon
    173173           lmt_bils(knindex(i))=(swnet(i)+lwnet(i)+fluxsens(i)+fluxlat(i)) &
     
    189189!--ad-hoc correction for model radiative balance tuning
    190190!--now outside alboc_cd routine
    191        alb_eau(:) = fmagic*alb_eau(:) + pmagic
    192        alb_eau=MIN(MAX(alb_eau,0.0),1.0)
     191       alb_eau(1:klon) = fmagic*alb_eau(1:klon) + pmagic
     192       alb_eau(1:klon)=MIN(MAX(alb_eau(1:klon),0.0),1.0)
    193193!
    194194    ELSE
     
    197197!--ad-hoc correction for model radiative balance tuning
    198198!--now outside alboc routine
    199        alb_eau(:) = fmagic*alb_eau(:) + pmagic
    200        alb_eau=MIN(MAX(alb_eau(i),0.04),0.60)
     199       alb_eau(1:klon) = fmagic*alb_eau(1:klon) + pmagic
     200       alb_eau(1:klon)=MIN(MAX(alb_eau(1:klon),0.04),0.60)
    201201!
    202202    ENDIF
     
    209209!IM 09122015 next line corresponds to the old way of doing in LMDZ5A/IPSLCM5A versions
    210210!albedo for diffuse radiation is taken the same as for direct radiation
    211      alb_dif_new=alb_dir_new
     211     alb_dif_new(1:knon,:)=alb_dir_new(1:knon,:)
    212212!IM 09122015 end
    213213!
     
    219219!
    220220!--ad-hoc correction for model radiative balance tuning
    221     alb_dir_new(:,:) = fmagic*alb_dir_new(:,:) + pmagic
    222     alb_dir_new=MIN(MAX(alb_dir_new,0.0),1.0)
    223     alb_dif_new=MIN(MAX(alb_dif_new,0.0),1.0)
     221    alb_dir_new(1:knon,:) = fmagic*alb_dir_new(1:knon,:) + pmagic
     222    alb_dir_new(1:knon,:)=MIN(MAX(alb_dir_new(1:knon,:),0.0),1.0)
     223    alb_dif_new(1:knon,:)=MIN(MAX(alb_dif_new(1:knon,:),0.0),1.0)
    224224!
    225225ENDIF
Note: See TracChangeset for help on using the changeset viewer.