[ncl-talk] Reading NSIDC sea ice motion binary (.bin format) data

Sourav Chatterjee srvsxc at outlook.com
Thu Jul 26 22:39:10 MDT 2018


Hi Will

I have seen this page. But the NSIDC sea-ice motion is in binary format, not nc. I was hoping if I can get any help on dealing with those.

Thanks
Sourav
________________________________
From: ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of ncl-talk-request at ucar.edu <ncl-talk-request at ucar.edu>
Sent: Thursday, July 26, 2018 6:00 PM
To: ncl-talk at ucar.edu
Subject: ncl-talk Digest, Vol 176, Issue 41

Send ncl-talk mailing list submissions to
        ncl-talk at ucar.edu

To subscribe or unsubscribe via the World Wide Web, visit
        http://mailman.ucar.edu/mailman/listinfo/ncl-talk
or, via email, send a message with subject or body 'help' to
        ncl-talk-request at ucar.edu

You can reach the person managing the list at
        ncl-talk-owner at ucar.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of ncl-talk digest..."


Today's Topics:

   1. Re: Reading NSIDC sea ice motion binary (.bin format)     data
      (Will Hobbs)
   2. ploting SLP from a regrid (SARA CORNEJO BUENO)
   3. Re: problem with ESFM mapping (Michele Petrini - CITG)


----------------------------------------------------------------------

Message: 1
Date: Thu, 26 Jul 2018 06:07:46 +0000
From: Will Hobbs <will.hobbs at utas.edu.au>
To: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] Reading NSIDC sea ice motion binary (.bin
        format) data
Message-ID: <4C384360-A016-4130-AA13-9BC917FF72FF at utas.edu.au>
Content-Type: text/plain; charset="utf-8"

Sourav

There?s an entire example page on the NCL help files on how to plot the NSIDC EASE grid.

http://www.ncl.ucar.edu/Applications/ease.shtml

This should resolve your cluelessness?.

Will

From: ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of Sourav Chatterjee <srvsxc at outlook.com>
Date: Thursday, 26 July 2018 at 4:03 PM
To: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Subject: [ncl-talk] Reading NSIDC sea ice motion binary (.bin format) data

Dear NCL users

Can anyone help me out with reading the NSIDC EASE-Grid Sea Ice Motion Vectors data (.bin format) in NCL.

I have not used this format earlier in NCL, so clueless about it. Any help is appreciated.

A sample data is attached. The data format can be found in http://nsidc.org/data/nsidc-0116/versions/3<http://nsidc.org/data/nsidc-0116/versions/3>
Polar Pathfinder Daily 25 km EASE-Grid Sea Ice Motion Vectors, Version 3 | National Snow and Ice Data Center<http://nsidc.org/data/nsidc-0116/versions/3>
Polar Pathfinder Daily 25 km EASE-Grid Sea Ice Motion Vectors, Version 3
nsidc.org<http://nsidc.org>



Thanks in advance
Sourav


University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180726/5682ecf3/attachment-0001.html>

------------------------------

Message: 2
Date: Thu, 26 Jul 2018 10:48:07 +0200
From: SARA CORNEJO BUENO <sarcorne at ucm.es>
To: ncl-talk at ucar.edu
Subject: [ncl-talk] ploting SLP from a regrid
Message-ID:
        <CANq32LVv_5BDRMQDycqr1RjPcsXs_BTaZO9VdaVP9hNVhpbF8g at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello,

I'm trying to make a sea level pressure plot from a Regrid; this is part of
the code

;;;;;; Set basic resources ;;;;;;
  res           = True
  res at MainTitle = "Sea Level Pressure_811"
  time                       = wrf_user_getvar(a,"time",-1) ; get all time
in the file
  ntime = dimsizes(time)
  do it = 0,ntime-1,1           ; TIME LOOP
  res at TimeLabel               = time(it)                  ; Set Valid time
to use on plots
;exit()
  ; Open workstation
  wks_type          = "png"
  wks_type at wkWidth  = 2000
  wks_type at wkHeight = 2000
  wks               = gsn_open_wks(wks_type, "/Volumes/SimuPlots/slp_811_"
+time(it)+ "")

  gsn_define_colormap(wks,"BlAqGrYeOrRe")
;exit()

