Ignore:
Timestamp:
Apr 20, 2021, 12:40:10 PM (4 years ago)
Author:
abierjon
Message:

Mars GCM:
Definition of mesh longitude boundaries in inigeomphy

  • at poles : west bound is set as -PI, east bound is set as PI (to ensure

that westbound < eastbound and that longitude values are
within [-PI;PI] and not [0;2PI]everywhere on the globe)

  • elsewhere : rectify the index for west bounds, and make a special case for

the west bound of the first longitude (-PI).
NB: thanks to the redundant point in longitude, there is no need
of such a special case for the east bound of the last longitude

AB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/dynphy_lonlat/inigeomphy_mod.F90

    r2471 r2500  
    120120    cufi_glo(1) = cu(1)
    121121    cvfi_glo(1) = cv(1)
    122     boundslonfi_glo(1,north_east)=0
    123     boundslatfi_glo(1,north_east)=PI/2
    124     boundslonfi_glo(1,north_west)=2*PI
    125     boundslatfi_glo(1,north_west)=PI/2
    126     boundslonfi_glo(1,south_west)=2*PI
    127     boundslatfi_glo(1,south_west)=rlatv(1)
    128     boundslonfi_glo(1,south_east)=0
    129     boundslatfi_glo(1,south_east)=rlatv(1)
     122    boundslonfi_glo(1,north_east)= PI
     123    boundslatfi_glo(1,north_east)= PI/2
     124    boundslonfi_glo(1,north_west)= -PI
     125    boundslatfi_glo(1,north_west)= PI/2
     126    boundslonfi_glo(1,south_west)= -PI
     127    boundslatfi_glo(1,south_west)= rlatv(1)
     128    boundslonfi_glo(1,south_east)= PI
     129    boundslatfi_glo(1,south_east)= rlatv(1)
    130130    DO j=2,jjm
    131131      DO i=1,iim
     
    137137        boundslonfi_glo(k,north_east)=rlonu(i)
    138138        boundslatfi_glo(k,north_east)=rlatv(j-1)
    139         boundslonfi_glo(k,north_west)=rlonu(i+1)
     139        if (i.eq.1) then
     140          ! special case for the first longitude's west bound
     141          boundslonfi_glo(k,north_west)=rlonu(iim)-2*PI
     142          boundslonfi_glo(k,south_west)=rlonu(iim)-2*PI
     143        else
     144          boundslonfi_glo(k,north_west)=rlonu(i-1)
     145          boundslonfi_glo(k,south_west)=rlonu(i-1)
     146        endif
    140147        boundslatfi_glo(k,north_west)=rlatv(j-1)
    141         boundslonfi_glo(k,south_west)=rlonu(i+1)
    142148        boundslatfi_glo(k,south_west)=rlatv(j)
    143149        boundslonfi_glo(k,south_east)=rlonu(i)
     
    150156    cufi_glo(klon_glo) = cu((iim+1)*jjm+1)
    151157    cvfi_glo(klon_glo) = cv((iim+1)*jjm-iim)
    152     boundslonfi_glo(klon_glo,north_east)= 0
     158    boundslonfi_glo(klon_glo,north_east)= PI
    153159    boundslatfi_glo(klon_glo,north_east)= rlatv(jjm)
    154     boundslonfi_glo(klon_glo,north_west)= 2*PI
     160    boundslonfi_glo(klon_glo,north_west)= -PI
    155161    boundslatfi_glo(klon_glo,north_west)= rlatv(jjm)
    156     boundslonfi_glo(klon_glo,south_west)= 2*PI
     162    boundslonfi_glo(klon_glo,south_west)= -PI
    157163    boundslatfi_glo(klon_glo,south_west)= -PI/2
    158     boundslonfi_glo(klon_glo,south_east)= 0
    159     boundslatfi_glo(klon_glo,south_east)= -Pi/2
     164    boundslonfi_glo(klon_glo,south_east)= PI
     165    boundslatfi_glo(klon_glo,south_east)= -PI/2
    160166
    161167    ! build airefi(), mesh area on physics grid
Note: See TracChangeset for help on using the changeset viewer.