Changeset 2502


Ignore:
Timestamp:
Apr 22, 2021, 12:06:10 PM (4 years ago)
Author:
jnaar
Message:

icelocationmode=4 now default in surfini.F
This option uses predefined 64x48 water caps for every resolution
JN

Location:
trunk/LMDZ.MARS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2501 r2502  
    33293329  where the addition of a dynamical timestep is no longer needed
    33303330 
     3331== 22/04/2021 == JN
     3332- Adding a new option for icelocationmode in surfini.F, which uses the
     3333  predefined 64x48 water caps for any resolution. Now default option
     3334  should be icelocationmode=4.
     3335
     3336
  • trunk/LMDZ.MARS/libf/phymars/surfini.F

    r2311 r2502  
    44      use netcdf
    55      use tracer_mod, only: nqmx, noms
    6       use geometry_mod, only: longitude, latitude ! in radians
     6      use geometry_mod, only: longitude, latitude, ! in radians
     7     &                     cell_area ! for watercaptag diagnosis
    78      use surfdat_h, only: watercaptag, frost_albedo_threshold,
    89     &                     albedo_h2o_ice, inert_h2o_ice, albedodat,
     
    3637      LOGICAL, DIMENSION(100000) :: longwatercaptag
    3738     
    38 ! There are 3 different modes for ice distribution:
     39! There are 4 different modes for ice distribution:
    3940! icelocationmode = 1 ---> based on data from surface.nc
    4041! icelocationmode = 2 ---> directly predefined for GCM resolutions 32x24 or 64x48
    4142! icelocationmode = 3 ---> based on logical relations for latitude and longitude
     43! icelocationmode = 4 ---> predefined 64x48 but usable with every
     44! resolution, and easily adaptable for dynamico
    4245! For visualisation : > /u/tnalmd/bin/watercaps gcm_txt_output_file
    43       INTEGER,SAVE :: icelocationmode = 2
     46      INTEGER,SAVE :: icelocationmode = 4
    4447       
    4548       
     
    430433         end do ! of (klon_glo)
    431434
     435        ELSE IF (icelocationmode .eq. 4) THEN
     436     
     437         print*,'icelocationmode = 4'
     438         print*,'Surfini: ice caps defined using manual 64x48 settings'
     439         print*,'(although, it should work with any resolution)'
     440         call locate_watercaptag(klon_glo,lati_glo,
     441     &            long_glo,watercaptag_glo)
     442
     443!         print*,'watercaptag_glo(:), ',watercaptag_glo(:)
    432444
    433445        ELSE
    434446     
    435447         print*, 'In surfini.F, icelocationmode is ', icelocationmode
    436          print*, 'It should be 1, 2 or 3.'
     448         print*, 'It should be 1, 2, 3 or 4 (default is 4)'
    437449         call abort_physic("surfini","wrong icelocationmode",1)
    438450
     
    448460             print*,'surfini: ice water cap', lati_glo(ig)*180./pi,
    449461     &              long_glo(ig)*180./pi, ig
     462!             write(1,*),ig, lati_glo(ig)*180./pi,
     463!     &              cell_area(ig)
     464!             write(2,*), lati_glo(ig)*180./pi,
     465!     &              long_glo(ig)*180./pi,cell_area(ig)
     466!             write(3,*), ig, lati_glo(ig)*180./pi,
     467!     &              long_glo(ig)*180./pi,cell_area(ig)
    450468          endif
    451469        enddo
     
    464482! end of #else of #ifndef MESOSCALE
    465483#endif       
    466 
    467       END
     484!      END SUBROUTINE surfini(ngrid,piceco2,qsurf)
     485      END !SUBROUTINE surfini(ngrid,piceco2,qsurf)
     486
     487      SUBROUTINE locate_watercaptag(klon_glo,lati_glo,
     488     &            long_glo,watercaptag_glo)
     489
     490      USE comcstfi_h, ONLY: pi
     491
     492      integer, intent(in) :: klon_glo
     493      real, intent(in) :: lati_glo(klon_glo)
     494      real, intent(in) :: long_glo(klon_glo)
     495      logical, intent(out) :: watercaptag_glo(klon_glo)
     496      integer :: ig,i
     497!      real, dimension(klon_glo,120) :: wcap
     498      real, dimension(120,2) :: latedge
     499      real, dimension(120,2) :: lonedge
     500
     501! In icelocationmode=2 there are 120 manually predefined grid points where
     502! watercaptag is true (for the 64x48 resolution). The grid cells corners
     503! coordinates in latitude and longitude are written below. With this
     504! routine, we check if the grid cell center is in between any of those
     505! points. If so, watercaptag = true.
     506
     507
     508
     509
     510      latedge(:,1)=(/
     511     & 88.125, 84.375, 84.375, 84.375, 84.375, 84.375,84.375, 84.375,
     512     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     513     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     514     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     515     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     516     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     517     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     518     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     519     & 84.375, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625,
     520     & 80.625, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625,
     521     & 80.625, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625,
     522     & 80.625, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625,
     523     & 80.625, 80.625, 76.875, 76.875, 76.875, 76.875, 76.875, 76.875,
     524     & 76.875, 76.875, 76.875, 76.875, 76.875, 76.875, 76.875, 73.125,
     525     & 73.125, 73.125, 73.125, 73.125, 73.125, 73.125, 73.125, 73.125/)
     526
     527
     528      latedge(:,2)=(/
     529     & 90. , 88.125, 88.125, 88.125, 88.125, 88.125,88.125, 88.125,   
     530     & 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125,
     531     & 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125,
     532     & 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125,
     533     & 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125,
     534     & 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125,
     535     & 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125,
     536     & 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125, 88.125,
     537     & 88.125, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     538     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     539     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     540     & 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375, 84.375,
     541     & 84.375, 84.375, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625,
     542     & 80.625, 80.625, 80.625, 80.625, 80.625, 80.625, 80.625, 76.875,
     543     & 76.875, 76.875, 76.875, 76.875, 76.875, 76.875, 76.875, 76.875/)
     544
     545
     546      lonedge(:,1)=(/
     547     &-180.    , -180.    , -177.1875, -171.5625,-165.9375, -160.3125,
     548     &-154.6875, -149.0625, -143.4375, -137.8125, -132.1875,-126.5625,
     549     &-120.9375, -115.3125, -109.6875, -104.0625,  -98.4375, -92.8125,
     550     & -87.1875,  -81.5625,  -75.9375,  -70.3125,  -64.6875, -59.0625,
     551     & -53.4375,  -47.8125,  -42.1875,  -36.5625,  -30.9375, -25.3125,
     552     & -19.6875,  -14.0625,   -8.4375,   -2.8125,    2.8125,   8.4375,
     553     &  14.0625,   19.6875,   25.3125,   30.9375,   36.5625,  42.1875,
     554     &  47.8125,   53.4375,   59.0625,   64.6875,   70.3125,  75.9375,
     555     &  81.5625,   87.1875,   92.8125,   98.4375,  104.0625, 109.6875,
     556     & 115.3125,  120.9375,  126.5625,  132.1875,  137.8125, 143.4375,
     557     & 149.0625,  154.6875,  160.3125,  165.9375,  171.5625,-132.1875,
     558     &-126.5625, -120.9375, -115.3125, -109.6875, -104.0625, -98.4375,
     559     & -92.8125,  -87.1875,  -81.5625,  -75.9375,  -30.9375, -25.3125,
     560     & -19.6875,  -14.0625,   -8.4375,   -2.8125,    2.8125,   8.4375,
     561     &  14.0625,   19.6875,   25.3125,   30.9375,   36.5625,  42.1875,
     562     &  47.8125,   53.4375,   59.0625,   64.6875,   70.3125,  75.9375,
     563     &  81.5625,   87.1875, -149.0625, -137.8125, -126.5625,-115.3125,
     564     &  -8.4375,    2.8125,   14.0625,  115.3125,  126.5625, 137.8125,
     565     & 149.0625,  160.3125,  171.5625, -180.    , -132.1875,-109.6875,
     566     &  98.4375,  109.6875,  132.1875,  143.4375,  154.6875,165.9375/)
     567
     568      lonedge(:,2)=(/
     569     & 180.    , -180.    , -171.5625, -165.9375,-160.3125, -154.6875,
     570     &-149.0625,-143.4375, -137.8125, -132.1875, -126.5625, -120.9375,
     571     &-115.3125,-109.6875, -104.0625,  -98.4375,  -92.8125,  -87.1875,
     572     & -81.5625, -75.9375,  -70.3125,  -64.6875,  -59.0625,  -53.4375,
     573     & -47.8125, -42.1875,  -36.5625,  -30.9375,  -25.3125,  -19.6875,
     574     & -14.0625,  -8.4375,   -2.8125,    2.8125,    8.4375,   14.0625,
     575     &  19.6875,  25.3125,   30.9375,   36.5625,   42.1875,   47.8125,
     576     &  53.4375,  59.0625,   64.6875,   70.3125,   75.9375,   81.5625,
     577     &  87.1875,  92.8125,   98.4375,  104.0625,  109.6875,  115.3125,
     578     & 120.9375, 126.5625,  132.1875,  137.8125,  143.4375,  149.0625,
     579     & 154.6875, 160.3125,  165.9375,  171.5625,  177.1875, -126.5625,
     580     &-120.9375,-115.3125, -109.6875, -104.0625,  -98.4375,  -92.8125,
     581     & -87.1875, -81.5625,  -75.9375,  -70.3125,  -25.3125,  -19.6875,
     582     & -14.0625,  -8.4375,   -2.8125,    2.8125,    8.4375,   14.0625,
     583     &  19.6875,  25.3125,   30.9375,   36.5625,   42.1875,   47.8125,
     584     &  53.4375,  59.0625,   64.6875,   70.3125,   75.9375,   81.5625,
     585     &  87.1875,  92.8125, -143.4375, -132.1875, -120.9375, -109.6875,
     586     &  -2.8125,   8.4375,   19.6875,  120.9375,  132.1875,  143.4375,
     587     & 154.6875, 165.9375,  177.1875, -177.1875, -126.5625, -104.0625,
     588     & 104.0625, 115.3125,  137.8125,  149.0625,  160.3125,171.5625/)
     589
     590
     591      watercaptag_glo(:) = .false.
     592      DO ig=1, klon_glo
     593        DO i=1, 120
     594           if ((long_glo(ig)*180./pi.ge.lonedge(i,1))
     595     &         .and.(long_glo(ig)*180./pi.le.lonedge(i,2))
     596     &         .and.(lati_glo(ig)*180./pi.ge.latedge(i,1))
     597     &         .and.(lati_glo(ig)*180./pi.le.latedge(i,2))) then
     598             watercaptag_glo(ig) = .true.
     599           endif
     600        ENDDO !i=1, 120
     601      ENDDO ! ig=1, klon_glo
     602
     603      END SUBROUTINE locate_watercaptag
Note: See TracChangeset for help on using the changeset viewer.