Changeset 1920


Ignore:
Timestamp:
May 30, 2016 10:50:15 AM (8 years ago)
Author:
suehring
Message:

Avoid segmentation fault (see change in 1915) by different initialization of us instead of adding a very small number in the denominator

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/init_3d_model.f90

    r1919 r1920  
    1919! Current revisions:
    2020! ------------------
    21 !
     21! Initialize us with very small number to avoid segmentation fault during
     22! calculation of Obukhov length
    2223!
    2324! Former revisions:
     
    951952          ol    = ( zu(nzb+1) - zw(nzb) ) / zeta_min
    952953          ts    = 0.0_wp
    953           us    = 0.0_wp
     954!
     955!--       Very small number is required for calculation of Obukhov length
     956!--       at first timestep     
     957          us    = 1E-30_wp
    954958          usws  = 0.0_wp
    955959          uswst = top_momentumflux_u
  • palm/trunk/SOURCE/surface_layer_fluxes_mod.f90

    r1916 r1920  
    1919! Current revisions:
    2020! ------------------
    21 !
     21! Avoid segmentation fault (see change in 1915) by different initialization of
     22! us instead of adding a very small number in the denominator
    2223!
    2324! Former revisions:
     
    722723!--             consequence would result in very large shear stresses and very
    723724!--             small momentum fluxes (both are generally unrealistic).
    724                 IF ( ( z_mo / ( ol(j,i) + 1E-30_wp ) ) < zeta_min )  ol(j,i) = z_mo / zeta_min
    725                 IF ( ( z_mo / ( ol(j,i) + 1E-30_wp ) ) > zeta_max )  ol(j,i) = z_mo / zeta_max
    726 
     725                IF ( ( z_mo / ol(j,i) ) < zeta_min )  ol(j,i) = z_mo / zeta_min
     726                IF ( ( z_mo / ol(j,i) ) > zeta_max )  ol(j,i) = z_mo / zeta_max
    727727             ENDDO
    728728          ENDDO
Note: See TracChangeset for help on using the changeset viewer.