Skip to content
Snippets Groups Projects

Fix the automatic calculation of vertical profiles

Merged pascal-graf requested to merge correct_profilecalc into master
2 unresolved threads

When T and rh are only given as (1x2) array, i.e., bottom and top value of the profile, a linear profile was taken to calculate the isotope profiles. The calculation was only correct, if profiles of T and rh were used as input. This behavior doesn't make much sense, as it would require to pre-calculate the profiles with a Rayleigh ascent.

With this fix, profiles of T and rh are directly calculated with the rayleigh ascent. A linear profile for these variables is only calculated if namelist.profilecalc = 0

Edited by pascal-graf

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
377 if length(prof_T)==2
378 profiles.T=linspace(prof_T(1),prof_T(2),nstep);
379 else
380 if length(prof_T)~=nstep
381 fprintf('Error: Temperature profile has the wrong size!\n')
382 return
383 end
384 profiles.T=prof_T;
385 354 end
386 355
387 356
388 357 % Calculation of profiles
389 358 % -----------------------
390 359
391 % Calculate pressure profile
392 profiles.p(1)=namelist.p0;
  • 352 351 end
    353 352 profiles.dexcv=prof_dexc;
    354 353 end
    355 else
    356 % When Rayleigh ascent profile is allowed: Check if lenght of input
    357 % profile is 2
    358 if length(prof_deltaH)~=2
    359 fprintf('Error: deltaH profile has the wrong size!\n')
    360 return;
    361 end
    362 end
    363
    364 % Define linear profile of h if two values are given, take input profile
    365 % if its length corresponds to the length of z
    366 if length(prof_rh)==2
    367 profiles.h=linspace(prof_rh(1),prof_rh(2),nstep);
    • Author Developer

      The humidity and temperature profiles were defined as a linear profile, if only the boundary values were defined. This would require to calculate the Rayleigh profiles of T and h separately.

      This correction first allows to define the profiles of T and h by the Raiyleigh ascent. If namelist.profilecalc==0, the linear profiles are created afterwards, i.e., this code section is moved futher down

    • Please register or sign in to reply
  • pascal-graf changed the description

    changed the description

  • pascal-graf marked this merge request as ready

    marked this merge request as ready

  • Harald.Sodemann approved this merge request

    approved this merge request

  • Harald.Sodemann mentioned in commit c5f8352f

    mentioned in commit c5f8352f

  • Please register or sign in to reply
    Loading