- Timestamp:
- Dec 6, 2022, 12:01:16 AM (21 months ago)
- Location:
- LMDZ6/branches/Ocean_skin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Ocean_skin
- Property svn:mergeinfo changed
-
LMDZ6/branches/Ocean_skin/libf/dynphy_lonlat/phylmd/init_ssrf_m.F90
r2798 r4368 3 3 !******************************************************************************* 4 4 5 USE indice_sol_mod, ONLY: is_ter, is_oce, is_oce, is_lic, epsfra5 USE indice_sol_mod, ONLY: is_ter, is_oce, is_oce, is_lic, epsfra 6 6 USE dimphy, ONLY: klon, zmasq 7 7 USE phys_state_var_mod, ONLY: pctsrf 8 USE geometry_mod, ONLY : longitude_deg, latitude_deg8 USE geometry_mod, ONLY : longitude_deg, latitude_deg 9 9 USE grid_atob_m, ONLY: grille_m 10 10 USE ioipsl, ONLY: flininfo, flinopen, flinget, flinclo 11 11 USE ioipsl_getin_p_mod, ONLY: getin_p 12 USE comconst_mod, ONLY: im, pi 12 USE comconst_mod, ONLY: im, pi 13 USE surface_data, ONLY: landice_opt 13 14 14 15 CHARACTER(LEN=256), PARAMETER :: icefname="landiceref.nc", icevar="landice" … … 58 59 ! Sub-surfaces initialization 59 60 !******************************************************************************* 60 !--- Read and interpolate on model T-grid soil fraction and soil ice fraction. 61 CALL flininfo(icefname, iml_lic, jml_lic, llm_tmp, ttm_tmp, fid) 62 ALLOCATE(lat_lic(iml_lic,jml_lic),lon_lic(iml_lic,jml_lic)) 63 ALLOCATE(fraclic(iml_lic,jml_lic)) 64 CALL flinopen(icefname, .FALSE., iml_lic, jml_lic, llm_tmp, & 65 & lon_lic, lat_lic, lev, ttm_tmp, itaul, date, dt, fid) 66 CALL flinget(fid, icevar, iml_lic, jml_lic, llm_tmp, ttm_tmp, 1,1, fraclic) 67 CALL flinclo(fid) 68 WRITE(lunout,*)'landice dimensions: iml_lic, jml_lic : ',iml_lic,jml_lic 61 IF (landice_opt .LT. 2) THEN 62 ! Continue with reading landice.nc file 63 WRITE(lunout,*)"Read landice.nc file to attribute is_lic fraction" 69 64 70 ALLOCATE(dlon_lic(iml_lic),dlat_lic(jml_lic)) 71 dlon_lic(:)=lon_lic(:,1); IF(MAXVAL(dlon_lic)>pi) dlon_lic=dlon_lic*pi/180. 72 dlat_lic(:)=lat_lic(1,:); IF(MAXVAL(dlat_lic)>pi) dlat_lic=dlat_lic*pi/180. 73 DEALLOCATE(lon_lic,lat_lic); ALLOCATE(flic_tmp(iip1,jjp1)) 74 CALL grille_m(dlon_lic,dlat_lic,fraclic,rlonv(1:iim),rlatu,flic_tmp(1:iim,:)) 75 flic_tmp(iip1,:)=flic_tmp(1,:) 76 77 !--- To the physical grid 78 pctsrf(:,:) = 0. 79 CALL gr_dyn_fi(1, iip1, jjp1, klon, flic_tmp, pctsrf(:,is_lic)) 80 DEALLOCATE(flic_tmp) 81 82 !--- Adequation with soil/sea mask 83 WHERE(pctsrf(:,is_lic)<EPSFRA) pctsrf(:,is_lic)=0. 84 WHERE(zmasq(:)<EPSFRA) pctsrf(:,is_lic)=0. 85 pctsrf(:,is_ter)=zmasq(:) 86 DO ji=1,klon 87 IF(zmasq(ji)>EPSFRA) THEN 88 IF(pctsrf(ji,is_lic)>=zmasq(ji)) THEN 89 pctsrf(ji,is_lic)=zmasq(ji) 90 pctsrf(ji,is_ter)=0. 91 ELSE 92 pctsrf(ji,is_ter)=zmasq(ji)-pctsrf(ji,is_lic) 93 IF(pctsrf(ji,is_ter)<EPSFRA) THEN 94 pctsrf(ji,is_ter)=0. 95 pctsrf(ji,is_lic)=zmasq(ji) 96 END IF 97 END IF 98 END IF 99 END DO 100 101 102 !--- Option no_ter_antartique removes all land fractions souther than 60S. 103 !--- Land ice is set instead of the land fractions on these latitudes. 104 !--- The ocean and sea-ice fractions are not changed. 105 no_ter_antartique=.FALSE. 106 CALL getin_p('no_ter_antartique',no_ter_antartique) 107 WRITE(lunout,*)"no_ter_antartique=",no_ter_antartique 108 IF (no_ter_antartique) THEN 109 ! Remove all land fractions souther than 60S and set land-ice instead 110 WRITE(lunout,*) "Remove land fractions souther than 60deg south by increasing" 111 WRITE(lunout,*) "the continental ice fractions. No land can now be found at Antartic." 112 DO ji=1, klon 113 IF (latitude_deg(ji)<-60.0) THEN 114 pctsrf(ji,is_lic) = pctsrf(ji,is_lic) + pctsrf(ji,is_ter) 115 pctsrf(ji,is_ter) = 0 65 !--- Read and interpolate on model T-grid soil fraction and soil ice fraction. 66 CALL flininfo(icefname, iml_lic, jml_lic, llm_tmp, ttm_tmp, fid) 67 ALLOCATE(lat_lic(iml_lic,jml_lic),lon_lic(iml_lic,jml_lic)) 68 ALLOCATE(fraclic(iml_lic,jml_lic)) 69 CALL flinopen(icefname, .FALSE., iml_lic, jml_lic, llm_tmp, & 70 & lon_lic, lat_lic, lev, ttm_tmp, itaul, date, dt, fid) 71 CALL flinget(fid, icevar, iml_lic, jml_lic, llm_tmp, ttm_tmp, 1,1, fraclic) 72 CALL flinclo(fid) 73 WRITE(lunout,*)'landice dimensions: iml_lic, jml_lic : ',iml_lic,jml_lic 74 75 ALLOCATE(dlon_lic(iml_lic),dlat_lic(jml_lic)) 76 dlon_lic(:)=lon_lic(:,1); IF(MAXVAL(dlon_lic)>pi) dlon_lic=dlon_lic*pi/180. 77 dlat_lic(:)=lat_lic(1,:); IF(MAXVAL(dlat_lic)>pi) dlat_lic=dlat_lic*pi/180. 78 DEALLOCATE(lon_lic,lat_lic); ALLOCATE(flic_tmp(iip1,jjp1)) 79 CALL grille_m(dlon_lic,dlat_lic,fraclic,rlonv(1:iim),rlatu,flic_tmp(1:iim,:)) 80 flic_tmp(iip1,:)=flic_tmp(1,:) 81 82 !--- To the physical grid 83 pctsrf(:,:) = 0. 84 CALL gr_dyn_fi(1, iip1, jjp1, klon, flic_tmp, pctsrf(:,is_lic)) 85 DEALLOCATE(flic_tmp) 86 87 !--- Adequation with soil/sea mask 88 WHERE(pctsrf(:,is_lic)<EPSFRA) pctsrf(:,is_lic)=0. 89 WHERE(zmasq(:)<EPSFRA) pctsrf(:,is_lic)=0. 90 pctsrf(:,is_ter)=zmasq(:) 91 DO ji=1,klon 92 IF(zmasq(ji)>EPSFRA) THEN 93 IF(pctsrf(ji,is_lic)>=zmasq(ji)) THEN 94 pctsrf(ji,is_lic)=zmasq(ji) 95 pctsrf(ji,is_ter)=0. 96 ELSE 97 pctsrf(ji,is_ter)=zmasq(ji)-pctsrf(ji,is_lic) 98 IF(pctsrf(ji,is_ter)<EPSFRA) THEN 99 pctsrf(ji,is_ter)=0. 100 pctsrf(ji,is_lic)=zmasq(ji) 101 END IF 102 END IF 116 103 END IF 117 104 END DO 105 106 107 !--- Option no_ter_antartique removes all land fractions souther than 60S. 108 !--- Land ice is set instead of the land fractions on these latitudes. 109 !--- The ocean and sea-ice fractions are not changed. 110 no_ter_antartique=.FALSE. 111 CALL getin_p('no_ter_antartique',no_ter_antartique) 112 WRITE(lunout,*)"no_ter_antartique=",no_ter_antartique 113 IF (no_ter_antartique) THEN 114 ! Remove all land fractions souther than 60S and set land-ice instead 115 WRITE(lunout,*) "Remove land fractions souther than 60deg south by increasing" 116 WRITE(lunout,*) "the continental ice fractions. No land can now be found at Antartic." 117 DO ji=1, klon 118 IF (latitude_deg(ji)<-60.0) THEN 119 pctsrf(ji,is_lic) = pctsrf(ji,is_lic) + pctsrf(ji,is_ter) 120 pctsrf(ji,is_ter) = 0 121 END IF 122 END DO 123 END IF 124 125 ELSE 126 ! landice_opt=2 and higher 127 WRITE(lunout,*) 'No landice is attributed is_lic sub-surface because landice_opt=2 or higher.' 128 WRITE(lunout,*) 'This means that the land model will handel land ice as well as all other land areas.' 129 pctsrf(:,is_ter) = zmasq(:) 130 pctsrf(:,is_lic) = 0.0 118 131 END IF 119 120 132 121 133 !--- Sub-surface ocean and sea ice (sea ice set to zero for start).
Note: See TracChangeset
for help on using the changeset viewer.