Changeset 2930 for trunk/LMDZ.MARS
- Timestamp:
- Apr 2, 2023, 9:08:46 PM (20 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2929 r2930 3976 3976 Replicate Venus commits r2927 and r2928 for Mars photochemistry : 3977 3977 Correction of the reaction N2+ + e- > N + N 3978 3979 == 02/04/2023 == EM 3980 Adapt topmons_setup to handle both cartesian and icosahedral grids -
trunk/LMDZ.MARS/libf/phymars/topmons_mod.F90
r2826 r2930 989 989 use comcstfi_h,only: pi,g 990 990 use planetwide_mod,only: planetwide_maxval, planetwide_minval 991 use mod_grid_phy_lmdz, only: nvertex !number of encompassing vertex 991 992 use geometry_mod,only: longitude_deg,latitude_deg,& 992 boundslon,boundslat !boundslon/lat(ngrid,4) : 993 boundslon,boundslat ! if nvertex==4 then we have 994 ! boundslon/lat(ngrid,4) : 993 995 ! |------------------------------| 994 996 ! |north_west=2 north_east=1| … … 998 1000 ! |south_west=3 south_east=4| 999 1001 ! |------------------------------| 1002 ! if nvertex==6 (isocahedral grid) 1003 ! there is no dedicated ordering 1000 1004 1001 1005 implicit none … … 1022 1026 -44.8,-32.1,-21.1,26.8/ 1023 1027 integer,parameter :: ntop = 19 ! the topmons scheme is limited to the first ntop mounts 1024 real :: boundslon_deg( 4),boundslat_deg(4)1028 real :: boundslon_deg(nvertex),boundslat_deg(nvertex) 1025 1029 real :: hmax,hmin 1030 real :: minlon,maxlon ! min/max encompassing vertex longitude (deg) 1031 real :: minlat,maxlat ! min/max encompassing vertex latitude (deg) 1026 1032 integer :: ig,itop 1027 1033 … … 1040 1046 boundslon_deg(:)=boundslon(ig,:)/pi*180. 1041 1047 boundslat_deg(:)=boundslat(ig,:)/pi*180. 1048 1049 minlon=minval(boundslon_deg) 1050 maxlon=maxval(boundslon_deg) 1051 minlat=minval(boundslat_deg) 1052 maxlat=maxval(boundslat_deg) 1042 1053 1043 1054 do itop=1,ntop 1044 if ( (lon_top(itop).gt.boundslon_deg(2)).and.(lon_top(itop).lt.boundslon_deg(1))&1045 .and.(lat_top(itop).gt.boundslat_deg(3)).and.(lat_top(itop).lt.boundslat_deg(2))) then1055 if ((lon_top(itop).ge.minlon).and.(lon_top(itop).le.maxlon).and. & 1056 (lat_top(itop).ge.minlat).and.(lat_top(itop).le.maxlat)) then 1046 1057 contains_mons(ig)=.true. 1047 write(*,*) "topmons_setup: Found a mount at:" 1048 write(*,*) "(",boundslon_deg(2),",",boundslat_deg(2),") (",boundslon_deg(1),",",boundslat_deg(1),")" 1049 write(*,*) " ((",lon_top(itop),",",lat_top(itop),"))" 1050 write(*,*) "(",boundslon_deg(3),",",boundslat_deg(3),") (",boundslon_deg(4),",",boundslat_deg(4),")" 1058 write(*,*) "topmons_setup: Found a mount for ig:",ig 1059 write(*,*) " at : lon=",longitude_deg(ig)," lat=",latitude_deg(ig) 1060 if (nvertex==4) then 1061 write(*,*) "(",boundslon_deg(2),",",boundslat_deg(2),") (",boundslon_deg(1),",",boundslat_deg(1),")" 1062 write(*,*) " ((",lon_top(itop),",",lat_top(itop),"))" 1063 write(*,*) "(",boundslon_deg(3),",",boundslat_deg(3),") (",boundslon_deg(4),",",boundslat_deg(4),")" 1064 endif 1051 1065 endif 1052 enddo 1053 enddo 1066 enddo ! of do itop=1,ntop 1067 enddo ! of do ig=1,ngrid 1054 1068 1055 1069 ! Compute alpha_hmons 1056 1070 call planetwide_maxval(hmons,hmax) 1057 1071 call planetwide_minval(hmons,hmin) 1072 1073 ! Add a sanity check in case there is no topography: 1074 if (hmin==hmax) then 1075 write(*,*) "topmons_setup: hmin=",hmin," hmax=",hmax 1076 write(*,*) "topmons_setup: thus no topflows !!!" 1077 contains_mons(:)=.false. 1078 endif 1079 1058 1080 do ig=1,ngrid 1059 1081 if (contains_mons(ig)) then … … 1070 1092 alpha_hmons(ig)= 0 1071 1093 endif 1072 enddo 1094 enddo ! of do ig=1,ngrid 1073 1095 1074 1096 ! Compute hsummit
Note: See TracChangeset
for help on using the changeset viewer.