[MITgcm-support] MITgcm-support: python (smaeilpour)

Josué Martínez Moreno josue_pingu at ciencias.unam.mx
Fri Dec 16 11:57:26 EST 2016


Hi Saeid,

Before plotting the MITgcm outputs in python, you need to install the
package MITgcmutils located in
"/Path2MITgcm/MITgcm/utils/python/MITgcmutils/" by running:

*python setup.py install*

or just copy and paste the mds.py located in
"/Path2MITgcm/MITgcm/utils/python/MITgcmutils/MITgcmutils/" to your output
folder.

After this, you can write a script or in a python console write:

from pylab import *
from mds import *
temp=rdmds('U.0000000100')
pcolor(temp[:,50,:])
show()

Maybe if you plot a section of your interest like
http://mitgcm.org/public/pelican/online_documents/node9.html, you can find
an evidence of internal waves.
Otherwise you can set up your simulation to get the density anomaly (Check:
http://mitgcm.org/pipermail/mitgcm-support/2005-July/003250.html) like this
article:
http://nonlin-processes-geophys.net/17/575/2010/npg-17-575-2010.pdf

I hope this help you.
Thanks,
Josué.



On Fri, Dec 16, 2016 at 9:51 AM, <mitgcm-support-request at mitgcm.org> wrote:

> Send MITgcm-support mailing list submissions to
>         mitgcm-support at mitgcm.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mitgcm.org/mailman/listinfo/mitgcm-support
> or, via email, send a message with subject or body 'help' to
>         mitgcm-support-request at mitgcm.org
>
> You can reach the person managing the list at
>         mitgcm-support-owner at mitgcm.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of MITgcm-support digest..."
>
>
> Today's Topics:
>
>    1. python (smaeilpour)
>    2. weird temperature signal using 3D floats with the FLT package
>       (Steffie Ypma - CITG)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 16 Dec 2016 15:16:05 +0000 (UTC)
> From: smaeilpour <saeid_gal at yahoo.com>
> To: <mitgcm-support at mitgcm.org>
> Subject: [MITgcm-support] python
> Message-ID: <259517693.6254643.1481901365343 at mail.yahoo.com>
> Content-Type: text/plain; charset=UTF-8
>
> Hi,
> would you please tell me, how can i show data results below in python as
> plot or graph that they are internal wave outputs?
> what are commands for that?
>
> CVS         DXG.data             generateGifs.txt  maskInW.meta
>  __pycache__  RF.meta            T.init             W.0000000000.data
> data        DXG.meta             GIF_MOVIES        mitgcmuv
>  RAC.data     RhoRef.data        topog.concave      W.0000000000.meta
> data.obcs   DYC.data             hFacC.data        PH.0000000100.data
>  RAC.meta     RhoRef.meta        topog.convex       W.0000000100.data
> data.pkg    DYC.meta             hFacC.meta        PH.0000000100.meta
>  RAS.data     S.0000000000.data  topog.slope        W.0000000100.meta
> delXvar     DYG.data             hFacS.data        PHL.0000000100.data
> RAS.meta     S.0000000000.meta  U.0000000000.data  XC.data
> Depth.data  DYG.meta             hFacS.meta        PHL.0000000100.meta
> RAW.data     S.0000000100.data  U.0000000000.meta  XC.meta
> Depth.meta  eedata               hFacW.data        PHrefC.data
> RAW.meta     S.0000000100.meta  U.0000000100.data  XG.data
> DRC.data    eedata.mth           hFacW.meta        PHrefC.meta
> RAZ.data     STDERR.0000        U.0000000100.meta  XG.meta
> DRC.meta    Eta.0000000000.data  maskInC.data      PHrefF.data
> RAZ.meta     STDOUT.0000        V.0000000000.data  YC.data
> DRF.data    Eta.0000000000.meta  maskInC.meta      PHrefF.meta
> RC.data      T.0000000000.data  V.0000000000.meta  YC.meta
> DRF.meta    Eta.0000000100.data  maskInS.data      pickup.ckptA.data
> RC.meta      T.0000000000.meta  V.0000000100.data  YG.data
> DXC.data    Eta.0000000100.meta  maskInS.meta      pickup.ckptA.meta
> results      T.0000000100.data  V.0000000100.meta  YG.meta
> DXC.meta    gendata.m            maskInW.data      PNG_IMAGES
>  RF.data      T.0000000100.meta  variables.py
>
> thanks in advance
> saeid
>
>
> --------------------------------------------
> On Thu, 11/10/16, Matthew Mazloff <mmazloff at ucsd.edu> wrote:
>
>  Subject: Re: [MITgcm-support] Hello
>  To: mitgcm-support at mitgcm.org
>  Date: Thursday, November 10, 2016, 2:11 PM
>
>  if you don?t want to
>  compile multicore just don?t add
>  -mpi
>
>  to your compile command.
>
>  Matt
>
>
>  > On Nov 10, 2016, at 11:04
>  AM, smaeilpour <saeid_gal at yahoo.com>
>  wrote:
>  >
>  > Hi
>  again
>  >
>  > Please if
>  it's possible for you, check my error upon my pics
>  sending you, and other idea you have ...
>  >
>  > Best
>  > saeid
>  >
>  >
>  >
>  >
>  >
>  ----------------------------
>  > On Thu,
>  11/10/16, Matthew Mazloff <mmazloff at ucsd.edu>
>  wrote:
>  >
>  > Subject:
>  Re: [MITgcm-support] Hello
>  > To: mitgcm-support at mitgcm.org
>  > Date: Thursday, November 10, 2016, 9:28
>  PM
>  >
>  > This is likely
>  a platform
>  > issue. Most likely your path
>  to your ifort compiler is
>  > wrong.?
>  >
>  > You need to
>  > change your optfile to point to the
>  correct path. If all was
>  > working fine
>  and now it is not then it is likely that
>  > someone updated the fortran compilers on
>  your machine and
>  > the paths have
>  changed.
>  >
>  > Clean
>  out your build folder. Fix your paths.
>  >
>  Try again
>  >
>  > Hope
>  this
>  > helps
>  >
>  > -Matt
>  >
>  >
>  >
>  >> On Nov 10, 2016, at 9:39 AM,
>  smaeilpour
>  > <saeid_gal at yahoo.com>
>  > wrote:
>  >>
>  >> Hi,
>  >>
>  >> I have been having
>  > some problem compiling my code today,
>  after doing
>  >>
>  >>> make depend
>  >>
>  >> I get the
>  following
>  > error
>  >>
>  >>
>  >
>  ../../../tools/cyrus-imapd-makedepend/makedepend: warning
>  > :
>  >>
>  mdsio_readfield.F (reading SUPPORT.h,
>  >
>  line 179): cannot find include
>  >>
>  file
>  > "mpif.h"?
>  >>
>  >>? ? ? ?
>  ? ? not in mpif.h
>  >>? ? ? ? ?
>  ? not in mpif.h
>  >>? ? ? ? ? ?
>  not in???
>  >
>  opt/ifort/8.0.044/include/mpif.h
>  >>
>
>  >
>  ../../../tools/f90makedepend>>makefile
>  >>
>  >>
>  >> and as a result I cannot compile
>  the
>  > code.
>  >> I am
>  sure i have overlooked
>  > something quite
>  simple.
>  >>
>  >>
>  any Idea
>  >>
>  >>
>  thanks a lot in advance
>  >> saeid
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >
>  --------------------------------------------
>  >>
>  >>
>  >>
>  >
>  ------------------------------------------------------------
> ----------------------------
>  >> On Thu, 11/10/16, Jean-Michel
>  Campin
>  > <jmc at mit.edu> wrote:
>  >>
>  >> Subject:
>  Re:
>  > [MITgcm-support] river runoff
>  >> To: mitgcm-support at mitgcm.org
>  >> Date: Thursday, November 10, 2016,
>  10:42
>  > AM
>  >>
>  >> Hi,
>  >>
>  >> There are few
>  >
>  available options for including
>  >>
>  > run-off:
>  >>
>  >> 1) the
>  > most
>  >> commonly used is to include just
>  > in the surface level,
>  >>???as part of
>  > surface forcing (substracted to EmP
>  >>
>  > into EmPmR).
>  >>???Obviously this
>  approach
>  > is not
>  >> great for deep estuary with
>  > high
>  >>???vertical
>  >>
>  > resolution
>  (small dz).
>  >>???And the
>  effect
>  > on
>  >>
>  sea-level is accounted for with
>  >>
>  useRealFreshWaterFlux=.TRUE.,
>  >>???and in a
>  >> consistent
>  > way
>  for any tracers when Non-Lin Freee-surface
>  >> is
>  >>???used.
>  >>???In this case, the
>  >>
>  > run-off can be
>  provide as part of EmPmR or
>  >>
>  >> separately (e.g.,
>  >
>  using pkg/exf), but only the run-off that
>  >> fall
>  >>???on ocean grid
>  > cell (wet-cell) will be
>  >> considered.
>  >>
>
>  >> 2) If you want
>  >> to address the issue of deep
>  estuaries,
>  > you can
>  >>? ? try to prescribe
>  > a 3-D run-off input (file:
>  >> addMassFile
>  >
>  loaded into
>  >>? ? model 2-D
>  > array
>  >>
>  "addMass") using
>  >
>  selectAddFluid=1.
>  >>? ? This
>  > requires to compile with #define
>  >>
>  >
>  ALLOW_ADDFLUID
>  >>
>  >>? ? Note that
>  >> the current code does not provide
>  an
>  > option to prescribe
>  >>? ? time
>  >
>  dependent "addMass" inflow
>  >>
>  > (but should not
>  be difficult to add).
>  >>
>  >
>  >> 3) And the last
>  option, as described
>  > by Andrea,
>  >> is to use OBCS. This enable
>  >
>  >>? ? to
>  account,
>  >> in the momentum budget,
>  for the speed of
>  > the incoming
>  >> run-off.
>  >>? ?
>  Probably useful at very high
>  > to
>  >> high resolution (bot horizontal and
>  > vertical)
>  >>? ?
>  but may be not
>  > so important at lower
>  >> resolution.
>  >>
>
>  >> Cheers,
>  >>
>  Jean-Michel
>  >>
>  >> On
>  >> Wed, Nov
>  09, 2016
>  > at 08:31:34AM +0100, Andrea
>  Cimatoribus
>  >>
>  >
>  wrote:
>  >>> Certainly not the
>  most
>  > expert
>  >>
>  around here, but I have been
>  > dealing
>  >>>
>  >> with
>  > this lately, so I can try an answer.
>  >>>
>  >>> The
>  neatest
>  > way to
>  >>
>  do it is with obcs package, that
>  > is,
>  the open
>  >>> boundary package.
>  In
>  > data.obcs you can
>  >> define the (vertical)
>  > grid
>  >>> faces
>  >>
>  > through which
>  you want to apply the discharge (see
>  >> manual).
>  >>>
>  Using
>  > the correct grid metric,
>  >> you can set
>  > the
>  discharge velocity to
>  >>>
>  >> match the total volume discharge (and
>  you
>  > can easily check
>  >> if you
>  >>>
>  are doing it right using the
>  >>
>  diagnostic output). The simplest way to
>  >>>
>  >> impose
>  a
>  > time-variable discharge and
>  temperature is via the
>  >> exf
>  >>> package, in a
>  >
>  new namelist which is
>  >> provided by
>  the
>  > OBCS package,
>  >>> something
>  >>
>  along these lines:
>  >>>???
>  >>
>  >
>  &EXF_NML_OBCS
>  >>> # OBCS
>  > prescribe
>  >>>?
>  ? obcsEstartdate1???=
>  >>
>  20080101,
>  >>>???
>  >> obcsEstartdate2???=
>  010000,
>  >>>? ?
>  obcsEperiod???
>  >? ? =
>  >> 3600.,
>  >>>?
>  ? obcsWstartdate1???=
>  >>
>  20080101,
>  >>>???
>  >> obcsWstartdate2???=
>  010000,
>  >>>? ?
>  obcsWperiod???
>  >? ? =
>  >> 3600.,
>  >>>?
>  ? &
>  >>> As
>  >> far as I
>  >
>  understand, the temperature of the discharge must
>  >> span
>  >>>
>  exactly the
>  > same time interval and
>  >> have the same
>  >
>  periodicity as the
>  >>>
>  >> velocity.
>  >>>
>  The
>  > file names containing the
>  >> data are
>  > defined
>  in the data.obcs
>  >>>
>  >> (again, see manual).
>  >>>
>  >>> Hope
>  this
>  > helps, best,
>  >>>
>  >>>
>  Andrea
>  >>
>  >
>  Cimatoribus
>  >>> postdoctoral
>  > researcher
>  >>>
>  EPFL ENAC IIE ECOL
>  >>> https://people.epfl.ch/andrea.cimatoribus
>  >>>
>  >>> On
>  09/11/16
>  > 03:26,
>  >> ????????? wrote:
>  >>>> Hi
>  >>>>
>  >
>  >>>> I am using
>  >> mitgcm to simulate SST variation in
>  > coastal area with
>  >>
>  large
>  >>>> runoff. Does anyone
>  tell me
>  >> how to set up the river?
>  How mitgcm
>  > deal
>  >>>> with river mouth?
>  >>>
>  >>>
>  >>>> I've known that the
>  runoff
>  >> should be added to the
>  freshwater flux
>  > EmPmR,
>  >>>> but how to represent the
>  > effect of a
>  >> river
>  by gridded runoff
>  > data is not
>  >>>
>  >>>
>  clear to me (should the river grid
>  >
>  point be contacted
>  >> with ocean
>  >>>> interior or
>  >>
>  > boundary?).
>  >>>>
>  >>>
>
>  >>> It seems
>  >
>  that the test cases in mitgcm do not provide
>  >> enough river
>  >>>>
>  >
>  information.
>  >>>>
>  >>>> I'd
>  >>
>  > appreciate any
>  help.
>  >>>>
>  >>>>
>  >>>
>
>  >>> ------------------
>  >>>> Best
>  >>
>
>  > regards
>  >>>>
>  >>>
>
>  >>> Yu-Kun Qian
>  > (?????????)
>  >>>> Center
>  >> for Monsoon and Environment
>  Research
>  >>>
>  >>> Department
>  > of
>  Atmospheric Sciences
>  >>>
>  >>> School of Environmental Science
>  and
>  > Engineering
>  >>>> Sun Yat-sen
>  > University
>  >>>> No. 135 Xingang West
>  > Road, Haizhu
>  >>
>  District
>  >>>> Guangzhou, 510275,
>  P.R.
>  >> China
>  >>>> Tel;
>  >
>  020-84115227
>  >>>> Email: qianyk at mail3.sysu.edu.cn
>  >> <mailto:qianyk at mail2.sysu.edu.cn>
>  >>>>
>  >>>>
>  >>>>
>  >>>>
>  >>>
>
>  >>>
>  >
>  _______________________________________________
>  >>>> MITgcm-support mailing list
>  >>>> MITgcm-support at mitgcm.org
>  >>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>  >>>
>  >>>
>  >>>
>  >>>
>  >>
>  >
>  _______________________________________________
>  >>> MITgcm-support mailing list
>  >>> MITgcm-support at mitgcm.org
>  >>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>  >>
>  >
>  >>
>  >
>  _______________________________________________
>  >> MITgcm-support mailing list
>  >> MITgcm-support at mitgcm.org
>  >> http://mitgcm.org/mailman/listinfo/mitgcm-support
>  >>
>  >>
>  >>
>  >
>  _______________________________________________
>  >> MITgcm-support mailing list
>  >> MITgcm-support at mitgcm.org
>  >> http://mitgcm.org/mailman/listinfo/mitgcm-support
>  >
>  >
>  >
>  _______________________________________________
>  > MITgcm-support mailing list
>  > MITgcm-support at mitgcm.org
>  > http://mitgcm.org/mailman/listinfo/mitgcm-support<1.jpg>
> _______________________________________________
>  >
>  MITgcm-support mailing list
>  > MITgcm-support at mitgcm.org
>  > http://mitgcm.org/mailman/listinfo/mitgcm-support
>
>
>  _______________________________________________
>  MITgcm-support mailing list
>  MITgcm-support at mitgcm.org
>  http://mitgcm.org/mailman/listinfo/mitgcm-support
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 16 Dec 2016 15:51:09 +0000
> From: Steffie Ypma - CITG <S.L.Ypma at tudelft.nl>
> To: "mitgcm-support at mitgcm.org" <mitgcm-support at mitgcm.org>
> Subject: [MITgcm-support] weird temperature signal using 3D floats
>         with the        FLT package
> Message-ID:
>         <4DE6720049273548B7623438093E21BC0C042AAD at SRV361.tudelft.net>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all,
>
> I have released 3D floats using the FLT package in a very easy set up of
> the MITgcm. I have a 7.5km horizontal resolution in the horizontal, and 20
> levels in the vertical till a depth of 3000m. The basin is closed and a
> cyclonic, warm boundary current is created by restoring temperature in the
> south-east corner between the island and the coast. There is no surface
> forcing. Density is calculated using the linear equation of state and is
> only dependent on temperature.
> The particles are released using the online mode, just after the restoring
> area at y = 40, x = 140:160 and at all depth levels, integrated for the
> duration of 6 months. The figures show:
>
> - temperature.png: surface temperature after 6 months
> - velocity.png: absolute velocity (speed) at surface after 6 months
> - trajectories.png: the path of all particles
> - T_change.png: the temperature change over time of the particles that
> show cooling or warming > 0.5  degrees (24 out of the 181 particles).
>
> I am wondering what could be the cause of the particles jumps in the
> temperature. I have so far not found a correlation between this subset and
> other fields like change in depth, location etc.
> Any ideas are welcome.
>
> Cheers,
> Steffie
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/
> 20161216/556beeec/attachment.htm>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: T_change.png
> Type: image/x-png
> Size: 33128 bytes
> Desc: T_change.png
> URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/
> 20161216/556beeec/attachment.bin>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: temperature.png
> Type: image/x-png
> Size: 41083 bytes
> Desc: temperature.png
> URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/
> 20161216/556beeec/attachment-0001.bin>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: trajectories.png
> Type: image/x-png
> Size: 52000 bytes
> Desc: trajectories.png
> URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/
> 20161216/556beeec/attachment-0002.bin>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: velocity.png
> Type: image/x-png
> Size: 62263 bytes
> Desc: velocity.png
> URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/
> 20161216/556beeec/attachment-0003.bin>
>
> ------------------------------
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
>
>
> End of MITgcm-support Digest, Vol 162, Issue 12
> ***********************************************
>



-- 
Muchas gracias
Josué
http://faraday.fciencias.unam.mx/josue/
<http://faraday.fciencias.unam.mx/~josue/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20161216/405604e0/attachment-0001.htm>


More information about the MITgcm-support mailing list