Ignore:
Timestamp:
Nov 21, 2019, 4:43:45 PM (5 years ago)
Author:
lguez
Message:

Merge revisions 3427:3600 of trunk into branch Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/phylmd/atm2geo.F90

    r2429 r3605  
    55  USE dimphy
    66  USE mod_phys_lmdz_para
     7  USE mod_grid_phy_lmdz, only: grid_type, unstructured, regular_lonlat
    78  IMPLICIT NONE
    89  INCLUDE 'YOMCST.h'
     10
     11  CHARACTER (len = 6)                :: clmodnam
     12  CHARACTER (len = 20)               :: modname = 'atm2geo'
     13  CHARACTER (len = 80)               :: abort_message
     14
    915!
    1016! Change wind local atmospheric coordinates to geocentric
    1117!
     18! Geocentric :
     19! axe x is eastward : crosses (0 N, 0 E) point.
     20! axe y crosses (0 N, 90 E) point.
     21! axe z is 'up' : crosses north pole
    1222  INTEGER, INTENT (in)                 :: im, jm
    13   REAL, DIMENSION (im,jm), INTENT (in) :: pte, ptn
     23  REAL, DIMENSION (im,jm), INTENT (in) :: pte  ! Eastward vector component
     24  REAL, DIMENSION (im,jm), INTENT (in) :: ptn  ! Northward vector component
    1425  REAL, DIMENSION (im,jm), INTENT (in) :: plon, plat
    15   REAL, DIMENSION (im,jm), INTENT(out) :: pxx, pyy, pzz
    16  
    17   REAL :: rad
    18 
     26  REAL, DIMENSION (im,jm), INTENT(out) :: pxx, pyy, pzz  ! Component in the geocentric referential
     27  REAL :: rad, reps
    1928
    2029  rad = rpi / 180.0E0
     30  reps = 1.0e-5
    2131 
    2232  pxx(:,:) = &
     
    3141       + ptn(:,:) * COS(rad * plat (:,:))
    3242 
    33 ! Value at North Pole 
    34   IF (is_north_pole_dyn) THEN
    35      pxx(:, 1) = - pte (1, 1)
    36      pyy(:, 1) = - ptn (1, 1)
    37      pzz(:, 1) = pzz(1,1)
    38   ENDIF
     43  IF (grid_type==regular_lonlat) THEN
     44  ! Value at North Pole 
     45    IF (is_north_pole_dyn) THEN
     46       pxx(:, 1) = - pte (1, 1)
     47       pyy(:, 1) = - ptn (1, 1)
     48       pzz(:, 1) = pzz(1,1) ! => 0
     49    ENDIF
    3950
    40 ! Value at South Pole
    41   IF (is_south_pole_dyn) THEN
    42      pxx(:,jm) = pxx(1,jm)
    43      pyy(:,jm) = pyy(1,jm)
    44      pzz(:,jm) = pzz(1,jm)
    45   ENDIF
     51  ! Value at South Pole
     52    IF (is_south_pole_dyn) THEN
     53      pxx(:,jm) = pxx(1,jm)
     54       pyy(:,jm) = pyy(1,jm)
     55       pzz(:,jm) = pzz(1,jm) ! => 0
     56    ENDIF
     57 
     58  ELSE IF (grid_type==unstructured) THEN
     59     ! Pole nord pour Dynamico
     60     WHERE ( plat(:,:) >= 90.0d+0-reps )
     61        pxx (:,:) = -ptn (:,:)
     62        pyy (:,:) =  pte (:,:)
     63        pzz (:,:) =  0.0e0
     64     END WHERE
     65
     66  ELSE
     67     abort_message='Problem: unknown grid type'
     68     CALL abort_physic(modname,abort_message,1)
     69  END IF
     70
    4671 
    4772END SUBROUTINE atm2geo
Note: See TracChangeset for help on using the changeset viewer.