Opened 4 weeks ago

Closed 4 weeks ago

Last modified 3 weeks ago

#277 closed Support (fixed)

trouble understanding init_domainfill.f90

Reported by: nehstand Owned by:
Priority: minor Milestone:
Component: FP coding/compilation Version: FLEXPART 10.4
Keywords: Cc:

Description (last modified by pesei)

Hello,

I am trying to understand the initialization of particles in init_domainfill.f90. I'm having trouble understanding the following lines (54 to 57) :

  nx_we(1)=max(int(xpoint1(1)),0)
  nx_we(2)=min((int(xpoint2(1))+1),nxmin1)
  ny_sn(1)=max(int(ypoint1(1)),0)
  ny_sn(2)=min((int(ypoint2(1))+1),nymin1)

As far as I understand nx_we, ny_sn are the grid indices for western, eastern, southern and northern boundary of the release domain.

My question is the following : what happens if one of the longitudes and/or latitudes bounding the domain are negative? That is if one of xpoint1, xpoint2, ypoint1, ypoint2 < 0 ?
It seems to me that these code lines restrict our domain to positive values. However, I know from experience, when using Flexpart, that there is no such restriction.

Thank you in advance!

Attachments (2)

init_domainfill.f90 (15.1 KB) - added by nehstand 4 weeks ago.
init_domainfill.2.f90 (14.5 KB) - added by nehstand 4 weeks ago.

Download all attachments as: .zip

Change History (5)

Changed 4 weeks ago by nehstand

Changed 4 weeks ago by nehstand

comment:1 Changed 4 weeks ago by ignacio

The indices of the Flexpart internal grid are nonnegative.
Geographical input coordinates are converted to this internal grid in order to perform the calculations.
For example, the RELEASES coordinates are converted in lines 34-39 of subroutine coordtrafo.


do i=1,numpoint
    xpoint1(i)=(xpoint1(i)-xlon0)/dx
    xpoint2(i)=(xpoint2(i)-xlon0)/dx
    ypoint1(i)=(ypoint1(i)-ylat0)/dy
    ypoint2(i)=(ypoint2(i)-ylat0)/dy
end do
Last edited 3 weeks ago by pesei (previous) (diff)

comment:2 Changed 4 weeks ago by ignacio

  • Priority changed from major to minor
  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 3 weeks ago by pesei

  • Description modified (diff)
Note: See TracTickets for help on using tickets.
hosted by ZAMG