Changeset 3895


Ignore:
Timestamp:
May 12, 2021, 9:58:07 AM (3 years ago)
Author:
Ehouarn Millour
Message:

Correction on the values of the longitude boundaries which were offset wrt scalar grid point longitudes.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dynphy_lonlat/inigeomphy_mod.F90

    r3435 r3895  
    9393  ALLOCATE(boundslat_reg(jjm+1,2))
    9494 
    95   DO i=1,iim
    96    boundslon_reg(i,east)=rlonu(i+1)
    97    boundslon_reg(i,west)=rlonu(i)
     95  ! specific handling of the -180 longitude scalar grid point boundaries
     96  boundslon_reg(1,east)=rlonu(1)
     97  boundslon_reg(1,west)=rlonu(iim)-2*PI
     98  DO i=2,iim
     99   boundslon_reg(i,east)=rlonu(i)
     100   boundslon_reg(i,west)=rlonu(i-1)
    98101  ENDDO
    99102
     
    124127    cufi_glo(1) = cu(1)
    125128    cvfi_glo(1) = cv(1)
    126     boundslonfi_glo(1,north_east)=0
     129    boundslonfi_glo(1,north_east)=PI
    127130    boundslatfi_glo(1,north_east)=PI/2
    128     boundslonfi_glo(1,north_west)=2*PI
     131    boundslonfi_glo(1,north_west)=-PI
    129132    boundslatfi_glo(1,north_west)=PI/2
    130     boundslonfi_glo(1,south_west)=2*PI
     133    boundslonfi_glo(1,south_west)=-PI
    131134    boundslatfi_glo(1,south_west)=rlatv(1)
    132     boundslonfi_glo(1,south_east)=0
     135    boundslonfi_glo(1,south_east)=PI
    133136    boundslatfi_glo(1,south_east)=rlatv(1)
    134137    DO j=2,jjm
     
    141144        boundslonfi_glo(k,north_east)=rlonu(i)
    142145        boundslatfi_glo(k,north_east)=rlatv(j-1)
    143         boundslonfi_glo(k,north_west)=rlonu(i+1)
     146        if (i.eq.1) then
     147          ! special case for the first longitude's west bound
     148          boundslonfi_glo(k,north_west)=rlonu(iim)-2*PI
     149          boundslonfi_glo(k,south_west)=rlonu(iim)-2*PI
     150        else
     151          boundslonfi_glo(k,north_west)=rlonu(i-1)
     152          boundslonfi_glo(k,south_west)=rlonu(i-1)
     153        endif
    144154        boundslatfi_glo(k,north_west)=rlatv(j-1)
    145         boundslonfi_glo(k,south_west)=rlonu(i+1)
    146155        boundslatfi_glo(k,south_west)=rlatv(j)
    147156        boundslonfi_glo(k,south_east)=rlonu(i)
     
    154163    cufi_glo(klon_glo) = cu((iim+1)*jjm+1)
    155164    cvfi_glo(klon_glo) = cv((iim+1)*jjm-iim)
    156     boundslonfi_glo(klon_glo,north_east)= 0
     165    boundslonfi_glo(klon_glo,north_east)= PI
    157166    boundslatfi_glo(klon_glo,north_east)= rlatv(jjm)
    158     boundslonfi_glo(klon_glo,north_west)= 2*PI
     167    boundslonfi_glo(klon_glo,north_west)= -PI
    159168    boundslatfi_glo(klon_glo,north_west)= rlatv(jjm)
    160     boundslonfi_glo(klon_glo,south_west)= 2*PI
     169    boundslonfi_glo(klon_glo,south_west)= -PI
    161170    boundslatfi_glo(klon_glo,south_west)= -PI/2
    162     boundslonfi_glo(klon_glo,south_east)= 0
     171    boundslonfi_glo(klon_glo,south_east)= PI
    163172    boundslatfi_glo(klon_glo,south_east)= -Pi/2
    164173
Note: See TracChangeset for help on using the changeset viewer.