;;;;;; Set plot and map resources ;;;;;;
  pltres = True
  mpres = True
  mpres at mpOutlineBoundarySets       = "National"
  mpres at mpDataBaseVersion           = "MediumRes"
  mpres at mpDataSetName               = "Earth..4"
  mpres at mpGeophysicalLineColor      = "Black"
  mpres at mpGeophysicalLineThicknessF = 4.0
;exit()
LON =a->longitude
;print(lon)
LAT=a->latitude
;print(lat)
LON = LON-360  ;as? son longitudes W
;print(LON)
LAT = LAT(::-1)     ; overwrite: reverse using NCL syntax (para recolocar
la latitud (tiene que estar S-N))
;exit()
  if (isvar("zoomCoords")) then
   ; lat2d = wrf_user_Agetvar(a,"latitude",0)
    ;lon2d = wrf_user_getvar(a,"longitude",0)
;exit()
    ; Coordenadas de la zona del mapa que quiero dibujar
    mpres at mpLimitMode = "Corners"
    mpres at mpLeftCornerLatF = zoomCoords(0)
    mpres at mpLeftCornerLonF = zoomCoords(1)
    mpres at mpRightCornerLatF = zoomCoords(2)
    mpres at mpRightCornerLonF = zoomCoords(3)
  end if
;exit()
  ; Get the variables

  slp = wrf_user_getvar(a,"SLP",it)
  slp at units ="hPa"


All goes right untill the following part:

the problem appears at the end, on this part of the code:

;;;;;; Plotting options for slp ;;;;;
    opts2 = res
    opts2 at cnLevelSelectionMode = "ExplicitLevels"
    opts2 at gsnContourLineThicknessesScale = 7.0
    opts2 at cnLineColor = "Blue"
    opts2 at cnLineLabelInterval        = 1             ; default = 2
    opts2 at cnLineLabelPlacementMode = "constant"
    opts2 at cnLineLabelDensityF = 2   ;densidad de info-boxes en una linea de
contorno
;    opts2 at cnLevels = (/ 980, 984, 988, 990, 994, 998, 1000, 1002, 1004,
1008, 1010, 1012, 1018, 1020, 1022 /)
    opts2 at ContourParameters = (/ 980, 1022, 2 /)
    opts2 at cnFillOn = False
    contour_slp = wrf_contour(a, wks, slp, opts2)
    delete(opts2)

It appears these warnings:

warning:Attempt to reference attribute (TITLE) which is undefined

warning:Attempt to reference attribute (DX) which is undefined

warning:Attempt to reference attribute (WEST-EAST_GRID_DIMENSION) which is
undefined

warning:Attempt to reference attribute (SOUTH-NORTH_GRID_DIMENSION) which
is undefined

warning:Attempt to reference attribute (BOTTOM-TOP_GRID_DIMENSION) which is
undefined


The code continues like this

    ; MAKE PLOTS
    if (isvar("zoomCoords")) then
      pltres at LatLonOverlay = True
    end if
    plot = wrf_map_overlays(a, wks, (/contour_slp/), pltres, mpres)

  end do ; TIME LOOP
;end do ; DAY LOOP
end
And then the error says:

(0) wrf_map: Error: no MAP_PROJ attribute in input file

fatal:overlay: missing value as input, can't continue

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 83 in file
Plot_SLP_simus.ncl,


line 83 corresponds to:


 plot = wrf_map_overlays(a, wks, (/contour_slp/), pltres, mpres)


What I could understand is that, now, I don't have LAT and LONG
coordinates, but grid points. But I don't know how to call them.

Thank you very much in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180726/3d2947da/attachment-0001.html>

------------------------------

Message: 3
Date: Thu, 26 Jul 2018 14:00:31 +0000
From: Michele Petrini - CITG <M.Petrini at tudelft.nl>
To: Dennis Shea <shea at ucar.edu>
Cc: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] problem with ESFM mapping
Message-ID: <910ABA19-B9CC-4FE6-B461-40F8AB8FDDD8 at tudelft.nl>
Content-Type: text/plain; charset="utf-8"

Dear Dennis,
thanks for the reply.

A fist immediate difference I saw was the output of gcc ?version. By combining alias and export path, I managed to obtain

laptop-petrini:ESFM_regrid michele$ gcc --version
gcc-7 (Homebrew GCC 7.3.0) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

