Consecutive Dry/Wet Days from Multi-Dimensional Data (.nc file) in Python (Part 3) | Python Tips

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

ความคิดเห็น • 20

  • @nkanyisombatha5384
    @nkanyisombatha5384 2 ปีที่แล้ว +2

    Excellent work. Thanks a lot.

  • @tolulopeadeliyi9242
    @tolulopeadeliyi9242 2 ปีที่แล้ว +2

    Perfect! Thank you so much. Very explanatory and easy to comprehend.

    • @meteodata
      @meteodata  2 ปีที่แล้ว +2

      Glad it is helpful.

  • @seyrammillicent1611
    @seyrammillicent1611 2 ปีที่แล้ว +2

    This is great. One of the programming vlogs with clear speech and clarity when teaching. Thank you Doc.

    • @meteodata
      @meteodata  2 ปีที่แล้ว +2

      Glad it was helpful!

  • @MelBanful
    @MelBanful 2 ปีที่แล้ว +2

    Thanks Dr. Aryee

    • @meteodata
      @meteodata  2 ปีที่แล้ว +2

      Glad it's helpful.

  • @barandiaye7377
    @barandiaye7377 2 ปีที่แล้ว +2

    thanks its very clear

    • @meteodata
      @meteodata  2 ปีที่แล้ว +2

      Glad it helped

  • @peterlesiba6885
    @peterlesiba6885 2 ปีที่แล้ว +1

    lovely videos Could you please collect chirp data and analyze rainfall extremes and rainy days. Thank you very much

  • @danielamponsah3155
    @danielamponsah3155 2 ปีที่แล้ว +2

    Good stuffs

    • @meteodata
      @meteodata  2 ปีที่แล้ว +2

      Thanks. Glad it's helpful.

  • @samatechnical4144
    @samatechnical4144 11 หลายเดือนก่อน +1

    thank you so much, is there any different between CDD and DSL (dry season length)? if yes how can i calculate the DSL?

    • @meteodata
      @meteodata  11 หลายเดือนก่อน +1

      Yes. CDD is the longest consecutive dry days, whereas DSL is the duration of the dry season, which implies you detect the start and end of the dry season based on some criteria and the length becomes the interval between it's onset and cessation. Hope this helps.

    • @samatechnical4144
      @samatechnical4144 11 หลายเดือนก่อน

      Thank you. I appreciate your comment. I built this function to calculate the DSL; please take a look.
      def dry_season_length(data_array, thresh=1):
      if len(data_array) == 0:
      return 0
      dry_season_lengths = []
      dry_season_start = None
      for i, value in enumerate(data_array):
      if value < thresh and dry_season_start is None:
      dry_season_start = i
      elif value >= thresh and dry_season_start is not None:
      dry_season_lengths.append(i - dry_season_start)
      dry_season_start = None
      if dry_season_start is not None:
      dry_season_lengths.append(len(data_array) - dry_season_start)
      return max(dry_season_lengths) if dry_season_lengths else 0
      @@meteodata

  • @平等地喷每一个润人
    @平等地喷每一个润人 10 หลายเดือนก่อน

    Hey I have an idea, can I use da.where(da>thresh).count('time') to calculate the num of cwd

  • @Dabblez
    @Dabblez 2 ปีที่แล้ว +1

    This is great! Thank you so much, did youre for loope to run through the arange take a long time? I am using 1901-2021 CRU data for precip and it has taken long hours.

    • @meteodata
      @meteodata  2 ปีที่แล้ว +1

      Are you executing that on a global dataset?

    • @Dabblez
      @Dabblez 2 ปีที่แล้ว +1

      @@meteodata I am yes

    • @meteodata
      @meteodata  2 ปีที่แล้ว +1

      @@Dabblez Exactly. Since it is a global dataset and the loop is on each grid (which would be affected by the grid sizes), it will take some time.
      An obvious alternative is to parse the inputs as a DataFrame and apply the function on the entire DataFrame which could save some time.
      We hope to put something together on that soon. Best wishes.