laptop-petrini:ESFM_regrid michele$ uname -a
Darwin laptop-petrini.grs.vrlab.tudelft.nl<http://laptop-petrini.grs.vrlab.tudelft.nl> 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar  5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64


But I still get the same error - I really don?t understand why.

Right now, the only differences between my output and your output is the Kernel version (I have 17.5, you have 17.7) and the gcc version (I have 7.3.0, you have 6.2.0).

Please note that I installed gcc-7 because with ncl 6.5.0 I was getting an error re the fortran library libgfortran.4.dylib, which is not included in gcc-6 - that?s another difference.

any thoughts on that?

thanks,
Michele


******************************************************************
Michele Petrini, PhD

Department of Geoscience and Remote Sensing, TUDelft
Delft, The Netherlands

M.Petrini at tudelft.nl<mailto:M.Petrini at tudelft.nl>
+39 3398367372
michele.petrins (Skype alias)



On 26 Jul 2018, at 03:19, Dennis Shea <shea at ucar.edu<mailto:shea at ucar.edu>> wrote:

Hi Michele,

I just ran the example on my MAC with no problems using 6.5.0 and had no problem.

THX for including the output from your mchine (appended at the end of this email.)
Perhaps there is a setup issue. Unfortunately, I am not knowledgeable enough about
these types of thing. Hopefully, someone will chime in.

%> ncl ESMF_regrid_1.ncl

-rw-r--r--  1 shea  2200     6840 Jul 25 20:56 ESMF_regrid_1.ncl<http://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_1.ncl>
-rw-r--r--  1 shea  2200    50104 Jul 25 20:58 sst.nc<http://sst.nc/>
-rw-r--r--  1 shea  2200   973768 Jul 25 21:00 source_grid_file.nc<http://source_grid_file.nc/>
-rw-r--r--  1 shea  2200   151908 Jul 25 21:00 destination_grid_file.nc<http://destination_grid_file.nc/>
-rw-r--r--  1 shea  2200      231 Jul 25 21:00 PET0.RegridWeightGen.Log
-rw-r--r--  1 shea  2200  1644652 Jul 25 21:00 NCEP_2_Rect.nc
-rw-r--r--  1 shea  2200     9424 Jul 25 21:00 sst_regrid.nc<http://sst_regrid.nc/>
-rw-r--r--  1 shea  2200   215451 Jul 25 21:00 ESMF_regrid.png

I am attaching to output from

%> ncdump -h sst.nc<http://sst.nc/>  >! out.ncdump_sst.txt

and the ESMF_regrid..png   file

Your MAC:

laptop-petrini:Downloads michele$ uname -a
Darwin Micheles-MacBook-Pro.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar  5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.25.5)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin


My MAC:

%> uname -a
Darwin sherkin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

%> gcc --version
gcc (GCC) 6.2.0




On Wed, Jul 25, 2018 at 7:45 AM, Michele Petrini - CITG <M.Petrini at tudelft.nl<mailto:M.Petrini at tudelft.nl>> wrote:
Dear ncl helpdesk,

I am trying to remap ocean data from a global rectlinear grid to the CISM Greenland grid using ncl.

As a fist step, I am trying to run ESMF_regrid_1.ncl<https://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_1.ncl> from https://www.ncl.ucar.edu/Applications/ESMF.shtml.

I get the following error

sh: line 1: 33907 Abort trap: 6           ESMF_RegridWeightGen --help > /dev/null 2>&1
(0) ESMF_regrid_gen_weights: could not find ESMF_RegridWeightGen executable.

and I don?t understand why.

I am trying to run the script using ncl version 6.5.0 (installed gcc-8) - but I had same problem with older ncl version (for which I had to load di ESFM_regrid module).

What I am doing wrong?

thanks,
M

******************************************************************
Michele Petrini, PhD

Department of Geoscience and Remote Sensing, TUDelft
Delft, The Netherlands

M.Petrini at tudelft.nl<mailto:M.Petrini at tudelft.nl>
+39 3398367372
michele.petrins (Skype alias)




_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


<out.ncdump_sst.txt><ESMF_regrid.png>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180726/69cf8ae1/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


------------------------------

End of ncl-talk Digest, Vol 176, Issue 41
*****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180727/ffdcefc9/attachment-0001.html>


More information about the ncl-talk mailing list